@nutanix-scratch/licensing-js-client 4.2.1 → 4.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -3
- package/dist/Ntnx-Licensing-js-client-prod.js +1 -1
- package/dist/Ntnx-Licensing-js-client.js +633 -561
- package/dist/es/ApiClient.d.ts +29 -7
- package/dist/es/ApiClient.js +854 -667
- package/dist/es/Paginable.d.ts +1 -1
- package/dist/es/Paginable.js +144 -183
- package/dist/es/apis/enduserlicenseagreement-endpoints.d.ts +1 -1
- package/dist/es/apis/enduserlicenseagreement-endpoints.js +82 -99
- package/dist/es/apis/licensekeys-endpoints.d.ts +47 -2
- package/dist/es/apis/licensekeys-endpoints.js +360 -222
- package/dist/es/apis/licenses-endpoints.d.ts +6 -6
- package/dist/es/apis/licenses-endpoints.js +401 -381
- package/dist/es/index.d.ts +15 -3
- package/dist/es/index.js +387 -339
- package/dist/es/models/common/v1/config/Flag.d.ts +2 -8
- package/dist/es/models/common/v1/config/Flag.js +170 -211
- package/dist/es/models/common/v1/config/KVPair.d.ts +2 -8
- package/dist/es/models/common/v1/config/KVPair.js +225 -270
- package/dist/es/models/common/v1/config/MapOfStringWrapper.d.ts +2 -7
- package/dist/es/models/common/v1/config/MapOfStringWrapper.js +139 -178
- package/dist/es/models/common/v1/config/Message.d.ts +2 -10
- package/dist/es/models/common/v1/config/Message.js +213 -258
- package/dist/es/models/common/v1/config/MessageSeverity.js +7 -9
- package/dist/es/models/common/v1/config/TenantAwareModel.d.ts +2 -7
- package/dist/es/models/common/v1/config/TenantAwareModel.js +137 -177
- package/dist/es/models/common/v1/response/ApiLink.d.ts +2 -8
- package/dist/es/models/common/v1/response/ApiLink.js +165 -206
- package/dist/es/models/common/v1/response/ApiResponseMetadata.d.ts +2 -40
- package/dist/es/models/common/v1/response/ApiResponseMetadata.js +281 -344
- package/dist/es/models/common/v1/response/ExternalizableAbstractModel.d.ts +1 -15
- package/dist/es/models/common/v1/response/ExternalizableAbstractModel.js +154 -202
- package/dist/es/models/licensing/v4/agreements/Acceptance.d.ts +2 -16
- package/dist/es/models/licensing/v4/agreements/Acceptance.js +161 -203
- package/dist/es/models/licensing/v4/agreements/AddUserApiResponse.d.ts +2 -43
- package/dist/es/models/licensing/v4/agreements/AddUserApiResponse.js +209 -264
- package/dist/es/models/licensing/v4/agreements/EndUser.d.ts +2 -10
- package/dist/es/models/licensing/v4/agreements/EndUser.js +226 -271
- package/dist/es/models/licensing/v4/agreements/Eula.d.ts +1 -34
- package/dist/es/models/licensing/v4/agreements/Eula.js +230 -286
- package/dist/es/models/licensing/v4/agreements/GetEulaApiResponse.d.ts +2 -43
- package/dist/es/models/licensing/v4/agreements/GetEulaApiResponse.js +187 -242
- package/dist/es/models/licensing/v4/config/AddLicenseKeyApiResponse.d.ts +2 -46
- package/dist/es/models/licensing/v4/config/AddLicenseKeyApiResponse.js +190 -245
- package/dist/es/models/licensing/v4/config/AddLicenseKeyDryRunApiResponse.d.ts +2 -72
- package/dist/es/models/licensing/v4/config/AddLicenseKeyDryRunApiResponse.js +194 -247
- package/dist/es/models/licensing/v4/config/Allowance.d.ts +1 -27
- package/dist/es/models/licensing/v4/config/Allowance.js +192 -241
- package/dist/es/models/licensing/v4/config/AllowanceDetail.d.ts +2 -10
- package/dist/es/models/licensing/v4/config/AllowanceDetail.js +217 -262
- package/dist/es/models/licensing/v4/config/AllowanceDetailProjection.d.ts +1 -1
- package/dist/es/models/licensing/v4/config/AllowanceDetailProjection.js +74 -103
- package/dist/es/models/licensing/v4/config/AllowanceProjection.d.ts +1 -36
- package/dist/es/models/licensing/v4/config/AllowanceProjection.js +155 -198
- package/dist/es/models/licensing/v4/config/AssignLicenseKeysApiResponse.d.ts +2 -46
- package/dist/es/models/licensing/v4/config/AssignLicenseKeysApiResponse.js +209 -264
- package/dist/es/models/licensing/v4/config/{LicenseKeyAssociationSpec.d.ts → AssociateLicenseKeySpec.d.ts} +11 -24
- package/dist/es/models/licensing/v4/config/AssociateLicenseKeySpec.js +253 -0
- package/dist/es/models/licensing/v4/config/AssociateLicenseKeysApiResponse.d.ts +58 -0
- package/dist/es/models/licensing/v4/config/AssociateLicenseKeysApiResponse.js +310 -0
- package/dist/es/models/licensing/v4/config/AssociationType.js +7 -9
- package/dist/es/models/licensing/v4/config/BaseClusterInfo.d.ts +1 -16
- package/dist/es/models/licensing/v4/config/BaseClusterInfo.js +123 -166
- package/dist/es/models/licensing/v4/config/BaseLicenseInfo.d.ts +1 -20
- package/dist/es/models/licensing/v4/config/BaseLicenseInfo.js +223 -273
- package/dist/es/models/licensing/v4/config/BillingPlan.js +7 -9
- package/dist/es/models/licensing/v4/config/CapacityViolation.d.ts +2 -10
- package/dist/es/models/licensing/v4/config/CapacityViolation.js +210 -255
- package/dist/es/models/licensing/v4/config/ClusterLicenseKeyMapping.d.ts +1 -9
- package/dist/es/models/licensing/v4/config/ClusterLicenseKeyMapping.js +131 -170
- package/dist/es/models/licensing/v4/config/ClusterLicenseKeyMappingProjection.d.ts +1 -1
- package/dist/es/models/licensing/v4/config/ClusterLicenseKeyMappingProjection.js +73 -102
- package/dist/es/models/licensing/v4/config/ClusterType.js +14 -10
- package/dist/es/models/licensing/v4/config/Compliance.d.ts +1 -35
- package/dist/es/models/licensing/v4/config/Compliance.js +192 -241
- package/dist/es/models/licensing/v4/config/ComplianceProjection.d.ts +1 -52
- package/dist/es/models/licensing/v4/config/ComplianceProjection.js +155 -198
- package/dist/es/models/licensing/v4/config/Consumption.d.ts +2 -8
- package/dist/es/models/licensing/v4/config/Consumption.js +168 -209
- package/dist/es/models/licensing/v4/config/ConsumptionProjection.d.ts +1 -1
- package/dist/es/models/licensing/v4/config/ConsumptionProjection.js +74 -103
- package/dist/es/models/licensing/v4/config/ConsumptionType.js +7 -9
- package/dist/es/models/licensing/v4/config/DeleteLicenseKeyApiResponse.d.ts +2 -43
- package/dist/es/models/licensing/v4/config/DeleteLicenseKeyApiResponse.js +190 -245
- package/dist/es/models/licensing/v4/config/DryRunCheck.d.ts +2 -18
- package/dist/es/models/licensing/v4/config/DryRunCheck.js +173 -224
- package/dist/es/models/licensing/v4/config/DryRunStatus.js +7 -9
- package/dist/es/models/licensing/v4/config/DryRunValidationResult.d.ts +2 -23
- package/dist/es/models/licensing/v4/config/DryRunValidationResult.js +154 -207
- package/dist/es/models/licensing/v4/config/EnforcementActions.js +7 -9
- package/dist/es/models/licensing/v4/config/EnforcementLevel.js +7 -9
- package/dist/es/models/licensing/v4/config/EnforcementPolicy.js +7 -9
- package/dist/es/models/licensing/v4/config/Entitlement.d.ts +1 -33
- package/dist/es/models/licensing/v4/config/Entitlement.js +245 -298
- package/dist/es/models/licensing/v4/config/EntitlementDetail.d.ts +2 -14
- package/dist/es/models/licensing/v4/config/EntitlementDetail.js +308 -361
- package/dist/es/models/licensing/v4/config/EntitlementDetailProjection.d.ts +1 -1
- package/dist/es/models/licensing/v4/config/EntitlementDetailProjection.js +74 -103
- package/dist/es/models/licensing/v4/config/EntitlementProjection.d.ts +1 -46
- package/dist/es/models/licensing/v4/config/EntitlementProjection.js +165 -204
- package/dist/es/models/licensing/v4/config/ExpiredLicense.d.ts +1 -23
- package/dist/es/models/licensing/v4/config/ExpiredLicense.js +203 -239
- package/dist/es/models/licensing/v4/config/Feature.d.ts +1 -22
- package/dist/es/models/licensing/v4/config/Feature.js +285 -343
- package/dist/es/models/licensing/v4/config/FeatureDetail.d.ts +2 -9
- package/dist/es/models/licensing/v4/config/FeatureDetail.js +198 -241
- package/dist/es/models/licensing/v4/config/FeatureProjection.d.ts +1 -1
- package/dist/es/models/licensing/v4/config/FeatureProjection.js +74 -103
- package/dist/es/models/licensing/v4/config/FeatureViolation.d.ts +1 -10
- package/dist/es/models/licensing/v4/config/FeatureViolation.js +136 -173
- package/dist/es/models/licensing/v4/config/GetLicenseKeyApiResponse.d.ts +2 -43
- package/dist/es/models/licensing/v4/config/GetLicenseKeyApiResponse.js +187 -242
- package/dist/es/models/licensing/v4/config/License.d.ts +1 -31
- package/dist/es/models/licensing/v4/config/License.js +262 -306
- package/dist/es/models/licensing/v4/config/LicenseCategory.js +14 -10
- package/dist/es/models/licensing/v4/config/LicenseClass.js +7 -9
- package/dist/es/models/licensing/v4/config/LicenseKey.d.ts +1 -42
- package/dist/es/models/licensing/v4/config/LicenseKey.js +410 -483
- package/dist/es/models/licensing/v4/config/LicenseKeyAssignment.d.ts +2 -14
- package/dist/es/models/licensing/v4/config/LicenseKeyAssignment.js +178 -223
- package/dist/es/models/licensing/v4/config/LicenseKeyAssignmentSpec.d.ts +2 -19
- package/dist/es/models/licensing/v4/config/LicenseKeyAssignmentSpec.js +152 -195
- package/dist/es/models/licensing/v4/config/LicenseKeyAssociation.d.ts +2 -10
- package/dist/es/models/licensing/v4/config/LicenseKeyAssociation.js +215 -261
- package/dist/es/models/licensing/v4/config/LicenseKeyAssociationProjection.d.ts +1 -1
- package/dist/es/models/licensing/v4/config/LicenseKeyAssociationProjection.js +73 -102
- package/dist/es/models/licensing/v4/config/LicenseKeyMapping.d.ts +2 -8
- package/dist/es/models/licensing/v4/config/LicenseKeyMapping.js +168 -209
- package/dist/es/models/licensing/v4/config/LicenseKeyProjection.d.ts +1 -61
- package/dist/es/models/licensing/v4/config/LicenseKeyProjection.js +217 -254
- package/dist/es/models/licensing/v4/config/LicenseKeySubCategory.js +7 -9
- package/dist/es/models/licensing/v4/config/LicenseProjection.d.ts +1 -38
- package/dist/es/models/licensing/v4/config/LicenseProjection.js +187 -217
- package/dist/es/models/licensing/v4/config/LicenseStateSyncSpec.d.ts +2 -9
- package/dist/es/models/licensing/v4/config/LicenseStateSyncSpec.js +203 -246
- package/dist/es/models/licensing/v4/config/LicenseType.js +7 -9
- package/dist/es/models/licensing/v4/config/ListAllowancesApiResponse.d.ts +2 -43
- package/dist/es/models/licensing/v4/config/ListAllowancesApiResponse.js +213 -268
- package/dist/es/models/licensing/v4/config/ListCompliancesApiResponse.d.ts +2 -43
- package/dist/es/models/licensing/v4/config/ListCompliancesApiResponse.js +213 -268
- package/dist/es/models/licensing/v4/config/ListEntitlementsApiResponse.d.ts +2 -43
- package/dist/es/models/licensing/v4/config/ListEntitlementsApiResponse.js +213 -268
- package/dist/es/models/licensing/v4/config/ListFeaturesApiResponse.d.ts +2 -43
- package/dist/es/models/licensing/v4/config/ListFeaturesApiResponse.js +213 -268
- package/dist/es/models/licensing/v4/config/ListLicenseKeysApiResponse.d.ts +2 -43
- package/dist/es/models/licensing/v4/config/ListLicenseKeysApiResponse.js +213 -268
- package/dist/es/models/licensing/v4/config/ListLicensesApiResponse.d.ts +2 -43
- package/dist/es/models/licensing/v4/config/ListLicensesApiResponse.js +213 -268
- package/dist/es/models/licensing/v4/config/ListReclaimLicenseTokensApiResponse.d.ts +59 -0
- package/dist/es/models/licensing/v4/config/ListReclaimLicenseTokensApiResponse.js +315 -0
- package/dist/es/models/licensing/v4/config/ListRecommendationsApiResponse.d.ts +2 -43
- package/dist/es/models/licensing/v4/config/ListRecommendationsApiResponse.js +209 -264
- package/dist/es/models/licensing/v4/config/ListSettingsApiResponse.d.ts +2 -43
- package/dist/es/models/licensing/v4/config/ListSettingsApiResponse.js +209 -264
- package/dist/es/models/licensing/v4/config/ListViolationsApiResponse.d.ts +2 -43
- package/dist/es/models/licensing/v4/config/ListViolationsApiResponse.js +209 -264
- package/dist/es/models/licensing/v4/config/LogicalVersion.d.ts +2 -8
- package/dist/es/models/licensing/v4/config/LogicalVersion.js +166 -207
- package/dist/es/models/licensing/v4/config/Meter.js +7 -9
- package/dist/es/models/licensing/v4/config/OperationType.js +7 -9
- package/dist/es/models/licensing/v4/config/PortalSetting.d.ts +2 -9
- package/dist/es/models/licensing/v4/config/PortalSetting.js +194 -238
- package/dist/es/models/licensing/v4/config/PostPaidCategory.js +7 -9
- package/dist/es/models/licensing/v4/config/PostPaidConfig.d.ts +2 -11
- package/dist/es/models/licensing/v4/config/PostPaidConfig.js +237 -284
- package/dist/es/models/licensing/v4/config/ProductName.js +15 -11
- package/dist/es/models/licensing/v4/config/ReclaimLicenseKeyApiResponse.d.ts +58 -0
- package/dist/es/models/licensing/v4/config/ReclaimLicenseKeyApiResponse.js +310 -0
- package/dist/es/models/licensing/v4/config/ReclaimLicenseKeySpec.d.ts +59 -0
- package/dist/es/models/licensing/v4/config/ReclaimLicenseKeySpec.js +248 -0
- package/dist/es/models/licensing/v4/config/ReclaimLicenseToken.d.ts +57 -0
- package/dist/es/models/licensing/v4/config/ReclaimLicenseToken.js +342 -0
- package/dist/es/models/licensing/v4/config/ReclaimLicenseTokenProjection.d.ts +10 -0
- package/dist/es/models/licensing/v4/config/ReclaimLicenseTokenProjection.js +123 -0
- package/dist/es/models/licensing/v4/config/ReclaimType.js +7 -9
- package/dist/es/models/licensing/v4/config/Recommendation.d.ts +1 -25
- package/dist/es/models/licensing/v4/config/Recommendation.js +136 -182
- package/dist/es/models/licensing/v4/config/RecommendationDetail.d.ts +2 -11
- package/dist/es/models/licensing/v4/config/RecommendationDetail.js +241 -288
- package/dist/es/models/licensing/v4/config/RecommendationScope.js +7 -9
- package/dist/es/models/licensing/v4/config/ResetScope.js +7 -9
- package/dist/es/models/licensing/v4/config/Scope.js +7 -9
- package/dist/es/models/licensing/v4/config/Service.d.ts +2 -18
- package/dist/es/models/licensing/v4/config/Service.js +278 -331
- package/dist/es/models/licensing/v4/config/ServiceProjection.d.ts +1 -1
- package/dist/es/models/licensing/v4/config/ServiceProjection.js +74 -103
- package/dist/es/models/licensing/v4/config/ServiceViolation.d.ts +2 -8
- package/dist/es/models/licensing/v4/config/ServiceViolation.js +164 -205
- package/dist/es/models/licensing/v4/config/ServiceViolationType.js +7 -9
- package/dist/es/models/licensing/v4/config/Setting.d.ts +1 -40
- package/dist/es/models/licensing/v4/config/Setting.js +325 -382
- package/dist/es/models/licensing/v4/config/Status.js +7 -9
- package/dist/es/models/licensing/v4/config/SubCategory.js +7 -9
- package/dist/es/models/licensing/v4/config/SyncLicenseStateApiResponse.d.ts +2 -43
- package/dist/es/models/licensing/v4/config/SyncLicenseStateApiResponse.js +187 -242
- package/dist/es/models/licensing/v4/config/SyncOperationType.js +7 -9
- package/dist/es/models/licensing/v4/config/Trial.d.ts +1 -20
- package/dist/es/models/licensing/v4/config/Trial.js +218 -270
- package/dist/es/models/licensing/v4/config/TrialCategory.js +7 -9
- package/dist/es/models/licensing/v4/config/TrialProjection.d.ts +1 -1
- package/dist/es/models/licensing/v4/config/TrialProjection.js +74 -103
- package/dist/es/models/licensing/v4/config/TrialStatus.js +7 -9
- package/dist/es/models/licensing/v4/config/TrialType.js +7 -9
- package/dist/es/models/licensing/v4/config/ValueType.js +7 -9
- package/dist/es/models/licensing/v4/config/Violation.d.ts +1 -56
- package/dist/es/models/licensing/v4/config/Violation.js +211 -268
- package/dist/es/models/licensing/v4/error/AppMessage.d.ts +2 -12
- package/dist/es/models/licensing/v4/error/AppMessage.js +264 -313
- package/dist/es/models/licensing/v4/error/ErrorResponse.d.ts +2 -7
- package/dist/es/models/licensing/v4/error/ErrorResponse.js +178 -218
- package/dist/es/models/licensing/v4/error/SchemaValidationError.d.ts +2 -18
- package/dist/es/models/licensing/v4/error/SchemaValidationError.js +249 -300
- package/dist/es/models/licensing/v4/error/SchemaValidationErrorMessage.d.ts +2 -9
- package/dist/es/models/licensing/v4/error/SchemaValidationErrorMessage.js +191 -234
- package/dist/es/models/prism/v4/config/TaskReference.d.ts +2 -7
- package/dist/es/models/prism/v4/config/TaskReference.js +142 -181
- package/dist/es/models/validation/ValidationError.js +26 -42
- package/dist/es/models/validation/ValidationScopes.js +3 -3
- package/dist/es/utils/ValidationUtils.js +39 -69
- package/dist/lib/ApiClient.d.ts +29 -7
- package/dist/lib/ApiClient.js +854 -667
- package/dist/lib/Paginable.d.ts +1 -1
- package/dist/lib/Paginable.js +144 -183
- package/dist/lib/apis/enduserlicenseagreement-endpoints.d.ts +1 -1
- package/dist/lib/apis/enduserlicenseagreement-endpoints.js +82 -99
- package/dist/lib/apis/licensekeys-endpoints.d.ts +47 -2
- package/dist/lib/apis/licensekeys-endpoints.js +360 -222
- package/dist/lib/apis/licenses-endpoints.d.ts +6 -6
- package/dist/lib/apis/licenses-endpoints.js +401 -381
- package/dist/lib/index.d.ts +15 -3
- package/dist/lib/index.js +387 -339
- package/dist/lib/models/common/v1/config/Flag.d.ts +2 -8
- package/dist/lib/models/common/v1/config/Flag.js +170 -211
- package/dist/lib/models/common/v1/config/KVPair.d.ts +2 -8
- package/dist/lib/models/common/v1/config/KVPair.js +225 -270
- package/dist/lib/models/common/v1/config/MapOfStringWrapper.d.ts +2 -7
- package/dist/lib/models/common/v1/config/MapOfStringWrapper.js +139 -178
- package/dist/lib/models/common/v1/config/Message.d.ts +2 -10
- package/dist/lib/models/common/v1/config/Message.js +213 -258
- package/dist/lib/models/common/v1/config/MessageSeverity.js +7 -9
- package/dist/lib/models/common/v1/config/TenantAwareModel.d.ts +2 -7
- package/dist/lib/models/common/v1/config/TenantAwareModel.js +137 -177
- package/dist/lib/models/common/v1/response/ApiLink.d.ts +2 -8
- package/dist/lib/models/common/v1/response/ApiLink.js +165 -206
- package/dist/lib/models/common/v1/response/ApiResponseMetadata.d.ts +2 -40
- package/dist/lib/models/common/v1/response/ApiResponseMetadata.js +281 -344
- package/dist/lib/models/common/v1/response/ExternalizableAbstractModel.d.ts +1 -15
- package/dist/lib/models/common/v1/response/ExternalizableAbstractModel.js +154 -202
- package/dist/lib/models/licensing/v4/agreements/Acceptance.d.ts +2 -16
- package/dist/lib/models/licensing/v4/agreements/Acceptance.js +161 -203
- package/dist/lib/models/licensing/v4/agreements/AddUserApiResponse.d.ts +2 -43
- package/dist/lib/models/licensing/v4/agreements/AddUserApiResponse.js +209 -264
- package/dist/lib/models/licensing/v4/agreements/EndUser.d.ts +2 -10
- package/dist/lib/models/licensing/v4/agreements/EndUser.js +226 -271
- package/dist/lib/models/licensing/v4/agreements/Eula.d.ts +1 -34
- package/dist/lib/models/licensing/v4/agreements/Eula.js +230 -286
- package/dist/lib/models/licensing/v4/agreements/GetEulaApiResponse.d.ts +2 -43
- package/dist/lib/models/licensing/v4/agreements/GetEulaApiResponse.js +187 -242
- package/dist/lib/models/licensing/v4/config/AddLicenseKeyApiResponse.d.ts +2 -46
- package/dist/lib/models/licensing/v4/config/AddLicenseKeyApiResponse.js +190 -245
- package/dist/lib/models/licensing/v4/config/AddLicenseKeyDryRunApiResponse.d.ts +2 -72
- package/dist/lib/models/licensing/v4/config/AddLicenseKeyDryRunApiResponse.js +194 -247
- package/dist/lib/models/licensing/v4/config/Allowance.d.ts +1 -27
- package/dist/lib/models/licensing/v4/config/Allowance.js +192 -241
- package/dist/lib/models/licensing/v4/config/AllowanceDetail.d.ts +2 -10
- package/dist/lib/models/licensing/v4/config/AllowanceDetail.js +217 -262
- package/dist/lib/models/licensing/v4/config/AllowanceDetailProjection.d.ts +1 -1
- package/dist/lib/models/licensing/v4/config/AllowanceDetailProjection.js +74 -103
- package/dist/lib/models/licensing/v4/config/AllowanceProjection.d.ts +1 -36
- package/dist/lib/models/licensing/v4/config/AllowanceProjection.js +155 -198
- package/dist/lib/models/licensing/v4/config/AssignLicenseKeysApiResponse.d.ts +2 -46
- package/dist/lib/models/licensing/v4/config/AssignLicenseKeysApiResponse.js +209 -264
- package/dist/lib/models/licensing/v4/config/{LicenseKeyAssociationSpec.d.ts → AssociateLicenseKeySpec.d.ts} +11 -24
- package/dist/lib/models/licensing/v4/config/AssociateLicenseKeySpec.js +253 -0
- package/dist/lib/models/licensing/v4/config/AssociateLicenseKeysApiResponse.d.ts +58 -0
- package/dist/lib/models/licensing/v4/config/AssociateLicenseKeysApiResponse.js +310 -0
- package/dist/lib/models/licensing/v4/config/AssociationType.js +7 -9
- package/dist/lib/models/licensing/v4/config/BaseClusterInfo.d.ts +1 -16
- package/dist/lib/models/licensing/v4/config/BaseClusterInfo.js +123 -166
- package/dist/lib/models/licensing/v4/config/BaseLicenseInfo.d.ts +1 -20
- package/dist/lib/models/licensing/v4/config/BaseLicenseInfo.js +223 -273
- package/dist/lib/models/licensing/v4/config/BillingPlan.js +7 -9
- package/dist/lib/models/licensing/v4/config/CapacityViolation.d.ts +2 -10
- package/dist/lib/models/licensing/v4/config/CapacityViolation.js +210 -255
- package/dist/lib/models/licensing/v4/config/ClusterLicenseKeyMapping.d.ts +1 -9
- package/dist/lib/models/licensing/v4/config/ClusterLicenseKeyMapping.js +131 -170
- package/dist/lib/models/licensing/v4/config/ClusterLicenseKeyMappingProjection.d.ts +1 -1
- package/dist/lib/models/licensing/v4/config/ClusterLicenseKeyMappingProjection.js +73 -102
- package/dist/lib/models/licensing/v4/config/ClusterType.js +14 -10
- package/dist/lib/models/licensing/v4/config/Compliance.d.ts +1 -35
- package/dist/lib/models/licensing/v4/config/Compliance.js +192 -241
- package/dist/lib/models/licensing/v4/config/ComplianceProjection.d.ts +1 -52
- package/dist/lib/models/licensing/v4/config/ComplianceProjection.js +155 -198
- package/dist/lib/models/licensing/v4/config/Consumption.d.ts +2 -8
- package/dist/lib/models/licensing/v4/config/Consumption.js +168 -209
- package/dist/lib/models/licensing/v4/config/ConsumptionProjection.d.ts +1 -1
- package/dist/lib/models/licensing/v4/config/ConsumptionProjection.js +74 -103
- package/dist/lib/models/licensing/v4/config/ConsumptionType.js +7 -9
- package/dist/lib/models/licensing/v4/config/DeleteLicenseKeyApiResponse.d.ts +2 -43
- package/dist/lib/models/licensing/v4/config/DeleteLicenseKeyApiResponse.js +190 -245
- package/dist/lib/models/licensing/v4/config/DryRunCheck.d.ts +2 -18
- package/dist/lib/models/licensing/v4/config/DryRunCheck.js +173 -224
- package/dist/lib/models/licensing/v4/config/DryRunStatus.js +7 -9
- package/dist/lib/models/licensing/v4/config/DryRunValidationResult.d.ts +2 -23
- package/dist/lib/models/licensing/v4/config/DryRunValidationResult.js +154 -207
- package/dist/lib/models/licensing/v4/config/EnforcementActions.js +7 -9
- package/dist/lib/models/licensing/v4/config/EnforcementLevel.js +7 -9
- package/dist/lib/models/licensing/v4/config/EnforcementPolicy.js +7 -9
- package/dist/lib/models/licensing/v4/config/Entitlement.d.ts +1 -33
- package/dist/lib/models/licensing/v4/config/Entitlement.js +245 -298
- package/dist/lib/models/licensing/v4/config/EntitlementDetail.d.ts +2 -14
- package/dist/lib/models/licensing/v4/config/EntitlementDetail.js +308 -361
- package/dist/lib/models/licensing/v4/config/EntitlementDetailProjection.d.ts +1 -1
- package/dist/lib/models/licensing/v4/config/EntitlementDetailProjection.js +74 -103
- package/dist/lib/models/licensing/v4/config/EntitlementProjection.d.ts +1 -46
- package/dist/lib/models/licensing/v4/config/EntitlementProjection.js +165 -204
- package/dist/lib/models/licensing/v4/config/ExpiredLicense.d.ts +1 -23
- package/dist/lib/models/licensing/v4/config/ExpiredLicense.js +203 -239
- package/dist/lib/models/licensing/v4/config/Feature.d.ts +1 -22
- package/dist/lib/models/licensing/v4/config/Feature.js +285 -343
- package/dist/lib/models/licensing/v4/config/FeatureDetail.d.ts +2 -9
- package/dist/lib/models/licensing/v4/config/FeatureDetail.js +198 -241
- package/dist/lib/models/licensing/v4/config/FeatureProjection.d.ts +1 -1
- package/dist/lib/models/licensing/v4/config/FeatureProjection.js +74 -103
- package/dist/lib/models/licensing/v4/config/FeatureViolation.d.ts +1 -10
- package/dist/lib/models/licensing/v4/config/FeatureViolation.js +136 -173
- package/dist/lib/models/licensing/v4/config/GetLicenseKeyApiResponse.d.ts +2 -43
- package/dist/lib/models/licensing/v4/config/GetLicenseKeyApiResponse.js +187 -242
- package/dist/lib/models/licensing/v4/config/License.d.ts +1 -31
- package/dist/lib/models/licensing/v4/config/License.js +262 -306
- package/dist/lib/models/licensing/v4/config/LicenseCategory.js +14 -10
- package/dist/lib/models/licensing/v4/config/LicenseClass.js +7 -9
- package/dist/lib/models/licensing/v4/config/LicenseKey.d.ts +1 -42
- package/dist/lib/models/licensing/v4/config/LicenseKey.js +410 -483
- package/dist/lib/models/licensing/v4/config/LicenseKeyAssignment.d.ts +2 -14
- package/dist/lib/models/licensing/v4/config/LicenseKeyAssignment.js +178 -223
- package/dist/lib/models/licensing/v4/config/LicenseKeyAssignmentSpec.d.ts +2 -19
- package/dist/lib/models/licensing/v4/config/LicenseKeyAssignmentSpec.js +152 -195
- package/dist/lib/models/licensing/v4/config/LicenseKeyAssociation.d.ts +2 -10
- package/dist/lib/models/licensing/v4/config/LicenseKeyAssociation.js +215 -261
- package/dist/lib/models/licensing/v4/config/LicenseKeyAssociationProjection.d.ts +1 -1
- package/dist/lib/models/licensing/v4/config/LicenseKeyAssociationProjection.js +73 -102
- package/dist/lib/models/licensing/v4/config/LicenseKeyMapping.d.ts +2 -8
- package/dist/lib/models/licensing/v4/config/LicenseKeyMapping.js +168 -209
- package/dist/lib/models/licensing/v4/config/LicenseKeyProjection.d.ts +1 -61
- package/dist/lib/models/licensing/v4/config/LicenseKeyProjection.js +217 -254
- package/dist/lib/models/licensing/v4/config/LicenseKeySubCategory.js +7 -9
- package/dist/lib/models/licensing/v4/config/LicenseProjection.d.ts +1 -38
- package/dist/lib/models/licensing/v4/config/LicenseProjection.js +187 -217
- package/dist/lib/models/licensing/v4/config/LicenseStateSyncSpec.d.ts +2 -9
- package/dist/lib/models/licensing/v4/config/LicenseStateSyncSpec.js +203 -246
- package/dist/lib/models/licensing/v4/config/LicenseType.js +7 -9
- package/dist/lib/models/licensing/v4/config/ListAllowancesApiResponse.d.ts +2 -43
- package/dist/lib/models/licensing/v4/config/ListAllowancesApiResponse.js +213 -268
- package/dist/lib/models/licensing/v4/config/ListCompliancesApiResponse.d.ts +2 -43
- package/dist/lib/models/licensing/v4/config/ListCompliancesApiResponse.js +213 -268
- package/dist/lib/models/licensing/v4/config/ListEntitlementsApiResponse.d.ts +2 -43
- package/dist/lib/models/licensing/v4/config/ListEntitlementsApiResponse.js +213 -268
- package/dist/lib/models/licensing/v4/config/ListFeaturesApiResponse.d.ts +2 -43
- package/dist/lib/models/licensing/v4/config/ListFeaturesApiResponse.js +213 -268
- package/dist/lib/models/licensing/v4/config/ListLicenseKeysApiResponse.d.ts +2 -43
- package/dist/lib/models/licensing/v4/config/ListLicenseKeysApiResponse.js +213 -268
- package/dist/lib/models/licensing/v4/config/ListLicensesApiResponse.d.ts +2 -43
- package/dist/lib/models/licensing/v4/config/ListLicensesApiResponse.js +213 -268
- package/dist/lib/models/licensing/v4/config/ListReclaimLicenseTokensApiResponse.d.ts +59 -0
- package/dist/lib/models/licensing/v4/config/ListReclaimLicenseTokensApiResponse.js +315 -0
- package/dist/lib/models/licensing/v4/config/ListRecommendationsApiResponse.d.ts +2 -43
- package/dist/lib/models/licensing/v4/config/ListRecommendationsApiResponse.js +209 -264
- package/dist/lib/models/licensing/v4/config/ListSettingsApiResponse.d.ts +2 -43
- package/dist/lib/models/licensing/v4/config/ListSettingsApiResponse.js +209 -264
- package/dist/lib/models/licensing/v4/config/ListViolationsApiResponse.d.ts +2 -43
- package/dist/lib/models/licensing/v4/config/ListViolationsApiResponse.js +209 -264
- package/dist/lib/models/licensing/v4/config/LogicalVersion.d.ts +2 -8
- package/dist/lib/models/licensing/v4/config/LogicalVersion.js +166 -207
- package/dist/lib/models/licensing/v4/config/Meter.js +7 -9
- package/dist/lib/models/licensing/v4/config/OperationType.js +7 -9
- package/dist/lib/models/licensing/v4/config/PortalSetting.d.ts +2 -9
- package/dist/lib/models/licensing/v4/config/PortalSetting.js +194 -238
- package/dist/lib/models/licensing/v4/config/PostPaidCategory.js +7 -9
- package/dist/lib/models/licensing/v4/config/PostPaidConfig.d.ts +2 -11
- package/dist/lib/models/licensing/v4/config/PostPaidConfig.js +237 -284
- package/dist/lib/models/licensing/v4/config/ProductName.js +15 -11
- package/dist/lib/models/licensing/v4/config/ReclaimLicenseKeyApiResponse.d.ts +58 -0
- package/dist/lib/models/licensing/v4/config/ReclaimLicenseKeyApiResponse.js +310 -0
- package/dist/lib/models/licensing/v4/config/ReclaimLicenseKeySpec.d.ts +59 -0
- package/dist/lib/models/licensing/v4/config/ReclaimLicenseKeySpec.js +248 -0
- package/dist/lib/models/licensing/v4/config/ReclaimLicenseToken.d.ts +57 -0
- package/dist/lib/models/licensing/v4/config/ReclaimLicenseToken.js +342 -0
- package/dist/lib/models/licensing/v4/config/ReclaimLicenseTokenProjection.d.ts +10 -0
- package/dist/lib/models/licensing/v4/config/ReclaimLicenseTokenProjection.js +123 -0
- package/dist/lib/models/licensing/v4/config/ReclaimType.js +7 -9
- package/dist/lib/models/licensing/v4/config/Recommendation.d.ts +1 -25
- package/dist/lib/models/licensing/v4/config/Recommendation.js +136 -182
- package/dist/lib/models/licensing/v4/config/RecommendationDetail.d.ts +2 -11
- package/dist/lib/models/licensing/v4/config/RecommendationDetail.js +241 -288
- package/dist/lib/models/licensing/v4/config/RecommendationScope.js +7 -9
- package/dist/lib/models/licensing/v4/config/ResetScope.js +7 -9
- package/dist/lib/models/licensing/v4/config/Scope.js +7 -9
- package/dist/lib/models/licensing/v4/config/Service.d.ts +2 -18
- package/dist/lib/models/licensing/v4/config/Service.js +278 -331
- package/dist/lib/models/licensing/v4/config/ServiceProjection.d.ts +1 -1
- package/dist/lib/models/licensing/v4/config/ServiceProjection.js +74 -103
- package/dist/lib/models/licensing/v4/config/ServiceViolation.d.ts +2 -8
- package/dist/lib/models/licensing/v4/config/ServiceViolation.js +164 -205
- package/dist/lib/models/licensing/v4/config/ServiceViolationType.js +7 -9
- package/dist/lib/models/licensing/v4/config/Setting.d.ts +1 -40
- package/dist/lib/models/licensing/v4/config/Setting.js +325 -382
- package/dist/lib/models/licensing/v4/config/Status.js +7 -9
- package/dist/lib/models/licensing/v4/config/SubCategory.js +7 -9
- package/dist/lib/models/licensing/v4/config/SyncLicenseStateApiResponse.d.ts +2 -43
- package/dist/lib/models/licensing/v4/config/SyncLicenseStateApiResponse.js +187 -242
- package/dist/lib/models/licensing/v4/config/SyncOperationType.js +7 -9
- package/dist/lib/models/licensing/v4/config/Trial.d.ts +1 -20
- package/dist/lib/models/licensing/v4/config/Trial.js +218 -270
- package/dist/lib/models/licensing/v4/config/TrialCategory.js +7 -9
- package/dist/lib/models/licensing/v4/config/TrialProjection.d.ts +1 -1
- package/dist/lib/models/licensing/v4/config/TrialProjection.js +74 -103
- package/dist/lib/models/licensing/v4/config/TrialStatus.js +7 -9
- package/dist/lib/models/licensing/v4/config/TrialType.js +7 -9
- package/dist/lib/models/licensing/v4/config/ValueType.js +7 -9
- package/dist/lib/models/licensing/v4/config/Violation.d.ts +1 -56
- package/dist/lib/models/licensing/v4/config/Violation.js +211 -268
- package/dist/lib/models/licensing/v4/error/AppMessage.d.ts +2 -12
- package/dist/lib/models/licensing/v4/error/AppMessage.js +264 -313
- package/dist/lib/models/licensing/v4/error/ErrorResponse.d.ts +2 -7
- package/dist/lib/models/licensing/v4/error/ErrorResponse.js +178 -218
- package/dist/lib/models/licensing/v4/error/SchemaValidationError.d.ts +2 -18
- package/dist/lib/models/licensing/v4/error/SchemaValidationError.js +249 -300
- package/dist/lib/models/licensing/v4/error/SchemaValidationErrorMessage.d.ts +2 -9
- package/dist/lib/models/licensing/v4/error/SchemaValidationErrorMessage.js +191 -234
- package/dist/lib/models/prism/v4/config/TaskReference.d.ts +2 -7
- package/dist/lib/models/prism/v4/config/TaskReference.js +142 -181
- package/dist/lib/models/validation/ValidationError.js +26 -42
- package/dist/lib/models/validation/ValidationScopes.js +3 -3
- package/dist/lib/utils/ValidationUtils.js +39 -69
- package/package.json +1 -1
- package/dist/es/models/licensing/v4/config/LicenseKeyAssociationSpec.js +0 -296
- package/dist/lib/models/licensing/v4/config/LicenseKeyAssociationSpec.js +0 -296
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _LicenseKeyAssociation = _interopRequireDefault(require("./LicenseKeyAssociation"));
|
|
8
|
+
var _ValidationScopes = _interopRequireDefault(require("../../../validation/ValidationScopes"));
|
|
9
|
+
var _ValidationUtils = _interopRequireDefault(require("../../../../utils/ValidationUtils"));
|
|
10
|
+
var _ValidationError = _interopRequireDefault(require("../../../validation/ValidationError"));
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
function _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }
|
|
13
|
+
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); } /*
|
|
14
|
+
* Nutanix Licensing APIs
|
|
15
|
+
*
|
|
16
|
+
* OpenAPI spec version: 4.3.2
|
|
17
|
+
*
|
|
18
|
+
* NOTE: This class is auto generated by the Open API Dev Platform.
|
|
19
|
+
*
|
|
20
|
+
* Open API Dev Platform Codegen version: 17.5.1.10573-RELEASE
|
|
21
|
+
*
|
|
22
|
+
* Do not edit the class manually.
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
/**
|
|
26
|
+
* The AssociateLicenseKeySpec model module.
|
|
27
|
+
* @module Ntnx/AssociateLicenseKeySpec
|
|
28
|
+
* @version 4.3.2
|
|
29
|
+
* @class AssociateLicenseKeySpec
|
|
30
|
+
*
|
|
31
|
+
* @param { LicenseKeyAssociation[] } keyAssociations Model containing parent key, associated key, association and reclaim rules.
|
|
32
|
+
*/
|
|
33
|
+
var _AssociateLicenseKeySpec_brand = /*#__PURE__*/new WeakSet();
|
|
34
|
+
class AssociateLicenseKeySpec {
|
|
35
|
+
/**
|
|
36
|
+
* Constructs a new <code>AssociateLicenseKeySpec</code>.
|
|
37
|
+
* Payload containing array of key association for associate license key operation.
|
|
38
|
+
* @alias module:Ntnx/AssociateLicenseKeySpec
|
|
39
|
+
*
|
|
40
|
+
* @param { LicenseKeyAssociation[] } keyAssociations Model containing parent key, associated key, association and reclaim rules.
|
|
41
|
+
*/
|
|
42
|
+
constructor(keyAssociations) {
|
|
43
|
+
/*
|
|
44
|
+
* toJson method for a map type which supports map with primitive keys and values of object types
|
|
45
|
+
* @param {Object} obj
|
|
46
|
+
* @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.
|
|
47
|
+
* Otherwise, just returns the input object.
|
|
48
|
+
*/
|
|
49
|
+
_classPrivateMethodInitSpec(this, _AssociateLicenseKeySpec_brand);
|
|
50
|
+
this.keyAssociations = keyAssociations;
|
|
51
|
+
this.$objectType = "licensing.v4.config.AssociateLicenseKeySpec";
|
|
52
|
+
/** @type {object<string, any>} */
|
|
53
|
+
this.$reserved = {
|
|
54
|
+
'$fv': "v4.r3"
|
|
55
|
+
};
|
|
56
|
+
/** @type {object<string, any>} */
|
|
57
|
+
this.$unknownFields = {};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Constructs a <code>AssociateLicenseKeySpec</code> from a plain JavaScript object, optionally creating a new instance.
|
|
62
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
63
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
64
|
+
* @param {module:Ntnx/AssociateLicenseKeySpec} obj Optional instance to populate.
|
|
65
|
+
* @param callFromChild {Boolean} Flag to recognise calling instance
|
|
66
|
+
* @return {module:Ntnx/AssociateLicenseKeySpec} The populated <code>AssociateLicenseKeySpec</code> instance.
|
|
67
|
+
*/
|
|
68
|
+
static constructFromObject(data, obj = null, callFromChild = false) {
|
|
69
|
+
let items, item, i, itemArr, discriminator;
|
|
70
|
+
if (data) {
|
|
71
|
+
obj = obj || new AssociateLicenseKeySpec();
|
|
72
|
+
if (data.hasOwnProperty('keyAssociations') && data.keyAssociations !== null && data.keyAssociations !== undefined) {
|
|
73
|
+
itemArr = [];
|
|
74
|
+
items = data.keyAssociations;
|
|
75
|
+
for (i = 0; i < items.length; i++) {
|
|
76
|
+
item = _LicenseKeyAssociation.default.constructFromObject(items[i], undefined);
|
|
77
|
+
itemArr.push(item);
|
|
78
|
+
}
|
|
79
|
+
obj.setKeyAssociations(itemArr);
|
|
80
|
+
}
|
|
81
|
+
if (data.hasOwnProperty('$reserved')) {
|
|
82
|
+
obj.$reserved = data['$reserved'];
|
|
83
|
+
}
|
|
84
|
+
if (data.hasOwnProperty('$objectType')) {
|
|
85
|
+
obj.$objectType = data['$objectType'];
|
|
86
|
+
}
|
|
87
|
+
if (data.hasOwnProperty('$unknownFields')) {
|
|
88
|
+
obj.$unknownFields = data['$unknownFields'];
|
|
89
|
+
}
|
|
90
|
+
if (!callFromChild) {
|
|
91
|
+
obj.$unknownFields = {
|
|
92
|
+
...data.$unknownFields
|
|
93
|
+
};
|
|
94
|
+
for (const property in data) {
|
|
95
|
+
// Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,
|
|
96
|
+
// as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).
|
|
97
|
+
// Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.
|
|
98
|
+
// If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.
|
|
99
|
+
if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === "$" && property.endsWith("ItemDiscriminator"))) {
|
|
100
|
+
obj.$unknownFields[property] = data[property];
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
return obj;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Converts a given snake_case string to camelCase.
|
|
110
|
+
* @param {string} snakeStr - The input string in snake_case format.
|
|
111
|
+
* @returns {string} - The converted string in camelCase format.
|
|
112
|
+
*/
|
|
113
|
+
static snakeToCamel(snakeStr) {
|
|
114
|
+
return snakeStr.replace(/(_\w)/g, match => match[1].toUpperCase());
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Returns Model containing parent key, associated key, association and reclaim rules.
|
|
119
|
+
* @return {LicenseKeyAssociation[]}
|
|
120
|
+
*/
|
|
121
|
+
getKeyAssociations() {
|
|
122
|
+
return this.keyAssociations;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Sets Model containing parent key, associated key, association and reclaim rules.
|
|
127
|
+
* @param {LicenseKeyAssociation[]} keyAssociations Model containing parent key, associated key, association and reclaim rules.
|
|
128
|
+
*/
|
|
129
|
+
setKeyAssociations(keyAssociations) {
|
|
130
|
+
this.keyAssociations = keyAssociations;
|
|
131
|
+
}
|
|
132
|
+
get$Reserved() {
|
|
133
|
+
return this.$reserved;
|
|
134
|
+
}
|
|
135
|
+
get$ObjectType() {
|
|
136
|
+
return this.$objectType;
|
|
137
|
+
}
|
|
138
|
+
get$UnknownFields() {
|
|
139
|
+
return this.$unknownFields;
|
|
140
|
+
}
|
|
141
|
+
toJson(forMutation) {
|
|
142
|
+
if (forMutation === false) {
|
|
143
|
+
return {
|
|
144
|
+
...(typeof this.getKeyAssociations() !== 'undefined' && this.getKeyAssociations() !== null ? {
|
|
145
|
+
'keyAssociations': this.getKeyAssociations().map(item => item.toJson(false))
|
|
146
|
+
} : {}),
|
|
147
|
+
'$reserved': this.get$Reserved(),
|
|
148
|
+
'$objectType': this.get$ObjectType(),
|
|
149
|
+
...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),
|
|
150
|
+
'$unknownFields': {}
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
return {
|
|
154
|
+
...(typeof this.getKeyAssociations() !== 'undefined' && this.getKeyAssociations() !== null ? {
|
|
155
|
+
'keyAssociations': this.getKeyAssociations().map(item => item.toJson(false))
|
|
156
|
+
} : {}),
|
|
157
|
+
'$reserved': this.get$Reserved(),
|
|
158
|
+
'$objectType': this.get$ObjectType(),
|
|
159
|
+
...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),
|
|
160
|
+
'$unknownFields': {}
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
validate(scope, properties) {
|
|
164
|
+
let propList = [];
|
|
165
|
+
if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _ValidationScopes.default) {
|
|
166
|
+
//cases validate() and validate(scope)
|
|
167
|
+
propList = ["keyAssociations"];
|
|
168
|
+
} else if (arguments.length === 1) {
|
|
169
|
+
//case validate(properties)
|
|
170
|
+
propList = arguments[0];
|
|
171
|
+
scope = null;
|
|
172
|
+
} else {
|
|
173
|
+
//case validate(scope, properties)
|
|
174
|
+
propList = arguments[1];
|
|
175
|
+
}
|
|
176
|
+
let res = [];
|
|
177
|
+
let err = null;
|
|
178
|
+
propList.forEach(property => {
|
|
179
|
+
err = this.validateProperty(property, scope);
|
|
180
|
+
if (err) {
|
|
181
|
+
res.push(err);
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
return new Promise(function (resolve, reject) {
|
|
185
|
+
if (res.length !== 0) {
|
|
186
|
+
reject(err);
|
|
187
|
+
} else {
|
|
188
|
+
resolve();
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
validateProperty(scope, property) {
|
|
193
|
+
if (property === "keyAssociations") {
|
|
194
|
+
if (typeof this.keyAssociations === 'undefined' || this.keyAssociations === null) {
|
|
195
|
+
return new _ValidationError.default("keyAssociations", "undefined or null");
|
|
196
|
+
}
|
|
197
|
+
if (!_ValidationUtils.default.validateMaxItems(this.keyAssociations, 5)) {
|
|
198
|
+
return new _ValidationError.default("keyAssociations", "does not satisfy required maxItems constraint: 5");
|
|
199
|
+
}
|
|
200
|
+
if (!_ValidationUtils.default.validateMinItems(this.keyAssociations, 1)) {
|
|
201
|
+
return new _ValidationError.default("keyAssociations", "does not satisfy required minItems constraint: 1");
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
if (property === "$reserved") {
|
|
205
|
+
if (typeof this.$reserved === 'undefined' || this.$reserved === null) {
|
|
206
|
+
return new _ValidationError.default("$reserved", "undefined or null");
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
if (property === "$objectType") {
|
|
210
|
+
if (typeof this.$objectType === 'undefined' || this.$objectType === null) {
|
|
211
|
+
return new _ValidationError.default("$objectType", "undefined or null");
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
if (property === "$unknownFields") {
|
|
215
|
+
if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {
|
|
216
|
+
return new _ValidationError.default("$unknownFields", "undefined or null");
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
return new _ValidationError.default(property, "no such property exists");
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Model containing parent key, associated key, association and reclaim rules.
|
|
225
|
+
* @memberof AssociateLicenseKeySpec
|
|
226
|
+
*/
|
|
227
|
+
exports.default = AssociateLicenseKeySpec;
|
|
228
|
+
function _toJsonMapType(obj, forMutation) {
|
|
229
|
+
if (obj instanceof Map) {
|
|
230
|
+
return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== "undefined" ? v.toJson(forMutation) : v]));
|
|
231
|
+
} else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {
|
|
232
|
+
return Object.fromEntries(Array.from(Object.entries(obj), entry => {
|
|
233
|
+
return [entry[0], typeof entry[1].toJson !== "undefined" ? entry[1].toJson(forMutation) : entry[1]];
|
|
234
|
+
}));
|
|
235
|
+
}
|
|
236
|
+
return obj;
|
|
237
|
+
}
|
|
238
|
+
/*
|
|
239
|
+
* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting
|
|
240
|
+
* @param {Object} obj Object to serialize
|
|
241
|
+
* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization
|
|
242
|
+
* @returns {Object|string} Returns serialized date object or original input object
|
|
243
|
+
*/
|
|
244
|
+
function _handleDateType(obj, isDateOnly) {
|
|
245
|
+
if (obj instanceof Date && isDateOnly !== undefined) {
|
|
246
|
+
return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();
|
|
247
|
+
}
|
|
248
|
+
return obj;
|
|
249
|
+
}
|
|
250
|
+
AssociateLicenseKeySpec.prototype.keyAssociations = undefined;
|
|
251
|
+
AssociateLicenseKeySpec.prototype.$reserved = undefined;
|
|
252
|
+
AssociateLicenseKeySpec.prototype.$objectType = undefined;
|
|
253
|
+
AssociateLicenseKeySpec.prototype.$unknownFields = undefined;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The AssociateLicenseKeysApiResponse model module.
|
|
3
|
+
* @module Ntnx/AssociateLicenseKeysApiResponse
|
|
4
|
+
* @version 4.3.2
|
|
5
|
+
* @class AssociateLicenseKeysApiResponse
|
|
6
|
+
*/
|
|
7
|
+
export default class AssociateLicenseKeysApiResponse extends Paginable {
|
|
8
|
+
/**
|
|
9
|
+
* Constructs a <code>AssociateLicenseKeysApiResponse</code> from a plain JavaScript object, optionally creating a new instance.
|
|
10
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
11
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
12
|
+
* @param {module:Ntnx/AssociateLicenseKeysApiResponse} obj Optional instance to populate.
|
|
13
|
+
* @param callFromChild {Boolean} Flag to recognise calling instance
|
|
14
|
+
* @return {module:Ntnx/AssociateLicenseKeysApiResponse} The populated <code>AssociateLicenseKeysApiResponse</code> instance.
|
|
15
|
+
*/
|
|
16
|
+
static constructFromObject(data: any, obj?: any, callFromChild?: boolean): any;
|
|
17
|
+
/**
|
|
18
|
+
* Converts a given snake_case string to camelCase.
|
|
19
|
+
* @param {string} snakeStr - The input string in snake_case format.
|
|
20
|
+
* @returns {string} - The converted string in camelCase format.
|
|
21
|
+
*/
|
|
22
|
+
static snakeToCamel(snakeStr: string): string;
|
|
23
|
+
$objectType: string;
|
|
24
|
+
/** @type {object<string, any>} */
|
|
25
|
+
$reserved: object;
|
|
26
|
+
/** @type {object<string, any>} */
|
|
27
|
+
$unknownFields: object;
|
|
28
|
+
/**
|
|
29
|
+
* @return {ApiResponseMetadata}
|
|
30
|
+
*/
|
|
31
|
+
getMetadata(): ApiResponseMetadata;
|
|
32
|
+
/**
|
|
33
|
+
* @param {ApiResponseMetadata} metadata
|
|
34
|
+
*/
|
|
35
|
+
setMetadata(metadata: ApiResponseMetadata): void;
|
|
36
|
+
metadata: ApiResponseMetadata;
|
|
37
|
+
/**
|
|
38
|
+
* @return {AppMessage[] | ErrorResponse}
|
|
39
|
+
*/
|
|
40
|
+
getData(): AppMessage[] | ErrorResponse;
|
|
41
|
+
/**
|
|
42
|
+
* @param {AppMessage[] | ErrorResponse} data
|
|
43
|
+
*/
|
|
44
|
+
setData(data: AppMessage[] | ErrorResponse): void;
|
|
45
|
+
data: ErrorResponse | AppMessage[];
|
|
46
|
+
get$Reserved(): any;
|
|
47
|
+
get$ObjectType(): string;
|
|
48
|
+
get$UnknownFields(): any;
|
|
49
|
+
toJson(forMutation: any): any;
|
|
50
|
+
validate(scope: any, properties: any, ...args: any[]): Promise<any>;
|
|
51
|
+
validateProperty(scope: any, property: any): ValidationError;
|
|
52
|
+
#private;
|
|
53
|
+
}
|
|
54
|
+
import Paginable from "../../../../Paginable";
|
|
55
|
+
import ApiResponseMetadata from "../../../common/v1/response/ApiResponseMetadata";
|
|
56
|
+
import AppMessage from "../error/AppMessage";
|
|
57
|
+
import ErrorResponse from "../error/ErrorResponse";
|
|
58
|
+
import ValidationError from "../../../validation/ValidationError";
|
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _ApiResponseMetadata = _interopRequireDefault(require("../../../common/v1/response/ApiResponseMetadata"));
|
|
8
|
+
var _AppMessage = _interopRequireDefault(require("../error/AppMessage"));
|
|
9
|
+
var _ErrorResponse = _interopRequireDefault(require("../error/ErrorResponse"));
|
|
10
|
+
var _ValidationScopes = _interopRequireDefault(require("../../../validation/ValidationScopes"));
|
|
11
|
+
var _ValidationUtils = _interopRequireDefault(require("../../../../utils/ValidationUtils"));
|
|
12
|
+
var _ValidationError = _interopRequireDefault(require("../../../validation/ValidationError"));
|
|
13
|
+
var _Paginable = _interopRequireDefault(require("../../../../Paginable"));
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
+
function _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }
|
|
16
|
+
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
|
17
|
+
function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } /*
|
|
18
|
+
* Nutanix Licensing APIs
|
|
19
|
+
*
|
|
20
|
+
* OpenAPI spec version: 4.3.2
|
|
21
|
+
*
|
|
22
|
+
* NOTE: This class is auto generated by the Open API Dev Platform.
|
|
23
|
+
*
|
|
24
|
+
* Open API Dev Platform Codegen version: 17.5.1.10573-RELEASE
|
|
25
|
+
*
|
|
26
|
+
* Do not edit the class manually.
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
29
|
+
/**
|
|
30
|
+
* The AssociateLicenseKeysApiResponse model module.
|
|
31
|
+
* @module Ntnx/AssociateLicenseKeysApiResponse
|
|
32
|
+
* @version 4.3.2
|
|
33
|
+
* @class AssociateLicenseKeysApiResponse
|
|
34
|
+
*/
|
|
35
|
+
var _AssociateLicenseKeysApiResponse_brand = /*#__PURE__*/new WeakSet();
|
|
36
|
+
class AssociateLicenseKeysApiResponse extends _Paginable.default {
|
|
37
|
+
/**
|
|
38
|
+
* Constructs a new <code>AssociateLicenseKeysApiResponse</code>.
|
|
39
|
+
* REST response for all response codes in API path /licensing/v4.3/config/license-keys/{extId}/$actions/associate-license-keys Post operation
|
|
40
|
+
* @alias module:Ntnx/AssociateLicenseKeysApiResponse
|
|
41
|
+
*/
|
|
42
|
+
constructor() {
|
|
43
|
+
super();
|
|
44
|
+
/*
|
|
45
|
+
* toJson method for a map type which supports map with primitive keys and values of object types
|
|
46
|
+
* @param {Object} obj
|
|
47
|
+
* @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.
|
|
48
|
+
* Otherwise, just returns the input object.
|
|
49
|
+
*/
|
|
50
|
+
_classPrivateMethodInitSpec(this, _AssociateLicenseKeysApiResponse_brand);
|
|
51
|
+
this.$objectType = "licensing.v4.config.AssociateLicenseKeysApiResponse";
|
|
52
|
+
/** @type {object<string, any>} */
|
|
53
|
+
this.$reserved = {
|
|
54
|
+
'$fv': "v4.r3"
|
|
55
|
+
};
|
|
56
|
+
/** @type {object<string, any>} */
|
|
57
|
+
this.$unknownFields = {};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Constructs a <code>AssociateLicenseKeysApiResponse</code> from a plain JavaScript object, optionally creating a new instance.
|
|
62
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
63
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
64
|
+
* @param {module:Ntnx/AssociateLicenseKeysApiResponse} obj Optional instance to populate.
|
|
65
|
+
* @param callFromChild {Boolean} Flag to recognise calling instance
|
|
66
|
+
* @return {module:Ntnx/AssociateLicenseKeysApiResponse} The populated <code>AssociateLicenseKeysApiResponse</code> instance.
|
|
67
|
+
*/
|
|
68
|
+
static constructFromObject(data, obj = null, callFromChild = false) {
|
|
69
|
+
let items, item, i, itemArr, discriminator;
|
|
70
|
+
if (data) {
|
|
71
|
+
obj = obj || new AssociateLicenseKeysApiResponse();
|
|
72
|
+
if (data.hasOwnProperty('metadata')) {
|
|
73
|
+
_Paginable.default.constructFromObject(data['metadata'], obj);
|
|
74
|
+
}
|
|
75
|
+
if (data.hasOwnProperty('metadata') && data.metadata !== null && data.metadata !== undefined) {
|
|
76
|
+
obj.setMetadata(_ApiResponseMetadata.default.constructFromObject(data['metadata']));
|
|
77
|
+
}
|
|
78
|
+
if (data.hasOwnProperty('data') && data.data !== null && data.data !== undefined) {
|
|
79
|
+
if (Array.isArray(data['data'])) {
|
|
80
|
+
if (data['data'].length === 0) {
|
|
81
|
+
obj.setData([]);
|
|
82
|
+
} else {
|
|
83
|
+
itemArr = [];
|
|
84
|
+
items = data['data'];
|
|
85
|
+
if (items[0].hasOwnProperty('$objectType')) {
|
|
86
|
+
discriminator = items[0]['$objectType'];
|
|
87
|
+
} else {
|
|
88
|
+
discriminator = typeof items[0];
|
|
89
|
+
}
|
|
90
|
+
for (i = 0; i < items.length; i++) {
|
|
91
|
+
switch (discriminator) {
|
|
92
|
+
case 'licensing.v4.error.AppMessage':
|
|
93
|
+
item = _AppMessage.default.constructFromObject(items[i], undefined);
|
|
94
|
+
itemArr.push(item);
|
|
95
|
+
break;
|
|
96
|
+
default:
|
|
97
|
+
throw "Unknown list of type " + discriminator + " in data";
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
obj.setData(itemArr);
|
|
101
|
+
}
|
|
102
|
+
} else {
|
|
103
|
+
if (data['data'].hasOwnProperty('$objectType')) {
|
|
104
|
+
discriminator = data['data']['$objectType'];
|
|
105
|
+
} else {
|
|
106
|
+
discriminator = typeof data['data'];
|
|
107
|
+
}
|
|
108
|
+
switch (discriminator) {
|
|
109
|
+
case 'licensing.v4.error.ErrorResponse':
|
|
110
|
+
obj.setData(_ErrorResponse.default.constructFromObject(data['data'], undefined));
|
|
111
|
+
break;
|
|
112
|
+
default:
|
|
113
|
+
throw "Unknown datatype " + discriminator + " in data";
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
if (data.hasOwnProperty('$reserved')) {
|
|
118
|
+
obj.$reserved = data['$reserved'];
|
|
119
|
+
}
|
|
120
|
+
if (data.hasOwnProperty('$objectType')) {
|
|
121
|
+
obj.$objectType = data['$objectType'];
|
|
122
|
+
}
|
|
123
|
+
if (data.hasOwnProperty('$unknownFields')) {
|
|
124
|
+
obj.$unknownFields = data['$unknownFields'];
|
|
125
|
+
}
|
|
126
|
+
if (!callFromChild) {
|
|
127
|
+
obj.$unknownFields = {
|
|
128
|
+
...data.$unknownFields
|
|
129
|
+
};
|
|
130
|
+
for (const property in data) {
|
|
131
|
+
// Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,
|
|
132
|
+
// as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).
|
|
133
|
+
// Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.
|
|
134
|
+
// If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.
|
|
135
|
+
if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === "$" && property.endsWith("ItemDiscriminator"))) {
|
|
136
|
+
obj.$unknownFields[property] = data[property];
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
return obj;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Converts a given snake_case string to camelCase.
|
|
146
|
+
* @param {string} snakeStr - The input string in snake_case format.
|
|
147
|
+
* @returns {string} - The converted string in camelCase format.
|
|
148
|
+
*/
|
|
149
|
+
static snakeToCamel(snakeStr) {
|
|
150
|
+
return snakeStr.replace(/(_\w)/g, match => match[1].toUpperCase());
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* @return {ApiResponseMetadata}
|
|
155
|
+
*/
|
|
156
|
+
getMetadata() {
|
|
157
|
+
return this.metadata;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* @param {ApiResponseMetadata} metadata
|
|
162
|
+
*/
|
|
163
|
+
setMetadata(metadata) {
|
|
164
|
+
this.metadata = metadata;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* @return {AppMessage[] | ErrorResponse}
|
|
169
|
+
*/
|
|
170
|
+
getData() {
|
|
171
|
+
return this.data;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* @param {AppMessage[] | ErrorResponse} data
|
|
176
|
+
*/
|
|
177
|
+
setData(data) {
|
|
178
|
+
this.data = data;
|
|
179
|
+
}
|
|
180
|
+
get$Reserved() {
|
|
181
|
+
return this.$reserved;
|
|
182
|
+
}
|
|
183
|
+
get$ObjectType() {
|
|
184
|
+
return this.$objectType;
|
|
185
|
+
}
|
|
186
|
+
get$UnknownFields() {
|
|
187
|
+
return this.$unknownFields;
|
|
188
|
+
}
|
|
189
|
+
toJson(forMutation) {
|
|
190
|
+
if (forMutation === false) {
|
|
191
|
+
return {
|
|
192
|
+
...(typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {
|
|
193
|
+
'metadata': this.getMetadata().toJson(false)
|
|
194
|
+
} : {}),
|
|
195
|
+
...(typeof this.getData() !== 'undefined' && this.getData() !== null ? {
|
|
196
|
+
'data': typeof this.getData().toJson !== "undefined" ? this.getData().toJson(false) : Array.isArray(this.getData()) ? this.getData().map(item => typeof item.toJson !== "undefined" ? item.toJson(false) : item) : _assertClassBrand(_AssociateLicenseKeysApiResponse_brand, this, _toJsonMapType).call(this, this.getData(), false)
|
|
197
|
+
} : {}),
|
|
198
|
+
'$reserved': this.get$Reserved(),
|
|
199
|
+
'$objectType': this.get$ObjectType(),
|
|
200
|
+
...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),
|
|
201
|
+
'$unknownFields': {}
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
return {
|
|
205
|
+
...(typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {
|
|
206
|
+
'metadata': this.getMetadata().toJson(false)
|
|
207
|
+
} : {}),
|
|
208
|
+
...(typeof this.getData() !== 'undefined' && this.getData() !== null ? {
|
|
209
|
+
'data': typeof this.getData().toJson !== "undefined" ? this.getData().toJson() : Array.isArray(this.getData()) ? this.getData().map(item => typeof item.toJson !== "undefined" ? item.toJson() : item) : _assertClassBrand(_AssociateLicenseKeysApiResponse_brand, this, _toJsonMapType).call(this, this.getData())
|
|
210
|
+
} : {}),
|
|
211
|
+
'$reserved': this.get$Reserved(),
|
|
212
|
+
'$objectType': this.get$ObjectType(),
|
|
213
|
+
...(typeof this.get$UnknownFields() !== 'undefined' && this.get$UnknownFields() !== null ? this.get$UnknownFields() : {}),
|
|
214
|
+
'$unknownFields': {}
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
validate(scope, properties) {
|
|
218
|
+
let propList = [];
|
|
219
|
+
if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _ValidationScopes.default) {
|
|
220
|
+
//cases validate() and validate(scope)
|
|
221
|
+
propList = [];
|
|
222
|
+
} else if (arguments.length === 1) {
|
|
223
|
+
//case validate(properties)
|
|
224
|
+
propList = arguments[0];
|
|
225
|
+
scope = null;
|
|
226
|
+
} else {
|
|
227
|
+
//case validate(scope, properties)
|
|
228
|
+
propList = arguments[1];
|
|
229
|
+
}
|
|
230
|
+
let res = [];
|
|
231
|
+
let err = null;
|
|
232
|
+
propList.forEach(property => {
|
|
233
|
+
err = this.validateProperty(property, scope);
|
|
234
|
+
if (err) {
|
|
235
|
+
res.push(err);
|
|
236
|
+
}
|
|
237
|
+
});
|
|
238
|
+
return new Promise(function (resolve, reject) {
|
|
239
|
+
if (res.length !== 0) {
|
|
240
|
+
reject(err);
|
|
241
|
+
} else {
|
|
242
|
+
resolve();
|
|
243
|
+
}
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
validateProperty(scope, property) {
|
|
247
|
+
if (property === "metadata") {
|
|
248
|
+
if (typeof this.metadata === 'undefined' || this.metadata === null) {
|
|
249
|
+
return new _ValidationError.default("metadata", "undefined or null");
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
if (property === "data") {
|
|
253
|
+
if (typeof this.data === 'undefined' || this.data === null) {
|
|
254
|
+
return new _ValidationError.default("data", "undefined or null");
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
if (property === "$reserved") {
|
|
258
|
+
if (typeof this.$reserved === 'undefined' || this.$reserved === null) {
|
|
259
|
+
return new _ValidationError.default("$reserved", "undefined or null");
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
if (property === "$objectType") {
|
|
263
|
+
if (typeof this.$objectType === 'undefined' || this.$objectType === null) {
|
|
264
|
+
return new _ValidationError.default("$objectType", "undefined or null");
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
if (property === "$unknownFields") {
|
|
268
|
+
if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {
|
|
269
|
+
return new _ValidationError.default("$unknownFields", "undefined or null");
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
return new _ValidationError.default(property, "no such property exists");
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* @memberof AssociateLicenseKeysApiResponse
|
|
278
|
+
*/
|
|
279
|
+
exports.default = AssociateLicenseKeysApiResponse;
|
|
280
|
+
function _toJsonMapType(obj, forMutation) {
|
|
281
|
+
if (obj instanceof Map) {
|
|
282
|
+
return Object.fromEntries(Array.from(obj, ([k, v]) => [k, typeof v.toJson !== "undefined" ? v.toJson(forMutation) : v]));
|
|
283
|
+
} else if (typeof obj === 'object' && obj != null && obj.constructor === Object) {
|
|
284
|
+
return Object.fromEntries(Array.from(Object.entries(obj), entry => {
|
|
285
|
+
return [entry[0], typeof entry[1].toJson !== "undefined" ? entry[1].toJson(forMutation) : entry[1]];
|
|
286
|
+
}));
|
|
287
|
+
}
|
|
288
|
+
return obj;
|
|
289
|
+
}
|
|
290
|
+
/*
|
|
291
|
+
* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting
|
|
292
|
+
* @param {Object} obj Object to serialize
|
|
293
|
+
* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization
|
|
294
|
+
* @returns {Object|string} Returns serialized date object or original input object
|
|
295
|
+
*/
|
|
296
|
+
function _handleDateType(obj, isDateOnly) {
|
|
297
|
+
if (obj instanceof Date && isDateOnly !== undefined) {
|
|
298
|
+
return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();
|
|
299
|
+
}
|
|
300
|
+
return obj;
|
|
301
|
+
}
|
|
302
|
+
AssociateLicenseKeysApiResponse.prototype.metadata = undefined;
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* @memberof AssociateLicenseKeysApiResponse
|
|
306
|
+
*/
|
|
307
|
+
AssociateLicenseKeysApiResponse.prototype.data = undefined;
|
|
308
|
+
AssociateLicenseKeysApiResponse.prototype.$reserved = undefined;
|
|
309
|
+
AssociateLicenseKeysApiResponse.prototype.$objectType = undefined;
|
|
310
|
+
AssociateLicenseKeysApiResponse.prototype.$unknownFields = undefined;
|
|
@@ -3,19 +3,19 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports
|
|
6
|
+
exports.default = void 0;
|
|
7
7
|
var _ValidationScopes = _interopRequireDefault(require("../../../validation/ValidationScopes"));
|
|
8
8
|
var _ValidationUtils = _interopRequireDefault(require("../../../../utils/ValidationUtils"));
|
|
9
9
|
var _ValidationError = _interopRequireDefault(require("../../../validation/ValidationError"));
|
|
10
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : {
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
11
|
/*
|
|
12
12
|
* Nutanix Licensing APIs
|
|
13
13
|
*
|
|
14
|
-
* OpenAPI spec version: 4.2
|
|
14
|
+
* OpenAPI spec version: 4.3.2
|
|
15
15
|
*
|
|
16
16
|
* NOTE: This class is auto generated by the Open API Dev Platform.
|
|
17
17
|
*
|
|
18
|
-
* Open API Dev Platform Codegen version: 17.
|
|
18
|
+
* Open API Dev Platform Codegen version: 17.5.1.10573-RELEASE
|
|
19
19
|
*
|
|
20
20
|
* Do not edit the class manually.
|
|
21
21
|
*
|
|
@@ -26,7 +26,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default":
|
|
|
26
26
|
* @enum {string}
|
|
27
27
|
* @readonly
|
|
28
28
|
*/
|
|
29
|
-
|
|
29
|
+
const AssociationType = {
|
|
30
30
|
/**
|
|
31
31
|
* Unknown value.
|
|
32
32
|
* @const
|
|
@@ -56,9 +56,7 @@ var AssociationType = {
|
|
|
56
56
|
*/
|
|
57
57
|
AssociationType.constructFromObject = function (obj) {
|
|
58
58
|
if (typeof obj === 'string' || obj instanceof String) {
|
|
59
|
-
|
|
60
|
-
return AssociationType[key] === obj;
|
|
61
|
-
});
|
|
59
|
+
let enumVal = Object.keys(AssociationType).find(key => AssociationType[key] === obj);
|
|
62
60
|
return enumVal === undefined || enumVal === null ? AssociationType.$UNKNOWN : AssociationType[enumVal];
|
|
63
61
|
} else {
|
|
64
62
|
throw new Error("Received object name is not an instance of String");
|
|
@@ -82,4 +80,4 @@ AssociationType.validate = function (obj) {
|
|
|
82
80
|
}
|
|
83
81
|
};
|
|
84
82
|
Object.freeze(AssociationType);
|
|
85
|
-
var _default = exports
|
|
83
|
+
var _default = exports.default = AssociationType;
|