@nutanix-scratch/monitoring-js-client 4.0.1-beta.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-Monitoring-js-client-prod.js +1 -0
- package/dist/Ntnx-Monitoring-js-client.js +1466 -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/alertemailconfiguration-endpoints.d.ts +41 -0
- package/dist/es/apis/alertemailconfiguration-endpoints.js +141 -0
- package/dist/es/apis/alerts-endpoints.d.ts +103 -0
- package/dist/es/apis/alerts-endpoints.js +201 -0
- package/dist/es/apis/audits-endpoints.d.ts +91 -0
- package/dist/es/apis/audits-endpoints.js +189 -0
- package/dist/es/apis/events-endpoints.d.ts +81 -0
- package/dist/es/apis/events-endpoints.js +179 -0
- package/dist/es/apis/managealerts-endpoints.d.ts +34 -0
- package/dist/es/apis/managealerts-endpoints.js +118 -0
- package/dist/es/apis/userdefinedpolicies-endpoints.d.ts +117 -0
- package/dist/es/apis/userdefinedpolicies-endpoints.js +345 -0
- package/dist/es/index.d.ts +198 -0
- package/dist/es/index.js +788 -0
- package/dist/es/models/common/v1/config/FQDN.d.ts +48 -0
- package/dist/es/models/common/v1/config/FQDN.js +242 -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/IPAddressOrFQDN.d.ts +72 -0
- package/dist/es/models/common/v1/config/IPAddressOrFQDN.js +332 -0
- package/dist/es/models/common/v1/config/IPv4Address.d.ts +62 -0
- package/dist/es/models/common/v1/config/IPv4Address.js +288 -0
- package/dist/es/models/common/v1/config/IPv6Address.d.ts +62 -0
- package/dist/es/models/common/v1/config/IPv6Address.js +288 -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/KVStringPair.d.ts +62 -0
- package/dist/es/models/common/v1/config/KVStringPair.js +280 -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/monitoring/v4/common/AlertEntityReference.d.ts +74 -0
- package/dist/es/models/monitoring/v4/common/AlertEntityReference.js +320 -0
- package/dist/es/models/monitoring/v4/common/BoolValue.d.ts +57 -0
- package/dist/es/models/monitoring/v4/common/BoolValue.js +246 -0
- package/dist/es/models/monitoring/v4/common/CauseAndResolution.d.ts +62 -0
- package/dist/es/models/monitoring/v4/common/CauseAndResolution.js +280 -0
- package/dist/es/models/monitoring/v4/common/ComparisonOperator.d.ts +19 -0
- package/dist/es/models/monitoring/v4/common/ComparisonOperator.js +103 -0
- package/dist/es/models/monitoring/v4/common/ConditionType.d.ts +19 -0
- package/dist/es/models/monitoring/v4/common/ConditionType.js +79 -0
- package/dist/es/models/monitoring/v4/common/DataType.d.ts +19 -0
- package/dist/es/models/monitoring/v4/common/DataType.js +97 -0
- package/dist/es/models/monitoring/v4/common/DoubleValue.d.ts +57 -0
- package/dist/es/models/monitoring/v4/common/DoubleValue.js +246 -0
- package/dist/es/models/monitoring/v4/common/EntityReference.d.ts +74 -0
- package/dist/es/models/monitoring/v4/common/EntityReference.js +321 -0
- package/dist/es/models/monitoring/v4/common/ImpactType.d.ts +19 -0
- package/dist/es/models/monitoring/v4/common/ImpactType.js +121 -0
- package/dist/es/models/monitoring/v4/common/IntValue.d.ts +57 -0
- package/dist/es/models/monitoring/v4/common/IntValue.js +247 -0
- package/dist/es/models/monitoring/v4/common/MetricDetail.d.ts +164 -0
- package/dist/es/models/monitoring/v4/common/MetricDetail.js +668 -0
- package/dist/es/models/monitoring/v4/common/OperationType.d.ts +19 -0
- package/dist/es/models/monitoring/v4/common/OperationType.js +307 -0
- package/dist/es/models/monitoring/v4/common/Parameter.d.ts +62 -0
- package/dist/es/models/monitoring/v4/common/Parameter.js +304 -0
- package/dist/es/models/monitoring/v4/common/Severity.d.ts +19 -0
- package/dist/es/models/monitoring/v4/common/Severity.js +91 -0
- package/dist/es/models/monitoring/v4/common/StringValue.d.ts +57 -0
- package/dist/es/models/monitoring/v4/common/StringValue.js +246 -0
- package/dist/es/models/monitoring/v4/error/AppMessage.d.ts +108 -0
- package/dist/es/models/monitoring/v4/error/AppMessage.js +432 -0
- package/dist/es/models/monitoring/v4/error/ErrorResponse.d.ts +48 -0
- package/dist/es/models/monitoring/v4/error/ErrorResponse.js +300 -0
- package/dist/es/models/monitoring/v4/error/SchemaValidationError.d.ts +98 -0
- package/dist/es/models/monitoring/v4/error/SchemaValidationError.js +407 -0
- package/dist/es/models/monitoring/v4/error/SchemaValidationErrorMessage.d.ts +74 -0
- package/dist/es/models/monitoring/v4/error/SchemaValidationErrorMessage.js +318 -0
- package/dist/es/models/monitoring/v4/serviceability/ActionType.d.ts +19 -0
- package/dist/es/models/monitoring/v4/serviceability/ActionType.js +85 -0
- package/dist/es/models/monitoring/v4/serviceability/Alert.d.ts +316 -0
- package/dist/es/models/monitoring/v4/serviceability/Alert.js +1232 -0
- package/dist/es/models/monitoring/v4/serviceability/AlertActionSpec.d.ts +59 -0
- package/dist/es/models/monitoring/v4/serviceability/AlertActionSpec.js +245 -0
- package/dist/es/models/monitoring/v4/serviceability/AlertConfigExceptionGroup.d.ts +72 -0
- package/dist/es/models/monitoring/v4/serviceability/AlertConfigExceptionGroup.js +337 -0
- package/dist/es/models/monitoring/v4/serviceability/AlertDb.d.ts +210 -0
- package/dist/es/models/monitoring/v4/serviceability/AlertDb.js +882 -0
- package/dist/es/models/monitoring/v4/serviceability/AlertDbProjection.d.ts +49 -0
- package/dist/es/models/monitoring/v4/serviceability/AlertDbProjection.js +300 -0
- package/dist/es/models/monitoring/v4/serviceability/AlertEmailConfiguration.d.ts +153 -0
- package/dist/es/models/monitoring/v4/serviceability/AlertEmailConfiguration.js +632 -0
- package/dist/es/models/monitoring/v4/serviceability/Audit.d.ts +166 -0
- package/dist/es/models/monitoring/v4/serviceability/Audit.js +702 -0
- package/dist/es/models/monitoring/v4/serviceability/AuditDb.d.ts +148 -0
- package/dist/es/models/monitoring/v4/serviceability/AuditDb.js +598 -0
- package/dist/es/models/monitoring/v4/serviceability/AuditDbProjection.d.ts +9 -0
- package/dist/es/models/monitoring/v4/serviceability/AuditDbProjection.js +133 -0
- package/dist/es/models/monitoring/v4/serviceability/AuditEntityReference.d.ts +74 -0
- package/dist/es/models/monitoring/v4/serviceability/AuditEntityReference.js +320 -0
- package/dist/es/models/monitoring/v4/serviceability/AutoResolve.d.ts +19 -0
- package/dist/es/models/monitoring/v4/serviceability/AutoResolve.js +91 -0
- package/dist/es/models/monitoring/v4/serviceability/CommunicationStatus.d.ts +94 -0
- package/dist/es/models/monitoring/v4/serviceability/CommunicationStatus.js +390 -0
- package/dist/es/models/monitoring/v4/serviceability/Condition.d.ts +92 -0
- package/dist/es/models/monitoring/v4/serviceability/Condition.js +357 -0
- package/dist/es/models/monitoring/v4/serviceability/ConflictingPolicy.d.ts +60 -0
- package/dist/es/models/monitoring/v4/serviceability/ConflictingPolicy.js +250 -0
- package/dist/es/models/monitoring/v4/serviceability/ConnectionStatus.d.ts +19 -0
- package/dist/es/models/monitoring/v4/serviceability/ConnectionStatus.js +97 -0
- package/dist/es/models/monitoring/v4/serviceability/CreateUdaPolicyApiResponse.d.ts +59 -0
- package/dist/es/models/monitoring/v4/serviceability/CreateUdaPolicyApiResponse.js +311 -0
- package/dist/es/models/monitoring/v4/serviceability/DeleteUdaPolicyApiResponse.d.ts +59 -0
- package/dist/es/models/monitoring/v4/serviceability/DeleteUdaPolicyApiResponse.js +313 -0
- package/dist/es/models/monitoring/v4/serviceability/EmailConfigurationRule.d.ts +116 -0
- package/dist/es/models/monitoring/v4/serviceability/EmailConfigurationRule.js +507 -0
- package/dist/es/models/monitoring/v4/serviceability/EmailTemplate.d.ts +62 -0
- package/dist/es/models/monitoring/v4/serviceability/EmailTemplate.js +283 -0
- package/dist/es/models/monitoring/v4/serviceability/EntityFilter.d.ts +60 -0
- package/dist/es/models/monitoring/v4/serviceability/EntityFilter.js +250 -0
- package/dist/es/models/monitoring/v4/serviceability/Event.d.ts +150 -0
- package/dist/es/models/monitoring/v4/serviceability/Event.js +663 -0
- package/dist/es/models/monitoring/v4/serviceability/EventDb.d.ts +108 -0
- package/dist/es/models/monitoring/v4/serviceability/EventDb.js +463 -0
- package/dist/es/models/monitoring/v4/serviceability/EventDbProjection.d.ts +9 -0
- package/dist/es/models/monitoring/v4/serviceability/EventDbProjection.js +130 -0
- package/dist/es/models/monitoring/v4/serviceability/EventEntityReference.d.ts +74 -0
- package/dist/es/models/monitoring/v4/serviceability/EventEntityReference.js +320 -0
- package/dist/es/models/monitoring/v4/serviceability/FindConflictingUdaPoliciesApiResponse.d.ts +59 -0
- package/dist/es/models/monitoring/v4/serviceability/FindConflictingUdaPoliciesApiResponse.js +333 -0
- package/dist/es/models/monitoring/v4/serviceability/GetAlertApiResponse.d.ts +59 -0
- package/dist/es/models/monitoring/v4/serviceability/GetAlertApiResponse.js +311 -0
- package/dist/es/models/monitoring/v4/serviceability/GetAlertEmailConfigurationApiResponse.d.ts +59 -0
- package/dist/es/models/monitoring/v4/serviceability/GetAlertEmailConfigurationApiResponse.js +311 -0
- package/dist/es/models/monitoring/v4/serviceability/GetAuditApiResponse.d.ts +59 -0
- package/dist/es/models/monitoring/v4/serviceability/GetAuditApiResponse.js +311 -0
- package/dist/es/models/monitoring/v4/serviceability/GetEventApiResponse.d.ts +59 -0
- package/dist/es/models/monitoring/v4/serviceability/GetEventApiResponse.js +311 -0
- package/dist/es/models/monitoring/v4/serviceability/GetUdaPolicyApiResponse.d.ts +59 -0
- package/dist/es/models/monitoring/v4/serviceability/GetUdaPolicyApiResponse.js +311 -0
- package/dist/es/models/monitoring/v4/serviceability/GroupEntityType.d.ts +19 -0
- package/dist/es/models/monitoring/v4/serviceability/GroupEntityType.js +85 -0
- package/dist/es/models/monitoring/v4/serviceability/GroupFilter.d.ts +75 -0
- package/dist/es/models/monitoring/v4/serviceability/GroupFilter.js +291 -0
- package/dist/es/models/monitoring/v4/serviceability/HttpProxy.d.ts +110 -0
- package/dist/es/models/monitoring/v4/serviceability/HttpProxy.js +445 -0
- package/dist/es/models/monitoring/v4/serviceability/ListAlertsApiResponse.d.ts +59 -0
- package/dist/es/models/monitoring/v4/serviceability/ListAlertsApiResponse.js +333 -0
- package/dist/es/models/monitoring/v4/serviceability/ListAuditsApiResponse.d.ts +59 -0
- package/dist/es/models/monitoring/v4/serviceability/ListAuditsApiResponse.js +333 -0
- package/dist/es/models/monitoring/v4/serviceability/ListEventsApiResponse.d.ts +59 -0
- package/dist/es/models/monitoring/v4/serviceability/ListEventsApiResponse.js +333 -0
- package/dist/es/models/monitoring/v4/serviceability/ListUdaPoliciesApiResponse.d.ts +59 -0
- package/dist/es/models/monitoring/v4/serviceability/ListUdaPoliciesApiResponse.js +333 -0
- package/dist/es/models/monitoring/v4/serviceability/ManageAlertApiResponse.d.ts +59 -0
- package/dist/es/models/monitoring/v4/serviceability/ManageAlertApiResponse.js +311 -0
- package/dist/es/models/monitoring/v4/serviceability/ManageAlertsApiResponse.d.ts +59 -0
- package/dist/es/models/monitoring/v4/serviceability/ManageAlertsApiResponse.js +311 -0
- package/dist/es/models/monitoring/v4/serviceability/ParameterizedMessage.d.ts +58 -0
- package/dist/es/models/monitoring/v4/serviceability/ParameterizedMessage.js +285 -0
- package/dist/es/models/monitoring/v4/serviceability/PolicySeverityLevel.d.ts +19 -0
- package/dist/es/models/monitoring/v4/serviceability/PolicySeverityLevel.js +85 -0
- package/dist/es/models/monitoring/v4/serviceability/ProxyType.d.ts +19 -0
- package/dist/es/models/monitoring/v4/serviceability/ProxyType.js +91 -0
- package/dist/es/models/monitoring/v4/serviceability/RelatedPolicy.d.ts +76 -0
- package/dist/es/models/monitoring/v4/serviceability/RelatedPolicy.js +298 -0
- package/dist/es/models/monitoring/v4/serviceability/RemoteTunnelDetails.d.ts +78 -0
- package/dist/es/models/monitoring/v4/serviceability/RemoteTunnelDetails.js +347 -0
- package/dist/es/models/monitoring/v4/serviceability/RootCauseAnalysis.d.ts +56 -0
- package/dist/es/models/monitoring/v4/serviceability/RootCauseAnalysis.js +300 -0
- package/dist/es/models/monitoring/v4/serviceability/RootCauseAnalysisProjection.d.ts +9 -0
- package/dist/es/models/monitoring/v4/serviceability/RootCauseAnalysisProjection.js +129 -0
- package/dist/es/models/monitoring/v4/serviceability/ServiceCenter.d.ts +88 -0
- package/dist/es/models/monitoring/v4/serviceability/ServiceCenter.js +367 -0
- package/dist/es/models/monitoring/v4/serviceability/SeverityThresholdInfo.d.ts +60 -0
- package/dist/es/models/monitoring/v4/serviceability/SeverityThresholdInfo.js +278 -0
- package/dist/es/models/monitoring/v4/serviceability/SeverityTrail.d.ts +60 -0
- package/dist/es/models/monitoring/v4/serviceability/SeverityTrail.js +278 -0
- package/dist/es/models/monitoring/v4/serviceability/Status.d.ts +19 -0
- package/dist/es/models/monitoring/v4/serviceability/Status.js +91 -0
- package/dist/es/models/monitoring/v4/serviceability/TriggerCondition.d.ts +88 -0
- package/dist/es/models/monitoring/v4/serviceability/TriggerCondition.js +326 -0
- package/dist/es/models/monitoring/v4/serviceability/UpdateAlertEmailConfigurationApiResponse.d.ts +59 -0
- package/dist/es/models/monitoring/v4/serviceability/UpdateAlertEmailConfigurationApiResponse.js +311 -0
- package/dist/es/models/monitoring/v4/serviceability/UpdateSdaPolicyApiResponse.d.ts +59 -0
- package/dist/es/models/monitoring/v4/serviceability/UpdateSdaPolicyApiResponse.js +311 -0
- package/dist/es/models/monitoring/v4/serviceability/UpdateUdaPolicyApiResponse.d.ts +59 -0
- package/dist/es/models/monitoring/v4/serviceability/UpdateUdaPolicyApiResponse.js +311 -0
- package/dist/es/models/monitoring/v4/serviceability/UserDefinedPolicy.d.ts +207 -0
- package/dist/es/models/monitoring/v4/serviceability/UserDefinedPolicy.js +843 -0
- package/dist/es/models/monitoring/v4/serviceability/UserReference.d.ts +74 -0
- package/dist/es/models/monitoring/v4/serviceability/UserReference.js +324 -0
- package/dist/es/models/prism/v4/config/TaskReference.d.ts +50 -0
- package/dist/es/models/prism/v4/config/TaskReference.js +249 -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/alertemailconfiguration-endpoints.d.ts +41 -0
- package/dist/lib/apis/alertemailconfiguration-endpoints.js +141 -0
- package/dist/lib/apis/alerts-endpoints.d.ts +103 -0
- package/dist/lib/apis/alerts-endpoints.js +201 -0
- package/dist/lib/apis/audits-endpoints.d.ts +91 -0
- package/dist/lib/apis/audits-endpoints.js +189 -0
- package/dist/lib/apis/events-endpoints.d.ts +81 -0
- package/dist/lib/apis/events-endpoints.js +179 -0
- package/dist/lib/apis/managealerts-endpoints.d.ts +34 -0
- package/dist/lib/apis/managealerts-endpoints.js +118 -0
- package/dist/lib/apis/userdefinedpolicies-endpoints.d.ts +117 -0
- package/dist/lib/apis/userdefinedpolicies-endpoints.js +345 -0
- package/dist/lib/index.d.ts +198 -0
- package/dist/lib/index.js +788 -0
- package/dist/lib/models/common/v1/config/FQDN.d.ts +48 -0
- package/dist/lib/models/common/v1/config/FQDN.js +242 -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/IPAddressOrFQDN.d.ts +72 -0
- package/dist/lib/models/common/v1/config/IPAddressOrFQDN.js +332 -0
- package/dist/lib/models/common/v1/config/IPv4Address.d.ts +62 -0
- package/dist/lib/models/common/v1/config/IPv4Address.js +288 -0
- package/dist/lib/models/common/v1/config/IPv6Address.d.ts +62 -0
- package/dist/lib/models/common/v1/config/IPv6Address.js +288 -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/KVStringPair.d.ts +62 -0
- package/dist/lib/models/common/v1/config/KVStringPair.js +280 -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/monitoring/v4/common/AlertEntityReference.d.ts +74 -0
- package/dist/lib/models/monitoring/v4/common/AlertEntityReference.js +320 -0
- package/dist/lib/models/monitoring/v4/common/BoolValue.d.ts +57 -0
- package/dist/lib/models/monitoring/v4/common/BoolValue.js +246 -0
- package/dist/lib/models/monitoring/v4/common/CauseAndResolution.d.ts +62 -0
- package/dist/lib/models/monitoring/v4/common/CauseAndResolution.js +280 -0
- package/dist/lib/models/monitoring/v4/common/ComparisonOperator.d.ts +19 -0
- package/dist/lib/models/monitoring/v4/common/ComparisonOperator.js +103 -0
- package/dist/lib/models/monitoring/v4/common/ConditionType.d.ts +19 -0
- package/dist/lib/models/monitoring/v4/common/ConditionType.js +79 -0
- package/dist/lib/models/monitoring/v4/common/DataType.d.ts +19 -0
- package/dist/lib/models/monitoring/v4/common/DataType.js +97 -0
- package/dist/lib/models/monitoring/v4/common/DoubleValue.d.ts +57 -0
- package/dist/lib/models/monitoring/v4/common/DoubleValue.js +246 -0
- package/dist/lib/models/monitoring/v4/common/EntityReference.d.ts +74 -0
- package/dist/lib/models/monitoring/v4/common/EntityReference.js +321 -0
- package/dist/lib/models/monitoring/v4/common/ImpactType.d.ts +19 -0
- package/dist/lib/models/monitoring/v4/common/ImpactType.js +121 -0
- package/dist/lib/models/monitoring/v4/common/IntValue.d.ts +57 -0
- package/dist/lib/models/monitoring/v4/common/IntValue.js +247 -0
- package/dist/lib/models/monitoring/v4/common/MetricDetail.d.ts +164 -0
- package/dist/lib/models/monitoring/v4/common/MetricDetail.js +668 -0
- package/dist/lib/models/monitoring/v4/common/OperationType.d.ts +19 -0
- package/dist/lib/models/monitoring/v4/common/OperationType.js +307 -0
- package/dist/lib/models/monitoring/v4/common/Parameter.d.ts +62 -0
- package/dist/lib/models/monitoring/v4/common/Parameter.js +304 -0
- package/dist/lib/models/monitoring/v4/common/Severity.d.ts +19 -0
- package/dist/lib/models/monitoring/v4/common/Severity.js +91 -0
- package/dist/lib/models/monitoring/v4/common/StringValue.d.ts +57 -0
- package/dist/lib/models/monitoring/v4/common/StringValue.js +246 -0
- package/dist/lib/models/monitoring/v4/error/AppMessage.d.ts +108 -0
- package/dist/lib/models/monitoring/v4/error/AppMessage.js +432 -0
- package/dist/lib/models/monitoring/v4/error/ErrorResponse.d.ts +48 -0
- package/dist/lib/models/monitoring/v4/error/ErrorResponse.js +300 -0
- package/dist/lib/models/monitoring/v4/error/SchemaValidationError.d.ts +98 -0
- package/dist/lib/models/monitoring/v4/error/SchemaValidationError.js +407 -0
- package/dist/lib/models/monitoring/v4/error/SchemaValidationErrorMessage.d.ts +74 -0
- package/dist/lib/models/monitoring/v4/error/SchemaValidationErrorMessage.js +318 -0
- package/dist/lib/models/monitoring/v4/serviceability/ActionType.d.ts +19 -0
- package/dist/lib/models/monitoring/v4/serviceability/ActionType.js +85 -0
- package/dist/lib/models/monitoring/v4/serviceability/Alert.d.ts +316 -0
- package/dist/lib/models/monitoring/v4/serviceability/Alert.js +1232 -0
- package/dist/lib/models/monitoring/v4/serviceability/AlertActionSpec.d.ts +59 -0
- package/dist/lib/models/monitoring/v4/serviceability/AlertActionSpec.js +245 -0
- package/dist/lib/models/monitoring/v4/serviceability/AlertConfigExceptionGroup.d.ts +72 -0
- package/dist/lib/models/monitoring/v4/serviceability/AlertConfigExceptionGroup.js +337 -0
- package/dist/lib/models/monitoring/v4/serviceability/AlertDb.d.ts +210 -0
- package/dist/lib/models/monitoring/v4/serviceability/AlertDb.js +882 -0
- package/dist/lib/models/monitoring/v4/serviceability/AlertDbProjection.d.ts +49 -0
- package/dist/lib/models/monitoring/v4/serviceability/AlertDbProjection.js +300 -0
- package/dist/lib/models/monitoring/v4/serviceability/AlertEmailConfiguration.d.ts +153 -0
- package/dist/lib/models/monitoring/v4/serviceability/AlertEmailConfiguration.js +632 -0
- package/dist/lib/models/monitoring/v4/serviceability/Audit.d.ts +166 -0
- package/dist/lib/models/monitoring/v4/serviceability/Audit.js +702 -0
- package/dist/lib/models/monitoring/v4/serviceability/AuditDb.d.ts +148 -0
- package/dist/lib/models/monitoring/v4/serviceability/AuditDb.js +598 -0
- package/dist/lib/models/monitoring/v4/serviceability/AuditDbProjection.d.ts +9 -0
- package/dist/lib/models/monitoring/v4/serviceability/AuditDbProjection.js +133 -0
- package/dist/lib/models/monitoring/v4/serviceability/AuditEntityReference.d.ts +74 -0
- package/dist/lib/models/monitoring/v4/serviceability/AuditEntityReference.js +320 -0
- package/dist/lib/models/monitoring/v4/serviceability/AutoResolve.d.ts +19 -0
- package/dist/lib/models/monitoring/v4/serviceability/AutoResolve.js +91 -0
- package/dist/lib/models/monitoring/v4/serviceability/CommunicationStatus.d.ts +94 -0
- package/dist/lib/models/monitoring/v4/serviceability/CommunicationStatus.js +390 -0
- package/dist/lib/models/monitoring/v4/serviceability/Condition.d.ts +92 -0
- package/dist/lib/models/monitoring/v4/serviceability/Condition.js +357 -0
- package/dist/lib/models/monitoring/v4/serviceability/ConflictingPolicy.d.ts +60 -0
- package/dist/lib/models/monitoring/v4/serviceability/ConflictingPolicy.js +250 -0
- package/dist/lib/models/monitoring/v4/serviceability/ConnectionStatus.d.ts +19 -0
- package/dist/lib/models/monitoring/v4/serviceability/ConnectionStatus.js +97 -0
- package/dist/lib/models/monitoring/v4/serviceability/CreateUdaPolicyApiResponse.d.ts +59 -0
- package/dist/lib/models/monitoring/v4/serviceability/CreateUdaPolicyApiResponse.js +311 -0
- package/dist/lib/models/monitoring/v4/serviceability/DeleteUdaPolicyApiResponse.d.ts +59 -0
- package/dist/lib/models/monitoring/v4/serviceability/DeleteUdaPolicyApiResponse.js +313 -0
- package/dist/lib/models/monitoring/v4/serviceability/EmailConfigurationRule.d.ts +116 -0
- package/dist/lib/models/monitoring/v4/serviceability/EmailConfigurationRule.js +507 -0
- package/dist/lib/models/monitoring/v4/serviceability/EmailTemplate.d.ts +62 -0
- package/dist/lib/models/monitoring/v4/serviceability/EmailTemplate.js +283 -0
- package/dist/lib/models/monitoring/v4/serviceability/EntityFilter.d.ts +60 -0
- package/dist/lib/models/monitoring/v4/serviceability/EntityFilter.js +250 -0
- package/dist/lib/models/monitoring/v4/serviceability/Event.d.ts +150 -0
- package/dist/lib/models/monitoring/v4/serviceability/Event.js +663 -0
- package/dist/lib/models/monitoring/v4/serviceability/EventDb.d.ts +108 -0
- package/dist/lib/models/monitoring/v4/serviceability/EventDb.js +463 -0
- package/dist/lib/models/monitoring/v4/serviceability/EventDbProjection.d.ts +9 -0
- package/dist/lib/models/monitoring/v4/serviceability/EventDbProjection.js +130 -0
- package/dist/lib/models/monitoring/v4/serviceability/EventEntityReference.d.ts +74 -0
- package/dist/lib/models/monitoring/v4/serviceability/EventEntityReference.js +320 -0
- package/dist/lib/models/monitoring/v4/serviceability/FindConflictingUdaPoliciesApiResponse.d.ts +59 -0
- package/dist/lib/models/monitoring/v4/serviceability/FindConflictingUdaPoliciesApiResponse.js +333 -0
- package/dist/lib/models/monitoring/v4/serviceability/GetAlertApiResponse.d.ts +59 -0
- package/dist/lib/models/monitoring/v4/serviceability/GetAlertApiResponse.js +311 -0
- package/dist/lib/models/monitoring/v4/serviceability/GetAlertEmailConfigurationApiResponse.d.ts +59 -0
- package/dist/lib/models/monitoring/v4/serviceability/GetAlertEmailConfigurationApiResponse.js +311 -0
- package/dist/lib/models/monitoring/v4/serviceability/GetAuditApiResponse.d.ts +59 -0
- package/dist/lib/models/monitoring/v4/serviceability/GetAuditApiResponse.js +311 -0
- package/dist/lib/models/monitoring/v4/serviceability/GetEventApiResponse.d.ts +59 -0
- package/dist/lib/models/monitoring/v4/serviceability/GetEventApiResponse.js +311 -0
- package/dist/lib/models/monitoring/v4/serviceability/GetUdaPolicyApiResponse.d.ts +59 -0
- package/dist/lib/models/monitoring/v4/serviceability/GetUdaPolicyApiResponse.js +311 -0
- package/dist/lib/models/monitoring/v4/serviceability/GroupEntityType.d.ts +19 -0
- package/dist/lib/models/monitoring/v4/serviceability/GroupEntityType.js +85 -0
- package/dist/lib/models/monitoring/v4/serviceability/GroupFilter.d.ts +75 -0
- package/dist/lib/models/monitoring/v4/serviceability/GroupFilter.js +291 -0
- package/dist/lib/models/monitoring/v4/serviceability/HttpProxy.d.ts +110 -0
- package/dist/lib/models/monitoring/v4/serviceability/HttpProxy.js +445 -0
- package/dist/lib/models/monitoring/v4/serviceability/ListAlertsApiResponse.d.ts +59 -0
- package/dist/lib/models/monitoring/v4/serviceability/ListAlertsApiResponse.js +333 -0
- package/dist/lib/models/monitoring/v4/serviceability/ListAuditsApiResponse.d.ts +59 -0
- package/dist/lib/models/monitoring/v4/serviceability/ListAuditsApiResponse.js +333 -0
- package/dist/lib/models/monitoring/v4/serviceability/ListEventsApiResponse.d.ts +59 -0
- package/dist/lib/models/monitoring/v4/serviceability/ListEventsApiResponse.js +333 -0
- package/dist/lib/models/monitoring/v4/serviceability/ListUdaPoliciesApiResponse.d.ts +59 -0
- package/dist/lib/models/monitoring/v4/serviceability/ListUdaPoliciesApiResponse.js +333 -0
- package/dist/lib/models/monitoring/v4/serviceability/ManageAlertApiResponse.d.ts +59 -0
- package/dist/lib/models/monitoring/v4/serviceability/ManageAlertApiResponse.js +311 -0
- package/dist/lib/models/monitoring/v4/serviceability/ManageAlertsApiResponse.d.ts +59 -0
- package/dist/lib/models/monitoring/v4/serviceability/ManageAlertsApiResponse.js +311 -0
- package/dist/lib/models/monitoring/v4/serviceability/ParameterizedMessage.d.ts +58 -0
- package/dist/lib/models/monitoring/v4/serviceability/ParameterizedMessage.js +285 -0
- package/dist/lib/models/monitoring/v4/serviceability/PolicySeverityLevel.d.ts +19 -0
- package/dist/lib/models/monitoring/v4/serviceability/PolicySeverityLevel.js +85 -0
- package/dist/lib/models/monitoring/v4/serviceability/ProxyType.d.ts +19 -0
- package/dist/lib/models/monitoring/v4/serviceability/ProxyType.js +91 -0
- package/dist/lib/models/monitoring/v4/serviceability/RelatedPolicy.d.ts +76 -0
- package/dist/lib/models/monitoring/v4/serviceability/RelatedPolicy.js +298 -0
- package/dist/lib/models/monitoring/v4/serviceability/RemoteTunnelDetails.d.ts +78 -0
- package/dist/lib/models/monitoring/v4/serviceability/RemoteTunnelDetails.js +347 -0
- package/dist/lib/models/monitoring/v4/serviceability/RootCauseAnalysis.d.ts +56 -0
- package/dist/lib/models/monitoring/v4/serviceability/RootCauseAnalysis.js +300 -0
- package/dist/lib/models/monitoring/v4/serviceability/RootCauseAnalysisProjection.d.ts +9 -0
- package/dist/lib/models/monitoring/v4/serviceability/RootCauseAnalysisProjection.js +129 -0
- package/dist/lib/models/monitoring/v4/serviceability/ServiceCenter.d.ts +88 -0
- package/dist/lib/models/monitoring/v4/serviceability/ServiceCenter.js +367 -0
- package/dist/lib/models/monitoring/v4/serviceability/SeverityThresholdInfo.d.ts +60 -0
- package/dist/lib/models/monitoring/v4/serviceability/SeverityThresholdInfo.js +278 -0
- package/dist/lib/models/monitoring/v4/serviceability/SeverityTrail.d.ts +60 -0
- package/dist/lib/models/monitoring/v4/serviceability/SeverityTrail.js +278 -0
- package/dist/lib/models/monitoring/v4/serviceability/Status.d.ts +19 -0
- package/dist/lib/models/monitoring/v4/serviceability/Status.js +91 -0
- package/dist/lib/models/monitoring/v4/serviceability/TriggerCondition.d.ts +88 -0
- package/dist/lib/models/monitoring/v4/serviceability/TriggerCondition.js +326 -0
- package/dist/lib/models/monitoring/v4/serviceability/UpdateAlertEmailConfigurationApiResponse.d.ts +59 -0
- package/dist/lib/models/monitoring/v4/serviceability/UpdateAlertEmailConfigurationApiResponse.js +311 -0
- package/dist/lib/models/monitoring/v4/serviceability/UpdateSdaPolicyApiResponse.d.ts +59 -0
- package/dist/lib/models/monitoring/v4/serviceability/UpdateSdaPolicyApiResponse.js +311 -0
- package/dist/lib/models/monitoring/v4/serviceability/UpdateUdaPolicyApiResponse.d.ts +59 -0
- package/dist/lib/models/monitoring/v4/serviceability/UpdateUdaPolicyApiResponse.js +311 -0
- package/dist/lib/models/monitoring/v4/serviceability/UserDefinedPolicy.d.ts +207 -0
- package/dist/lib/models/monitoring/v4/serviceability/UserDefinedPolicy.js +843 -0
- package/dist/lib/models/monitoring/v4/serviceability/UserReference.d.ts +74 -0
- package/dist/lib/models/monitoring/v4/serviceability/UserReference.js +324 -0
- package/dist/lib/models/prism/v4/config/TaskReference.d.ts +50 -0
- package/dist/lib/models/prism/v4/config/TaskReference.js +249 -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,843 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _ExternalizableAbstractModel = _interopRequireDefault(require("../../../common/v1/response/ExternalizableAbstractModel"));
|
|
8
|
+
var _ImpactType = _interopRequireDefault(require("../common/ImpactType"));
|
|
9
|
+
var _EntityFilter = _interopRequireDefault(require("./EntityFilter"));
|
|
10
|
+
var _GroupFilter = _interopRequireDefault(require("./GroupFilter"));
|
|
11
|
+
var _RelatedPolicy = _interopRequireDefault(require("./RelatedPolicy"));
|
|
12
|
+
var _TriggerCondition = _interopRequireDefault(require("./TriggerCondition"));
|
|
13
|
+
var _ValidationScopes = _interopRequireDefault(require("../../../validation/ValidationScopes"));
|
|
14
|
+
var _ValidationUtils = _interopRequireDefault(require("../../../../utils/ValidationUtils"));
|
|
15
|
+
var _ValidationError = _interopRequireDefault(require("../../../validation/ValidationError"));
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
18
|
+
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."); }
|
|
19
|
+
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); }
|
|
20
|
+
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; }
|
|
21
|
+
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; } }
|
|
22
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
23
|
+
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); }
|
|
24
|
+
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; }
|
|
25
|
+
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; }
|
|
26
|
+
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; }
|
|
27
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
28
|
+
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); } }
|
|
29
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
30
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
31
|
+
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); }
|
|
32
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
33
|
+
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); }
|
|
34
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
35
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
36
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
37
|
+
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); }
|
|
38
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
39
|
+
function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
|
|
40
|
+
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
|
41
|
+
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"); } /*
|
|
42
|
+
* Nutanix Monitoring Versioned APIs
|
|
43
|
+
*
|
|
44
|
+
* OpenAPI spec version: 4.0.1-beta-1
|
|
45
|
+
*
|
|
46
|
+
* NOTE: This class is auto generated by the Open API Dev Platform.
|
|
47
|
+
*
|
|
48
|
+
* Open API Dev Platform Codegen version: 16.8.0.7344-RELEASE
|
|
49
|
+
*
|
|
50
|
+
* Do not edit the class manually.
|
|
51
|
+
*
|
|
52
|
+
*/
|
|
53
|
+
/**
|
|
54
|
+
* The UserDefinedPolicy model module.
|
|
55
|
+
* @module Ntnx/UserDefinedPolicy
|
|
56
|
+
* @version 4.0.1-beta-1
|
|
57
|
+
* @class UserDefinedPolicy
|
|
58
|
+
*
|
|
59
|
+
* @param { String } title Title of the policy.
|
|
60
|
+
*
|
|
61
|
+
* @param { TriggerCondition } triggerConditions Trigger conditions for the policy. If there are multiple trigger conditions, all of them will be considered during the operation.
|
|
62
|
+
*
|
|
63
|
+
* @param { String } entityType Entity type associated with the User-Defined Alert policy. Allowed values are VM, node and cluster.
|
|
64
|
+
*/
|
|
65
|
+
var _UserDefinedPolicy_brand = /*#__PURE__*/new WeakSet();
|
|
66
|
+
var UserDefinedPolicy = exports["default"] = /*#__PURE__*/function (_ExternalizableAbstra) {
|
|
67
|
+
/**
|
|
68
|
+
* Constructs a new <code>UserDefinedPolicy</code>.
|
|
69
|
+
* @alias module:Ntnx/UserDefinedPolicy
|
|
70
|
+
* @extends module:Ntnx/ExternalizableAbstractModel
|
|
71
|
+
*
|
|
72
|
+
* @param { String } title Title of the policy.
|
|
73
|
+
*
|
|
74
|
+
* @param { TriggerCondition } triggerConditions Trigger conditions for the policy. If there are multiple trigger conditions, all of them will be considered during the operation.
|
|
75
|
+
*
|
|
76
|
+
* @param { String } entityType Entity type associated with the User-Defined Alert policy. Allowed values are VM, node and cluster.
|
|
77
|
+
*/
|
|
78
|
+
function UserDefinedPolicy(title, triggerConditions, entityType) {
|
|
79
|
+
var _this;
|
|
80
|
+
_classCallCheck(this, UserDefinedPolicy);
|
|
81
|
+
_this = _callSuper(this, UserDefinedPolicy);
|
|
82
|
+
/*
|
|
83
|
+
* toJson method for a map type which supports map with primitive keys and values of object types
|
|
84
|
+
* @param {Object} obj
|
|
85
|
+
* @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.
|
|
86
|
+
* Otherwise, just returns the input object.
|
|
87
|
+
*/
|
|
88
|
+
_classPrivateMethodInitSpec(_this, _UserDefinedPolicy_brand);
|
|
89
|
+
_this.title = title;
|
|
90
|
+
_this.triggerConditions = triggerConditions;
|
|
91
|
+
_this.entityType = entityType;
|
|
92
|
+
_this.$objectType = "monitoring.v4.serviceability.UserDefinedPolicy";
|
|
93
|
+
_this.$reserved = {
|
|
94
|
+
'$fv': "v4.r0.b1"
|
|
95
|
+
};
|
|
96
|
+
_this.$unknownFields = {};
|
|
97
|
+
return _this;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Constructs a <code>UserDefinedPolicy</code> from a plain JavaScript object, optionally creating a new instance.
|
|
102
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
103
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
104
|
+
* @param {module:Ntnx/UserDefinedPolicy} obj Optional instance to populate.
|
|
105
|
+
* @param callFromChild {Boolean} Flag to recognise calling instance
|
|
106
|
+
* @return {module:Ntnx/UserDefinedPolicy} The populated <code>UserDefinedPolicy</code> instance.
|
|
107
|
+
*/
|
|
108
|
+
_inherits(UserDefinedPolicy, _ExternalizableAbstra);
|
|
109
|
+
return _createClass(UserDefinedPolicy, [{
|
|
110
|
+
key: "getTitle",
|
|
111
|
+
value:
|
|
112
|
+
/**
|
|
113
|
+
* Returns Title of the policy.
|
|
114
|
+
* @return {}
|
|
115
|
+
*/
|
|
116
|
+
function getTitle() {
|
|
117
|
+
return this.title;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Sets Title of the policy.
|
|
122
|
+
* @param {} title Title of the policy.
|
|
123
|
+
*/
|
|
124
|
+
}, {
|
|
125
|
+
key: "setTitle",
|
|
126
|
+
value: function setTitle(title) {
|
|
127
|
+
this.title = title;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Returns Description of the policy.
|
|
132
|
+
* @return {}
|
|
133
|
+
*/
|
|
134
|
+
}, {
|
|
135
|
+
key: "getDescription",
|
|
136
|
+
value: function getDescription() {
|
|
137
|
+
return this.description;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Sets Description of the policy.
|
|
142
|
+
* @param {} description Description of the policy.
|
|
143
|
+
*/
|
|
144
|
+
}, {
|
|
145
|
+
key: "setDescription",
|
|
146
|
+
value: function setDescription(description) {
|
|
147
|
+
this.description = description;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Returns Enable/Disable flag for the policy.
|
|
152
|
+
* @return {}
|
|
153
|
+
*/
|
|
154
|
+
}, {
|
|
155
|
+
key: "getIsEnabled",
|
|
156
|
+
value: function getIsEnabled() {
|
|
157
|
+
return this.isEnabled;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Sets Enable/Disable flag for the policy.
|
|
162
|
+
* @param {} isEnabled Enable/Disable flag for the policy.
|
|
163
|
+
*/
|
|
164
|
+
}, {
|
|
165
|
+
key: "setIsEnabled",
|
|
166
|
+
value: function setIsEnabled(isEnabled) {
|
|
167
|
+
this.isEnabled = isEnabled;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Returns Indicates whether the auto resolve feature is enabled for this policy.
|
|
172
|
+
* @return {}
|
|
173
|
+
*/
|
|
174
|
+
}, {
|
|
175
|
+
key: "getIsAutoResolved",
|
|
176
|
+
value: function getIsAutoResolved() {
|
|
177
|
+
return this.isAutoResolved;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Sets Indicates whether the auto resolve feature is enabled for this policy.
|
|
182
|
+
* @param {} isAutoResolved Indicates whether the auto resolve feature is enabled for this policy.
|
|
183
|
+
*/
|
|
184
|
+
}, {
|
|
185
|
+
key: "setIsAutoResolved",
|
|
186
|
+
value: function setIsAutoResolved(isAutoResolved) {
|
|
187
|
+
this.isAutoResolved = isAutoResolved;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Returns Filter criteria for narrowing down the entities on which User-Defined Alert policies can be setup.
|
|
192
|
+
* @return {}
|
|
193
|
+
*/
|
|
194
|
+
}, {
|
|
195
|
+
key: "getFilters",
|
|
196
|
+
value: function getFilters() {
|
|
197
|
+
return this.filters;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Sets Filter criteria for narrowing down the entities on which User-Defined Alert policies can be setup.
|
|
202
|
+
* @param {} filters Filter criteria for narrowing down the entities on which User-Defined Alert policies can be setup.
|
|
203
|
+
*/
|
|
204
|
+
}, {
|
|
205
|
+
key: "setFilters",
|
|
206
|
+
value: function setFilters(filters) {
|
|
207
|
+
this.filters = filters;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Returns Trigger conditions for the policy. If there are multiple trigger conditions, all of them will be considered during the operation.
|
|
212
|
+
* @return {}
|
|
213
|
+
*/
|
|
214
|
+
}, {
|
|
215
|
+
key: "getTriggerConditions",
|
|
216
|
+
value: function getTriggerConditions() {
|
|
217
|
+
return this.triggerConditions;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Sets Trigger conditions for the policy. If there are multiple trigger conditions, all of them will be considered during the operation.
|
|
222
|
+
* @param {} triggerConditions Trigger conditions for the policy. If there are multiple trigger conditions, all of them will be considered during the operation.
|
|
223
|
+
*/
|
|
224
|
+
}, {
|
|
225
|
+
key: "setTriggerConditions",
|
|
226
|
+
value: function setTriggerConditions(triggerConditions) {
|
|
227
|
+
this.triggerConditions = triggerConditions;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Returns Impact Types for the associated resulting alert.
|
|
232
|
+
* @return {}
|
|
233
|
+
*/
|
|
234
|
+
}, {
|
|
235
|
+
key: "getImpactTypes",
|
|
236
|
+
value: function getImpactTypes() {
|
|
237
|
+
return this.impactTypes;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* Sets Impact Types for the associated resulting alert.
|
|
242
|
+
* @param {} impactTypes Impact Types for the associated resulting alert.
|
|
243
|
+
*/
|
|
244
|
+
}, {
|
|
245
|
+
key: "setImpactTypes",
|
|
246
|
+
value: function setImpactTypes(impactTypes) {
|
|
247
|
+
this.impactTypes = impactTypes;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* Returns Username of the user who created the policy.
|
|
252
|
+
* @return {}
|
|
253
|
+
*/
|
|
254
|
+
}, {
|
|
255
|
+
key: "getCreatedBy",
|
|
256
|
+
value: function getCreatedBy() {
|
|
257
|
+
return this.createdBy;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* Sets Username of the user who created the policy.
|
|
262
|
+
* @param {} createdBy Username of the user who created the policy.
|
|
263
|
+
*/
|
|
264
|
+
}, {
|
|
265
|
+
key: "setCreatedBy",
|
|
266
|
+
value: function setCreatedBy(createdBy) {
|
|
267
|
+
this.createdBy = createdBy;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* Returns Last updated time of the policy in ISO 8601 format. This value will be used as the CAS value during updates.
|
|
272
|
+
* @return {}
|
|
273
|
+
*/
|
|
274
|
+
}, {
|
|
275
|
+
key: "getLastUpdatedTime",
|
|
276
|
+
value: function getLastUpdatedTime() {
|
|
277
|
+
return this.lastUpdatedTime;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* Sets Last updated time of the policy in ISO 8601 format. This value will be used as the CAS value during updates.
|
|
282
|
+
* @param {} lastUpdatedTime Last updated time of the policy in ISO 8601 format. This value will be used as the CAS value during updates.
|
|
283
|
+
*/
|
|
284
|
+
}, {
|
|
285
|
+
key: "setLastUpdatedTime",
|
|
286
|
+
value: function setLastUpdatedTime(lastUpdatedTime) {
|
|
287
|
+
this.lastUpdatedTime = lastUpdatedTime;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* Returns Error if conflicting alert policies are found.
|
|
292
|
+
* @return {}
|
|
293
|
+
*/
|
|
294
|
+
}, {
|
|
295
|
+
key: "getIsExpectedToErrorOnConflict",
|
|
296
|
+
value: function getIsExpectedToErrorOnConflict() {
|
|
297
|
+
return this.isExpectedToErrorOnConflict;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* Sets Error if conflicting alert policies are found.
|
|
302
|
+
* @param {} isExpectedToErrorOnConflict Error if conflicting alert policies are found.
|
|
303
|
+
*/
|
|
304
|
+
}, {
|
|
305
|
+
key: "setIsExpectedToErrorOnConflict",
|
|
306
|
+
value: function setIsExpectedToErrorOnConflict(isExpectedToErrorOnConflict) {
|
|
307
|
+
this.isExpectedToErrorOnConflict = isExpectedToErrorOnConflict;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* Returns List of IDs of the alert policies that should be overridden.
|
|
312
|
+
* @return {}
|
|
313
|
+
*/
|
|
314
|
+
}, {
|
|
315
|
+
key: "getPoliciesToOverride",
|
|
316
|
+
value: function getPoliciesToOverride() {
|
|
317
|
+
return this.policiesToOverride;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* Sets List of IDs of the alert policies that should be overridden.
|
|
322
|
+
* @param {} policiesToOverride List of IDs of the alert policies that should be overridden.
|
|
323
|
+
*/
|
|
324
|
+
}, {
|
|
325
|
+
key: "setPoliciesToOverride",
|
|
326
|
+
value: function setPoliciesToOverride(policiesToOverride) {
|
|
327
|
+
this.policiesToOverride = policiesToOverride;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* Returns Waiting duration in seconds before triggering the alert, when the specified condition is met. It is set to 600s by default.
|
|
332
|
+
* @return {}
|
|
333
|
+
*/
|
|
334
|
+
}, {
|
|
335
|
+
key: "getTriggerWaitPeriod",
|
|
336
|
+
value: function getTriggerWaitPeriod() {
|
|
337
|
+
return this.triggerWaitPeriod;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* Sets Waiting duration in seconds before triggering the alert, when the specified condition is met. It is set to 600s by default.
|
|
342
|
+
* @param {} triggerWaitPeriod Waiting duration in seconds before triggering the alert, when the specified condition is met. It is set to 600s by default.
|
|
343
|
+
*/
|
|
344
|
+
}, {
|
|
345
|
+
key: "setTriggerWaitPeriod",
|
|
346
|
+
value: function setTriggerWaitPeriod(triggerWaitPeriod) {
|
|
347
|
+
this.triggerWaitPeriod = triggerWaitPeriod;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* Returns List of alert policies that are related to the entities of the current policy.
|
|
352
|
+
* @return {}
|
|
353
|
+
*/
|
|
354
|
+
}, {
|
|
355
|
+
key: "getRelatedPolicies",
|
|
356
|
+
value: function getRelatedPolicies() {
|
|
357
|
+
return this.relatedPolicies;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
/**
|
|
361
|
+
* Sets List of alert policies that are related to the entities of the current policy.
|
|
362
|
+
* @param {} relatedPolicies List of alert policies that are related to the entities of the current policy.
|
|
363
|
+
*/
|
|
364
|
+
}, {
|
|
365
|
+
key: "setRelatedPolicies",
|
|
366
|
+
value: function setRelatedPolicies(relatedPolicies) {
|
|
367
|
+
this.relatedPolicies = relatedPolicies;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
/**
|
|
371
|
+
* Returns Entity type associated with the User-Defined Alert policy. Allowed values are VM, node and cluster.
|
|
372
|
+
* @return {}
|
|
373
|
+
*/
|
|
374
|
+
}, {
|
|
375
|
+
key: "getEntityType",
|
|
376
|
+
value: function getEntityType() {
|
|
377
|
+
return this.entityType;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* Sets Entity type associated with the User-Defined Alert policy. Allowed values are VM, node and cluster.
|
|
382
|
+
* @param {} entityType Entity type associated with the User-Defined Alert policy. Allowed values are VM, node and cluster.
|
|
383
|
+
*/
|
|
384
|
+
}, {
|
|
385
|
+
key: "setEntityType",
|
|
386
|
+
value: function setEntityType(entityType) {
|
|
387
|
+
this.entityType = entityType;
|
|
388
|
+
}
|
|
389
|
+
}, {
|
|
390
|
+
key: "toJson",
|
|
391
|
+
value: function toJson(forMutation) {
|
|
392
|
+
if (forMutation === false) {
|
|
393
|
+
return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, typeof this.getTitle() !== 'undefined' && this.getTitle() !== null ? {
|
|
394
|
+
'title': this.getTitle()
|
|
395
|
+
} : {}), typeof this.getDescription() !== 'undefined' && this.getDescription() !== null ? {
|
|
396
|
+
'description': this.getDescription()
|
|
397
|
+
} : {}), typeof this.getIsEnabled() !== 'undefined' && this.getIsEnabled() !== null ? {
|
|
398
|
+
'isEnabled': this.getIsEnabled()
|
|
399
|
+
} : {}), typeof this.getIsAutoResolved() !== 'undefined' && this.getIsAutoResolved() !== null ? {
|
|
400
|
+
'isAutoResolved': this.getIsAutoResolved()
|
|
401
|
+
} : {}), typeof this.getFilters() !== 'undefined' && this.getFilters() !== null ? {
|
|
402
|
+
'filters': typeof this.getFilters().toJson !== "undefined" ? this.getFilters().toJson(false) : Array.isArray(this.getFilters()) ? this.getFilters().map(function (item) {
|
|
403
|
+
return typeof item.toJson !== "undefined" ? item.toJson(false) : item;
|
|
404
|
+
}) : _assertClassBrand(_UserDefinedPolicy_brand, this, _toJsonMapType).call(this, this.getFilters(), false)
|
|
405
|
+
} : {}), typeof this.getTriggerConditions() !== 'undefined' && this.getTriggerConditions() !== null ? {
|
|
406
|
+
'triggerConditions': this.getTriggerConditions().map(function (item) {
|
|
407
|
+
return item.toJson(false);
|
|
408
|
+
})
|
|
409
|
+
} : {}), typeof this.getImpactTypes() !== 'undefined' && this.getImpactTypes() !== null ? {
|
|
410
|
+
'impactTypes': this.getImpactTypes()
|
|
411
|
+
} : {}), typeof this.getCreatedBy() !== 'undefined' && this.getCreatedBy() !== null ? {
|
|
412
|
+
'createdBy': this.getCreatedBy()
|
|
413
|
+
} : {}), typeof this.getLastUpdatedTime() !== 'undefined' && this.getLastUpdatedTime() !== null ? {
|
|
414
|
+
'lastUpdatedTime': this.getLastUpdatedTime()
|
|
415
|
+
} : {}), typeof this.getIsExpectedToErrorOnConflict() !== 'undefined' && this.getIsExpectedToErrorOnConflict() !== null ? {
|
|
416
|
+
'isExpectedToErrorOnConflict': this.getIsExpectedToErrorOnConflict()
|
|
417
|
+
} : {}), typeof this.getPoliciesToOverride() !== 'undefined' && this.getPoliciesToOverride() !== null ? {
|
|
418
|
+
'policiesToOverride': this.getPoliciesToOverride()
|
|
419
|
+
} : {}), typeof this.getTriggerWaitPeriod() !== 'undefined' && this.getTriggerWaitPeriod() !== null ? {
|
|
420
|
+
'triggerWaitPeriod': this.getTriggerWaitPeriod()
|
|
421
|
+
} : {}), typeof this.getRelatedPolicies() !== 'undefined' && this.getRelatedPolicies() !== null ? {
|
|
422
|
+
'relatedPolicies': this.getRelatedPolicies().map(function (item) {
|
|
423
|
+
return item.toJson(false);
|
|
424
|
+
})
|
|
425
|
+
} : {}), typeof this.getEntityType() !== 'undefined' && this.getEntityType() !== null ? {
|
|
426
|
+
'entityType': this.getEntityType()
|
|
427
|
+
} : {}), typeof this.getExtId() !== 'undefined' && this.getExtId() !== null ? {
|
|
428
|
+
'extId': this.getExtId()
|
|
429
|
+
} : {}), typeof this.getLinks() !== 'undefined' && this.getLinks() !== null ? {
|
|
430
|
+
'links': this.getLinks().map(function (item) {
|
|
431
|
+
return item.toJson(false);
|
|
432
|
+
})
|
|
433
|
+
} : {}), typeof this.getTenantId() !== 'undefined' && this.getTenantId() !== null ? {
|
|
434
|
+
'tenantId': this.getTenantId()
|
|
435
|
+
} : {}), {}, {
|
|
436
|
+
'$reserved': this.get$Reserved(),
|
|
437
|
+
'$objectType': this.get$ObjectType(),
|
|
438
|
+
'$unknownFields': this.get$UnknownFields()
|
|
439
|
+
});
|
|
440
|
+
}
|
|
441
|
+
return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, typeof this.getTitle() !== 'undefined' && this.getTitle() !== null ? {
|
|
442
|
+
'title': this.getTitle()
|
|
443
|
+
} : {}), typeof this.getDescription() !== 'undefined' && this.getDescription() !== null ? {
|
|
444
|
+
'description': this.getDescription()
|
|
445
|
+
} : {}), typeof this.getIsEnabled() !== 'undefined' && this.getIsEnabled() !== null ? {
|
|
446
|
+
'isEnabled': this.getIsEnabled()
|
|
447
|
+
} : {}), typeof this.getIsAutoResolved() !== 'undefined' && this.getIsAutoResolved() !== null ? {
|
|
448
|
+
'isAutoResolved': this.getIsAutoResolved()
|
|
449
|
+
} : {}), typeof this.getFilters() !== 'undefined' && this.getFilters() !== null ? {
|
|
450
|
+
'filters': typeof this.getFilters().toJson !== "undefined" ? this.getFilters().toJson() : Array.isArray(this.getFilters()) ? this.getFilters().map(function (item) {
|
|
451
|
+
return typeof item.toJson !== "undefined" ? item.toJson() : item;
|
|
452
|
+
}) : _assertClassBrand(_UserDefinedPolicy_brand, this, _toJsonMapType).call(this, this.getFilters())
|
|
453
|
+
} : {}), typeof this.getTriggerConditions() !== 'undefined' && this.getTriggerConditions() !== null ? {
|
|
454
|
+
'triggerConditions': this.getTriggerConditions().map(function (item) {
|
|
455
|
+
return item.toJson(false);
|
|
456
|
+
})
|
|
457
|
+
} : {}), typeof this.getImpactTypes() !== 'undefined' && this.getImpactTypes() !== null ? {
|
|
458
|
+
'impactTypes': this.getImpactTypes()
|
|
459
|
+
} : {}), typeof this.getIsExpectedToErrorOnConflict() !== 'undefined' && this.getIsExpectedToErrorOnConflict() !== null ? {
|
|
460
|
+
'isExpectedToErrorOnConflict': this.getIsExpectedToErrorOnConflict()
|
|
461
|
+
} : {}), typeof this.getPoliciesToOverride() !== 'undefined' && this.getPoliciesToOverride() !== null ? {
|
|
462
|
+
'policiesToOverride': this.getPoliciesToOverride()
|
|
463
|
+
} : {}), typeof this.getTriggerWaitPeriod() !== 'undefined' && this.getTriggerWaitPeriod() !== null ? {
|
|
464
|
+
'triggerWaitPeriod': this.getTriggerWaitPeriod()
|
|
465
|
+
} : {}), typeof this.getRelatedPolicies() !== 'undefined' && this.getRelatedPolicies() !== null ? {
|
|
466
|
+
'relatedPolicies': this.getRelatedPolicies().map(function (item) {
|
|
467
|
+
return item.toJson(false);
|
|
468
|
+
})
|
|
469
|
+
} : {}), typeof this.getEntityType() !== 'undefined' && this.getEntityType() !== null ? {
|
|
470
|
+
'entityType': this.getEntityType()
|
|
471
|
+
} : {}), typeof this.getExtId() !== 'undefined' && this.getExtId() !== null ? {
|
|
472
|
+
'extId': this.getExtId()
|
|
473
|
+
} : {}), {}, {
|
|
474
|
+
'$reserved': this.get$Reserved(),
|
|
475
|
+
'$objectType': this.get$ObjectType(),
|
|
476
|
+
'$unknownFields': this.get$UnknownFields()
|
|
477
|
+
});
|
|
478
|
+
}
|
|
479
|
+
}, {
|
|
480
|
+
key: "validate",
|
|
481
|
+
value: function validate(scope, properties) {
|
|
482
|
+
var _this2 = this;
|
|
483
|
+
var propList = [];
|
|
484
|
+
if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _ValidationScopes["default"]) {
|
|
485
|
+
//cases validate() and validate(scope)
|
|
486
|
+
propList = ["title", "triggerConditions", "entityType"];
|
|
487
|
+
} else if (arguments.length === 1) {
|
|
488
|
+
//case validate(properties)
|
|
489
|
+
propList = arguments[0];
|
|
490
|
+
scope = null;
|
|
491
|
+
} else {
|
|
492
|
+
//case validate(scope, properties)
|
|
493
|
+
propList = arguments[1];
|
|
494
|
+
}
|
|
495
|
+
var res = [];
|
|
496
|
+
var err = null;
|
|
497
|
+
propList.forEach(function (property) {
|
|
498
|
+
err = _this2.validateProperty(property, scope);
|
|
499
|
+
if (err) {
|
|
500
|
+
res.push(err);
|
|
501
|
+
}
|
|
502
|
+
});
|
|
503
|
+
return new Promise(function (resolve, reject) {
|
|
504
|
+
if (res.length !== 0) {
|
|
505
|
+
reject(err);
|
|
506
|
+
} else {
|
|
507
|
+
resolve();
|
|
508
|
+
}
|
|
509
|
+
});
|
|
510
|
+
}
|
|
511
|
+
}, {
|
|
512
|
+
key: "validateProperty",
|
|
513
|
+
value: function validateProperty(scope, property) {
|
|
514
|
+
if (property === "title") {
|
|
515
|
+
if (typeof this.title === 'undefined' || this.title === null) {
|
|
516
|
+
return new _ValidationError["default"]("title", "undefined or null");
|
|
517
|
+
}
|
|
518
|
+
if (!_ValidationUtils["default"].validateMaxLength(this.title, 150)) {
|
|
519
|
+
return new _ValidationError["default"]("title", "does not satisfy required maxLength constraint: 150");
|
|
520
|
+
}
|
|
521
|
+
if (!_ValidationUtils["default"].validateMinLength(this.title, 1)) {
|
|
522
|
+
return new _ValidationError["default"]("title", "does not satisfy required minLength constraint: 1");
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
if (property === "description") {
|
|
526
|
+
if (typeof this.description === 'undefined' || this.description === null) {
|
|
527
|
+
return new _ValidationError["default"]("description", "undefined or null");
|
|
528
|
+
}
|
|
529
|
+
if (!_ValidationUtils["default"].validateMaxLength(this.description, 500)) {
|
|
530
|
+
return new _ValidationError["default"]("description", "does not satisfy required maxLength constraint: 500");
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
if (property === "isEnabled") {
|
|
534
|
+
if (typeof this.isEnabled === 'undefined' || this.isEnabled === null) {
|
|
535
|
+
return new _ValidationError["default"]("isEnabled", "undefined or null");
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
if (property === "isAutoResolved") {
|
|
539
|
+
if (typeof this.isAutoResolved === 'undefined' || this.isAutoResolved === null) {
|
|
540
|
+
return new _ValidationError["default"]("isAutoResolved", "undefined or null");
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
if (property === "filters") {
|
|
544
|
+
if (typeof this.filters === 'undefined' || this.filters === null) {
|
|
545
|
+
return new _ValidationError["default"]("filters", "undefined or null");
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
if (property === "triggerConditions") {
|
|
549
|
+
if (typeof this.triggerConditions === 'undefined' || this.triggerConditions === null) {
|
|
550
|
+
return new _ValidationError["default"]("triggerConditions", "undefined or null");
|
|
551
|
+
}
|
|
552
|
+
if (!_ValidationUtils["default"].validateMaxItems(this.triggerConditions, 4)) {
|
|
553
|
+
return new _ValidationError["default"]("triggerConditions", "does not satisfy required maxItems constraint: 4");
|
|
554
|
+
}
|
|
555
|
+
if (!_ValidationUtils["default"].validateMinItems(this.triggerConditions, 1)) {
|
|
556
|
+
return new _ValidationError["default"]("triggerConditions", "does not satisfy required minItems constraint: 1");
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
if (property === "impactTypes") {
|
|
560
|
+
if (typeof this.impactTypes === 'undefined' || this.impactTypes === null) {
|
|
561
|
+
return new _ValidationError["default"]("impactTypes", "undefined or null");
|
|
562
|
+
}
|
|
563
|
+
if (!_ValidationUtils["default"].validateMaxItems(this.impactTypes, 8)) {
|
|
564
|
+
return new _ValidationError["default"]("impactTypes", "does not satisfy required maxItems constraint: 8");
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
if (property === "createdBy") {
|
|
568
|
+
if (typeof this.createdBy === 'undefined' || this.createdBy === null) {
|
|
569
|
+
return new _ValidationError["default"]("createdBy", "undefined or null");
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
if (property === "lastUpdatedTime") {
|
|
573
|
+
if (typeof this.lastUpdatedTime === 'undefined' || this.lastUpdatedTime === null) {
|
|
574
|
+
return new _ValidationError["default"]("lastUpdatedTime", "undefined or null");
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
if (property === "isExpectedToErrorOnConflict") {
|
|
578
|
+
if (typeof this.isExpectedToErrorOnConflict === 'undefined' || this.isExpectedToErrorOnConflict === null) {
|
|
579
|
+
return new _ValidationError["default"]("isExpectedToErrorOnConflict", "undefined or null");
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
if (property === "policiesToOverride") {
|
|
583
|
+
if (typeof this.policiesToOverride === 'undefined' || this.policiesToOverride === null) {
|
|
584
|
+
return new _ValidationError["default"]("policiesToOverride", "undefined or null");
|
|
585
|
+
}
|
|
586
|
+
if (!_ValidationUtils["default"].validateMaxItems(this.policiesToOverride, 100)) {
|
|
587
|
+
return new _ValidationError["default"]("policiesToOverride", "does not satisfy required maxItems constraint: 100");
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
if (property === "triggerWaitPeriod") {
|
|
591
|
+
if (typeof this.triggerWaitPeriod === 'undefined' || this.triggerWaitPeriod === null) {
|
|
592
|
+
return new _ValidationError["default"]("triggerWaitPeriod", "undefined or null");
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
if (property === "relatedPolicies") {
|
|
596
|
+
if (typeof this.relatedPolicies === 'undefined' || this.relatedPolicies === null) {
|
|
597
|
+
return new _ValidationError["default"]("relatedPolicies", "undefined or null");
|
|
598
|
+
}
|
|
599
|
+
if (!_ValidationUtils["default"].validateMaxItems(this.relatedPolicies, 100)) {
|
|
600
|
+
return new _ValidationError["default"]("relatedPolicies", "does not satisfy required maxItems constraint: 100");
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
if (property === "entityType") {
|
|
604
|
+
if (typeof this.entityType === 'undefined' || this.entityType === null) {
|
|
605
|
+
return new _ValidationError["default"]("entityType", "undefined or null");
|
|
606
|
+
}
|
|
607
|
+
if (!_ValidationUtils["default"].validateMaxLength(this.entityType, 10)) {
|
|
608
|
+
return new _ValidationError["default"]("entityType", "does not satisfy required maxLength constraint: 10");
|
|
609
|
+
}
|
|
610
|
+
if (!_ValidationUtils["default"].validateMinLength(this.entityType, 1)) {
|
|
611
|
+
return new _ValidationError["default"]("entityType", "does not satisfy required minLength constraint: 1");
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
return new _ValidationError["default"](property, "no such property exists");
|
|
615
|
+
}
|
|
616
|
+
}], [{
|
|
617
|
+
key: "constructFromObject",
|
|
618
|
+
value: function constructFromObject(data, obj) {
|
|
619
|
+
var callFromChild = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
620
|
+
var items, item, i, itemArr, discriminator;
|
|
621
|
+
if (data) {
|
|
622
|
+
obj = obj || new UserDefinedPolicy();
|
|
623
|
+
_ExternalizableAbstractModel["default"].constructFromObject(data, obj, true);
|
|
624
|
+
if (data.hasOwnProperty('title') && data.title !== null && data.title !== undefined) {
|
|
625
|
+
obj.setTitle(data['title']);
|
|
626
|
+
}
|
|
627
|
+
if (data.hasOwnProperty('description') && data.description !== null && data.description !== undefined) {
|
|
628
|
+
obj.setDescription(data['description']);
|
|
629
|
+
}
|
|
630
|
+
if (data.hasOwnProperty('isEnabled') && data.isEnabled !== null && data.isEnabled !== undefined) {
|
|
631
|
+
obj.setIsEnabled(data['isEnabled']);
|
|
632
|
+
}
|
|
633
|
+
if (data.hasOwnProperty('isAutoResolved') && data.isAutoResolved !== null && data.isAutoResolved !== undefined) {
|
|
634
|
+
obj.setIsAutoResolved(data['isAutoResolved']);
|
|
635
|
+
}
|
|
636
|
+
if (data.hasOwnProperty('filters') && data.filters !== null && data.filters !== undefined) {
|
|
637
|
+
if (Array.isArray(data['filters'])) {
|
|
638
|
+
if (data['filters'].length === 0) {
|
|
639
|
+
obj.setFilters([]);
|
|
640
|
+
} else {
|
|
641
|
+
itemArr = [];
|
|
642
|
+
items = data['filters'];
|
|
643
|
+
if (items[0].hasOwnProperty('$objectType')) {
|
|
644
|
+
discriminator = items[0]['$objectType'];
|
|
645
|
+
} else {
|
|
646
|
+
discriminator = _typeof(items[0]);
|
|
647
|
+
}
|
|
648
|
+
for (i = 0; i < items.length; i++) {
|
|
649
|
+
switch (discriminator) {
|
|
650
|
+
case 'monitoring.v4.serviceability.EntityFilter':
|
|
651
|
+
item = _EntityFilter["default"].constructFromObject(items[i], undefined);
|
|
652
|
+
itemArr.push(item);
|
|
653
|
+
break;
|
|
654
|
+
case 'monitoring.v4.serviceability.GroupFilter':
|
|
655
|
+
item = _GroupFilter["default"].constructFromObject(items[i], undefined);
|
|
656
|
+
itemArr.push(item);
|
|
657
|
+
break;
|
|
658
|
+
default:
|
|
659
|
+
throw "Unknown list of type " + discriminator + " in data";
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
obj.setFilters(itemArr);
|
|
663
|
+
}
|
|
664
|
+
} else {
|
|
665
|
+
if (data['filters'].hasOwnProperty('$objectType')) {
|
|
666
|
+
discriminator = data['filters']['$objectType'];
|
|
667
|
+
} else {
|
|
668
|
+
discriminator = _typeof(data['filters']);
|
|
669
|
+
}
|
|
670
|
+
switch (discriminator) {
|
|
671
|
+
default:
|
|
672
|
+
throw "Unknown datatype " + discriminator + " in data";
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
if (data.hasOwnProperty('triggerConditions') && data.triggerConditions !== null && data.triggerConditions !== undefined) {
|
|
677
|
+
itemArr = [];
|
|
678
|
+
items = data.triggerConditions;
|
|
679
|
+
for (i = 0; i < items.length; i++) {
|
|
680
|
+
item = _TriggerCondition["default"].constructFromObject(items[i], undefined);
|
|
681
|
+
itemArr.push(item);
|
|
682
|
+
}
|
|
683
|
+
obj.setTriggerConditions(itemArr);
|
|
684
|
+
}
|
|
685
|
+
if (data.hasOwnProperty('impactTypes') && data.impactTypes !== null && data.impactTypes !== undefined) {
|
|
686
|
+
itemArr = [];
|
|
687
|
+
items = data.impactTypes;
|
|
688
|
+
for (i = 0; i < items.length; i++) {
|
|
689
|
+
item = _ImpactType["default"].constructFromObject(items[i], undefined);
|
|
690
|
+
itemArr.push(item);
|
|
691
|
+
}
|
|
692
|
+
obj.setImpactTypes(itemArr);
|
|
693
|
+
}
|
|
694
|
+
if (data.hasOwnProperty('createdBy') && data.createdBy !== null && data.createdBy !== undefined) {
|
|
695
|
+
obj.setCreatedBy(data['createdBy']);
|
|
696
|
+
}
|
|
697
|
+
if (data.hasOwnProperty('lastUpdatedTime') && data.lastUpdatedTime !== null && data.lastUpdatedTime !== undefined) {
|
|
698
|
+
obj.setLastUpdatedTime(data['lastUpdatedTime']);
|
|
699
|
+
}
|
|
700
|
+
if (data.hasOwnProperty('isExpectedToErrorOnConflict') && data.isExpectedToErrorOnConflict !== null && data.isExpectedToErrorOnConflict !== undefined) {
|
|
701
|
+
obj.setIsExpectedToErrorOnConflict(data['isExpectedToErrorOnConflict']);
|
|
702
|
+
}
|
|
703
|
+
if (data.hasOwnProperty('policiesToOverride') && data.policiesToOverride !== null && data.policiesToOverride !== undefined) {
|
|
704
|
+
itemArr = [];
|
|
705
|
+
items = data.policiesToOverride;
|
|
706
|
+
for (i = 0; i < items.length; i++) {
|
|
707
|
+
itemArr.push(items[i]);
|
|
708
|
+
}
|
|
709
|
+
obj.setPoliciesToOverride(itemArr);
|
|
710
|
+
}
|
|
711
|
+
if (data.hasOwnProperty('triggerWaitPeriod') && data.triggerWaitPeriod !== null && data.triggerWaitPeriod !== undefined) {
|
|
712
|
+
obj.setTriggerWaitPeriod(data['triggerWaitPeriod']);
|
|
713
|
+
}
|
|
714
|
+
if (data.hasOwnProperty('relatedPolicies') && data.relatedPolicies !== null && data.relatedPolicies !== undefined) {
|
|
715
|
+
itemArr = [];
|
|
716
|
+
items = data.relatedPolicies;
|
|
717
|
+
for (i = 0; i < items.length; i++) {
|
|
718
|
+
item = _RelatedPolicy["default"].constructFromObject(items[i], undefined);
|
|
719
|
+
itemArr.push(item);
|
|
720
|
+
}
|
|
721
|
+
obj.setRelatedPolicies(itemArr);
|
|
722
|
+
}
|
|
723
|
+
if (data.hasOwnProperty('entityType') && data.entityType !== null && data.entityType !== undefined) {
|
|
724
|
+
obj.setEntityType(data['entityType']);
|
|
725
|
+
}
|
|
726
|
+
if (!callFromChild) {
|
|
727
|
+
obj.$unknownFields = _objectSpread({}, data.$unknownFields);
|
|
728
|
+
for (var property in data) {
|
|
729
|
+
if (!Object.keys(obj).includes(property) && !(property[0] === "$" && property.endsWith("ItemDiscriminator"))) {
|
|
730
|
+
obj.$unknownFields[property] = data[property];
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
return obj;
|
|
736
|
+
}
|
|
737
|
+
}]);
|
|
738
|
+
}(_ExternalizableAbstractModel["default"]);
|
|
739
|
+
/**
|
|
740
|
+
* Title of the policy.
|
|
741
|
+
* @memberof UserDefinedPolicy
|
|
742
|
+
*/
|
|
743
|
+
function _toJsonMapType(obj, forMutation) {
|
|
744
|
+
if (obj instanceof Map) {
|
|
745
|
+
return Object.fromEntries(Array.from(obj, function (_ref) {
|
|
746
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
747
|
+
k = _ref2[0],
|
|
748
|
+
v = _ref2[1];
|
|
749
|
+
return [k, typeof v.toJson !== "undefined" ? v.toJson(forMutation) : v];
|
|
750
|
+
}));
|
|
751
|
+
} else if (_typeof(obj) === 'object' && obj != null && obj.constructor === Object) {
|
|
752
|
+
return Object.fromEntries(Array.from(Object.entries(obj), function (entry) {
|
|
753
|
+
return [entry[0], typeof entry[1].toJson !== "undefined" ? entry[1].toJson(forMutation) : entry[1]];
|
|
754
|
+
}));
|
|
755
|
+
}
|
|
756
|
+
return obj;
|
|
757
|
+
}
|
|
758
|
+
UserDefinedPolicy.prototype.title = undefined;
|
|
759
|
+
|
|
760
|
+
/**
|
|
761
|
+
* Description of the policy.
|
|
762
|
+
* @memberof UserDefinedPolicy
|
|
763
|
+
*/
|
|
764
|
+
UserDefinedPolicy.prototype.description = undefined;
|
|
765
|
+
|
|
766
|
+
/**
|
|
767
|
+
* Enable/Disable flag for the policy.
|
|
768
|
+
* @memberof UserDefinedPolicy
|
|
769
|
+
* @default false
|
|
770
|
+
*/
|
|
771
|
+
UserDefinedPolicy.prototype.isEnabled = false;
|
|
772
|
+
|
|
773
|
+
/**
|
|
774
|
+
* Indicates whether the auto resolve feature is enabled for this policy.
|
|
775
|
+
* @memberof UserDefinedPolicy
|
|
776
|
+
* @default true
|
|
777
|
+
*/
|
|
778
|
+
UserDefinedPolicy.prototype.isAutoResolved = true;
|
|
779
|
+
|
|
780
|
+
/**
|
|
781
|
+
* Filter criteria for narrowing down the entities on which User-Defined Alert policies can be setup.
|
|
782
|
+
* @memberof UserDefinedPolicy
|
|
783
|
+
*/
|
|
784
|
+
UserDefinedPolicy.prototype.filters = undefined;
|
|
785
|
+
|
|
786
|
+
/**
|
|
787
|
+
* Trigger conditions for the policy. If there are multiple trigger conditions, all of them will be considered during the operation.
|
|
788
|
+
* @memberof UserDefinedPolicy
|
|
789
|
+
*/
|
|
790
|
+
UserDefinedPolicy.prototype.triggerConditions = undefined;
|
|
791
|
+
|
|
792
|
+
/**
|
|
793
|
+
* Impact Types for the associated resulting alert.
|
|
794
|
+
* @memberof UserDefinedPolicy
|
|
795
|
+
*/
|
|
796
|
+
UserDefinedPolicy.prototype.impactTypes = undefined;
|
|
797
|
+
|
|
798
|
+
/**
|
|
799
|
+
* Username of the user who created the policy.
|
|
800
|
+
* @memberof UserDefinedPolicy
|
|
801
|
+
*/
|
|
802
|
+
UserDefinedPolicy.prototype.createdBy = undefined;
|
|
803
|
+
|
|
804
|
+
/**
|
|
805
|
+
* Last updated time of the policy in ISO 8601 format. This value will be used as the CAS value during updates.
|
|
806
|
+
* @memberof UserDefinedPolicy
|
|
807
|
+
*/
|
|
808
|
+
UserDefinedPolicy.prototype.lastUpdatedTime = undefined;
|
|
809
|
+
|
|
810
|
+
/**
|
|
811
|
+
* Error if conflicting alert policies are found.
|
|
812
|
+
* @memberof UserDefinedPolicy
|
|
813
|
+
* @default true
|
|
814
|
+
*/
|
|
815
|
+
UserDefinedPolicy.prototype.isExpectedToErrorOnConflict = true;
|
|
816
|
+
|
|
817
|
+
/**
|
|
818
|
+
* List of IDs of the alert policies that should be overridden.
|
|
819
|
+
* @memberof UserDefinedPolicy
|
|
820
|
+
*/
|
|
821
|
+
UserDefinedPolicy.prototype.policiesToOverride = undefined;
|
|
822
|
+
|
|
823
|
+
/**
|
|
824
|
+
* Waiting duration in seconds before triggering the alert, when the specified condition is met. It is set to 600s by default.
|
|
825
|
+
* @memberof UserDefinedPolicy
|
|
826
|
+
*/
|
|
827
|
+
UserDefinedPolicy.prototype.triggerWaitPeriod = undefined;
|
|
828
|
+
|
|
829
|
+
/**
|
|
830
|
+
* List of alert policies that are related to the entities of the current policy.
|
|
831
|
+
* @memberof UserDefinedPolicy
|
|
832
|
+
*/
|
|
833
|
+
UserDefinedPolicy.prototype.relatedPolicies = undefined;
|
|
834
|
+
|
|
835
|
+
/**
|
|
836
|
+
* Entity type associated with the User-Defined Alert policy. Allowed values are VM, node and cluster.
|
|
837
|
+
* @memberof UserDefinedPolicy
|
|
838
|
+
*/
|
|
839
|
+
UserDefinedPolicy.prototype.entityType = undefined;
|
|
840
|
+
|
|
841
|
+
// Implement OneOfmonitoring.v4.serviceability.UpdateUdaPolicyApiResponsedata interface:
|
|
842
|
+
// Implement OneOfmonitoring.v4.serviceability.GetUdaPolicyApiResponsedata interface:
|
|
843
|
+
// Implement OneOfmonitoring.v4.serviceability.CreateUdaPolicyApiResponsedata interface:
|