@nutanix-scratch/licensing-js-client 4.0.1-alpha.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 +49 -0
- package/README.md +197 -0
- package/dist/Ntnx-Licensing-js-client-prod.js +1 -0
- package/dist/Ntnx-Licensing-js-client.js +1257 -0
- package/dist/es/ApiClient.d.ts +159 -0
- package/dist/es/ApiClient.js +1211 -0
- package/dist/es/Paginable.d.ts +95 -0
- package/dist/es/Paginable.js +287 -0
- package/dist/es/apis/enduserlicenseagreements-endpoints.d.ts +51 -0
- package/dist/es/apis/enduserlicenseagreements-endpoints.js +183 -0
- package/dist/es/apis/licenses-endpoints.d.ts +292 -0
- package/dist/es/apis/licenses-endpoints.js +666 -0
- package/dist/es/index.d.ts +160 -0
- package/dist/es/index.js +636 -0
- package/dist/es/models/common/v1/config/Flag.d.ts +58 -0
- package/dist/es/models/common/v1/config/Flag.js +275 -0
- package/dist/es/models/common/v1/config/KVPair.d.ts +62 -0
- package/dist/es/models/common/v1/config/KVPair.js +332 -0
- package/dist/es/models/common/v1/config/Message.d.ts +84 -0
- package/dist/es/models/common/v1/config/Message.js +354 -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 +50 -0
- package/dist/es/models/common/v1/config/TenantAwareModel.js +243 -0
- package/dist/es/models/common/v1/response/ApiLink.d.ts +62 -0
- package/dist/es/models/common/v1/response/ApiLink.js +280 -0
- package/dist/es/models/common/v1/response/ApiResponseMetadata.d.ts +98 -0
- package/dist/es/models/common/v1/response/ApiResponseMetadata.js +438 -0
- package/dist/es/models/common/v1/response/ExternalizableAbstractModel.d.ts +42 -0
- package/dist/es/models/common/v1/response/ExternalizableAbstractModel.js +270 -0
- package/dist/es/models/licensing/v4/agreements/AddUserApiResponse.d.ts +59 -0
- package/dist/es/models/licensing/v4/agreements/AddUserApiResponse.js +311 -0
- package/dist/es/models/licensing/v4/agreements/Eula.d.ts +95 -0
- package/dist/es/models/licensing/v4/agreements/Eula.js +404 -0
- package/dist/es/models/licensing/v4/agreements/EulaUser.d.ts +103 -0
- package/dist/es/models/licensing/v4/agreements/EulaUser.js +409 -0
- package/dist/es/models/licensing/v4/agreements/GetEulaApiResponse.d.ts +59 -0
- package/dist/es/models/licensing/v4/agreements/GetEulaApiResponse.js +311 -0
- package/dist/es/models/licensing/v4/agreements/UpdateEulaApiResponse.d.ts +59 -0
- package/dist/es/models/licensing/v4/agreements/UpdateEulaApiResponse.js +311 -0
- package/dist/es/models/licensing/v4/config/AllowanceDetail.d.ts +82 -0
- package/dist/es/models/licensing/v4/config/AllowanceDetail.js +358 -0
- package/dist/es/models/licensing/v4/config/AllowanceDetailProjection.d.ts +9 -0
- package/dist/es/models/licensing/v4/config/AllowanceDetailProjection.js +131 -0
- package/dist/es/models/licensing/v4/config/BaseClusterInfo.d.ts +32 -0
- package/dist/es/models/licensing/v4/config/BaseClusterInfo.js +223 -0
- package/dist/es/models/licensing/v4/config/BaseLicenseInfo.d.ts +74 -0
- package/dist/es/models/licensing/v4/config/BaseLicenseInfo.js +374 -0
- package/dist/es/models/licensing/v4/config/CapacityViolation.d.ts +80 -0
- package/dist/es/models/licensing/v4/config/CapacityViolation.js +350 -0
- package/dist/es/models/licensing/v4/config/ClusterAllowance.d.ts +55 -0
- package/dist/es/models/licensing/v4/config/ClusterAllowance.js +319 -0
- package/dist/es/models/licensing/v4/config/ClusterAllowanceProjection.d.ts +34 -0
- package/dist/es/models/licensing/v4/config/ClusterAllowanceProjection.js +241 -0
- package/dist/es/models/licensing/v4/config/ClusterEntitlement.d.ts +79 -0
- package/dist/es/models/licensing/v4/config/ClusterEntitlement.js +398 -0
- package/dist/es/models/licensing/v4/config/ClusterEntitlementProjection.d.ts +36 -0
- package/dist/es/models/licensing/v4/config/ClusterEntitlementProjection.js +249 -0
- package/dist/es/models/licensing/v4/config/ClusterTypeEnum.d.ts +19 -0
- package/dist/es/models/licensing/v4/config/ClusterTypeEnum.js +91 -0
- package/dist/es/models/licensing/v4/config/ClusterViolation.d.ts +57 -0
- package/dist/es/models/licensing/v4/config/ClusterViolation.js +346 -0
- package/dist/es/models/licensing/v4/config/Compliance.d.ts +55 -0
- package/dist/es/models/licensing/v4/config/Compliance.js +319 -0
- package/dist/es/models/licensing/v4/config/ComplianceProjection.d.ts +34 -0
- package/dist/es/models/licensing/v4/config/ComplianceProjection.js +241 -0
- package/dist/es/models/licensing/v4/config/Consumption.d.ts +44 -0
- package/dist/es/models/licensing/v4/config/Consumption.js +266 -0
- package/dist/es/models/licensing/v4/config/ConsumptionProjection.d.ts +9 -0
- package/dist/es/models/licensing/v4/config/ConsumptionProjection.js +129 -0
- package/dist/es/models/licensing/v4/config/EnforcementActionsEnum.d.ts +19 -0
- package/dist/es/models/licensing/v4/config/EnforcementActionsEnum.js +139 -0
- package/dist/es/models/licensing/v4/config/EnforcementLevelEnum.d.ts +19 -0
- package/dist/es/models/licensing/v4/config/EnforcementLevelEnum.js +85 -0
- package/dist/es/models/licensing/v4/config/EnforcementPolicyEnum.d.ts +19 -0
- package/dist/es/models/licensing/v4/config/EnforcementPolicyEnum.js +85 -0
- package/dist/es/models/licensing/v4/config/EntitlementDetail.d.ts +124 -0
- package/dist/es/models/licensing/v4/config/EntitlementDetail.js +501 -0
- package/dist/es/models/licensing/v4/config/EntitlementDetailProjection.d.ts +9 -0
- package/dist/es/models/licensing/v4/config/EntitlementDetailProjection.js +134 -0
- package/dist/es/models/licensing/v4/config/ExpiredLicense.d.ts +59 -0
- package/dist/es/models/licensing/v4/config/ExpiredLicense.js +324 -0
- package/dist/es/models/licensing/v4/config/Feature.d.ts +94 -0
- package/dist/es/models/licensing/v4/config/Feature.js +449 -0
- package/dist/es/models/licensing/v4/config/FeatureDetail.d.ts +74 -0
- package/dist/es/models/licensing/v4/config/FeatureDetail.js +327 -0
- package/dist/es/models/licensing/v4/config/FeatureProjection.d.ts +9 -0
- package/dist/es/models/licensing/v4/config/FeatureProjection.js +134 -0
- package/dist/es/models/licensing/v4/config/FeatureViolation.d.ts +32 -0
- package/dist/es/models/licensing/v4/config/FeatureViolation.js +229 -0
- package/dist/es/models/licensing/v4/config/GetClusterAllowanceApiResponse.d.ts +59 -0
- package/dist/es/models/licensing/v4/config/GetClusterAllowanceApiResponse.js +311 -0
- package/dist/es/models/licensing/v4/config/GetClusterEntitlementApiResponse.d.ts +59 -0
- package/dist/es/models/licensing/v4/config/GetClusterEntitlementApiResponse.js +311 -0
- package/dist/es/models/licensing/v4/config/GetClusterViolationApiResponse.d.ts +59 -0
- package/dist/es/models/licensing/v4/config/GetClusterViolationApiResponse.js +311 -0
- package/dist/es/models/licensing/v4/config/GetComplianceApiResponse.d.ts +59 -0
- package/dist/es/models/licensing/v4/config/GetComplianceApiResponse.js +311 -0
- package/dist/es/models/licensing/v4/config/GetLicenseApiResponse.d.ts +59 -0
- package/dist/es/models/licensing/v4/config/GetLicenseApiResponse.js +311 -0
- package/dist/es/models/licensing/v4/config/GetSettingApiResponse.d.ts +59 -0
- package/dist/es/models/licensing/v4/config/GetSettingApiResponse.js +311 -0
- package/dist/es/models/licensing/v4/config/License.d.ts +69 -0
- package/dist/es/models/licensing/v4/config/License.js +376 -0
- package/dist/es/models/licensing/v4/config/LicenseCategoryEnum.d.ts +19 -0
- package/dist/es/models/licensing/v4/config/LicenseCategoryEnum.js +271 -0
- package/dist/es/models/licensing/v4/config/LicenseProjection.d.ts +39 -0
- package/dist/es/models/licensing/v4/config/LicenseProjection.js +264 -0
- package/dist/es/models/licensing/v4/config/LicenseTypeEnum.d.ts +19 -0
- package/dist/es/models/licensing/v4/config/LicenseTypeEnum.js +235 -0
- package/dist/es/models/licensing/v4/config/ListClusterAllowancesApiResponse.d.ts +59 -0
- package/dist/es/models/licensing/v4/config/ListClusterAllowancesApiResponse.js +338 -0
- package/dist/es/models/licensing/v4/config/ListClusterEntitlementsApiResponse.d.ts +59 -0
- package/dist/es/models/licensing/v4/config/ListClusterEntitlementsApiResponse.js +338 -0
- package/dist/es/models/licensing/v4/config/ListClusterViolationsApiResponse.d.ts +59 -0
- package/dist/es/models/licensing/v4/config/ListClusterViolationsApiResponse.js +333 -0
- package/dist/es/models/licensing/v4/config/ListCompliancesApiResponse.d.ts +59 -0
- package/dist/es/models/licensing/v4/config/ListCompliancesApiResponse.js +338 -0
- package/dist/es/models/licensing/v4/config/ListFeaturesApiResponse.d.ts +59 -0
- package/dist/es/models/licensing/v4/config/ListFeaturesApiResponse.js +338 -0
- package/dist/es/models/licensing/v4/config/ListLicensesApiResponse.d.ts +59 -0
- package/dist/es/models/licensing/v4/config/ListLicensesApiResponse.js +338 -0
- package/dist/es/models/licensing/v4/config/ListSettingsApiResponse.d.ts +59 -0
- package/dist/es/models/licensing/v4/config/ListSettingsApiResponse.js +333 -0
- package/dist/es/models/licensing/v4/config/LogicalVersion.d.ts +62 -0
- package/dist/es/models/licensing/v4/config/LogicalVersion.js +280 -0
- package/dist/es/models/licensing/v4/config/MeterEnum.d.ts +19 -0
- package/dist/es/models/licensing/v4/config/MeterEnum.js +121 -0
- package/dist/es/models/licensing/v4/config/NutanixClusterConfig.d.ts +98 -0
- package/dist/es/models/licensing/v4/config/NutanixClusterConfig.js +406 -0
- package/dist/es/models/licensing/v4/config/PostPaidCategoryEnum.d.ts +19 -0
- package/dist/es/models/licensing/v4/config/PostPaidCategoryEnum.js +85 -0
- package/dist/es/models/licensing/v4/config/PostPaidConfig.d.ts +74 -0
- package/dist/es/models/licensing/v4/config/PostPaidConfig.js +324 -0
- package/dist/es/models/licensing/v4/config/ProductNameEnum.d.ts +19 -0
- package/dist/es/models/licensing/v4/config/ProductNameEnum.js +115 -0
- package/dist/es/models/licensing/v4/config/ResetScopeEnum.d.ts +19 -0
- package/dist/es/models/licensing/v4/config/ResetScopeEnum.js +85 -0
- package/dist/es/models/licensing/v4/config/ScopeEnum.d.ts +19 -0
- package/dist/es/models/licensing/v4/config/ScopeEnum.js +97 -0
- package/dist/es/models/licensing/v4/config/Service.d.ts +104 -0
- package/dist/es/models/licensing/v4/config/Service.js +444 -0
- package/dist/es/models/licensing/v4/config/ServiceProjection.d.ts +9 -0
- package/dist/es/models/licensing/v4/config/ServiceProjection.js +134 -0
- package/dist/es/models/licensing/v4/config/ServiceViolation.d.ts +60 -0
- package/dist/es/models/licensing/v4/config/ServiceViolation.js +278 -0
- package/dist/es/models/licensing/v4/config/ServiceViolationEnum.d.ts +19 -0
- package/dist/es/models/licensing/v4/config/ServiceViolationEnum.js +91 -0
- package/dist/es/models/licensing/v4/config/Setting.d.ts +133 -0
- package/dist/es/models/licensing/v4/config/Setting.js +568 -0
- package/dist/es/models/licensing/v4/config/StatusEnum.d.ts +19 -0
- package/dist/es/models/licensing/v4/config/StatusEnum.js +85 -0
- package/dist/es/models/licensing/v4/config/SubCategoryEnum.d.ts +19 -0
- package/dist/es/models/licensing/v4/config/SubCategoryEnum.js +85 -0
- package/dist/es/models/licensing/v4/config/TypeEnum.d.ts +19 -0
- package/dist/es/models/licensing/v4/config/TypeEnum.js +85 -0
- package/dist/es/models/licensing/v4/error/AppMessage.d.ts +108 -0
- package/dist/es/models/licensing/v4/error/AppMessage.js +432 -0
- package/dist/es/models/licensing/v4/error/ErrorResponse.d.ts +48 -0
- package/dist/es/models/licensing/v4/error/ErrorResponse.js +299 -0
- package/dist/es/models/licensing/v4/error/SchemaValidationError.d.ts +98 -0
- package/dist/es/models/licensing/v4/error/SchemaValidationError.js +407 -0
- package/dist/es/models/licensing/v4/error/SchemaValidationErrorMessage.d.ts +74 -0
- package/dist/es/models/licensing/v4/error/SchemaValidationErrorMessage.js +318 -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 +159 -0
- package/dist/lib/ApiClient.js +1211 -0
- package/dist/lib/Paginable.d.ts +95 -0
- package/dist/lib/Paginable.js +287 -0
- package/dist/lib/apis/enduserlicenseagreements-endpoints.d.ts +51 -0
- package/dist/lib/apis/enduserlicenseagreements-endpoints.js +183 -0
- package/dist/lib/apis/licenses-endpoints.d.ts +292 -0
- package/dist/lib/apis/licenses-endpoints.js +666 -0
- package/dist/lib/index.d.ts +160 -0
- package/dist/lib/index.js +636 -0
- package/dist/lib/models/common/v1/config/Flag.d.ts +58 -0
- package/dist/lib/models/common/v1/config/Flag.js +275 -0
- package/dist/lib/models/common/v1/config/KVPair.d.ts +62 -0
- package/dist/lib/models/common/v1/config/KVPair.js +332 -0
- package/dist/lib/models/common/v1/config/Message.d.ts +84 -0
- package/dist/lib/models/common/v1/config/Message.js +354 -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 +50 -0
- package/dist/lib/models/common/v1/config/TenantAwareModel.js +243 -0
- package/dist/lib/models/common/v1/response/ApiLink.d.ts +62 -0
- package/dist/lib/models/common/v1/response/ApiLink.js +280 -0
- package/dist/lib/models/common/v1/response/ApiResponseMetadata.d.ts +98 -0
- package/dist/lib/models/common/v1/response/ApiResponseMetadata.js +438 -0
- package/dist/lib/models/common/v1/response/ExternalizableAbstractModel.d.ts +42 -0
- package/dist/lib/models/common/v1/response/ExternalizableAbstractModel.js +270 -0
- package/dist/lib/models/licensing/v4/agreements/AddUserApiResponse.d.ts +59 -0
- package/dist/lib/models/licensing/v4/agreements/AddUserApiResponse.js +311 -0
- package/dist/lib/models/licensing/v4/agreements/Eula.d.ts +95 -0
- package/dist/lib/models/licensing/v4/agreements/Eula.js +404 -0
- package/dist/lib/models/licensing/v4/agreements/EulaUser.d.ts +103 -0
- package/dist/lib/models/licensing/v4/agreements/EulaUser.js +409 -0
- package/dist/lib/models/licensing/v4/agreements/GetEulaApiResponse.d.ts +59 -0
- package/dist/lib/models/licensing/v4/agreements/GetEulaApiResponse.js +311 -0
- package/dist/lib/models/licensing/v4/agreements/UpdateEulaApiResponse.d.ts +59 -0
- package/dist/lib/models/licensing/v4/agreements/UpdateEulaApiResponse.js +311 -0
- package/dist/lib/models/licensing/v4/config/AllowanceDetail.d.ts +82 -0
- package/dist/lib/models/licensing/v4/config/AllowanceDetail.js +358 -0
- package/dist/lib/models/licensing/v4/config/AllowanceDetailProjection.d.ts +9 -0
- package/dist/lib/models/licensing/v4/config/AllowanceDetailProjection.js +131 -0
- package/dist/lib/models/licensing/v4/config/BaseClusterInfo.d.ts +32 -0
- package/dist/lib/models/licensing/v4/config/BaseClusterInfo.js +223 -0
- package/dist/lib/models/licensing/v4/config/BaseLicenseInfo.d.ts +74 -0
- package/dist/lib/models/licensing/v4/config/BaseLicenseInfo.js +374 -0
- package/dist/lib/models/licensing/v4/config/CapacityViolation.d.ts +80 -0
- package/dist/lib/models/licensing/v4/config/CapacityViolation.js +350 -0
- package/dist/lib/models/licensing/v4/config/ClusterAllowance.d.ts +55 -0
- package/dist/lib/models/licensing/v4/config/ClusterAllowance.js +319 -0
- package/dist/lib/models/licensing/v4/config/ClusterAllowanceProjection.d.ts +34 -0
- package/dist/lib/models/licensing/v4/config/ClusterAllowanceProjection.js +241 -0
- package/dist/lib/models/licensing/v4/config/ClusterEntitlement.d.ts +79 -0
- package/dist/lib/models/licensing/v4/config/ClusterEntitlement.js +398 -0
- package/dist/lib/models/licensing/v4/config/ClusterEntitlementProjection.d.ts +36 -0
- package/dist/lib/models/licensing/v4/config/ClusterEntitlementProjection.js +249 -0
- package/dist/lib/models/licensing/v4/config/ClusterTypeEnum.d.ts +19 -0
- package/dist/lib/models/licensing/v4/config/ClusterTypeEnum.js +91 -0
- package/dist/lib/models/licensing/v4/config/ClusterViolation.d.ts +57 -0
- package/dist/lib/models/licensing/v4/config/ClusterViolation.js +346 -0
- package/dist/lib/models/licensing/v4/config/Compliance.d.ts +55 -0
- package/dist/lib/models/licensing/v4/config/Compliance.js +319 -0
- package/dist/lib/models/licensing/v4/config/ComplianceProjection.d.ts +34 -0
- package/dist/lib/models/licensing/v4/config/ComplianceProjection.js +241 -0
- package/dist/lib/models/licensing/v4/config/Consumption.d.ts +44 -0
- package/dist/lib/models/licensing/v4/config/Consumption.js +266 -0
- package/dist/lib/models/licensing/v4/config/ConsumptionProjection.d.ts +9 -0
- package/dist/lib/models/licensing/v4/config/ConsumptionProjection.js +129 -0
- package/dist/lib/models/licensing/v4/config/EnforcementActionsEnum.d.ts +19 -0
- package/dist/lib/models/licensing/v4/config/EnforcementActionsEnum.js +139 -0
- package/dist/lib/models/licensing/v4/config/EnforcementLevelEnum.d.ts +19 -0
- package/dist/lib/models/licensing/v4/config/EnforcementLevelEnum.js +85 -0
- package/dist/lib/models/licensing/v4/config/EnforcementPolicyEnum.d.ts +19 -0
- package/dist/lib/models/licensing/v4/config/EnforcementPolicyEnum.js +85 -0
- package/dist/lib/models/licensing/v4/config/EntitlementDetail.d.ts +124 -0
- package/dist/lib/models/licensing/v4/config/EntitlementDetail.js +501 -0
- package/dist/lib/models/licensing/v4/config/EntitlementDetailProjection.d.ts +9 -0
- package/dist/lib/models/licensing/v4/config/EntitlementDetailProjection.js +134 -0
- package/dist/lib/models/licensing/v4/config/ExpiredLicense.d.ts +59 -0
- package/dist/lib/models/licensing/v4/config/ExpiredLicense.js +324 -0
- package/dist/lib/models/licensing/v4/config/Feature.d.ts +94 -0
- package/dist/lib/models/licensing/v4/config/Feature.js +449 -0
- package/dist/lib/models/licensing/v4/config/FeatureDetail.d.ts +74 -0
- package/dist/lib/models/licensing/v4/config/FeatureDetail.js +327 -0
- package/dist/lib/models/licensing/v4/config/FeatureProjection.d.ts +9 -0
- package/dist/lib/models/licensing/v4/config/FeatureProjection.js +134 -0
- package/dist/lib/models/licensing/v4/config/FeatureViolation.d.ts +32 -0
- package/dist/lib/models/licensing/v4/config/FeatureViolation.js +229 -0
- package/dist/lib/models/licensing/v4/config/GetClusterAllowanceApiResponse.d.ts +59 -0
- package/dist/lib/models/licensing/v4/config/GetClusterAllowanceApiResponse.js +311 -0
- package/dist/lib/models/licensing/v4/config/GetClusterEntitlementApiResponse.d.ts +59 -0
- package/dist/lib/models/licensing/v4/config/GetClusterEntitlementApiResponse.js +311 -0
- package/dist/lib/models/licensing/v4/config/GetClusterViolationApiResponse.d.ts +59 -0
- package/dist/lib/models/licensing/v4/config/GetClusterViolationApiResponse.js +311 -0
- package/dist/lib/models/licensing/v4/config/GetComplianceApiResponse.d.ts +59 -0
- package/dist/lib/models/licensing/v4/config/GetComplianceApiResponse.js +311 -0
- package/dist/lib/models/licensing/v4/config/GetLicenseApiResponse.d.ts +59 -0
- package/dist/lib/models/licensing/v4/config/GetLicenseApiResponse.js +311 -0
- package/dist/lib/models/licensing/v4/config/GetSettingApiResponse.d.ts +59 -0
- package/dist/lib/models/licensing/v4/config/GetSettingApiResponse.js +311 -0
- package/dist/lib/models/licensing/v4/config/License.d.ts +69 -0
- package/dist/lib/models/licensing/v4/config/License.js +376 -0
- package/dist/lib/models/licensing/v4/config/LicenseCategoryEnum.d.ts +19 -0
- package/dist/lib/models/licensing/v4/config/LicenseCategoryEnum.js +271 -0
- package/dist/lib/models/licensing/v4/config/LicenseProjection.d.ts +39 -0
- package/dist/lib/models/licensing/v4/config/LicenseProjection.js +264 -0
- package/dist/lib/models/licensing/v4/config/LicenseTypeEnum.d.ts +19 -0
- package/dist/lib/models/licensing/v4/config/LicenseTypeEnum.js +235 -0
- package/dist/lib/models/licensing/v4/config/ListClusterAllowancesApiResponse.d.ts +59 -0
- package/dist/lib/models/licensing/v4/config/ListClusterAllowancesApiResponse.js +338 -0
- package/dist/lib/models/licensing/v4/config/ListClusterEntitlementsApiResponse.d.ts +59 -0
- package/dist/lib/models/licensing/v4/config/ListClusterEntitlementsApiResponse.js +338 -0
- package/dist/lib/models/licensing/v4/config/ListClusterViolationsApiResponse.d.ts +59 -0
- package/dist/lib/models/licensing/v4/config/ListClusterViolationsApiResponse.js +333 -0
- package/dist/lib/models/licensing/v4/config/ListCompliancesApiResponse.d.ts +59 -0
- package/dist/lib/models/licensing/v4/config/ListCompliancesApiResponse.js +338 -0
- package/dist/lib/models/licensing/v4/config/ListFeaturesApiResponse.d.ts +59 -0
- package/dist/lib/models/licensing/v4/config/ListFeaturesApiResponse.js +338 -0
- package/dist/lib/models/licensing/v4/config/ListLicensesApiResponse.d.ts +59 -0
- package/dist/lib/models/licensing/v4/config/ListLicensesApiResponse.js +338 -0
- package/dist/lib/models/licensing/v4/config/ListSettingsApiResponse.d.ts +59 -0
- package/dist/lib/models/licensing/v4/config/ListSettingsApiResponse.js +333 -0
- package/dist/lib/models/licensing/v4/config/LogicalVersion.d.ts +62 -0
- package/dist/lib/models/licensing/v4/config/LogicalVersion.js +280 -0
- package/dist/lib/models/licensing/v4/config/MeterEnum.d.ts +19 -0
- package/dist/lib/models/licensing/v4/config/MeterEnum.js +121 -0
- package/dist/lib/models/licensing/v4/config/NutanixClusterConfig.d.ts +98 -0
- package/dist/lib/models/licensing/v4/config/NutanixClusterConfig.js +406 -0
- package/dist/lib/models/licensing/v4/config/PostPaidCategoryEnum.d.ts +19 -0
- package/dist/lib/models/licensing/v4/config/PostPaidCategoryEnum.js +85 -0
- package/dist/lib/models/licensing/v4/config/PostPaidConfig.d.ts +74 -0
- package/dist/lib/models/licensing/v4/config/PostPaidConfig.js +324 -0
- package/dist/lib/models/licensing/v4/config/ProductNameEnum.d.ts +19 -0
- package/dist/lib/models/licensing/v4/config/ProductNameEnum.js +115 -0
- package/dist/lib/models/licensing/v4/config/ResetScopeEnum.d.ts +19 -0
- package/dist/lib/models/licensing/v4/config/ResetScopeEnum.js +85 -0
- package/dist/lib/models/licensing/v4/config/ScopeEnum.d.ts +19 -0
- package/dist/lib/models/licensing/v4/config/ScopeEnum.js +97 -0
- package/dist/lib/models/licensing/v4/config/Service.d.ts +104 -0
- package/dist/lib/models/licensing/v4/config/Service.js +444 -0
- package/dist/lib/models/licensing/v4/config/ServiceProjection.d.ts +9 -0
- package/dist/lib/models/licensing/v4/config/ServiceProjection.js +134 -0
- package/dist/lib/models/licensing/v4/config/ServiceViolation.d.ts +60 -0
- package/dist/lib/models/licensing/v4/config/ServiceViolation.js +278 -0
- package/dist/lib/models/licensing/v4/config/ServiceViolationEnum.d.ts +19 -0
- package/dist/lib/models/licensing/v4/config/ServiceViolationEnum.js +91 -0
- package/dist/lib/models/licensing/v4/config/Setting.d.ts +133 -0
- package/dist/lib/models/licensing/v4/config/Setting.js +568 -0
- package/dist/lib/models/licensing/v4/config/StatusEnum.d.ts +19 -0
- package/dist/lib/models/licensing/v4/config/StatusEnum.js +85 -0
- package/dist/lib/models/licensing/v4/config/SubCategoryEnum.d.ts +19 -0
- package/dist/lib/models/licensing/v4/config/SubCategoryEnum.js +85 -0
- package/dist/lib/models/licensing/v4/config/TypeEnum.d.ts +19 -0
- package/dist/lib/models/licensing/v4/config/TypeEnum.js +85 -0
- package/dist/lib/models/licensing/v4/error/AppMessage.d.ts +108 -0
- package/dist/lib/models/licensing/v4/error/AppMessage.js +432 -0
- package/dist/lib/models/licensing/v4/error/ErrorResponse.d.ts +48 -0
- package/dist/lib/models/licensing/v4/error/ErrorResponse.js +299 -0
- package/dist/lib/models/licensing/v4/error/SchemaValidationError.d.ts +98 -0
- package/dist/lib/models/licensing/v4/error/SchemaValidationError.js +407 -0
- package/dist/lib/models/licensing/v4/error/SchemaValidationErrorMessage.d.ts +74 -0
- package/dist/lib/models/licensing/v4/error/SchemaValidationErrorMessage.js +318 -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,229 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _FeatureDetail2 = _interopRequireDefault(require("./FeatureDetail"));
|
|
8
|
+
var _ValidationScopes = _interopRequireDefault(require("../../../validation/ValidationScopes"));
|
|
9
|
+
var _ValidationUtils = _interopRequireDefault(require("../../../../utils/ValidationUtils"));
|
|
10
|
+
var _ValidationError = _interopRequireDefault(require("../../../validation/ValidationError"));
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
12
|
+
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); }
|
|
13
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
14
|
+
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."); }
|
|
15
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
16
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
17
|
+
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; } }
|
|
18
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
19
|
+
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; }
|
|
20
|
+
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; }
|
|
21
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
22
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
24
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
25
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
26
|
+
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); }
|
|
27
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
28
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
29
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
30
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
31
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
32
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
33
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
34
|
+
function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
|
|
35
|
+
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } } /*
|
|
36
|
+
* Nutanix Licensing Versioned APIs
|
|
37
|
+
*
|
|
38
|
+
* OpenAPI spec version: 4.0.1-alpha-1
|
|
39
|
+
*
|
|
40
|
+
* NOTE: This class is auto generated by the Open API Dev Platform.
|
|
41
|
+
*
|
|
42
|
+
* Open API Dev Platform Codegen version: 16.8.0.7344-RELEASE
|
|
43
|
+
*
|
|
44
|
+
* Do not edit the class manually.
|
|
45
|
+
*
|
|
46
|
+
*/
|
|
47
|
+
/**
|
|
48
|
+
* The FeatureViolation model module.
|
|
49
|
+
* @module Ntnx/FeatureViolation
|
|
50
|
+
* @version 4.0.1-alpha-1
|
|
51
|
+
* @class FeatureViolation
|
|
52
|
+
*/
|
|
53
|
+
var _FeatureViolation_brand = /*#__PURE__*/new WeakSet();
|
|
54
|
+
var FeatureViolation = exports["default"] = /*#__PURE__*/function (_FeatureDetail) {
|
|
55
|
+
/**
|
|
56
|
+
* Constructs a new <code>FeatureViolation</code>.
|
|
57
|
+
* Model capturing feature info and associated clusters
|
|
58
|
+
* @alias module:Ntnx/FeatureViolation
|
|
59
|
+
* @extends module:Ntnx/FeatureDetail
|
|
60
|
+
*/
|
|
61
|
+
function FeatureViolation() {
|
|
62
|
+
var _this;
|
|
63
|
+
_classCallCheck(this, FeatureViolation);
|
|
64
|
+
_this = _callSuper(this, FeatureViolation);
|
|
65
|
+
/*
|
|
66
|
+
* toJson method for a map type which supports map with primitive keys and values of object types
|
|
67
|
+
* @param {Object} obj
|
|
68
|
+
* @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.
|
|
69
|
+
* Otherwise, just returns the input object.
|
|
70
|
+
*/
|
|
71
|
+
_classPrivateMethodInitSpec(_this, _FeatureViolation_brand);
|
|
72
|
+
_this.$objectType = "licensing.v4.config.FeatureViolation";
|
|
73
|
+
_this.$reserved = {
|
|
74
|
+
'$fv': "v4.r0.a1"
|
|
75
|
+
};
|
|
76
|
+
_this.$unknownFields = {};
|
|
77
|
+
return _this;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Constructs a <code>FeatureViolation</code> from a plain JavaScript object, optionally creating a new instance.
|
|
82
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
83
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
84
|
+
* @param {module:Ntnx/FeatureViolation} obj Optional instance to populate.
|
|
85
|
+
* @param callFromChild {Boolean} Flag to recognise calling instance
|
|
86
|
+
* @return {module:Ntnx/FeatureViolation} The populated <code>FeatureViolation</code> instance.
|
|
87
|
+
*/
|
|
88
|
+
_inherits(FeatureViolation, _FeatureDetail);
|
|
89
|
+
return _createClass(FeatureViolation, [{
|
|
90
|
+
key: "getAffectedEntity",
|
|
91
|
+
value:
|
|
92
|
+
/**
|
|
93
|
+
* Returns Description of entity for which feature violation is thrown. Examples: 1) Vm with uuid 000604af-3aa4-9cfe-1c6a-ac1f6b357fb7. 2) Storage Container bucket-data-prod 3) Protection Domain pd_prod with Application consistency group prod
|
|
94
|
+
* @return {}
|
|
95
|
+
*/
|
|
96
|
+
function getAffectedEntity() {
|
|
97
|
+
return this.affectedEntity;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Sets Description of entity for which feature violation is thrown. Examples: 1) Vm with uuid 000604af-3aa4-9cfe-1c6a-ac1f6b357fb7. 2) Storage Container bucket-data-prod 3) Protection Domain pd_prod with Application consistency group prod
|
|
102
|
+
* @param {} affectedEntity Description of entity for which feature violation is thrown. Examples: 1) Vm with uuid 000604af-3aa4-9cfe-1c6a-ac1f6b357fb7. 2) Storage Container bucket-data-prod 3) Protection Domain pd_prod with Application consistency group prod
|
|
103
|
+
*/
|
|
104
|
+
}, {
|
|
105
|
+
key: "setAffectedEntity",
|
|
106
|
+
value: function setAffectedEntity(affectedEntity) {
|
|
107
|
+
this.affectedEntity = affectedEntity;
|
|
108
|
+
}
|
|
109
|
+
}, {
|
|
110
|
+
key: "toJson",
|
|
111
|
+
value: function toJson(forMutation) {
|
|
112
|
+
if (forMutation === false) {
|
|
113
|
+
return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, typeof this.getAffectedEntity() !== 'undefined' && this.getAffectedEntity() !== null ? {
|
|
114
|
+
'affectedEntity': this.getAffectedEntity()
|
|
115
|
+
} : {}), typeof this.getFeatureId() !== 'undefined' && this.getFeatureId() !== null ? {
|
|
116
|
+
'featureId': this.getFeatureId()
|
|
117
|
+
} : {}), typeof this.getName() !== 'undefined' && this.getName() !== null ? {
|
|
118
|
+
'name': this.getName()
|
|
119
|
+
} : {}), typeof this.getDescription() !== 'undefined' && this.getDescription() !== null ? {
|
|
120
|
+
'description': this.getDescription()
|
|
121
|
+
} : {}), {}, {
|
|
122
|
+
'$reserved': this.get$Reserved(),
|
|
123
|
+
'$objectType': this.get$ObjectType(),
|
|
124
|
+
'$unknownFields': this.get$UnknownFields()
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, typeof this.getAffectedEntity() !== 'undefined' && this.getAffectedEntity() !== null ? {
|
|
128
|
+
'affectedEntity': this.getAffectedEntity()
|
|
129
|
+
} : {}), typeof this.getFeatureId() !== 'undefined' && this.getFeatureId() !== null ? {
|
|
130
|
+
'featureId': this.getFeatureId()
|
|
131
|
+
} : {}), typeof this.getName() !== 'undefined' && this.getName() !== null ? {
|
|
132
|
+
'name': this.getName()
|
|
133
|
+
} : {}), typeof this.getDescription() !== 'undefined' && this.getDescription() !== null ? {
|
|
134
|
+
'description': this.getDescription()
|
|
135
|
+
} : {}), {}, {
|
|
136
|
+
'$reserved': this.get$Reserved(),
|
|
137
|
+
'$objectType': this.get$ObjectType(),
|
|
138
|
+
'$unknownFields': this.get$UnknownFields()
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
}, {
|
|
142
|
+
key: "validate",
|
|
143
|
+
value: function validate(scope, properties) {
|
|
144
|
+
var _this2 = this;
|
|
145
|
+
var propList = [];
|
|
146
|
+
if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _ValidationScopes["default"]) {
|
|
147
|
+
//cases validate() and validate(scope)
|
|
148
|
+
propList = [];
|
|
149
|
+
} else if (arguments.length === 1) {
|
|
150
|
+
//case validate(properties)
|
|
151
|
+
propList = arguments[0];
|
|
152
|
+
scope = null;
|
|
153
|
+
} else {
|
|
154
|
+
//case validate(scope, properties)
|
|
155
|
+
propList = arguments[1];
|
|
156
|
+
}
|
|
157
|
+
var res = [];
|
|
158
|
+
var err = null;
|
|
159
|
+
propList.forEach(function (property) {
|
|
160
|
+
err = _this2.validateProperty(property, scope);
|
|
161
|
+
if (err) {
|
|
162
|
+
res.push(err);
|
|
163
|
+
}
|
|
164
|
+
});
|
|
165
|
+
return new Promise(function (resolve, reject) {
|
|
166
|
+
if (res.length !== 0) {
|
|
167
|
+
reject(err);
|
|
168
|
+
} else {
|
|
169
|
+
resolve();
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
}, {
|
|
174
|
+
key: "validateProperty",
|
|
175
|
+
value: function validateProperty(scope, property) {
|
|
176
|
+
if (property === "affectedEntity") {
|
|
177
|
+
if (typeof this.affectedEntity === 'undefined' || this.affectedEntity === null) {
|
|
178
|
+
return new _ValidationError["default"]("affectedEntity", "undefined or null");
|
|
179
|
+
}
|
|
180
|
+
if (!_ValidationUtils["default"].validateMaxLength(this.affectedEntity, 100)) {
|
|
181
|
+
return new _ValidationError["default"]("affectedEntity", "does not satisfy required maxLength constraint: 100");
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
return new _ValidationError["default"](property, "no such property exists");
|
|
185
|
+
}
|
|
186
|
+
}], [{
|
|
187
|
+
key: "constructFromObject",
|
|
188
|
+
value: function constructFromObject(data, obj) {
|
|
189
|
+
var callFromChild = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
190
|
+
var items, item, i, itemArr, discriminator;
|
|
191
|
+
if (data) {
|
|
192
|
+
obj = obj || new FeatureViolation();
|
|
193
|
+
_FeatureDetail2["default"].constructFromObject(data, obj, true);
|
|
194
|
+
if (data.hasOwnProperty('affectedEntity') && data.affectedEntity !== null && data.affectedEntity !== undefined) {
|
|
195
|
+
obj.setAffectedEntity(data['affectedEntity']);
|
|
196
|
+
}
|
|
197
|
+
if (!callFromChild) {
|
|
198
|
+
obj.$unknownFields = _objectSpread({}, data.$unknownFields);
|
|
199
|
+
for (var property in data) {
|
|
200
|
+
if (!Object.keys(obj).includes(property) && !(property[0] === "$" && property.endsWith("ItemDiscriminator"))) {
|
|
201
|
+
obj.$unknownFields[property] = data[property];
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
return obj;
|
|
207
|
+
}
|
|
208
|
+
}]);
|
|
209
|
+
}(_FeatureDetail2["default"]);
|
|
210
|
+
/**
|
|
211
|
+
* Description of entity for which feature violation is thrown. Examples: 1) Vm with uuid 000604af-3aa4-9cfe-1c6a-ac1f6b357fb7. 2) Storage Container bucket-data-prod 3) Protection Domain pd_prod with Application consistency group prod
|
|
212
|
+
* @memberof FeatureViolation
|
|
213
|
+
*/
|
|
214
|
+
function _toJsonMapType(obj, forMutation) {
|
|
215
|
+
if (obj instanceof Map) {
|
|
216
|
+
return Object.fromEntries(Array.from(obj, function (_ref) {
|
|
217
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
218
|
+
k = _ref2[0],
|
|
219
|
+
v = _ref2[1];
|
|
220
|
+
return [k, typeof v.toJson !== "undefined" ? v.toJson(forMutation) : v];
|
|
221
|
+
}));
|
|
222
|
+
} else if (_typeof(obj) === 'object' && obj != null && obj.constructor === Object) {
|
|
223
|
+
return Object.fromEntries(Array.from(Object.entries(obj), function (entry) {
|
|
224
|
+
return [entry[0], typeof entry[1].toJson !== "undefined" ? entry[1].toJson(forMutation) : entry[1]];
|
|
225
|
+
}));
|
|
226
|
+
}
|
|
227
|
+
return obj;
|
|
228
|
+
}
|
|
229
|
+
FeatureViolation.prototype.affectedEntity = undefined;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The GetClusterAllowanceApiResponse model module.
|
|
3
|
+
* @module Ntnx/GetClusterAllowanceApiResponse
|
|
4
|
+
* @version 4.0.1-alpha-1
|
|
5
|
+
* @class GetClusterAllowanceApiResponse
|
|
6
|
+
*/
|
|
7
|
+
export default class GetClusterAllowanceApiResponse extends Paginable {
|
|
8
|
+
/**
|
|
9
|
+
* Constructs a <code>GetClusterAllowanceApiResponse</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/GetClusterAllowanceApiResponse} obj Optional instance to populate.
|
|
13
|
+
* @param callFromChild {Boolean} Flag to recognise calling instance
|
|
14
|
+
* @return {module:Ntnx/GetClusterAllowanceApiResponse} The populated <code>GetClusterAllowanceApiResponse</code> instance.
|
|
15
|
+
*/
|
|
16
|
+
static constructFromObject(data: any, obj: any, callFromChild?: boolean): any;
|
|
17
|
+
$objectType: string;
|
|
18
|
+
$reserved: {
|
|
19
|
+
$fv: string;
|
|
20
|
+
};
|
|
21
|
+
$unknownFields: {};
|
|
22
|
+
/**
|
|
23
|
+
* @return {}
|
|
24
|
+
*/
|
|
25
|
+
getMetadata(): any;
|
|
26
|
+
/**
|
|
27
|
+
* @param {} metadata
|
|
28
|
+
*/
|
|
29
|
+
setMetadata(metadata: any): void;
|
|
30
|
+
metadata: any;
|
|
31
|
+
/**
|
|
32
|
+
* @return {}
|
|
33
|
+
*/
|
|
34
|
+
getData(): any;
|
|
35
|
+
/**
|
|
36
|
+
* @param {} data
|
|
37
|
+
*/
|
|
38
|
+
setData(data: any): void;
|
|
39
|
+
data: any;
|
|
40
|
+
get$Reserved(): {
|
|
41
|
+
$fv: string;
|
|
42
|
+
};
|
|
43
|
+
get$ObjectType(): string;
|
|
44
|
+
get$UnknownFields(): {};
|
|
45
|
+
toJson(forMutation: any): {
|
|
46
|
+
$reserved: {
|
|
47
|
+
$fv: string;
|
|
48
|
+
};
|
|
49
|
+
$objectType: string;
|
|
50
|
+
$unknownFields: {};
|
|
51
|
+
data?: any;
|
|
52
|
+
metadata?: any;
|
|
53
|
+
};
|
|
54
|
+
validate(scope: any, properties: any, ...args: any[]): Promise<any>;
|
|
55
|
+
validateProperty(scope: any, property: any): ValidationError;
|
|
56
|
+
#private;
|
|
57
|
+
}
|
|
58
|
+
import Paginable from "../../../../Paginable";
|
|
59
|
+
import ValidationError from "../../../validation/ValidationError";
|
|
@@ -0,0 +1,311 @@
|
|
|
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 _ClusterAllowance = _interopRequireDefault(require("./ClusterAllowance"));
|
|
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 _Paginable2 = _interopRequireDefault(require("../../../../Paginable"));
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
16
|
+
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."); }
|
|
17
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
18
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
19
|
+
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; } }
|
|
20
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
21
|
+
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); }
|
|
22
|
+
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; }
|
|
23
|
+
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; }
|
|
24
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
25
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
26
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
27
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
28
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
29
|
+
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); }
|
|
30
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
31
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
32
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
33
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
34
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
35
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
36
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
37
|
+
function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
|
|
38
|
+
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
|
39
|
+
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"); } /*
|
|
40
|
+
* Nutanix Licensing Versioned APIs
|
|
41
|
+
*
|
|
42
|
+
* OpenAPI spec version: 4.0.1-alpha-1
|
|
43
|
+
*
|
|
44
|
+
* NOTE: This class is auto generated by the Open API Dev Platform.
|
|
45
|
+
*
|
|
46
|
+
* Open API Dev Platform Codegen version: 16.8.0.7344-RELEASE
|
|
47
|
+
*
|
|
48
|
+
* Do not edit the class manually.
|
|
49
|
+
*
|
|
50
|
+
*/
|
|
51
|
+
/**
|
|
52
|
+
* The GetClusterAllowanceApiResponse model module.
|
|
53
|
+
* @module Ntnx/GetClusterAllowanceApiResponse
|
|
54
|
+
* @version 4.0.1-alpha-1
|
|
55
|
+
* @class GetClusterAllowanceApiResponse
|
|
56
|
+
*/
|
|
57
|
+
var _GetClusterAllowanceApiResponse_brand = /*#__PURE__*/new WeakSet();
|
|
58
|
+
var GetClusterAllowanceApiResponse = exports["default"] = /*#__PURE__*/function (_Paginable) {
|
|
59
|
+
/**
|
|
60
|
+
* Constructs a new <code>GetClusterAllowanceApiResponse</code>.
|
|
61
|
+
* REST response for all response codes in API path /licensing/v4.0.a1/config/clusters/{extId}/allowances Get operation
|
|
62
|
+
* @alias module:Ntnx/GetClusterAllowanceApiResponse
|
|
63
|
+
*/
|
|
64
|
+
function GetClusterAllowanceApiResponse() {
|
|
65
|
+
var _this;
|
|
66
|
+
_classCallCheck(this, GetClusterAllowanceApiResponse);
|
|
67
|
+
_this = _callSuper(this, GetClusterAllowanceApiResponse);
|
|
68
|
+
/*
|
|
69
|
+
* toJson method for a map type which supports map with primitive keys and values of object types
|
|
70
|
+
* @param {Object} obj
|
|
71
|
+
* @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.
|
|
72
|
+
* Otherwise, just returns the input object.
|
|
73
|
+
*/
|
|
74
|
+
_classPrivateMethodInitSpec(_this, _GetClusterAllowanceApiResponse_brand);
|
|
75
|
+
_this.$objectType = "licensing.v4.config.GetClusterAllowanceApiResponse";
|
|
76
|
+
_this.$reserved = {
|
|
77
|
+
'$fv': "v4.r0.a1"
|
|
78
|
+
};
|
|
79
|
+
_this.$unknownFields = {};
|
|
80
|
+
return _this;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Constructs a <code>GetClusterAllowanceApiResponse</code> from a plain JavaScript object, optionally creating a new instance.
|
|
85
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
86
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
87
|
+
* @param {module:Ntnx/GetClusterAllowanceApiResponse} obj Optional instance to populate.
|
|
88
|
+
* @param callFromChild {Boolean} Flag to recognise calling instance
|
|
89
|
+
* @return {module:Ntnx/GetClusterAllowanceApiResponse} The populated <code>GetClusterAllowanceApiResponse</code> instance.
|
|
90
|
+
*/
|
|
91
|
+
_inherits(GetClusterAllowanceApiResponse, _Paginable);
|
|
92
|
+
return _createClass(GetClusterAllowanceApiResponse, [{
|
|
93
|
+
key: "getMetadata",
|
|
94
|
+
value:
|
|
95
|
+
/**
|
|
96
|
+
* @return {}
|
|
97
|
+
*/
|
|
98
|
+
function getMetadata() {
|
|
99
|
+
return this.metadata;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* @param {} metadata
|
|
104
|
+
*/
|
|
105
|
+
}, {
|
|
106
|
+
key: "setMetadata",
|
|
107
|
+
value: function setMetadata(metadata) {
|
|
108
|
+
this.metadata = metadata;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* @return {}
|
|
113
|
+
*/
|
|
114
|
+
}, {
|
|
115
|
+
key: "getData",
|
|
116
|
+
value: function getData() {
|
|
117
|
+
return this.data;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* @param {} data
|
|
122
|
+
*/
|
|
123
|
+
}, {
|
|
124
|
+
key: "setData",
|
|
125
|
+
value: function setData(data) {
|
|
126
|
+
this.data = data;
|
|
127
|
+
}
|
|
128
|
+
}, {
|
|
129
|
+
key: "get$Reserved",
|
|
130
|
+
value: function get$Reserved() {
|
|
131
|
+
return this.$reserved;
|
|
132
|
+
}
|
|
133
|
+
}, {
|
|
134
|
+
key: "get$ObjectType",
|
|
135
|
+
value: function get$ObjectType() {
|
|
136
|
+
return this.$objectType;
|
|
137
|
+
}
|
|
138
|
+
}, {
|
|
139
|
+
key: "get$UnknownFields",
|
|
140
|
+
value: function get$UnknownFields() {
|
|
141
|
+
return this.$unknownFields;
|
|
142
|
+
}
|
|
143
|
+
}, {
|
|
144
|
+
key: "toJson",
|
|
145
|
+
value: function toJson(forMutation) {
|
|
146
|
+
if (forMutation === false) {
|
|
147
|
+
return _objectSpread(_objectSpread(_objectSpread({}, typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {
|
|
148
|
+
'metadata': this.getMetadata().toJson(false)
|
|
149
|
+
} : {}), typeof this.getData() !== 'undefined' && this.getData() !== null ? {
|
|
150
|
+
'data': typeof this.getData().toJson !== "undefined" ? this.getData().toJson(false) : Array.isArray(this.getData()) ? this.getData().map(function (item) {
|
|
151
|
+
return typeof item.toJson !== "undefined" ? item.toJson(false) : item;
|
|
152
|
+
}) : _assertClassBrand(_GetClusterAllowanceApiResponse_brand, this, _toJsonMapType).call(this, this.getData(), false)
|
|
153
|
+
} : {}), {}, {
|
|
154
|
+
'$reserved': this.get$Reserved(),
|
|
155
|
+
'$objectType': this.get$ObjectType(),
|
|
156
|
+
'$unknownFields': this.get$UnknownFields()
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
return _objectSpread(_objectSpread(_objectSpread({}, typeof this.getMetadata() !== 'undefined' && this.getMetadata() !== null ? {
|
|
160
|
+
'metadata': this.getMetadata().toJson(false)
|
|
161
|
+
} : {}), typeof this.getData() !== 'undefined' && this.getData() !== null ? {
|
|
162
|
+
'data': typeof this.getData().toJson !== "undefined" ? this.getData().toJson() : Array.isArray(this.getData()) ? this.getData().map(function (item) {
|
|
163
|
+
return typeof item.toJson !== "undefined" ? item.toJson() : item;
|
|
164
|
+
}) : _assertClassBrand(_GetClusterAllowanceApiResponse_brand, this, _toJsonMapType).call(this, this.getData())
|
|
165
|
+
} : {}), {}, {
|
|
166
|
+
'$reserved': this.get$Reserved(),
|
|
167
|
+
'$objectType': this.get$ObjectType(),
|
|
168
|
+
'$unknownFields': this.get$UnknownFields()
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
}, {
|
|
172
|
+
key: "validate",
|
|
173
|
+
value: function validate(scope, properties) {
|
|
174
|
+
var _this2 = this;
|
|
175
|
+
var propList = [];
|
|
176
|
+
if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _ValidationScopes["default"]) {
|
|
177
|
+
//cases validate() and validate(scope)
|
|
178
|
+
propList = [];
|
|
179
|
+
} else if (arguments.length === 1) {
|
|
180
|
+
//case validate(properties)
|
|
181
|
+
propList = arguments[0];
|
|
182
|
+
scope = null;
|
|
183
|
+
} else {
|
|
184
|
+
//case validate(scope, properties)
|
|
185
|
+
propList = arguments[1];
|
|
186
|
+
}
|
|
187
|
+
var res = [];
|
|
188
|
+
var err = null;
|
|
189
|
+
propList.forEach(function (property) {
|
|
190
|
+
err = _this2.validateProperty(property, scope);
|
|
191
|
+
if (err) {
|
|
192
|
+
res.push(err);
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
return new Promise(function (resolve, reject) {
|
|
196
|
+
if (res.length !== 0) {
|
|
197
|
+
reject(err);
|
|
198
|
+
} else {
|
|
199
|
+
resolve();
|
|
200
|
+
}
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
}, {
|
|
204
|
+
key: "validateProperty",
|
|
205
|
+
value: function validateProperty(scope, property) {
|
|
206
|
+
if (property === "metadata") {
|
|
207
|
+
if (typeof this.metadata === 'undefined' || this.metadata === null) {
|
|
208
|
+
return new _ValidationError["default"]("metadata", "undefined or null");
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
if (property === "data") {
|
|
212
|
+
if (typeof this.data === 'undefined' || this.data === null) {
|
|
213
|
+
return new _ValidationError["default"]("data", "undefined or null");
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
if (property === "$reserved") {
|
|
217
|
+
if (typeof this.$reserved === 'undefined' || this.$reserved === null) {
|
|
218
|
+
return new _ValidationError["default"]("$reserved", "undefined or null");
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
if (property === "$objectType") {
|
|
222
|
+
if (typeof this.$objectType === 'undefined' || this.$objectType === null) {
|
|
223
|
+
return new _ValidationError["default"]("$objectType", "undefined or null");
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
if (property === "$unknownFields") {
|
|
227
|
+
if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {
|
|
228
|
+
return new _ValidationError["default"]("$unknownFields", "undefined or null");
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
return new _ValidationError["default"](property, "no such property exists");
|
|
232
|
+
}
|
|
233
|
+
}], [{
|
|
234
|
+
key: "constructFromObject",
|
|
235
|
+
value: function constructFromObject(data, obj) {
|
|
236
|
+
var callFromChild = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
237
|
+
var items, item, i, itemArr, discriminator;
|
|
238
|
+
if (data) {
|
|
239
|
+
obj = obj || new GetClusterAllowanceApiResponse();
|
|
240
|
+
if (data.hasOwnProperty('metadata')) {
|
|
241
|
+
_Paginable2["default"].constructFromObject(data['metadata'], obj);
|
|
242
|
+
}
|
|
243
|
+
if (data.hasOwnProperty('metadata') && data.metadata !== null && data.metadata !== undefined) {
|
|
244
|
+
obj.setMetadata(_ApiResponseMetadata["default"].constructFromObject(data['metadata']));
|
|
245
|
+
}
|
|
246
|
+
if (data.hasOwnProperty('data') && data.data !== null && data.data !== undefined) {
|
|
247
|
+
if (data['data'].hasOwnProperty('$objectType')) {
|
|
248
|
+
discriminator = data['data']['$objectType'];
|
|
249
|
+
} else {
|
|
250
|
+
discriminator = _typeof(data['data']);
|
|
251
|
+
}
|
|
252
|
+
switch (discriminator) {
|
|
253
|
+
case 'licensing.v4.config.ClusterAllowance':
|
|
254
|
+
obj.setData(_ClusterAllowance["default"].constructFromObject(data['data'], undefined));
|
|
255
|
+
break;
|
|
256
|
+
case 'licensing.v4.error.ErrorResponse':
|
|
257
|
+
obj.setData(_ErrorResponse["default"].constructFromObject(data['data'], undefined));
|
|
258
|
+
break;
|
|
259
|
+
default:
|
|
260
|
+
throw "Unknown datatype " + discriminator + " in data";
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
if (data.hasOwnProperty('$reserved')) {
|
|
264
|
+
obj.$reserved = data['$reserved'];
|
|
265
|
+
}
|
|
266
|
+
if (data.hasOwnProperty('$objectType')) {
|
|
267
|
+
obj.$objectType = data['$objectType'];
|
|
268
|
+
}
|
|
269
|
+
if (data.hasOwnProperty('$unknownFields')) {
|
|
270
|
+
obj.$unknownFields = data['$unknownFields'];
|
|
271
|
+
}
|
|
272
|
+
if (!callFromChild) {
|
|
273
|
+
obj.$unknownFields = _objectSpread({}, data.$unknownFields);
|
|
274
|
+
for (var property in data) {
|
|
275
|
+
if (!Object.keys(obj).includes(property) && !(property[0] === "$" && property.endsWith("ItemDiscriminator"))) {
|
|
276
|
+
obj.$unknownFields[property] = data[property];
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
return obj;
|
|
282
|
+
}
|
|
283
|
+
}]);
|
|
284
|
+
}(_Paginable2["default"]);
|
|
285
|
+
/**
|
|
286
|
+
* @memberof GetClusterAllowanceApiResponse
|
|
287
|
+
*/
|
|
288
|
+
function _toJsonMapType(obj, forMutation) {
|
|
289
|
+
if (obj instanceof Map) {
|
|
290
|
+
return Object.fromEntries(Array.from(obj, function (_ref) {
|
|
291
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
292
|
+
k = _ref2[0],
|
|
293
|
+
v = _ref2[1];
|
|
294
|
+
return [k, typeof v.toJson !== "undefined" ? v.toJson(forMutation) : v];
|
|
295
|
+
}));
|
|
296
|
+
} else if (_typeof(obj) === 'object' && obj != null && obj.constructor === Object) {
|
|
297
|
+
return Object.fromEntries(Array.from(Object.entries(obj), function (entry) {
|
|
298
|
+
return [entry[0], typeof entry[1].toJson !== "undefined" ? entry[1].toJson(forMutation) : entry[1]];
|
|
299
|
+
}));
|
|
300
|
+
}
|
|
301
|
+
return obj;
|
|
302
|
+
}
|
|
303
|
+
GetClusterAllowanceApiResponse.prototype.metadata = undefined;
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* @memberof GetClusterAllowanceApiResponse
|
|
307
|
+
*/
|
|
308
|
+
GetClusterAllowanceApiResponse.prototype.data = undefined;
|
|
309
|
+
GetClusterAllowanceApiResponse.prototype.$reserved = undefined;
|
|
310
|
+
GetClusterAllowanceApiResponse.prototype.$objectType = undefined;
|
|
311
|
+
GetClusterAllowanceApiResponse.prototype.$unknownFields = undefined;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The GetClusterEntitlementApiResponse model module.
|
|
3
|
+
* @module Ntnx/GetClusterEntitlementApiResponse
|
|
4
|
+
* @version 4.0.1-alpha-1
|
|
5
|
+
* @class GetClusterEntitlementApiResponse
|
|
6
|
+
*/
|
|
7
|
+
export default class GetClusterEntitlementApiResponse extends Paginable {
|
|
8
|
+
/**
|
|
9
|
+
* Constructs a <code>GetClusterEntitlementApiResponse</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/GetClusterEntitlementApiResponse} obj Optional instance to populate.
|
|
13
|
+
* @param callFromChild {Boolean} Flag to recognise calling instance
|
|
14
|
+
* @return {module:Ntnx/GetClusterEntitlementApiResponse} The populated <code>GetClusterEntitlementApiResponse</code> instance.
|
|
15
|
+
*/
|
|
16
|
+
static constructFromObject(data: any, obj: any, callFromChild?: boolean): any;
|
|
17
|
+
$objectType: string;
|
|
18
|
+
$reserved: {
|
|
19
|
+
$fv: string;
|
|
20
|
+
};
|
|
21
|
+
$unknownFields: {};
|
|
22
|
+
/**
|
|
23
|
+
* @return {}
|
|
24
|
+
*/
|
|
25
|
+
getMetadata(): any;
|
|
26
|
+
/**
|
|
27
|
+
* @param {} metadata
|
|
28
|
+
*/
|
|
29
|
+
setMetadata(metadata: any): void;
|
|
30
|
+
metadata: any;
|
|
31
|
+
/**
|
|
32
|
+
* @return {}
|
|
33
|
+
*/
|
|
34
|
+
getData(): any;
|
|
35
|
+
/**
|
|
36
|
+
* @param {} data
|
|
37
|
+
*/
|
|
38
|
+
setData(data: any): void;
|
|
39
|
+
data: any;
|
|
40
|
+
get$Reserved(): {
|
|
41
|
+
$fv: string;
|
|
42
|
+
};
|
|
43
|
+
get$ObjectType(): string;
|
|
44
|
+
get$UnknownFields(): {};
|
|
45
|
+
toJson(forMutation: any): {
|
|
46
|
+
$reserved: {
|
|
47
|
+
$fv: string;
|
|
48
|
+
};
|
|
49
|
+
$objectType: string;
|
|
50
|
+
$unknownFields: {};
|
|
51
|
+
data?: any;
|
|
52
|
+
metadata?: any;
|
|
53
|
+
};
|
|
54
|
+
validate(scope: any, properties: any, ...args: any[]): Promise<any>;
|
|
55
|
+
validateProperty(scope: any, property: any): ValidationError;
|
|
56
|
+
#private;
|
|
57
|
+
}
|
|
58
|
+
import Paginable from "../../../../Paginable";
|
|
59
|
+
import ValidationError from "../../../validation/ValidationError";
|