@nutanix-scratch/licensing-js-client 1.421.1
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/LICENSE.txt +202 -0
- package/README.md +215 -0
- package/dist/Ntnx-Licensing-js-client-prod.js +1 -0
- package/dist/Ntnx-Licensing-js-client.js +1642 -0
- package/dist/es/ApiClient.d.ts +172 -0
- package/dist/es/ApiClient.js +1262 -0
- package/dist/es/Paginable.d.ts +95 -0
- package/dist/es/Paginable.js +287 -0
- package/dist/es/apis/enduserlicenseagreement-endpoints.d.ts +41 -0
- package/dist/es/apis/enduserlicenseagreement-endpoints.js +141 -0
- package/dist/es/apis/licensekeys-endpoints.d.ts +91 -0
- package/dist/es/apis/licensekeys-endpoints.js +283 -0
- package/dist/es/apis/licenses-endpoints.d.ts +206 -0
- package/dist/es/apis/licenses-endpoints.js +480 -0
- package/dist/es/index.d.ts +230 -0
- package/dist/es/index.js +916 -0
- package/dist/es/models/common/v1/config/Flag.d.ts +64 -0
- package/dist/es/models/common/v1/config/Flag.js +319 -0
- package/dist/es/models/common/v1/config/KVPair.d.ts +71 -0
- package/dist/es/models/common/v1/config/KVPair.js +378 -0
- package/dist/es/models/common/v1/config/MapOfStringWrapper.d.ts +58 -0
- package/dist/es/models/common/v1/config/MapOfStringWrapper.js +275 -0
- package/dist/es/models/common/v1/config/Message.d.ts +87 -0
- package/dist/es/models/common/v1/config/Message.js +386 -0
- package/dist/es/models/common/v1/config/MessageSeverity.d.ts +19 -0
- package/dist/es/models/common/v1/config/MessageSeverity.js +91 -0
- package/dist/es/models/common/v1/config/TenantAwareModel.d.ts +52 -0
- package/dist/es/models/common/v1/config/TenantAwareModel.js +275 -0
- package/dist/es/models/common/v1/response/ApiLink.d.ts +64 -0
- package/dist/es/models/common/v1/response/ApiLink.js +312 -0
- package/dist/es/models/common/v1/response/ApiResponseMetadata.d.ts +133 -0
- package/dist/es/models/common/v1/response/ApiResponseMetadata.js +482 -0
- package/dist/es/models/common/v1/response/ExternalizableAbstractModel.d.ts +48 -0
- package/dist/es/models/common/v1/response/ExternalizableAbstractModel.js +310 -0
- package/dist/es/models/licensing/v4/agreements/Acceptance.d.ts +81 -0
- package/dist/es/models/licensing/v4/agreements/Acceptance.js +314 -0
- package/dist/es/models/licensing/v4/agreements/AddUserApiResponse.d.ts +99 -0
- package/dist/es/models/licensing/v4/agreements/AddUserApiResponse.js +365 -0
- package/dist/es/models/licensing/v4/agreements/EndUser.d.ts +110 -0
- package/dist/es/models/licensing/v4/agreements/EndUser.js +420 -0
- package/dist/es/models/licensing/v4/agreements/Eula.d.ts +115 -0
- package/dist/es/models/licensing/v4/agreements/Eula.js +441 -0
- package/dist/es/models/licensing/v4/agreements/GetEulaApiResponse.d.ts +99 -0
- package/dist/es/models/licensing/v4/agreements/GetEulaApiResponse.js +343 -0
- package/dist/es/models/licensing/v4/config/AddLicenseKeyApiResponse.d.ts +103 -0
- package/dist/es/models/licensing/v4/config/AddLicenseKeyApiResponse.js +347 -0
- package/dist/es/models/licensing/v4/config/AddLicenseKeyDryRunApiResponse.d.ts +137 -0
- package/dist/es/models/licensing/v4/config/AddLicenseKeyDryRunApiResponse.js +360 -0
- package/dist/es/models/licensing/v4/config/Allowance.d.ts +70 -0
- package/dist/es/models/licensing/v4/config/Allowance.js +371 -0
- package/dist/es/models/licensing/v4/config/AllowanceDetail.d.ts +86 -0
- package/dist/es/models/licensing/v4/config/AllowanceDetail.js +390 -0
- package/dist/es/models/licensing/v4/config/AllowanceDetailProjection.d.ts +10 -0
- package/dist/es/models/licensing/v4/config/AllowanceDetailProjection.js +152 -0
- package/dist/es/models/licensing/v4/config/AllowanceProjection.d.ts +56 -0
- package/dist/es/models/licensing/v4/config/AllowanceProjection.js +320 -0
- package/dist/es/models/licensing/v4/config/AssignLicenseKeysApiResponse.d.ts +102 -0
- package/dist/es/models/licensing/v4/config/AssignLicenseKeysApiResponse.js +365 -0
- package/dist/es/models/licensing/v4/config/AssociationType.d.ts +19 -0
- package/dist/es/models/licensing/v4/config/AssociationType.js +85 -0
- package/dist/es/models/licensing/v4/config/BaseClusterInfo.d.ts +37 -0
- package/dist/es/models/licensing/v4/config/BaseClusterInfo.js +271 -0
- package/dist/es/models/licensing/v4/config/BaseLicenseInfo.d.ts +82 -0
- package/dist/es/models/licensing/v4/config/BaseLicenseInfo.js +423 -0
- package/dist/es/models/licensing/v4/config/BillingPlan.d.ts +19 -0
- package/dist/es/models/licensing/v4/config/BillingPlan.js +91 -0
- package/dist/es/models/licensing/v4/config/CapacityViolation.d.ts +85 -0
- package/dist/es/models/licensing/v4/config/CapacityViolation.js +382 -0
- package/dist/es/models/licensing/v4/config/ClusterLicenseKeyMapping.d.ts +30 -0
- package/dist/es/models/licensing/v4/config/ClusterLicenseKeyMapping.js +269 -0
- package/dist/es/models/licensing/v4/config/ClusterLicenseKeyMappingProjection.d.ts +10 -0
- package/dist/es/models/licensing/v4/config/ClusterLicenseKeyMappingProjection.js +151 -0
- package/dist/es/models/licensing/v4/config/ClusterType.d.ts +19 -0
- package/dist/es/models/licensing/v4/config/ClusterType.js +91 -0
- package/dist/es/models/licensing/v4/config/Compliance.d.ts +78 -0
- package/dist/es/models/licensing/v4/config/Compliance.js +371 -0
- package/dist/es/models/licensing/v4/config/ComplianceProjection.d.ts +72 -0
- package/dist/es/models/licensing/v4/config/ComplianceProjection.js +320 -0
- package/dist/es/models/licensing/v4/config/Consumption.d.ts +64 -0
- package/dist/es/models/licensing/v4/config/Consumption.js +315 -0
- package/dist/es/models/licensing/v4/config/ConsumptionProjection.d.ts +10 -0
- package/dist/es/models/licensing/v4/config/ConsumptionProjection.js +150 -0
- package/dist/es/models/licensing/v4/config/ConsumptionType.d.ts +19 -0
- package/dist/es/models/licensing/v4/config/ConsumptionType.js +85 -0
- package/dist/es/models/licensing/v4/config/DeleteLicenseKeyApiResponse.d.ts +98 -0
- package/dist/es/models/licensing/v4/config/DeleteLicenseKeyApiResponse.js +345 -0
- package/dist/es/models/licensing/v4/config/DryRunCheck.d.ts +72 -0
- package/dist/es/models/licensing/v4/config/DryRunCheck.js +325 -0
- package/dist/es/models/licensing/v4/config/DryRunStatus.d.ts +19 -0
- package/dist/es/models/licensing/v4/config/DryRunStatus.js +86 -0
- package/dist/es/models/licensing/v4/config/DryRunValidationResult.d.ts +68 -0
- package/dist/es/models/licensing/v4/config/DryRunValidationResult.js +297 -0
- package/dist/es/models/licensing/v4/config/EnforcementActions.d.ts +19 -0
- package/dist/es/models/licensing/v4/config/EnforcementActions.js +139 -0
- package/dist/es/models/licensing/v4/config/EnforcementLevel.d.ts +19 -0
- package/dist/es/models/licensing/v4/config/EnforcementLevel.js +85 -0
- package/dist/es/models/licensing/v4/config/EnforcementPolicy.d.ts +19 -0
- package/dist/es/models/licensing/v4/config/EnforcementPolicy.js +85 -0
- package/dist/es/models/licensing/v4/config/Entitlement.d.ts +98 -0
- package/dist/es/models/licensing/v4/config/Entitlement.js +450 -0
- package/dist/es/models/licensing/v4/config/EntitlementDetail.d.ts +131 -0
- package/dist/es/models/licensing/v4/config/EntitlementDetail.js +534 -0
- package/dist/es/models/licensing/v4/config/EntitlementDetailProjection.d.ts +10 -0
- package/dist/es/models/licensing/v4/config/EntitlementDetailProjection.js +155 -0
- package/dist/es/models/licensing/v4/config/EntitlementProjection.d.ts +66 -0
- package/dist/es/models/licensing/v4/config/EntitlementProjection.js +338 -0
- package/dist/es/models/licensing/v4/config/ExpiredLicense.d.ts +65 -0
- package/dist/es/models/licensing/v4/config/ExpiredLicense.js +396 -0
- package/dist/es/models/licensing/v4/config/Feature.d.ts +104 -0
- package/dist/es/models/licensing/v4/config/Feature.js +512 -0
- package/dist/es/models/licensing/v4/config/FeatureDetail.d.ts +76 -0
- package/dist/es/models/licensing/v4/config/FeatureDetail.js +359 -0
- package/dist/es/models/licensing/v4/config/FeatureProjection.d.ts +10 -0
- package/dist/es/models/licensing/v4/config/FeatureProjection.js +152 -0
- package/dist/es/models/licensing/v4/config/FeatureViolation.d.ts +31 -0
- package/dist/es/models/licensing/v4/config/FeatureViolation.js +278 -0
- package/dist/es/models/licensing/v4/config/GetLicenseKeyApiResponse.d.ts +99 -0
- package/dist/es/models/licensing/v4/config/GetLicenseKeyApiResponse.js +343 -0
- package/dist/es/models/licensing/v4/config/License.d.ts +95 -0
- package/dist/es/models/licensing/v4/config/License.js +484 -0
- package/dist/es/models/licensing/v4/config/LicenseCategory.d.ts +19 -0
- package/dist/es/models/licensing/v4/config/LicenseCategory.js +295 -0
- package/dist/es/models/licensing/v4/config/LicenseClass.d.ts +19 -0
- package/dist/es/models/licensing/v4/config/LicenseClass.js +91 -0
- package/dist/es/models/licensing/v4/config/LicenseKey.d.ts +181 -0
- package/dist/es/models/licensing/v4/config/LicenseKey.js +707 -0
- package/dist/es/models/licensing/v4/config/LicenseKeyAssignment.d.ts +71 -0
- package/dist/es/models/licensing/v4/config/LicenseKeyAssignment.js +329 -0
- package/dist/es/models/licensing/v4/config/LicenseKeyAssignmentSpec.d.ts +75 -0
- package/dist/es/models/licensing/v4/config/LicenseKeyAssignmentSpec.js +296 -0
- package/dist/es/models/licensing/v4/config/LicenseKeyAssociation.d.ts +104 -0
- package/dist/es/models/licensing/v4/config/LicenseKeyAssociation.js +403 -0
- package/dist/es/models/licensing/v4/config/LicenseKeyAssociationProjection.d.ts +16 -0
- package/dist/es/models/licensing/v4/config/LicenseKeyAssociationProjection.js +164 -0
- package/dist/es/models/licensing/v4/config/LicenseKeyAssociationSpec.d.ts +71 -0
- package/dist/es/models/licensing/v4/config/LicenseKeyAssociationSpec.js +296 -0
- package/dist/es/models/licensing/v4/config/LicenseKeyMapping.d.ts +64 -0
- package/dist/es/models/licensing/v4/config/LicenseKeyMapping.js +315 -0
- package/dist/es/models/licensing/v4/config/LicenseKeyProjection.d.ts +91 -0
- package/dist/es/models/licensing/v4/config/LicenseKeyProjection.js +431 -0
- package/dist/es/models/licensing/v4/config/LicenseKeySubCategory.d.ts +19 -0
- package/dist/es/models/licensing/v4/config/LicenseKeySubCategory.js +85 -0
- package/dist/es/models/licensing/v4/config/LicenseProjection.d.ts +58 -0
- package/dist/es/models/licensing/v4/config/LicenseProjection.js +374 -0
- package/dist/es/models/licensing/v4/config/LicenseStateSyncSpec.d.ts +75 -0
- package/dist/es/models/licensing/v4/config/LicenseStateSyncSpec.js +364 -0
- package/dist/es/models/licensing/v4/config/LicenseType.d.ts +19 -0
- package/dist/es/models/licensing/v4/config/LicenseType.js +283 -0
- package/dist/es/models/licensing/v4/config/ListAllowancesApiResponse.d.ts +100 -0
- package/dist/es/models/licensing/v4/config/ListAllowancesApiResponse.js +370 -0
- package/dist/es/models/licensing/v4/config/ListCompliancesApiResponse.d.ts +100 -0
- package/dist/es/models/licensing/v4/config/ListCompliancesApiResponse.js +370 -0
- package/dist/es/models/licensing/v4/config/ListEntitlementsApiResponse.d.ts +100 -0
- package/dist/es/models/licensing/v4/config/ListEntitlementsApiResponse.js +370 -0
- package/dist/es/models/licensing/v4/config/ListFeaturesApiResponse.d.ts +100 -0
- package/dist/es/models/licensing/v4/config/ListFeaturesApiResponse.js +370 -0
- package/dist/es/models/licensing/v4/config/ListLicenseKeysApiResponse.d.ts +100 -0
- package/dist/es/models/licensing/v4/config/ListLicenseKeysApiResponse.js +370 -0
- package/dist/es/models/licensing/v4/config/ListLicensesApiResponse.d.ts +100 -0
- package/dist/es/models/licensing/v4/config/ListLicensesApiResponse.js +370 -0
- package/dist/es/models/licensing/v4/config/ListRecommendationsApiResponse.d.ts +99 -0
- package/dist/es/models/licensing/v4/config/ListRecommendationsApiResponse.js +365 -0
- package/dist/es/models/licensing/v4/config/ListSettingsApiResponse.d.ts +99 -0
- package/dist/es/models/licensing/v4/config/ListSettingsApiResponse.js +365 -0
- package/dist/es/models/licensing/v4/config/ListViolationsApiResponse.d.ts +99 -0
- package/dist/es/models/licensing/v4/config/ListViolationsApiResponse.js +365 -0
- package/dist/es/models/licensing/v4/config/LogicalVersion.d.ts +64 -0
- package/dist/es/models/licensing/v4/config/LogicalVersion.js +312 -0
- package/dist/es/models/licensing/v4/config/Meter.d.ts +19 -0
- package/dist/es/models/licensing/v4/config/Meter.js +127 -0
- package/dist/es/models/licensing/v4/config/OperationType.d.ts +19 -0
- package/dist/es/models/licensing/v4/config/OperationType.js +97 -0
- package/dist/es/models/licensing/v4/config/PortalSetting.d.ts +86 -0
- package/dist/es/models/licensing/v4/config/PortalSetting.js +359 -0
- package/dist/es/models/licensing/v4/config/PostPaidCategory.d.ts +19 -0
- package/dist/es/models/licensing/v4/config/PostPaidCategory.js +85 -0
- package/dist/es/models/licensing/v4/config/PostPaidConfig.d.ts +97 -0
- package/dist/es/models/licensing/v4/config/PostPaidConfig.js +423 -0
- package/dist/es/models/licensing/v4/config/ProductName.d.ts +19 -0
- package/dist/es/models/licensing/v4/config/ProductName.js +115 -0
- package/dist/es/models/licensing/v4/config/ReclaimType.d.ts +19 -0
- package/dist/es/models/licensing/v4/config/ReclaimType.js +85 -0
- package/dist/es/models/licensing/v4/config/Recommendation.d.ts +47 -0
- package/dist/es/models/licensing/v4/config/Recommendation.js +287 -0
- package/dist/es/models/licensing/v4/config/RecommendationDetail.d.ts +98 -0
- package/dist/es/models/licensing/v4/config/RecommendationDetail.js +429 -0
- package/dist/es/models/licensing/v4/config/RecommendationScope.d.ts +19 -0
- package/dist/es/models/licensing/v4/config/RecommendationScope.js +85 -0
- package/dist/es/models/licensing/v4/config/ResetScope.d.ts +19 -0
- package/dist/es/models/licensing/v4/config/ResetScope.js +85 -0
- package/dist/es/models/licensing/v4/config/Scope.d.ts +19 -0
- package/dist/es/models/licensing/v4/config/Scope.js +91 -0
- package/dist/es/models/licensing/v4/config/Service.d.ts +117 -0
- package/dist/es/models/licensing/v4/config/Service.js +482 -0
- package/dist/es/models/licensing/v4/config/ServiceProjection.d.ts +10 -0
- package/dist/es/models/licensing/v4/config/ServiceProjection.js +155 -0
- package/dist/es/models/licensing/v4/config/ServiceViolation.d.ts +63 -0
- package/dist/es/models/licensing/v4/config/ServiceViolation.js +311 -0
- package/dist/es/models/licensing/v4/config/ServiceViolationType.d.ts +19 -0
- package/dist/es/models/licensing/v4/config/ServiceViolationType.js +91 -0
- package/dist/es/models/licensing/v4/config/Setting.d.ts +145 -0
- package/dist/es/models/licensing/v4/config/Setting.js +581 -0
- package/dist/es/models/licensing/v4/config/Status.d.ts +19 -0
- package/dist/es/models/licensing/v4/config/Status.js +85 -0
- package/dist/es/models/licensing/v4/config/SubCategory.d.ts +19 -0
- package/dist/es/models/licensing/v4/config/SubCategory.js +85 -0
- package/dist/es/models/licensing/v4/config/SyncLicenseStateApiResponse.d.ts +99 -0
- package/dist/es/models/licensing/v4/config/SyncLicenseStateApiResponse.js +343 -0
- package/dist/es/models/licensing/v4/config/SyncOperationType.d.ts +19 -0
- package/dist/es/models/licensing/v4/config/SyncOperationType.js +121 -0
- package/dist/es/models/licensing/v4/config/Trial.d.ts +93 -0
- package/dist/es/models/licensing/v4/config/Trial.js +421 -0
- package/dist/es/models/licensing/v4/config/TrialCategory.d.ts +19 -0
- package/dist/es/models/licensing/v4/config/TrialCategory.js +79 -0
- package/dist/es/models/licensing/v4/config/TrialProjection.d.ts +12 -0
- package/dist/es/models/licensing/v4/config/TrialProjection.js +159 -0
- package/dist/es/models/licensing/v4/config/TrialStatus.d.ts +19 -0
- package/dist/es/models/licensing/v4/config/TrialStatus.js +85 -0
- package/dist/es/models/licensing/v4/config/TrialType.d.ts +19 -0
- package/dist/es/models/licensing/v4/config/TrialType.js +79 -0
- package/dist/es/models/licensing/v4/config/ValueType.d.ts +19 -0
- package/dist/es/models/licensing/v4/config/ValueType.js +85 -0
- package/dist/es/models/licensing/v4/config/Violation.d.ts +102 -0
- package/dist/es/models/licensing/v4/config/Violation.js +398 -0
- package/dist/es/models/licensing/v4/error/AppMessage.d.ts +117 -0
- package/dist/es/models/licensing/v4/error/AppMessage.js +464 -0
- package/dist/es/models/licensing/v4/error/ErrorResponse.d.ts +52 -0
- package/dist/es/models/licensing/v4/error/ErrorResponse.js +331 -0
- package/dist/es/models/licensing/v4/error/SchemaValidationError.d.ts +108 -0
- package/dist/es/models/licensing/v4/error/SchemaValidationError.js +440 -0
- package/dist/es/models/licensing/v4/error/SchemaValidationErrorMessage.d.ts +76 -0
- package/dist/es/models/licensing/v4/error/SchemaValidationErrorMessage.js +350 -0
- package/dist/es/models/prism/v4/config/TaskReference.d.ts +52 -0
- package/dist/es/models/prism/v4/config/TaskReference.js +279 -0
- package/dist/es/models/validation/ValidationError.d.ts +13 -0
- package/dist/es/models/validation/ValidationError.js +60 -0
- package/dist/es/models/validation/ValidationScopes.d.ts +9 -0
- package/dist/es/models/validation/ValidationScopes.js +38 -0
- package/dist/es/utils/ValidationUtils.d.ts +13 -0
- package/dist/es/utils/ValidationUtils.js +85 -0
- package/dist/lib/ApiClient.d.ts +172 -0
- package/dist/lib/ApiClient.js +1262 -0
- package/dist/lib/Paginable.d.ts +95 -0
- package/dist/lib/Paginable.js +287 -0
- package/dist/lib/apis/enduserlicenseagreement-endpoints.d.ts +41 -0
- package/dist/lib/apis/enduserlicenseagreement-endpoints.js +141 -0
- package/dist/lib/apis/licensekeys-endpoints.d.ts +91 -0
- package/dist/lib/apis/licensekeys-endpoints.js +283 -0
- package/dist/lib/apis/licenses-endpoints.d.ts +206 -0
- package/dist/lib/apis/licenses-endpoints.js +480 -0
- package/dist/lib/index.d.ts +230 -0
- package/dist/lib/index.js +916 -0
- package/dist/lib/models/common/v1/config/Flag.d.ts +64 -0
- package/dist/lib/models/common/v1/config/Flag.js +319 -0
- package/dist/lib/models/common/v1/config/KVPair.d.ts +71 -0
- package/dist/lib/models/common/v1/config/KVPair.js +378 -0
- package/dist/lib/models/common/v1/config/MapOfStringWrapper.d.ts +58 -0
- package/dist/lib/models/common/v1/config/MapOfStringWrapper.js +275 -0
- package/dist/lib/models/common/v1/config/Message.d.ts +87 -0
- package/dist/lib/models/common/v1/config/Message.js +386 -0
- package/dist/lib/models/common/v1/config/MessageSeverity.d.ts +19 -0
- package/dist/lib/models/common/v1/config/MessageSeverity.js +91 -0
- package/dist/lib/models/common/v1/config/TenantAwareModel.d.ts +52 -0
- package/dist/lib/models/common/v1/config/TenantAwareModel.js +275 -0
- package/dist/lib/models/common/v1/response/ApiLink.d.ts +64 -0
- package/dist/lib/models/common/v1/response/ApiLink.js +312 -0
- package/dist/lib/models/common/v1/response/ApiResponseMetadata.d.ts +133 -0
- package/dist/lib/models/common/v1/response/ApiResponseMetadata.js +482 -0
- package/dist/lib/models/common/v1/response/ExternalizableAbstractModel.d.ts +48 -0
- package/dist/lib/models/common/v1/response/ExternalizableAbstractModel.js +310 -0
- package/dist/lib/models/licensing/v4/agreements/Acceptance.d.ts +81 -0
- package/dist/lib/models/licensing/v4/agreements/Acceptance.js +314 -0
- package/dist/lib/models/licensing/v4/agreements/AddUserApiResponse.d.ts +99 -0
- package/dist/lib/models/licensing/v4/agreements/AddUserApiResponse.js +365 -0
- package/dist/lib/models/licensing/v4/agreements/EndUser.d.ts +110 -0
- package/dist/lib/models/licensing/v4/agreements/EndUser.js +420 -0
- package/dist/lib/models/licensing/v4/agreements/Eula.d.ts +115 -0
- package/dist/lib/models/licensing/v4/agreements/Eula.js +441 -0
- package/dist/lib/models/licensing/v4/agreements/GetEulaApiResponse.d.ts +99 -0
- package/dist/lib/models/licensing/v4/agreements/GetEulaApiResponse.js +343 -0
- package/dist/lib/models/licensing/v4/config/AddLicenseKeyApiResponse.d.ts +103 -0
- package/dist/lib/models/licensing/v4/config/AddLicenseKeyApiResponse.js +347 -0
- package/dist/lib/models/licensing/v4/config/AddLicenseKeyDryRunApiResponse.d.ts +137 -0
- package/dist/lib/models/licensing/v4/config/AddLicenseKeyDryRunApiResponse.js +360 -0
- package/dist/lib/models/licensing/v4/config/Allowance.d.ts +70 -0
- package/dist/lib/models/licensing/v4/config/Allowance.js +371 -0
- package/dist/lib/models/licensing/v4/config/AllowanceDetail.d.ts +86 -0
- package/dist/lib/models/licensing/v4/config/AllowanceDetail.js +390 -0
- package/dist/lib/models/licensing/v4/config/AllowanceDetailProjection.d.ts +10 -0
- package/dist/lib/models/licensing/v4/config/AllowanceDetailProjection.js +152 -0
- package/dist/lib/models/licensing/v4/config/AllowanceProjection.d.ts +56 -0
- package/dist/lib/models/licensing/v4/config/AllowanceProjection.js +320 -0
- package/dist/lib/models/licensing/v4/config/AssignLicenseKeysApiResponse.d.ts +102 -0
- package/dist/lib/models/licensing/v4/config/AssignLicenseKeysApiResponse.js +365 -0
- package/dist/lib/models/licensing/v4/config/AssociationType.d.ts +19 -0
- package/dist/lib/models/licensing/v4/config/AssociationType.js +85 -0
- package/dist/lib/models/licensing/v4/config/BaseClusterInfo.d.ts +37 -0
- package/dist/lib/models/licensing/v4/config/BaseClusterInfo.js +271 -0
- package/dist/lib/models/licensing/v4/config/BaseLicenseInfo.d.ts +82 -0
- package/dist/lib/models/licensing/v4/config/BaseLicenseInfo.js +423 -0
- package/dist/lib/models/licensing/v4/config/BillingPlan.d.ts +19 -0
- package/dist/lib/models/licensing/v4/config/BillingPlan.js +91 -0
- package/dist/lib/models/licensing/v4/config/CapacityViolation.d.ts +85 -0
- package/dist/lib/models/licensing/v4/config/CapacityViolation.js +382 -0
- package/dist/lib/models/licensing/v4/config/ClusterLicenseKeyMapping.d.ts +30 -0
- package/dist/lib/models/licensing/v4/config/ClusterLicenseKeyMapping.js +269 -0
- package/dist/lib/models/licensing/v4/config/ClusterLicenseKeyMappingProjection.d.ts +10 -0
- package/dist/lib/models/licensing/v4/config/ClusterLicenseKeyMappingProjection.js +151 -0
- package/dist/lib/models/licensing/v4/config/ClusterType.d.ts +19 -0
- package/dist/lib/models/licensing/v4/config/ClusterType.js +91 -0
- package/dist/lib/models/licensing/v4/config/Compliance.d.ts +78 -0
- package/dist/lib/models/licensing/v4/config/Compliance.js +371 -0
- package/dist/lib/models/licensing/v4/config/ComplianceProjection.d.ts +72 -0
- package/dist/lib/models/licensing/v4/config/ComplianceProjection.js +320 -0
- package/dist/lib/models/licensing/v4/config/Consumption.d.ts +64 -0
- package/dist/lib/models/licensing/v4/config/Consumption.js +315 -0
- package/dist/lib/models/licensing/v4/config/ConsumptionProjection.d.ts +10 -0
- package/dist/lib/models/licensing/v4/config/ConsumptionProjection.js +150 -0
- package/dist/lib/models/licensing/v4/config/ConsumptionType.d.ts +19 -0
- package/dist/lib/models/licensing/v4/config/ConsumptionType.js +85 -0
- package/dist/lib/models/licensing/v4/config/DeleteLicenseKeyApiResponse.d.ts +98 -0
- package/dist/lib/models/licensing/v4/config/DeleteLicenseKeyApiResponse.js +345 -0
- package/dist/lib/models/licensing/v4/config/DryRunCheck.d.ts +72 -0
- package/dist/lib/models/licensing/v4/config/DryRunCheck.js +325 -0
- package/dist/lib/models/licensing/v4/config/DryRunStatus.d.ts +19 -0
- package/dist/lib/models/licensing/v4/config/DryRunStatus.js +86 -0
- package/dist/lib/models/licensing/v4/config/DryRunValidationResult.d.ts +68 -0
- package/dist/lib/models/licensing/v4/config/DryRunValidationResult.js +297 -0
- package/dist/lib/models/licensing/v4/config/EnforcementActions.d.ts +19 -0
- package/dist/lib/models/licensing/v4/config/EnforcementActions.js +139 -0
- package/dist/lib/models/licensing/v4/config/EnforcementLevel.d.ts +19 -0
- package/dist/lib/models/licensing/v4/config/EnforcementLevel.js +85 -0
- package/dist/lib/models/licensing/v4/config/EnforcementPolicy.d.ts +19 -0
- package/dist/lib/models/licensing/v4/config/EnforcementPolicy.js +85 -0
- package/dist/lib/models/licensing/v4/config/Entitlement.d.ts +98 -0
- package/dist/lib/models/licensing/v4/config/Entitlement.js +450 -0
- package/dist/lib/models/licensing/v4/config/EntitlementDetail.d.ts +131 -0
- package/dist/lib/models/licensing/v4/config/EntitlementDetail.js +534 -0
- package/dist/lib/models/licensing/v4/config/EntitlementDetailProjection.d.ts +10 -0
- package/dist/lib/models/licensing/v4/config/EntitlementDetailProjection.js +155 -0
- package/dist/lib/models/licensing/v4/config/EntitlementProjection.d.ts +66 -0
- package/dist/lib/models/licensing/v4/config/EntitlementProjection.js +338 -0
- package/dist/lib/models/licensing/v4/config/ExpiredLicense.d.ts +65 -0
- package/dist/lib/models/licensing/v4/config/ExpiredLicense.js +396 -0
- package/dist/lib/models/licensing/v4/config/Feature.d.ts +104 -0
- package/dist/lib/models/licensing/v4/config/Feature.js +512 -0
- package/dist/lib/models/licensing/v4/config/FeatureDetail.d.ts +76 -0
- package/dist/lib/models/licensing/v4/config/FeatureDetail.js +359 -0
- package/dist/lib/models/licensing/v4/config/FeatureProjection.d.ts +10 -0
- package/dist/lib/models/licensing/v4/config/FeatureProjection.js +152 -0
- package/dist/lib/models/licensing/v4/config/FeatureViolation.d.ts +31 -0
- package/dist/lib/models/licensing/v4/config/FeatureViolation.js +278 -0
- package/dist/lib/models/licensing/v4/config/GetLicenseKeyApiResponse.d.ts +99 -0
- package/dist/lib/models/licensing/v4/config/GetLicenseKeyApiResponse.js +343 -0
- package/dist/lib/models/licensing/v4/config/License.d.ts +95 -0
- package/dist/lib/models/licensing/v4/config/License.js +484 -0
- package/dist/lib/models/licensing/v4/config/LicenseCategory.d.ts +19 -0
- package/dist/lib/models/licensing/v4/config/LicenseCategory.js +295 -0
- package/dist/lib/models/licensing/v4/config/LicenseClass.d.ts +19 -0
- package/dist/lib/models/licensing/v4/config/LicenseClass.js +91 -0
- package/dist/lib/models/licensing/v4/config/LicenseKey.d.ts +181 -0
- package/dist/lib/models/licensing/v4/config/LicenseKey.js +707 -0
- package/dist/lib/models/licensing/v4/config/LicenseKeyAssignment.d.ts +71 -0
- package/dist/lib/models/licensing/v4/config/LicenseKeyAssignment.js +329 -0
- package/dist/lib/models/licensing/v4/config/LicenseKeyAssignmentSpec.d.ts +75 -0
- package/dist/lib/models/licensing/v4/config/LicenseKeyAssignmentSpec.js +296 -0
- package/dist/lib/models/licensing/v4/config/LicenseKeyAssociation.d.ts +104 -0
- package/dist/lib/models/licensing/v4/config/LicenseKeyAssociation.js +403 -0
- package/dist/lib/models/licensing/v4/config/LicenseKeyAssociationProjection.d.ts +16 -0
- package/dist/lib/models/licensing/v4/config/LicenseKeyAssociationProjection.js +164 -0
- package/dist/lib/models/licensing/v4/config/LicenseKeyAssociationSpec.d.ts +71 -0
- package/dist/lib/models/licensing/v4/config/LicenseKeyAssociationSpec.js +296 -0
- package/dist/lib/models/licensing/v4/config/LicenseKeyMapping.d.ts +64 -0
- package/dist/lib/models/licensing/v4/config/LicenseKeyMapping.js +315 -0
- package/dist/lib/models/licensing/v4/config/LicenseKeyProjection.d.ts +91 -0
- package/dist/lib/models/licensing/v4/config/LicenseKeyProjection.js +431 -0
- package/dist/lib/models/licensing/v4/config/LicenseKeySubCategory.d.ts +19 -0
- package/dist/lib/models/licensing/v4/config/LicenseKeySubCategory.js +85 -0
- package/dist/lib/models/licensing/v4/config/LicenseProjection.d.ts +58 -0
- package/dist/lib/models/licensing/v4/config/LicenseProjection.js +374 -0
- package/dist/lib/models/licensing/v4/config/LicenseStateSyncSpec.d.ts +75 -0
- package/dist/lib/models/licensing/v4/config/LicenseStateSyncSpec.js +364 -0
- package/dist/lib/models/licensing/v4/config/LicenseType.d.ts +19 -0
- package/dist/lib/models/licensing/v4/config/LicenseType.js +283 -0
- package/dist/lib/models/licensing/v4/config/ListAllowancesApiResponse.d.ts +100 -0
- package/dist/lib/models/licensing/v4/config/ListAllowancesApiResponse.js +370 -0
- package/dist/lib/models/licensing/v4/config/ListCompliancesApiResponse.d.ts +100 -0
- package/dist/lib/models/licensing/v4/config/ListCompliancesApiResponse.js +370 -0
- package/dist/lib/models/licensing/v4/config/ListEntitlementsApiResponse.d.ts +100 -0
- package/dist/lib/models/licensing/v4/config/ListEntitlementsApiResponse.js +370 -0
- package/dist/lib/models/licensing/v4/config/ListFeaturesApiResponse.d.ts +100 -0
- package/dist/lib/models/licensing/v4/config/ListFeaturesApiResponse.js +370 -0
- package/dist/lib/models/licensing/v4/config/ListLicenseKeysApiResponse.d.ts +100 -0
- package/dist/lib/models/licensing/v4/config/ListLicenseKeysApiResponse.js +370 -0
- package/dist/lib/models/licensing/v4/config/ListLicensesApiResponse.d.ts +100 -0
- package/dist/lib/models/licensing/v4/config/ListLicensesApiResponse.js +370 -0
- package/dist/lib/models/licensing/v4/config/ListRecommendationsApiResponse.d.ts +99 -0
- package/dist/lib/models/licensing/v4/config/ListRecommendationsApiResponse.js +365 -0
- package/dist/lib/models/licensing/v4/config/ListSettingsApiResponse.d.ts +99 -0
- package/dist/lib/models/licensing/v4/config/ListSettingsApiResponse.js +365 -0
- package/dist/lib/models/licensing/v4/config/ListViolationsApiResponse.d.ts +99 -0
- package/dist/lib/models/licensing/v4/config/ListViolationsApiResponse.js +365 -0
- package/dist/lib/models/licensing/v4/config/LogicalVersion.d.ts +64 -0
- package/dist/lib/models/licensing/v4/config/LogicalVersion.js +312 -0
- package/dist/lib/models/licensing/v4/config/Meter.d.ts +19 -0
- package/dist/lib/models/licensing/v4/config/Meter.js +127 -0
- package/dist/lib/models/licensing/v4/config/OperationType.d.ts +19 -0
- package/dist/lib/models/licensing/v4/config/OperationType.js +97 -0
- package/dist/lib/models/licensing/v4/config/PortalSetting.d.ts +86 -0
- package/dist/lib/models/licensing/v4/config/PortalSetting.js +359 -0
- package/dist/lib/models/licensing/v4/config/PostPaidCategory.d.ts +19 -0
- package/dist/lib/models/licensing/v4/config/PostPaidCategory.js +85 -0
- package/dist/lib/models/licensing/v4/config/PostPaidConfig.d.ts +97 -0
- package/dist/lib/models/licensing/v4/config/PostPaidConfig.js +423 -0
- package/dist/lib/models/licensing/v4/config/ProductName.d.ts +19 -0
- package/dist/lib/models/licensing/v4/config/ProductName.js +115 -0
- package/dist/lib/models/licensing/v4/config/ReclaimType.d.ts +19 -0
- package/dist/lib/models/licensing/v4/config/ReclaimType.js +85 -0
- package/dist/lib/models/licensing/v4/config/Recommendation.d.ts +47 -0
- package/dist/lib/models/licensing/v4/config/Recommendation.js +287 -0
- package/dist/lib/models/licensing/v4/config/RecommendationDetail.d.ts +98 -0
- package/dist/lib/models/licensing/v4/config/RecommendationDetail.js +429 -0
- package/dist/lib/models/licensing/v4/config/RecommendationScope.d.ts +19 -0
- package/dist/lib/models/licensing/v4/config/RecommendationScope.js +85 -0
- package/dist/lib/models/licensing/v4/config/ResetScope.d.ts +19 -0
- package/dist/lib/models/licensing/v4/config/ResetScope.js +85 -0
- package/dist/lib/models/licensing/v4/config/Scope.d.ts +19 -0
- package/dist/lib/models/licensing/v4/config/Scope.js +91 -0
- package/dist/lib/models/licensing/v4/config/Service.d.ts +117 -0
- package/dist/lib/models/licensing/v4/config/Service.js +482 -0
- package/dist/lib/models/licensing/v4/config/ServiceProjection.d.ts +10 -0
- package/dist/lib/models/licensing/v4/config/ServiceProjection.js +155 -0
- package/dist/lib/models/licensing/v4/config/ServiceViolation.d.ts +63 -0
- package/dist/lib/models/licensing/v4/config/ServiceViolation.js +311 -0
- package/dist/lib/models/licensing/v4/config/ServiceViolationType.d.ts +19 -0
- package/dist/lib/models/licensing/v4/config/ServiceViolationType.js +91 -0
- package/dist/lib/models/licensing/v4/config/Setting.d.ts +145 -0
- package/dist/lib/models/licensing/v4/config/Setting.js +581 -0
- package/dist/lib/models/licensing/v4/config/Status.d.ts +19 -0
- package/dist/lib/models/licensing/v4/config/Status.js +85 -0
- package/dist/lib/models/licensing/v4/config/SubCategory.d.ts +19 -0
- package/dist/lib/models/licensing/v4/config/SubCategory.js +85 -0
- package/dist/lib/models/licensing/v4/config/SyncLicenseStateApiResponse.d.ts +99 -0
- package/dist/lib/models/licensing/v4/config/SyncLicenseStateApiResponse.js +343 -0
- package/dist/lib/models/licensing/v4/config/SyncOperationType.d.ts +19 -0
- package/dist/lib/models/licensing/v4/config/SyncOperationType.js +121 -0
- package/dist/lib/models/licensing/v4/config/Trial.d.ts +93 -0
- package/dist/lib/models/licensing/v4/config/Trial.js +421 -0
- package/dist/lib/models/licensing/v4/config/TrialCategory.d.ts +19 -0
- package/dist/lib/models/licensing/v4/config/TrialCategory.js +79 -0
- package/dist/lib/models/licensing/v4/config/TrialProjection.d.ts +12 -0
- package/dist/lib/models/licensing/v4/config/TrialProjection.js +159 -0
- package/dist/lib/models/licensing/v4/config/TrialStatus.d.ts +19 -0
- package/dist/lib/models/licensing/v4/config/TrialStatus.js +85 -0
- package/dist/lib/models/licensing/v4/config/TrialType.d.ts +19 -0
- package/dist/lib/models/licensing/v4/config/TrialType.js +79 -0
- package/dist/lib/models/licensing/v4/config/ValueType.d.ts +19 -0
- package/dist/lib/models/licensing/v4/config/ValueType.js +85 -0
- package/dist/lib/models/licensing/v4/config/Violation.d.ts +102 -0
- package/dist/lib/models/licensing/v4/config/Violation.js +398 -0
- package/dist/lib/models/licensing/v4/error/AppMessage.d.ts +117 -0
- package/dist/lib/models/licensing/v4/error/AppMessage.js +464 -0
- package/dist/lib/models/licensing/v4/error/ErrorResponse.d.ts +52 -0
- package/dist/lib/models/licensing/v4/error/ErrorResponse.js +331 -0
- package/dist/lib/models/licensing/v4/error/SchemaValidationError.d.ts +108 -0
- package/dist/lib/models/licensing/v4/error/SchemaValidationError.js +440 -0
- package/dist/lib/models/licensing/v4/error/SchemaValidationErrorMessage.d.ts +76 -0
- package/dist/lib/models/licensing/v4/error/SchemaValidationErrorMessage.js +350 -0
- package/dist/lib/models/prism/v4/config/TaskReference.d.ts +52 -0
- package/dist/lib/models/prism/v4/config/TaskReference.js +279 -0
- package/dist/lib/models/validation/ValidationError.d.ts +13 -0
- package/dist/lib/models/validation/ValidationError.js +60 -0
- package/dist/lib/models/validation/ValidationScopes.d.ts +9 -0
- package/dist/lib/models/validation/ValidationScopes.js +38 -0
- package/dist/lib/utils/ValidationUtils.d.ts +13 -0
- package/dist/lib/utils/ValidationUtils.js +85 -0
- package/package.json +53 -0
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _ValidationScopes = _interopRequireDefault(require("../../../validation/ValidationScopes"));
|
|
8
|
+
var _ValidationUtils = _interopRequireDefault(require("../../../../utils/ValidationUtils"));
|
|
9
|
+
var _ValidationError = _interopRequireDefault(require("../../../validation/ValidationError"));
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
11
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
12
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
13
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
14
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
15
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
16
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
17
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
18
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
19
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
20
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
21
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
22
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
23
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
24
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
25
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
26
|
+
function _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }
|
|
27
|
+
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); } /*
|
|
28
|
+
* Nutanix Licensing APIs
|
|
29
|
+
*
|
|
30
|
+
* OpenAPI spec version: 1.421.1
|
|
31
|
+
*
|
|
32
|
+
* NOTE: This class is auto generated by the Open API Dev Platform.
|
|
33
|
+
*
|
|
34
|
+
* Open API Dev Platform Codegen version: 17.3.1.9079-RELEASE
|
|
35
|
+
*
|
|
36
|
+
* Do not edit the class manually.
|
|
37
|
+
*
|
|
38
|
+
*/
|
|
39
|
+
/**
|
|
40
|
+
* The TenantAwareModel model module.
|
|
41
|
+
* @module Ntnx/TenantAwareModel
|
|
42
|
+
* @version 1.421.1
|
|
43
|
+
* @class TenantAwareModel
|
|
44
|
+
*/
|
|
45
|
+
var _TenantAwareModel_brand = /*#__PURE__*/new WeakSet();
|
|
46
|
+
var TenantAwareModel = exports["default"] = /*#__PURE__*/function () {
|
|
47
|
+
/**
|
|
48
|
+
* Constructs a new <code>TenantAwareModel</code>.
|
|
49
|
+
* A model base class whose instances are bound to a specific tenant. This model adds a tenantId to the base model class that it extends and is automatically set by the server.
|
|
50
|
+
* @alias module:Ntnx/TenantAwareModel
|
|
51
|
+
*/
|
|
52
|
+
function TenantAwareModel() {
|
|
53
|
+
_classCallCheck(this, TenantAwareModel);
|
|
54
|
+
/*
|
|
55
|
+
* toJson method for a map type which supports map with primitive keys and values of object types
|
|
56
|
+
* @param {Object} obj
|
|
57
|
+
* @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.
|
|
58
|
+
* Otherwise, just returns the input object.
|
|
59
|
+
*/
|
|
60
|
+
_classPrivateMethodInitSpec(this, _TenantAwareModel_brand);
|
|
61
|
+
this.$objectType = "common.v1.config.TenantAwareModel";
|
|
62
|
+
/** @type {object<string, any>} */
|
|
63
|
+
this.$reserved = {
|
|
64
|
+
'$fv': "v1.r0"
|
|
65
|
+
};
|
|
66
|
+
/** @type {object<string, any>} */
|
|
67
|
+
this.$unknownFields = {};
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Constructs a <code>TenantAwareModel</code> from a plain JavaScript object, optionally creating a new instance.
|
|
72
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
73
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
74
|
+
* @param {module:Ntnx/TenantAwareModel} obj Optional instance to populate.
|
|
75
|
+
* @param callFromChild {Boolean} Flag to recognise calling instance
|
|
76
|
+
* @return {module:Ntnx/TenantAwareModel} The populated <code>TenantAwareModel</code> instance.
|
|
77
|
+
*/
|
|
78
|
+
return _createClass(TenantAwareModel, [{
|
|
79
|
+
key: "getTenantId",
|
|
80
|
+
value:
|
|
81
|
+
/**
|
|
82
|
+
* Returns A globally unique identifier that represents the tenant that owns this entity. The system automatically assigns it, and it and is immutable from an API consumer perspective (some use cases may cause this ID to change - For instance, a use case may require the transfer of ownership of the entity, but these cases are handled automatically on the server).
|
|
83
|
+
* @return {string}
|
|
84
|
+
*/
|
|
85
|
+
function getTenantId() {
|
|
86
|
+
return this.tenantId;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Sets A globally unique identifier that represents the tenant that owns this entity. The system automatically assigns it, and it and is immutable from an API consumer perspective (some use cases may cause this ID to change - For instance, a use case may require the transfer of ownership of the entity, but these cases are handled automatically on the server).
|
|
91
|
+
* @param {string} tenantId A globally unique identifier that represents the tenant that owns this entity. The system automatically assigns it, and it and is immutable from an API consumer perspective (some use cases may cause this ID to change - For instance, a use case may require the transfer of ownership of the entity, but these cases are handled automatically on the server).
|
|
92
|
+
*/
|
|
93
|
+
}, {
|
|
94
|
+
key: "setTenantId",
|
|
95
|
+
value: function setTenantId(tenantId) {
|
|
96
|
+
this.tenantId = tenantId;
|
|
97
|
+
}
|
|
98
|
+
}, {
|
|
99
|
+
key: "get$Reserved",
|
|
100
|
+
value: function get$Reserved() {
|
|
101
|
+
return this.$reserved;
|
|
102
|
+
}
|
|
103
|
+
}, {
|
|
104
|
+
key: "get$ObjectType",
|
|
105
|
+
value: function get$ObjectType() {
|
|
106
|
+
return this.$objectType;
|
|
107
|
+
}
|
|
108
|
+
}, {
|
|
109
|
+
key: "get$UnknownFields",
|
|
110
|
+
value: function get$UnknownFields() {
|
|
111
|
+
return this.$unknownFields;
|
|
112
|
+
}
|
|
113
|
+
}, {
|
|
114
|
+
key: "toJson",
|
|
115
|
+
value: function toJson(forMutation) {
|
|
116
|
+
if (forMutation === false) {
|
|
117
|
+
return _objectSpread(_objectSpread({}, typeof this.getTenantId() !== 'undefined' && this.getTenantId() !== null ? {
|
|
118
|
+
'tenantId': this.getTenantId()
|
|
119
|
+
} : {}), {}, {
|
|
120
|
+
'$reserved': this.get$Reserved(),
|
|
121
|
+
'$objectType': this.get$ObjectType(),
|
|
122
|
+
'$unknownFields': this.get$UnknownFields()
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
return {
|
|
126
|
+
'$reserved': this.get$Reserved(),
|
|
127
|
+
'$objectType': this.get$ObjectType(),
|
|
128
|
+
'$unknownFields': this.get$UnknownFields()
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
}, {
|
|
132
|
+
key: "validate",
|
|
133
|
+
value: function validate(scope, properties) {
|
|
134
|
+
var _this = this;
|
|
135
|
+
var propList = [];
|
|
136
|
+
if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _ValidationScopes["default"]) {
|
|
137
|
+
//cases validate() and validate(scope)
|
|
138
|
+
propList = [];
|
|
139
|
+
} else if (arguments.length === 1) {
|
|
140
|
+
//case validate(properties)
|
|
141
|
+
propList = arguments[0];
|
|
142
|
+
scope = null;
|
|
143
|
+
} else {
|
|
144
|
+
//case validate(scope, properties)
|
|
145
|
+
propList = arguments[1];
|
|
146
|
+
}
|
|
147
|
+
var res = [];
|
|
148
|
+
var err = null;
|
|
149
|
+
propList.forEach(function (property) {
|
|
150
|
+
err = _this.validateProperty(property, scope);
|
|
151
|
+
if (err) {
|
|
152
|
+
res.push(err);
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
return new Promise(function (resolve, reject) {
|
|
156
|
+
if (res.length !== 0) {
|
|
157
|
+
reject(err);
|
|
158
|
+
} else {
|
|
159
|
+
resolve();
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
}, {
|
|
164
|
+
key: "validateProperty",
|
|
165
|
+
value: function validateProperty(scope, property) {
|
|
166
|
+
if (property === "tenantId") {
|
|
167
|
+
if (typeof this.tenantId === 'undefined' || this.tenantId === null) {
|
|
168
|
+
return new _ValidationError["default"]("tenantId", "undefined or null");
|
|
169
|
+
}
|
|
170
|
+
if (!_ValidationUtils["default"].validatePattern(this.tenantId, /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)) {
|
|
171
|
+
return new _ValidationError["default"]("tenantId", "does not satisfy required pattern: /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/");
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
if (property === "$reserved") {
|
|
175
|
+
if (typeof this.$reserved === 'undefined' || this.$reserved === null) {
|
|
176
|
+
return new _ValidationError["default"]("$reserved", "undefined or null");
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
if (property === "$objectType") {
|
|
180
|
+
if (typeof this.$objectType === 'undefined' || this.$objectType === null) {
|
|
181
|
+
return new _ValidationError["default"]("$objectType", "undefined or null");
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
if (property === "$unknownFields") {
|
|
185
|
+
if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {
|
|
186
|
+
return new _ValidationError["default"]("$unknownFields", "undefined or null");
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
return new _ValidationError["default"](property, "no such property exists");
|
|
190
|
+
}
|
|
191
|
+
}], [{
|
|
192
|
+
key: "constructFromObject",
|
|
193
|
+
value: function constructFromObject(data) {
|
|
194
|
+
var obj = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
195
|
+
var callFromChild = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
196
|
+
var items, item, i, itemArr, discriminator;
|
|
197
|
+
if (data) {
|
|
198
|
+
obj = obj || new TenantAwareModel();
|
|
199
|
+
if (data.hasOwnProperty('tenantId') && data.tenantId !== null && data.tenantId !== undefined) {
|
|
200
|
+
obj.setTenantId(data['tenantId']);
|
|
201
|
+
}
|
|
202
|
+
if (data.hasOwnProperty('$reserved')) {
|
|
203
|
+
obj.$reserved = data['$reserved'];
|
|
204
|
+
}
|
|
205
|
+
if (data.hasOwnProperty('$objectType')) {
|
|
206
|
+
obj.$objectType = data['$objectType'];
|
|
207
|
+
}
|
|
208
|
+
if (data.hasOwnProperty('$unknownFields')) {
|
|
209
|
+
obj.$unknownFields = data['$unknownFields'];
|
|
210
|
+
}
|
|
211
|
+
if (!callFromChild) {
|
|
212
|
+
obj.$unknownFields = _objectSpread({}, data.$unknownFields);
|
|
213
|
+
for (var property in data) {
|
|
214
|
+
// Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,
|
|
215
|
+
// as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).
|
|
216
|
+
// Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.
|
|
217
|
+
// If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.
|
|
218
|
+
if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === "$" && property.endsWith("ItemDiscriminator"))) {
|
|
219
|
+
obj.$unknownFields[property] = data[property];
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
return obj;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* Converts a given snake_case string to camelCase.
|
|
229
|
+
* @param {string} snakeStr - The input string in snake_case format.
|
|
230
|
+
* @returns {string} - The converted string in camelCase format.
|
|
231
|
+
*/
|
|
232
|
+
}, {
|
|
233
|
+
key: "snakeToCamel",
|
|
234
|
+
value: function snakeToCamel(snakeStr) {
|
|
235
|
+
return snakeStr.replace(/(_\w)/g, function (match) {
|
|
236
|
+
return match[1].toUpperCase();
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
}]);
|
|
240
|
+
}();
|
|
241
|
+
/**
|
|
242
|
+
* A globally unique identifier that represents the tenant that owns this entity. The system automatically assigns it, and it and is immutable from an API consumer perspective (some use cases may cause this ID to change - For instance, a use case may require the transfer of ownership of the entity, but these cases are handled automatically on the server).
|
|
243
|
+
* @memberof TenantAwareModel
|
|
244
|
+
*/
|
|
245
|
+
function _toJsonMapType(obj, forMutation) {
|
|
246
|
+
if (obj instanceof Map) {
|
|
247
|
+
return Object.fromEntries(Array.from(obj, function (_ref) {
|
|
248
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
249
|
+
k = _ref2[0],
|
|
250
|
+
v = _ref2[1];
|
|
251
|
+
return [k, typeof v.toJson !== "undefined" ? v.toJson(forMutation) : v];
|
|
252
|
+
}));
|
|
253
|
+
} else if (_typeof(obj) === 'object' && obj != null && obj.constructor === Object) {
|
|
254
|
+
return Object.fromEntries(Array.from(Object.entries(obj), function (entry) {
|
|
255
|
+
return [entry[0], typeof entry[1].toJson !== "undefined" ? entry[1].toJson(forMutation) : entry[1]];
|
|
256
|
+
}));
|
|
257
|
+
}
|
|
258
|
+
return obj;
|
|
259
|
+
}
|
|
260
|
+
/*
|
|
261
|
+
* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting
|
|
262
|
+
* @param {Object} obj Object to serialize
|
|
263
|
+
* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization
|
|
264
|
+
* @returns {Object|string} Returns serialized date object or original input object
|
|
265
|
+
*/
|
|
266
|
+
function _handleDateType(obj, isDateOnly) {
|
|
267
|
+
if (obj instanceof Date && isDateOnly !== undefined) {
|
|
268
|
+
return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();
|
|
269
|
+
}
|
|
270
|
+
return obj;
|
|
271
|
+
}
|
|
272
|
+
TenantAwareModel.prototype.tenantId = undefined;
|
|
273
|
+
TenantAwareModel.prototype.$reserved = undefined;
|
|
274
|
+
TenantAwareModel.prototype.$objectType = undefined;
|
|
275
|
+
TenantAwareModel.prototype.$unknownFields = undefined;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The ApiLink model module.
|
|
3
|
+
* @module Ntnx/ApiLink
|
|
4
|
+
* @version 1.421.1
|
|
5
|
+
* @class ApiLink
|
|
6
|
+
*/
|
|
7
|
+
export default class ApiLink {
|
|
8
|
+
/**
|
|
9
|
+
* Constructs a <code>ApiLink</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/ApiLink} obj Optional instance to populate.
|
|
13
|
+
* @param callFromChild {Boolean} Flag to recognise calling instance
|
|
14
|
+
* @return {module:Ntnx/ApiLink} The populated <code>ApiLink</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
|
+
* Returns The URL at which the entity described by the link can be accessed.
|
|
30
|
+
* @return {string}
|
|
31
|
+
*/
|
|
32
|
+
getHref(): string;
|
|
33
|
+
/**
|
|
34
|
+
* Sets The URL at which the entity described by the link can be accessed.
|
|
35
|
+
* @param {string} href The URL at which the entity described by the link can be accessed.
|
|
36
|
+
*/
|
|
37
|
+
setHref(href: string): void;
|
|
38
|
+
href: string;
|
|
39
|
+
/**
|
|
40
|
+
* Returns A name that identifies the relationship of the link to the object that is returned by the URL. The unique value of \"self\" identifies the URL for the object.
|
|
41
|
+
* @return {string}
|
|
42
|
+
*/
|
|
43
|
+
getRel(): string;
|
|
44
|
+
/**
|
|
45
|
+
* Sets A name that identifies the relationship of the link to the object that is returned by the URL. The unique value of \"self\" identifies the URL for the object.
|
|
46
|
+
* @param {string} rel A name that identifies the relationship of the link to the object that is returned by the URL. The unique value of \"self\" identifies the URL for the object.
|
|
47
|
+
*/
|
|
48
|
+
setRel(rel: string): void;
|
|
49
|
+
rel: string;
|
|
50
|
+
get$Reserved(): any;
|
|
51
|
+
get$ObjectType(): string;
|
|
52
|
+
get$UnknownFields(): any;
|
|
53
|
+
toJson(forMutation: any): {
|
|
54
|
+
$reserved: any;
|
|
55
|
+
$objectType: string;
|
|
56
|
+
$unknownFields: any;
|
|
57
|
+
rel?: string;
|
|
58
|
+
href?: string;
|
|
59
|
+
};
|
|
60
|
+
validate(scope: any, properties: any, ...args: any[]): Promise<any>;
|
|
61
|
+
validateProperty(scope: any, property: any): ValidationError;
|
|
62
|
+
#private;
|
|
63
|
+
}
|
|
64
|
+
import ValidationError from "../../../validation/ValidationError";
|
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _ValidationScopes = _interopRequireDefault(require("../../../validation/ValidationScopes"));
|
|
8
|
+
var _ValidationUtils = _interopRequireDefault(require("../../../../utils/ValidationUtils"));
|
|
9
|
+
var _ValidationError = _interopRequireDefault(require("../../../validation/ValidationError"));
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
11
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
12
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
13
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
14
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
15
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
16
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
17
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
18
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
19
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
20
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
21
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
22
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
23
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
24
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
25
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
26
|
+
function _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }
|
|
27
|
+
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); } /*
|
|
28
|
+
* Nutanix Licensing APIs
|
|
29
|
+
*
|
|
30
|
+
* OpenAPI spec version: 1.421.1
|
|
31
|
+
*
|
|
32
|
+
* NOTE: This class is auto generated by the Open API Dev Platform.
|
|
33
|
+
*
|
|
34
|
+
* Open API Dev Platform Codegen version: 17.3.1.9079-RELEASE
|
|
35
|
+
*
|
|
36
|
+
* Do not edit the class manually.
|
|
37
|
+
*
|
|
38
|
+
*/
|
|
39
|
+
/**
|
|
40
|
+
* The ApiLink model module.
|
|
41
|
+
* @module Ntnx/ApiLink
|
|
42
|
+
* @version 1.421.1
|
|
43
|
+
* @class ApiLink
|
|
44
|
+
*/
|
|
45
|
+
var _ApiLink_brand = /*#__PURE__*/new WeakSet();
|
|
46
|
+
var ApiLink = exports["default"] = /*#__PURE__*/function () {
|
|
47
|
+
/**
|
|
48
|
+
* Constructs a new <code>ApiLink</code>.
|
|
49
|
+
* A HATEOAS style link for the response. Each link contains a user-friendly name identifying the link and an address for retrieving the particular resource.
|
|
50
|
+
* @alias module:Ntnx/ApiLink
|
|
51
|
+
*/
|
|
52
|
+
function ApiLink() {
|
|
53
|
+
_classCallCheck(this, ApiLink);
|
|
54
|
+
/*
|
|
55
|
+
* toJson method for a map type which supports map with primitive keys and values of object types
|
|
56
|
+
* @param {Object} obj
|
|
57
|
+
* @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.
|
|
58
|
+
* Otherwise, just returns the input object.
|
|
59
|
+
*/
|
|
60
|
+
_classPrivateMethodInitSpec(this, _ApiLink_brand);
|
|
61
|
+
this.$objectType = "common.v1.response.ApiLink";
|
|
62
|
+
/** @type {object<string, any>} */
|
|
63
|
+
this.$reserved = {
|
|
64
|
+
'$fv': "v1.r0"
|
|
65
|
+
};
|
|
66
|
+
/** @type {object<string, any>} */
|
|
67
|
+
this.$unknownFields = {};
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Constructs a <code>ApiLink</code> from a plain JavaScript object, optionally creating a new instance.
|
|
72
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
73
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
74
|
+
* @param {module:Ntnx/ApiLink} obj Optional instance to populate.
|
|
75
|
+
* @param callFromChild {Boolean} Flag to recognise calling instance
|
|
76
|
+
* @return {module:Ntnx/ApiLink} The populated <code>ApiLink</code> instance.
|
|
77
|
+
*/
|
|
78
|
+
return _createClass(ApiLink, [{
|
|
79
|
+
key: "getHref",
|
|
80
|
+
value:
|
|
81
|
+
/**
|
|
82
|
+
* Returns The URL at which the entity described by the link can be accessed.
|
|
83
|
+
* @return {string}
|
|
84
|
+
*/
|
|
85
|
+
function getHref() {
|
|
86
|
+
return this.href;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Sets The URL at which the entity described by the link can be accessed.
|
|
91
|
+
* @param {string} href The URL at which the entity described by the link can be accessed.
|
|
92
|
+
*/
|
|
93
|
+
}, {
|
|
94
|
+
key: "setHref",
|
|
95
|
+
value: function setHref(href) {
|
|
96
|
+
this.href = href;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Returns A name that identifies the relationship of the link to the object that is returned by the URL. The unique value of \"self\" identifies the URL for the object.
|
|
101
|
+
* @return {string}
|
|
102
|
+
*/
|
|
103
|
+
}, {
|
|
104
|
+
key: "getRel",
|
|
105
|
+
value: function getRel() {
|
|
106
|
+
return this.rel;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Sets A name that identifies the relationship of the link to the object that is returned by the URL. The unique value of \"self\" identifies the URL for the object.
|
|
111
|
+
* @param {string} rel A name that identifies the relationship of the link to the object that is returned by the URL. The unique value of \"self\" identifies the URL for the object.
|
|
112
|
+
*/
|
|
113
|
+
}, {
|
|
114
|
+
key: "setRel",
|
|
115
|
+
value: function setRel(rel) {
|
|
116
|
+
this.rel = rel;
|
|
117
|
+
}
|
|
118
|
+
}, {
|
|
119
|
+
key: "get$Reserved",
|
|
120
|
+
value: function get$Reserved() {
|
|
121
|
+
return this.$reserved;
|
|
122
|
+
}
|
|
123
|
+
}, {
|
|
124
|
+
key: "get$ObjectType",
|
|
125
|
+
value: function get$ObjectType() {
|
|
126
|
+
return this.$objectType;
|
|
127
|
+
}
|
|
128
|
+
}, {
|
|
129
|
+
key: "get$UnknownFields",
|
|
130
|
+
value: function get$UnknownFields() {
|
|
131
|
+
return this.$unknownFields;
|
|
132
|
+
}
|
|
133
|
+
}, {
|
|
134
|
+
key: "toJson",
|
|
135
|
+
value: function toJson(forMutation) {
|
|
136
|
+
if (forMutation === false) {
|
|
137
|
+
return _objectSpread(_objectSpread(_objectSpread({}, typeof this.getHref() !== 'undefined' && this.getHref() !== null ? {
|
|
138
|
+
'href': this.getHref()
|
|
139
|
+
} : {}), typeof this.getRel() !== 'undefined' && this.getRel() !== null ? {
|
|
140
|
+
'rel': this.getRel()
|
|
141
|
+
} : {}), {}, {
|
|
142
|
+
'$reserved': this.get$Reserved(),
|
|
143
|
+
'$objectType': this.get$ObjectType(),
|
|
144
|
+
'$unknownFields': this.get$UnknownFields()
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
return _objectSpread(_objectSpread(_objectSpread({}, typeof this.getHref() !== 'undefined' && this.getHref() !== null ? {
|
|
148
|
+
'href': this.getHref()
|
|
149
|
+
} : {}), typeof this.getRel() !== 'undefined' && this.getRel() !== null ? {
|
|
150
|
+
'rel': this.getRel()
|
|
151
|
+
} : {}), {}, {
|
|
152
|
+
'$reserved': this.get$Reserved(),
|
|
153
|
+
'$objectType': this.get$ObjectType(),
|
|
154
|
+
'$unknownFields': this.get$UnknownFields()
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
}, {
|
|
158
|
+
key: "validate",
|
|
159
|
+
value: function validate(scope, properties) {
|
|
160
|
+
var _this = this;
|
|
161
|
+
var propList = [];
|
|
162
|
+
if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _ValidationScopes["default"]) {
|
|
163
|
+
//cases validate() and validate(scope)
|
|
164
|
+
propList = [];
|
|
165
|
+
} else if (arguments.length === 1) {
|
|
166
|
+
//case validate(properties)
|
|
167
|
+
propList = arguments[0];
|
|
168
|
+
scope = null;
|
|
169
|
+
} else {
|
|
170
|
+
//case validate(scope, properties)
|
|
171
|
+
propList = arguments[1];
|
|
172
|
+
}
|
|
173
|
+
var res = [];
|
|
174
|
+
var err = null;
|
|
175
|
+
propList.forEach(function (property) {
|
|
176
|
+
err = _this.validateProperty(property, scope);
|
|
177
|
+
if (err) {
|
|
178
|
+
res.push(err);
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
return new Promise(function (resolve, reject) {
|
|
182
|
+
if (res.length !== 0) {
|
|
183
|
+
reject(err);
|
|
184
|
+
} else {
|
|
185
|
+
resolve();
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
}, {
|
|
190
|
+
key: "validateProperty",
|
|
191
|
+
value: function validateProperty(scope, property) {
|
|
192
|
+
if (property === "href") {
|
|
193
|
+
if (typeof this.href === 'undefined' || this.href === null) {
|
|
194
|
+
return new _ValidationError["default"]("href", "undefined or null");
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
if (property === "rel") {
|
|
198
|
+
if (typeof this.rel === 'undefined' || this.rel === null) {
|
|
199
|
+
return new _ValidationError["default"]("rel", "undefined or null");
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
if (property === "$reserved") {
|
|
203
|
+
if (typeof this.$reserved === 'undefined' || this.$reserved === null) {
|
|
204
|
+
return new _ValidationError["default"]("$reserved", "undefined or null");
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
if (property === "$objectType") {
|
|
208
|
+
if (typeof this.$objectType === 'undefined' || this.$objectType === null) {
|
|
209
|
+
return new _ValidationError["default"]("$objectType", "undefined or null");
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
if (property === "$unknownFields") {
|
|
213
|
+
if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {
|
|
214
|
+
return new _ValidationError["default"]("$unknownFields", "undefined or null");
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
return new _ValidationError["default"](property, "no such property exists");
|
|
218
|
+
}
|
|
219
|
+
}], [{
|
|
220
|
+
key: "constructFromObject",
|
|
221
|
+
value: function constructFromObject(data) {
|
|
222
|
+
var obj = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
223
|
+
var callFromChild = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
224
|
+
var items, item, i, itemArr, discriminator;
|
|
225
|
+
if (data) {
|
|
226
|
+
obj = obj || new ApiLink();
|
|
227
|
+
if (data.hasOwnProperty('href') && data.href !== null && data.href !== undefined) {
|
|
228
|
+
obj.setHref(data['href']);
|
|
229
|
+
}
|
|
230
|
+
if (data.hasOwnProperty('rel') && data.rel !== null && data.rel !== undefined) {
|
|
231
|
+
obj.setRel(data['rel']);
|
|
232
|
+
}
|
|
233
|
+
if (data.hasOwnProperty('$reserved')) {
|
|
234
|
+
obj.$reserved = data['$reserved'];
|
|
235
|
+
}
|
|
236
|
+
if (data.hasOwnProperty('$objectType')) {
|
|
237
|
+
obj.$objectType = data['$objectType'];
|
|
238
|
+
}
|
|
239
|
+
if (data.hasOwnProperty('$unknownFields')) {
|
|
240
|
+
obj.$unknownFields = data['$unknownFields'];
|
|
241
|
+
}
|
|
242
|
+
if (!callFromChild) {
|
|
243
|
+
obj.$unknownFields = _objectSpread({}, data.$unknownFields);
|
|
244
|
+
for (var property in data) {
|
|
245
|
+
// Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,
|
|
246
|
+
// as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).
|
|
247
|
+
// Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.
|
|
248
|
+
// If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.
|
|
249
|
+
if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === "$" && property.endsWith("ItemDiscriminator"))) {
|
|
250
|
+
obj.$unknownFields[property] = data[property];
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
return obj;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* Converts a given snake_case string to camelCase.
|
|
260
|
+
* @param {string} snakeStr - The input string in snake_case format.
|
|
261
|
+
* @returns {string} - The converted string in camelCase format.
|
|
262
|
+
*/
|
|
263
|
+
}, {
|
|
264
|
+
key: "snakeToCamel",
|
|
265
|
+
value: function snakeToCamel(snakeStr) {
|
|
266
|
+
return snakeStr.replace(/(_\w)/g, function (match) {
|
|
267
|
+
return match[1].toUpperCase();
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
}]);
|
|
271
|
+
}();
|
|
272
|
+
/**
|
|
273
|
+
* The URL at which the entity described by the link can be accessed.
|
|
274
|
+
* @memberof ApiLink
|
|
275
|
+
*/
|
|
276
|
+
function _toJsonMapType(obj, forMutation) {
|
|
277
|
+
if (obj instanceof Map) {
|
|
278
|
+
return Object.fromEntries(Array.from(obj, function (_ref) {
|
|
279
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
280
|
+
k = _ref2[0],
|
|
281
|
+
v = _ref2[1];
|
|
282
|
+
return [k, typeof v.toJson !== "undefined" ? v.toJson(forMutation) : v];
|
|
283
|
+
}));
|
|
284
|
+
} else if (_typeof(obj) === 'object' && obj != null && obj.constructor === Object) {
|
|
285
|
+
return Object.fromEntries(Array.from(Object.entries(obj), function (entry) {
|
|
286
|
+
return [entry[0], typeof entry[1].toJson !== "undefined" ? entry[1].toJson(forMutation) : entry[1]];
|
|
287
|
+
}));
|
|
288
|
+
}
|
|
289
|
+
return obj;
|
|
290
|
+
}
|
|
291
|
+
/*
|
|
292
|
+
* toJson method for a date type which serializes a Date object to proper Date or DateTime formatting
|
|
293
|
+
* @param {Object} obj Object to serialize
|
|
294
|
+
* @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization
|
|
295
|
+
* @returns {Object|string} Returns serialized date object or original input object
|
|
296
|
+
*/
|
|
297
|
+
function _handleDateType(obj, isDateOnly) {
|
|
298
|
+
if (obj instanceof Date && isDateOnly !== undefined) {
|
|
299
|
+
return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();
|
|
300
|
+
}
|
|
301
|
+
return obj;
|
|
302
|
+
}
|
|
303
|
+
ApiLink.prototype.href = undefined;
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* A name that identifies the relationship of the link to the object that is returned by the URL. The unique value of \"self\" identifies the URL for the object.
|
|
307
|
+
* @memberof ApiLink
|
|
308
|
+
*/
|
|
309
|
+
ApiLink.prototype.rel = undefined;
|
|
310
|
+
ApiLink.prototype.$reserved = undefined;
|
|
311
|
+
ApiLink.prototype.$objectType = undefined;
|
|
312
|
+
ApiLink.prototype.$unknownFields = undefined;
|