@nutanix-scratch/monitoring-js-client 4.2.1 → 4.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/dist/Ntnx-Monitoring-js-client-prod.js +1 -1
- package/dist/Ntnx-Monitoring-js-client.js +148 -148
- package/dist/es/ApiClient.d.ts +1 -1
- package/dist/es/ApiClient.js +4 -4
- package/dist/es/Paginable.d.ts +1 -1
- package/dist/es/Paginable.js +3 -3
- package/dist/es/apis/alertemailconfiguration-endpoints.d.ts +1 -1
- package/dist/es/apis/alertemailconfiguration-endpoints.js +3 -3
- package/dist/es/apis/alerts-endpoints.d.ts +2 -2
- package/dist/es/apis/alerts-endpoints.js +4 -4
- package/dist/es/apis/audits-endpoints.d.ts +2 -2
- package/dist/es/apis/audits-endpoints.js +4 -4
- package/dist/es/apis/clusterlogs-endpoints.d.ts +2 -2
- package/dist/es/apis/clusterlogs-endpoints.js +4 -4
- package/dist/es/apis/events-endpoints.d.ts +2 -2
- package/dist/es/apis/events-endpoints.js +4 -4
- package/dist/es/apis/managealerts-endpoints.d.ts +1 -1
- package/dist/es/apis/managealerts-endpoints.js +3 -3
- package/dist/es/apis/systemdefinedchecks-endpoints.d.ts +1 -1
- package/dist/es/apis/systemdefinedchecks-endpoints.js +3 -3
- package/dist/es/apis/systemdefinedpolicies-endpoints.d.ts +3 -3
- package/dist/es/apis/systemdefinedpolicies-endpoints.js +5 -5
- package/dist/es/apis/userdefinedpolicies-endpoints.d.ts +2 -2
- package/dist/es/apis/userdefinedpolicies-endpoints.js +4 -4
- package/dist/es/models/common/v1/config/FQDN.d.ts +1 -1
- package/dist/es/models/common/v1/config/FQDN.js +3 -3
- package/dist/es/models/common/v1/config/Flag.d.ts +1 -1
- package/dist/es/models/common/v1/config/Flag.js +3 -3
- package/dist/es/models/common/v1/config/IPAddressOrFQDN.d.ts +1 -1
- package/dist/es/models/common/v1/config/IPAddressOrFQDN.js +3 -3
- package/dist/es/models/common/v1/config/IPv4Address.d.ts +1 -1
- package/dist/es/models/common/v1/config/IPv4Address.js +3 -3
- package/dist/es/models/common/v1/config/IPv6Address.d.ts +1 -1
- package/dist/es/models/common/v1/config/IPv6Address.js +3 -3
- package/dist/es/models/common/v1/config/KVPair.d.ts +1 -1
- package/dist/es/models/common/v1/config/KVPair.js +3 -3
- package/dist/es/models/common/v1/config/KVStringPair.d.ts +1 -1
- package/dist/es/models/common/v1/config/KVStringPair.js +3 -3
- package/dist/es/models/common/v1/config/MapOfStringWrapper.d.ts +1 -1
- package/dist/es/models/common/v1/config/MapOfStringWrapper.js +3 -3
- package/dist/es/models/common/v1/config/Message.d.ts +1 -1
- package/dist/es/models/common/v1/config/Message.js +3 -3
- package/dist/es/models/common/v1/config/MessageSeverity.js +2 -2
- package/dist/es/models/common/v1/config/TenantAwareModel.d.ts +1 -1
- package/dist/es/models/common/v1/config/TenantAwareModel.js +3 -3
- package/dist/es/models/common/v1/response/ApiLink.d.ts +1 -1
- package/dist/es/models/common/v1/response/ApiLink.js +3 -3
- package/dist/es/models/common/v1/response/ApiResponseMetadata.d.ts +1 -1
- package/dist/es/models/common/v1/response/ApiResponseMetadata.js +3 -3
- package/dist/es/models/common/v1/response/ExternalizableAbstractModel.d.ts +1 -1
- package/dist/es/models/common/v1/response/ExternalizableAbstractModel.js +3 -3
- package/dist/es/models/monitoring/v4/common/AlertEntityReference.d.ts +1 -1
- package/dist/es/models/monitoring/v4/common/AlertEntityReference.js +3 -3
- package/dist/es/models/monitoring/v4/common/BoolValue.d.ts +1 -1
- package/dist/es/models/monitoring/v4/common/BoolValue.js +3 -3
- package/dist/es/models/monitoring/v4/common/CauseAndResolution.d.ts +1 -1
- package/dist/es/models/monitoring/v4/common/CauseAndResolution.js +3 -3
- package/dist/es/models/monitoring/v4/common/ComparisonOperator.js +2 -2
- package/dist/es/models/monitoring/v4/common/ConditionType.js +2 -2
- package/dist/es/models/monitoring/v4/common/DataType.js +2 -2
- package/dist/es/models/monitoring/v4/common/DoubleValue.d.ts +1 -1
- package/dist/es/models/monitoring/v4/common/DoubleValue.js +3 -3
- package/dist/es/models/monitoring/v4/common/EntityReference.d.ts +1 -1
- package/dist/es/models/monitoring/v4/common/EntityReference.js +3 -3
- package/dist/es/models/monitoring/v4/common/FloatValue.d.ts +1 -1
- package/dist/es/models/monitoring/v4/common/FloatValue.js +3 -3
- package/dist/es/models/monitoring/v4/common/ImpactType.js +2 -2
- package/dist/es/models/monitoring/v4/common/IntValue.d.ts +1 -1
- package/dist/es/models/monitoring/v4/common/IntValue.js +3 -3
- package/dist/es/models/monitoring/v4/common/MetricDetail.d.ts +1 -1
- package/dist/es/models/monitoring/v4/common/MetricDetail.js +3 -3
- package/dist/es/models/monitoring/v4/common/OperationType.js +2 -2
- package/dist/es/models/monitoring/v4/common/Parameter.d.ts +1 -1
- package/dist/es/models/monitoring/v4/common/Parameter.js +3 -3
- package/dist/es/models/monitoring/v4/common/Severity.js +2 -2
- package/dist/es/models/monitoring/v4/common/StringValue.d.ts +1 -1
- package/dist/es/models/monitoring/v4/common/StringValue.js +3 -3
- package/dist/es/models/monitoring/v4/error/AppMessage.d.ts +1 -1
- package/dist/es/models/monitoring/v4/error/AppMessage.js +3 -3
- package/dist/es/models/monitoring/v4/error/ErrorResponse.d.ts +1 -1
- package/dist/es/models/monitoring/v4/error/ErrorResponse.js +3 -3
- package/dist/es/models/monitoring/v4/error/SchemaValidationError.d.ts +1 -1
- package/dist/es/models/monitoring/v4/error/SchemaValidationError.js +3 -3
- package/dist/es/models/monitoring/v4/error/SchemaValidationErrorMessage.d.ts +1 -1
- package/dist/es/models/monitoring/v4/error/SchemaValidationErrorMessage.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/ActionType.js +2 -2
- package/dist/es/models/monitoring/v4/serviceability/Alert.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/Alert.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/AlertActionSpec.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/AlertActionSpec.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/AlertConfig.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/AlertConfig.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/AlertEmailConfiguration.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/AlertEmailConfiguration.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/AlertPolicyConfigurableParameter.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/AlertPolicyConfigurableParameter.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/ArchiveOpts.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/ArchiveOpts.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/Audit.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/Audit.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/AuditEntityReference.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/AuditEntityReference.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/AutoResolveState.js +2 -2
- package/dist/es/models/monitoring/v4/serviceability/BooleanConfigurableParamValue.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/BooleanConfigurableParamValue.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/ClusterConfig.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/ClusterConfig.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/ClusterConfigProjection.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/ClusterConfigProjection.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/ClusterType.js +2 -2
- package/dist/es/models/monitoring/v4/serviceability/CollectLogsApiResponse.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/CollectLogsApiResponse.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/CommunicationStatus.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/CommunicationStatus.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/Condition.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/Condition.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/ConfigurableParamValueRange.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/ConfigurableParamValueRange.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/ConflictingPolicy.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/ConflictingPolicy.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/ConnectionStatus.js +2 -2
- package/dist/es/models/monitoring/v4/serviceability/CreateUdaPolicyApiResponse.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/CreateUdaPolicyApiResponse.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/Credential.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/Credential.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/CustomServerUploadParams.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/CustomServerUploadParams.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/DeleteUdaPolicyApiResponse.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/DeleteUdaPolicyApiResponse.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/EmailConfigurationRule.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/EmailConfigurationRule.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/EmailTemplate.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/EmailTemplate.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/EntityFilter.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/EntityFilter.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/EntityType.js +2 -2
- package/dist/es/models/monitoring/v4/serviceability/Event.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/Event.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/EventEntityReference.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/EventEntityReference.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/FindConflictingUdaPoliciesApiResponse.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/FindConflictingUdaPoliciesApiResponse.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/FloatConfigurableParamValue.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/FloatConfigurableParamValue.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/GetAlertApiResponse.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/GetAlertApiResponse.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/GetAlertEmailConfigurationApiResponse.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/GetAlertEmailConfigurationApiResponse.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/GetAuditApiResponse.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/GetAuditApiResponse.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/GetClusterConfigApiResponse.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/GetClusterConfigApiResponse.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/GetEventApiResponse.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/GetEventApiResponse.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/GetSdaPolicyApiResponse.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/GetSdaPolicyApiResponse.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/GetUdaPolicyApiResponse.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/GetUdaPolicyApiResponse.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/GroupEntityType.js +2 -2
- package/dist/es/models/monitoring/v4/serviceability/GroupFilter.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/GroupFilter.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/HttpProxy.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/HttpProxy.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/IntConfigurableParamValue.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/IntConfigurableParamValue.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/ListAlertsApiResponse.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/ListAlertsApiResponse.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/ListAuditsApiResponse.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/ListAuditsApiResponse.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/ListClusterConfigsApiResponse.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/ListClusterConfigsApiResponse.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/ListEventsApiResponse.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/ListEventsApiResponse.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/ListSdaPoliciesApiResponse.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/ListSdaPoliciesApiResponse.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/ListTagsApiResponse.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/ListTagsApiResponse.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/ListUdaPoliciesApiResponse.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/ListUdaPoliciesApiResponse.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/LocalUploadParams.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/LocalUploadParams.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/LogCollectionSpec.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/LogCollectionSpec.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/ManageAlertApiResponse.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/ManageAlertApiResponse.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/MspOpts.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/MspOpts.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/NtnxServerUploadParams.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/NtnxServerUploadParams.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/ParameterizedMessage.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/ParameterizedMessage.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/PolicySeverityLevel.js +2 -2
- package/dist/es/models/monitoring/v4/serviceability/PropertyState.js +2 -2
- package/dist/es/models/monitoring/v4/serviceability/ProxyType.js +2 -2
- package/dist/es/models/monitoring/v4/serviceability/RelatedPolicy.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/RelatedPolicy.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/RemoteTunnelDetails.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/RemoteTunnelDetails.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/RootCauseAnalysis.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/RootCauseAnalysis.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/RootCauseAnalysisProjection.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/RootCauseAnalysisProjection.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/RunSystemDefinedChecksApiResponse.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/RunSystemDefinedChecksApiResponse.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/RunSystemDefinedChecksSpec.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/RunSystemDefinedChecksSpec.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/Scope.js +2 -2
- package/dist/es/models/monitoring/v4/serviceability/SdaSubType.js +2 -2
- package/dist/es/models/monitoring/v4/serviceability/SdaType.js +2 -2
- package/dist/es/models/monitoring/v4/serviceability/ServerUploadProtocol.js +2 -2
- package/dist/es/models/monitoring/v4/serviceability/ServiceCenter.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/ServiceCenter.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/SeverityConfig.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/SeverityConfig.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/SeverityTrail.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/SeverityTrail.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/Status.js +2 -2
- package/dist/es/models/monitoring/v4/serviceability/StorageContainerUploadParams.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/StorageContainerUploadParams.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/StringConfigurableParamValue.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/StringConfigurableParamValue.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/SystemDefinedPolicy.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/SystemDefinedPolicy.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/Tag.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/Tag.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/TagOpts.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/TagOpts.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/TriggerCondition.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/TriggerCondition.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/UpdateAlertEmailConfigurationApiResponse.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/UpdateAlertEmailConfigurationApiResponse.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/UpdateClusterConfigApiResponse.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/UpdateClusterConfigApiResponse.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/UpdateUdaPolicyApiResponse.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/UpdateUdaPolicyApiResponse.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/UserDefinedPolicy.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/UserDefinedPolicy.js +3 -3
- package/dist/es/models/monitoring/v4/serviceability/UserReference.d.ts +1 -1
- package/dist/es/models/monitoring/v4/serviceability/UserReference.js +3 -3
- package/dist/es/models/prism/v4/config/TaskReference.d.ts +1 -1
- package/dist/es/models/prism/v4/config/TaskReference.js +4 -4
- package/dist/es/models/validation/ValidationError.js +2 -2
- package/dist/es/utils/ValidationUtils.js +2 -2
- package/dist/lib/ApiClient.d.ts +1 -1
- package/dist/lib/ApiClient.js +4 -4
- package/dist/lib/Paginable.d.ts +1 -1
- package/dist/lib/Paginable.js +3 -3
- package/dist/lib/apis/alertemailconfiguration-endpoints.d.ts +1 -1
- package/dist/lib/apis/alertemailconfiguration-endpoints.js +3 -3
- package/dist/lib/apis/alerts-endpoints.d.ts +2 -2
- package/dist/lib/apis/alerts-endpoints.js +4 -4
- package/dist/lib/apis/audits-endpoints.d.ts +2 -2
- package/dist/lib/apis/audits-endpoints.js +4 -4
- package/dist/lib/apis/clusterlogs-endpoints.d.ts +2 -2
- package/dist/lib/apis/clusterlogs-endpoints.js +4 -4
- package/dist/lib/apis/events-endpoints.d.ts +2 -2
- package/dist/lib/apis/events-endpoints.js +4 -4
- package/dist/lib/apis/managealerts-endpoints.d.ts +1 -1
- package/dist/lib/apis/managealerts-endpoints.js +3 -3
- package/dist/lib/apis/systemdefinedchecks-endpoints.d.ts +1 -1
- package/dist/lib/apis/systemdefinedchecks-endpoints.js +3 -3
- package/dist/lib/apis/systemdefinedpolicies-endpoints.d.ts +3 -3
- package/dist/lib/apis/systemdefinedpolicies-endpoints.js +5 -5
- package/dist/lib/apis/userdefinedpolicies-endpoints.d.ts +2 -2
- package/dist/lib/apis/userdefinedpolicies-endpoints.js +4 -4
- package/dist/lib/models/common/v1/config/FQDN.d.ts +1 -1
- package/dist/lib/models/common/v1/config/FQDN.js +3 -3
- package/dist/lib/models/common/v1/config/Flag.d.ts +1 -1
- package/dist/lib/models/common/v1/config/Flag.js +3 -3
- package/dist/lib/models/common/v1/config/IPAddressOrFQDN.d.ts +1 -1
- package/dist/lib/models/common/v1/config/IPAddressOrFQDN.js +3 -3
- package/dist/lib/models/common/v1/config/IPv4Address.d.ts +1 -1
- package/dist/lib/models/common/v1/config/IPv4Address.js +3 -3
- package/dist/lib/models/common/v1/config/IPv6Address.d.ts +1 -1
- package/dist/lib/models/common/v1/config/IPv6Address.js +3 -3
- package/dist/lib/models/common/v1/config/KVPair.d.ts +1 -1
- package/dist/lib/models/common/v1/config/KVPair.js +3 -3
- package/dist/lib/models/common/v1/config/KVStringPair.d.ts +1 -1
- package/dist/lib/models/common/v1/config/KVStringPair.js +3 -3
- package/dist/lib/models/common/v1/config/MapOfStringWrapper.d.ts +1 -1
- package/dist/lib/models/common/v1/config/MapOfStringWrapper.js +3 -3
- package/dist/lib/models/common/v1/config/Message.d.ts +1 -1
- package/dist/lib/models/common/v1/config/Message.js +3 -3
- package/dist/lib/models/common/v1/config/MessageSeverity.js +2 -2
- package/dist/lib/models/common/v1/config/TenantAwareModel.d.ts +1 -1
- package/dist/lib/models/common/v1/config/TenantAwareModel.js +3 -3
- package/dist/lib/models/common/v1/response/ApiLink.d.ts +1 -1
- package/dist/lib/models/common/v1/response/ApiLink.js +3 -3
- package/dist/lib/models/common/v1/response/ApiResponseMetadata.d.ts +1 -1
- package/dist/lib/models/common/v1/response/ApiResponseMetadata.js +3 -3
- package/dist/lib/models/common/v1/response/ExternalizableAbstractModel.d.ts +1 -1
- package/dist/lib/models/common/v1/response/ExternalizableAbstractModel.js +3 -3
- package/dist/lib/models/monitoring/v4/common/AlertEntityReference.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/common/AlertEntityReference.js +3 -3
- package/dist/lib/models/monitoring/v4/common/BoolValue.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/common/BoolValue.js +3 -3
- package/dist/lib/models/monitoring/v4/common/CauseAndResolution.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/common/CauseAndResolution.js +3 -3
- package/dist/lib/models/monitoring/v4/common/ComparisonOperator.js +2 -2
- package/dist/lib/models/monitoring/v4/common/ConditionType.js +2 -2
- package/dist/lib/models/monitoring/v4/common/DataType.js +2 -2
- package/dist/lib/models/monitoring/v4/common/DoubleValue.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/common/DoubleValue.js +3 -3
- package/dist/lib/models/monitoring/v4/common/EntityReference.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/common/EntityReference.js +3 -3
- package/dist/lib/models/monitoring/v4/common/FloatValue.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/common/FloatValue.js +3 -3
- package/dist/lib/models/monitoring/v4/common/ImpactType.js +2 -2
- package/dist/lib/models/monitoring/v4/common/IntValue.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/common/IntValue.js +3 -3
- package/dist/lib/models/monitoring/v4/common/MetricDetail.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/common/MetricDetail.js +3 -3
- package/dist/lib/models/monitoring/v4/common/OperationType.js +2 -2
- package/dist/lib/models/monitoring/v4/common/Parameter.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/common/Parameter.js +3 -3
- package/dist/lib/models/monitoring/v4/common/Severity.js +2 -2
- package/dist/lib/models/monitoring/v4/common/StringValue.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/common/StringValue.js +3 -3
- package/dist/lib/models/monitoring/v4/error/AppMessage.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/error/AppMessage.js +3 -3
- package/dist/lib/models/monitoring/v4/error/ErrorResponse.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/error/ErrorResponse.js +3 -3
- package/dist/lib/models/monitoring/v4/error/SchemaValidationError.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/error/SchemaValidationError.js +3 -3
- package/dist/lib/models/monitoring/v4/error/SchemaValidationErrorMessage.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/error/SchemaValidationErrorMessage.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/ActionType.js +2 -2
- package/dist/lib/models/monitoring/v4/serviceability/Alert.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/Alert.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/AlertActionSpec.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/AlertActionSpec.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/AlertConfig.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/AlertConfig.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/AlertEmailConfiguration.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/AlertEmailConfiguration.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/AlertPolicyConfigurableParameter.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/AlertPolicyConfigurableParameter.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/ArchiveOpts.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/ArchiveOpts.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/Audit.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/Audit.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/AuditEntityReference.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/AuditEntityReference.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/AutoResolveState.js +2 -2
- package/dist/lib/models/monitoring/v4/serviceability/BooleanConfigurableParamValue.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/BooleanConfigurableParamValue.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/ClusterConfig.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/ClusterConfig.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/ClusterConfigProjection.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/ClusterConfigProjection.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/ClusterType.js +2 -2
- package/dist/lib/models/monitoring/v4/serviceability/CollectLogsApiResponse.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/CollectLogsApiResponse.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/CommunicationStatus.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/CommunicationStatus.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/Condition.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/Condition.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/ConfigurableParamValueRange.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/ConfigurableParamValueRange.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/ConflictingPolicy.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/ConflictingPolicy.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/ConnectionStatus.js +2 -2
- package/dist/lib/models/monitoring/v4/serviceability/CreateUdaPolicyApiResponse.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/CreateUdaPolicyApiResponse.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/Credential.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/Credential.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/CustomServerUploadParams.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/CustomServerUploadParams.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/DeleteUdaPolicyApiResponse.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/DeleteUdaPolicyApiResponse.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/EmailConfigurationRule.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/EmailConfigurationRule.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/EmailTemplate.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/EmailTemplate.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/EntityFilter.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/EntityFilter.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/EntityType.js +2 -2
- package/dist/lib/models/monitoring/v4/serviceability/Event.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/Event.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/EventEntityReference.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/EventEntityReference.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/FindConflictingUdaPoliciesApiResponse.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/FindConflictingUdaPoliciesApiResponse.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/FloatConfigurableParamValue.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/FloatConfigurableParamValue.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/GetAlertApiResponse.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/GetAlertApiResponse.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/GetAlertEmailConfigurationApiResponse.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/GetAlertEmailConfigurationApiResponse.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/GetAuditApiResponse.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/GetAuditApiResponse.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/GetClusterConfigApiResponse.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/GetClusterConfigApiResponse.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/GetEventApiResponse.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/GetEventApiResponse.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/GetSdaPolicyApiResponse.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/GetSdaPolicyApiResponse.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/GetUdaPolicyApiResponse.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/GetUdaPolicyApiResponse.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/GroupEntityType.js +2 -2
- package/dist/lib/models/monitoring/v4/serviceability/GroupFilter.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/GroupFilter.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/HttpProxy.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/HttpProxy.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/IntConfigurableParamValue.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/IntConfigurableParamValue.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/ListAlertsApiResponse.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/ListAlertsApiResponse.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/ListAuditsApiResponse.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/ListAuditsApiResponse.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/ListClusterConfigsApiResponse.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/ListClusterConfigsApiResponse.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/ListEventsApiResponse.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/ListEventsApiResponse.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/ListSdaPoliciesApiResponse.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/ListSdaPoliciesApiResponse.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/ListTagsApiResponse.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/ListTagsApiResponse.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/ListUdaPoliciesApiResponse.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/ListUdaPoliciesApiResponse.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/LocalUploadParams.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/LocalUploadParams.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/LogCollectionSpec.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/LogCollectionSpec.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/ManageAlertApiResponse.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/ManageAlertApiResponse.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/MspOpts.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/MspOpts.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/NtnxServerUploadParams.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/NtnxServerUploadParams.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/ParameterizedMessage.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/ParameterizedMessage.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/PolicySeverityLevel.js +2 -2
- package/dist/lib/models/monitoring/v4/serviceability/PropertyState.js +2 -2
- package/dist/lib/models/monitoring/v4/serviceability/ProxyType.js +2 -2
- package/dist/lib/models/monitoring/v4/serviceability/RelatedPolicy.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/RelatedPolicy.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/RemoteTunnelDetails.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/RemoteTunnelDetails.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/RootCauseAnalysis.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/RootCauseAnalysis.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/RootCauseAnalysisProjection.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/RootCauseAnalysisProjection.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/RunSystemDefinedChecksApiResponse.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/RunSystemDefinedChecksApiResponse.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/RunSystemDefinedChecksSpec.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/RunSystemDefinedChecksSpec.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/Scope.js +2 -2
- package/dist/lib/models/monitoring/v4/serviceability/SdaSubType.js +2 -2
- package/dist/lib/models/monitoring/v4/serviceability/SdaType.js +2 -2
- package/dist/lib/models/monitoring/v4/serviceability/ServerUploadProtocol.js +2 -2
- package/dist/lib/models/monitoring/v4/serviceability/ServiceCenter.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/ServiceCenter.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/SeverityConfig.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/SeverityConfig.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/SeverityTrail.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/SeverityTrail.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/Status.js +2 -2
- package/dist/lib/models/monitoring/v4/serviceability/StorageContainerUploadParams.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/StorageContainerUploadParams.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/StringConfigurableParamValue.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/StringConfigurableParamValue.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/SystemDefinedPolicy.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/SystemDefinedPolicy.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/Tag.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/Tag.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/TagOpts.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/TagOpts.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/TriggerCondition.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/TriggerCondition.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/UpdateAlertEmailConfigurationApiResponse.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/UpdateAlertEmailConfigurationApiResponse.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/UpdateClusterConfigApiResponse.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/UpdateClusterConfigApiResponse.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/UpdateUdaPolicyApiResponse.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/UpdateUdaPolicyApiResponse.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/UserDefinedPolicy.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/UserDefinedPolicy.js +3 -3
- package/dist/lib/models/monitoring/v4/serviceability/UserReference.d.ts +1 -1
- package/dist/lib/models/monitoring/v4/serviceability/UserReference.js +3 -3
- package/dist/lib/models/prism/v4/config/TaskReference.d.ts +1 -1
- package/dist/lib/models/prism/v4/config/TaskReference.js +4 -4
- package/dist/lib/models/validation/ValidationError.js +2 -2
- package/dist/lib/utils/ValidationUtils.js +2 -2
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Ntnx=t():(e.Ntnx=e.Ntnx||{},e.Ntnx.Monitoring=t())}(Object("undefined"==typeof self?this:self),()=>(()=>{var e={19(e,t,n){"use strict";var i=n(897);function s(e){if(e)return function(e){for(var t in s.prototype)Object.prototype.hasOwnProperty.call(s.prototype,t)&&(e[t]=s.prototype[t]);return e}(e)}e.exports=s,s.prototype.get=function(e){return this.header[e.toLowerCase()]},s.prototype._setHeaderProperties=function(e){var t=e["content-type"]||"";this.type=i.type(t);var n=i.params(t);for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(this[s]=n[s]);this.links={};try{e.link&&(this.links=i.parseLinks(e.link))}catch(e){}},s.prototype._setStatusProperties=function(e){var t=e/100|0;this.statusCode=e,this.status=this.statusCode,this.statusType=t,this.info=1===t,this.ok=2===t,this.redirect=3===t,this.clientError=4===t,this.serverError=5===t,this.error=(4===t||5===t)&&this.toError(),this.created=201===e,this.accepted=202===e,this.noContent=204===e,this.badRequest=400===e,this.unauthorized=401===e,this.notAcceptable=406===e,this.forbidden=403===e,this.notFound=404===e,this.unprocessableEntity=422===e}},98(e){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},340(e){e.exports=o,o.default=o,o.stable=u,o.stableStringify=u;var t="[...]",n="[Circular]",i=[],s=[];function r(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function o(e,t,n,o){var a;void 0===o&&(o=r()),l(e,"",0,[],void 0,0,o);try{a=0===s.length?JSON.stringify(e,t,n):JSON.stringify(e,c(t),n)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==i.length;){var d=i.pop();4===d.length?Object.defineProperty(d[0],d[1],d[3]):d[0][d[1]]=d[2]}}return a}function a(e,t,n,r){var o=Object.getOwnPropertyDescriptor(r,n);void 0!==o.get?o.configurable?(Object.defineProperty(r,n,{value:e}),i.push([r,n,t,o])):s.push([t,n,e]):(r[n]=e,i.push([r,n,t]))}function l(e,i,s,r,o,d,u){var h;if(d+=1,"object"==typeof e&&null!==e){for(h=0;h<r.length;h++)if(r[h]===e)return void a(n,e,i,o);if(void 0!==u.depthLimit&&d>u.depthLimit)return void a(t,e,i,o);if(void 0!==u.edgesLimit&&s+1>u.edgesLimit)return void a(t,e,i,o);if(r.push(e),Array.isArray(e))for(h=0;h<e.length;h++)l(e[h],h,h,r,e,d,u);else{var c=Object.keys(e);for(h=0;h<c.length;h++){var p=c[h];l(e[p],p,h,r,e,d,u)}}r.pop()}}function d(e,t){return e<t?-1:e>t?1:0}function u(e,t,n,o){void 0===o&&(o=r());var a,l=h(e,"",0,[],void 0,0,o)||e;try{a=0===s.length?JSON.stringify(l,t,n):JSON.stringify(l,c(t),n)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==i.length;){var d=i.pop();4===d.length?Object.defineProperty(d[0],d[1],d[3]):d[0][d[1]]=d[2]}}return a}function h(e,s,r,o,l,u,c){var p;if(u+=1,"object"==typeof e&&null!==e){for(p=0;p<o.length;p++)if(o[p]===e)return void a(n,e,s,l);try{if("function"==typeof e.toJSON)return}catch(e){return}if(void 0!==c.depthLimit&&u>c.depthLimit)return void a(t,e,s,l);if(void 0!==c.edgesLimit&&r+1>c.edgesLimit)return void a(t,e,s,l);if(o.push(e),Array.isArray(e))for(p=0;p<e.length;p++)h(e[p],p,p,o,e,u,c);else{var v={},y=Object.keys(e).sort(d);for(p=0;p<y.length;p++){var g=y[p];h(e[g],g,p,o,e,u,c),v[g]=e[g]}if(void 0===l)return v;i.push([l,s,e]),l[s]=v}o.pop()}}function c(e){return e=void 0!==e?e:function(e,t){return t},function(t,n){if(s.length>0)for(var i=0;i<s.length;i++){var r=s[i];if(r[1]===t&&r[0]===n){n=r[2],s.splice(i,1);break}}return e.call(this,t,n)}}},388(e){"use strict";function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}e.exports=function(e){return null!==e&&"object"===t(e)}},540(e){function t(e,t){if(this._maxRetries&&this._retries++<this._maxRetries&&function(e,t,n,i){if(i)return i(e,t);if(e&&e.code&&~["ECONNRESET","ETIMEDOUT","EADDRINFO","ESOCKETTIMEDOUT","ENOTFOUND","ECONNREFUSED"].indexOf(e.code))return!0;if(t&&t.status){const e=t.status;if(e>=500)return!0;if((e>=400||e<200)&&-1===n.indexOf(e))return!0}return!(!e||!("timeout"in e)||"ECONNABORTED"!==e.code)||e&&"crossDomain"in e}(e,t,this._allowedStatuses,this._retryCallback)){let e;e=this._retries?this._retryDelays[this._retries-1]:0;const t=this;return setTimeout(function(){return t._retry()},e)}const n=this._callback;this.clearTimeout(),e&&(this._maxRetries&&(e.retries=this._retries-1),this.emit("error",e)),n(e,t)}function n(e,t,n,i){0!==arguments.length&&!0!==e||(e=1),e<=0&&(e=0),"number"==typeof t&&(t=[t]);const s=t.length,r=e-s;if(0!==r){if(r<0)throw new Error("Cannot have more delays than retries");{const e=t[s-1];for(let n=0;n<r+1;n++)t.push(e)}}return this._maxRetries=e,this._retries=0,this._retryDelays=t||[0],this._allowedStatuses=n||[],this._retryCallback=i,this}e.exports=function(e){const i=e.Request;return i.prototype.oldRetry=i.prototype.retry,i.prototype.retry=n,i.prototype.callback=t,e}},545(){},548(){},585(e,t,n){"use strict";function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}var s;"undefined"!=typeof window?s=window:"undefined"==typeof self?(console.warn("Using browser-only version of superagent in non-browser environment"),s=void 0):s=self;var r=n(960),o=n(340),a=n(695),l=n(388),d=n(19),u=n(619);function h(){}e.exports=function(e,n){return"function"==typeof n?new t.Request("GET",e).end(n):1===arguments.length?new t.Request("GET",e):new t.Request(e,n)};var c=t=e.exports;t.Request=$,c.getXHR=function(){if(s.XMLHttpRequest&&(!s.location||"file:"!==s.location.protocol||!s.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}throw new Error("Browser-only version of superagent could not find XHR")};var p="".trim?function(e){return e.trim()}:function(e){return e.replace(/(^\s*|\s*$)/g,"")};function v(e){if(!l(e))return e;var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&y(t,n,e[n]);return t.join("&")}function y(e,t,n){if(void 0!==n)if(null!==n)if(Array.isArray(n))n.forEach(function(n){y(e,t,n)});else if(l(n))for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&y(e,"".concat(t,"[").concat(i,"]"),n[i]);else e.push(encodeURI(t)+"="+encodeURIComponent(n));else e.push(encodeURI(t))}function g(e){for(var t,n,i={},s=e.split("&"),r=0,o=s.length;r<o;++r)-1===(n=(t=s[r]).indexOf("="))?i[decodeURIComponent(t)]="":i[decodeURIComponent(t.slice(0,n))]=decodeURIComponent(t.slice(n+1));return i}function m(e){return/[/+]json($|[^-\w])/.test(e)}function f(e){this.req=e,this.xhr=this.req.xhr,this.text="HEAD"!==this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||void 0===this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText;var t=this.xhr.status;1223===t&&(t=204),this._setStatusProperties(t),this.headers=function(e){for(var t,n,i,s,r=e.split(/\r?\n/),o={},a=0,l=r.length;a<l;++a)-1!==(t=(n=r[a]).indexOf(":"))&&(i=n.slice(0,t).toLowerCase(),s=p(n.slice(t+1)),o[i]=s);return o}(this.xhr.getAllResponseHeaders()),this.header=this.headers,this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),null===this.text&&e._responseType?this.body=this.xhr.response:this.body="HEAD"===this.req.method?null:this._parseBody(this.text?this.text:this.xhr.response)}function $(e,t){var n=this;this._query=this._query||[],this.method=e,this.url=t,this.header={},this._header={},this.on("end",function(){var e,t=null,i=null;try{i=new f(n)}catch(e){return(t=new Error("Parser is unable to parse the response")).parse=!0,t.original=e,n.xhr?(t.rawResponse=void 0===n.xhr.responseType?n.xhr.responseText:n.xhr.response,t.status=n.xhr.status?n.xhr.status:null,t.statusCode=t.status):(t.rawResponse=null,t.status=null),n.callback(t)}n.emit("response",i);try{n._isResponseOK(i)||(e=new Error(i.statusText||i.text||"Unsuccessful HTTP response"))}catch(t){e=t}e?(e.original=t,e.response=i,e.status=i.status,n.callback(e,i)):n.callback(null,i)})}function w(e,t,n){var i=c("DELETE",e);return"function"==typeof t&&(n=t,t=null),t&&i.send(t),n&&i.end(n),i}c.serializeObject=v,c.parseString=g,c.types={html:"text/html",json:"application/json",xml:"text/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},c.serialize={"application/x-www-form-urlencoded":v,"application/json":o},c.parse={"application/x-www-form-urlencoded":g,"application/json":JSON.parse},d(f.prototype),f.prototype._parseBody=function(e){var t=c.parse[this.type];return this.req._parser?this.req._parser(this,e):(!t&&m(this.type)&&(t=c.parse["application/json"]),t&&e&&(e.length>0||e instanceof Object)?t(e):null)},f.prototype.toError=function(){var e=this.req,t=e.method,n=e.url,i="cannot ".concat(t," ").concat(n," (").concat(this.status,")"),s=new Error(i);return s.status=this.status,s.method=t,s.url=n,s},c.Response=f,r($.prototype),a($.prototype),$.prototype.type=function(e){return this.set("Content-Type",c.types[e]||e),this},$.prototype.accept=function(e){return this.set("Accept",c.types[e]||e),this},$.prototype.auth=function(e,t,n){return 1===arguments.length&&(t=""),"object"===i(t)&&null!==t&&(n=t,t=""),n||(n={type:"function"==typeof btoa?"basic":"auto"}),this._auth(e,t,n,function(e){if("function"==typeof btoa)return btoa(e);throw new Error("Cannot use basic auth, btoa is not a function")})},$.prototype.query=function(e){return"string"!=typeof e&&(e=v(e)),e&&this._query.push(e),this},$.prototype.attach=function(e,t,n){if(t){if(this._data)throw new Error("superagent can't mix .send() and .attach()");this._getFormData().append(e,t,n||t.name)}return this},$.prototype._getFormData=function(){return this._formData||(this._formData=new s.FormData),this._formData},$.prototype.callback=function(e,t){if(this._shouldRetry(e,t))return this._retry();var n=this._callback;this.clearTimeout(),e&&(this._maxRetries&&(e.retries=this._retries-1),this.emit("error",e)),n(e,t)},$.prototype.crossDomainError=function(){var e=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");e.crossDomain=!0,e.status=this.status,e.method=this.method,e.url=this.url,this.callback(e)},$.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},$.prototype.ca=$.prototype.agent,$.prototype.buffer=$.prototype.ca,$.prototype.write=function(){throw new Error("Streaming is not supported in browser version of superagent")},$.prototype.pipe=$.prototype.write,$.prototype._isHost=function(e){return e&&"object"===i(e)&&!Array.isArray(e)&&"[object Object]"!==Object.prototype.toString.call(e)},$.prototype.end=function(e){this._endCalled&&console.warn("Warning: .end() was called twice. This is not supported in superagent"),this._endCalled=!0,this._callback=e||h,this._finalizeQueryString(),this._end()},$.prototype._setUploadTimeout=function(){var e=this;this._uploadTimeout&&!this._uploadTimeoutTimer&&(this._uploadTimeoutTimer=setTimeout(function(){e._timeoutError("Upload timeout of ",e._uploadTimeout,"ETIMEDOUT")},this._uploadTimeout))},$.prototype._end=function(){if(this._aborted)return this.callback(new Error("The request has been aborted even before .end() was called"));var e=this;this.xhr=c.getXHR();var t=this.xhr,n=this._formData||this._data;this._setTimeouts(),t.onreadystatechange=function(){var n=t.readyState;if(n>=2&&e._responseTimeoutTimer&&clearTimeout(e._responseTimeoutTimer),4===n){var i;try{i=t.status}catch(e){i=0}if(!i){if(e.timedout||e._aborted)return;return e.crossDomainError()}e.emit("end")}};var i=function(t,n){n.total>0&&(n.percent=n.loaded/n.total*100,100===n.percent&&clearTimeout(e._uploadTimeoutTimer)),n.direction=t,e.emit("progress",n)};if(this.hasListeners("progress"))try{t.addEventListener("progress",i.bind(null,"download")),t.upload&&t.upload.addEventListener("progress",i.bind(null,"upload"))}catch(e){}t.upload&&this._setUploadTimeout();try{this.username&&this.password?t.open(this.method,this.url,!0,this.username,this.password):t.open(this.method,this.url,!0)}catch(e){return this.callback(e)}if(this._withCredentials&&(t.withCredentials=!0),!this._formData&&"GET"!==this.method&&"HEAD"!==this.method&&"string"!=typeof n&&!this._isHost(n)){var s=this._header["content-type"],r=this._serializer||c.serialize[s?s.split(";")[0]:""];!r&&m(s)&&(r=c.serialize["application/json"]),r&&(n=r(n))}for(var o in this.header)null!==this.header[o]&&Object.prototype.hasOwnProperty.call(this.header,o)&&t.setRequestHeader(o,this.header[o]);this._responseType&&(t.responseType=this._responseType),this.emit("request",this),t.send(void 0===n?null:n)},c.agent=function(){return new u},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach(function(e){u.prototype[e.toLowerCase()]=function(t,n){var i=new c.Request(e,t);return this._setDefaults(i),n&&i.end(n),i}}),u.prototype.del=u.prototype.delete,c.get=function(e,t,n){var i=c("GET",e);return"function"==typeof t&&(n=t,t=null),t&&i.query(t),n&&i.end(n),i},c.head=function(e,t,n){var i=c("HEAD",e);return"function"==typeof t&&(n=t,t=null),t&&i.query(t),n&&i.end(n),i},c.options=function(e,t,n){var i=c("OPTIONS",e);return"function"==typeof t&&(n=t,t=null),t&&i.send(t),n&&i.end(n),i},c.del=w,c.delete=w,c.patch=function(e,t,n){var i=c("PATCH",e);return"function"==typeof t&&(n=t,t=null),t&&i.send(t),n&&i.end(n),i},c.post=function(e,t,n){var i=c("POST",e);return"function"==typeof t&&(n=t,t=null),t&&i.send(t),n&&i.end(n),i},c.put=function(e,t,n){var i=c("PUT",e);return"function"==typeof t&&(n=t,t=null),t&&i.send(t),n&&i.end(n),i}},597(e){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},619(e){"use strict";function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function n(){this._defaults=[]}["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert","disableTLSCerts"].forEach(function(e){n.prototype[e]=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return this._defaults.push({fn:e,args:n}),this}}),n.prototype._setDefaults=function(e){this._defaults.forEach(function(n){var i;e[n.fn].apply(e,function(e){if(Array.isArray(e))return t(e)}(i=n.args)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(i)||function(e,n){if(e){if("string"==typeof e)return t(e,n);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?t(e,n):void 0}}(i)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())})},e.exports=n},695(e,t,n){"use strict";function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}var s=n(388);function r(e){if(e)return function(e){for(var t in r.prototype)Object.prototype.hasOwnProperty.call(r.prototype,t)&&(e[t]=r.prototype[t]);return e}(e)}e.exports=r,r.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),clearTimeout(this._uploadTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,delete this._uploadTimeoutTimer,this},r.prototype.parse=function(e){return this._parser=e,this},r.prototype.responseType=function(e){return this._responseType=e,this},r.prototype.serialize=function(e){return this._serializer=e,this},r.prototype.timeout=function(e){if(!e||"object"!==i(e))return this._timeout=e,this._responseTimeout=0,this._uploadTimeout=0,this;for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))switch(t){case"deadline":this._timeout=e.deadline;break;case"response":this._responseTimeout=e.response;break;case"upload":this._uploadTimeout=e.upload;break;default:console.warn("Unknown timeout option",t)}return this},r.prototype.retry=function(e,t){return 0!==arguments.length&&!0!==e||(e=1),e<=0&&(e=0),this._maxRetries=e,this._retries=0,this._retryCallback=t,this};var o=["ECONNRESET","ETIMEDOUT","EADDRINFO","ESOCKETTIMEDOUT"];r.prototype._shouldRetry=function(e,t){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{var n=this._retryCallback(e,t);if(!0===n)return!0;if(!1===n)return!1}catch(e){console.error(e)}if(t&&t.status&&t.status>=500&&501!==t.status)return!0;if(e){if(e.code&&o.includes(e.code))return!0;if(e.timeout&&"ECONNABORTED"===e.code)return!0;if(e.crossDomain)return!0}return!1},r.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this.timedoutError=null,this._end()},r.prototype.then=function(e,t){var n=this;if(!this._fullfilledPromise){var i=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise(function(e,t){i.on("abort",function(){if(!(n._maxRetries&&n._maxRetries>n._retries))if(n.timedout&&n.timedoutError)t(n.timedoutError);else{var e=new Error("Aborted");e.code="ABORTED",e.status=n.status,e.method=n.method,e.url=n.url,t(e)}}),i.end(function(n,i){n?t(n):e(i)})})}return this._fullfilledPromise.then(e,t)},r.prototype.catch=function(e){return this.then(void 0,e)},r.prototype.use=function(e){return e(this),this},r.prototype.ok=function(e){if("function"!=typeof e)throw new Error("Callback required");return this._okCallback=e,this},r.prototype._isResponseOK=function(e){return!!e&&(this._okCallback?this._okCallback(e):e.status>=200&&e.status<300)},r.prototype.get=function(e){return this._header[e.toLowerCase()]},r.prototype.getHeader=r.prototype.get,r.prototype.set=function(e,t){if(s(e)){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&this.set(n,e[n]);return this}return this._header[e.toLowerCase()]=t,this.header[e]=t,this},r.prototype.unset=function(e){return delete this._header[e.toLowerCase()],delete this.header[e],this},r.prototype.field=function(e,t){if(null==e)throw new Error(".field(name, val) name can not be empty");if(this._data)throw new Error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()");if(s(e)){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&this.field(n,e[n]);return this}if(Array.isArray(t)){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&this.field(e,t[i]);return this}if(null==t)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof t&&(t=String(t)),this._getFormData().append(e,t),this},r.prototype.abort=function(){return this._aborted||(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort")),this},r.prototype._auth=function(e,t,n,i){switch(n.type){case"basic":this.set("Authorization","Basic ".concat(i("".concat(e,":").concat(t))));break;case"auto":this.username=e,this.password=t;break;case"bearer":this.set("Authorization","Bearer ".concat(e))}return this},r.prototype.withCredentials=function(e){return void 0===e&&(e=!0),this._withCredentials=e,this},r.prototype.redirects=function(e){return this._maxRedirects=e,this},r.prototype.maxResponseSize=function(e){if("number"!=typeof e)throw new TypeError("Invalid argument");return this._maxResponseSize=e,this},r.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},r.prototype.send=function(e){var t=s(e),n=this._header["content-type"];if(this._formData)throw new Error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()");if(t&&!this._data)Array.isArray(e)?this._data=[]:this._isHost(e)||(this._data={});else if(e&&this._data&&this._isHost(this._data))throw new Error("Can't merge these send calls");if(t&&s(this._data))for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(this._data[i]=e[i]);else"string"==typeof e?(n||this.type("form"),n=this._header["content-type"],this._data="application/x-www-form-urlencoded"===n?this._data?"".concat(this._data,"&").concat(e):e:(this._data||"")+e):this._data=e;return!t||this._isHost(e)||n||this.type("json"),this},r.prototype.sortQuery=function(e){return this._sort=void 0===e||e,this},r.prototype._finalizeQueryString=function(){var e=this._query.join("&");if(e&&(this.url+=(this.url.includes("?")?"&":"?")+e),this._query.length=0,this._sort){var t=this.url.indexOf("?");if(t>=0){var n=this.url.slice(t+1).split("&");"function"==typeof this._sort?n.sort(this._sort):n.sort(),this.url=this.url.slice(0,t)+"?"+n.join("&")}}},r.prototype._appendQueryString=function(){console.warn("Unsupported")},r.prototype._timeoutError=function(e,t,n){if(!this._aborted){var i=new Error("".concat(e+t,"ms exceeded"));i.timeout=t,i.code="ECONNABORTED",i.errno=n,this.timedout=!0,this.timedoutError=i,this.abort(),this.callback(i)}},r.prototype._setTimeouts=function(){var e=this;this._timeout&&!this._timer&&(this._timer=setTimeout(function(){e._timeoutError("Timeout of ",e._timeout,"ETIME")},this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout(function(){e._timeoutError("Response timeout of ",e._responseTimeout,"ETIMEDOUT")},this._responseTimeout))}},784(e,t,n){"use strict";var i="win32"===process.platform,s=n(818);function r(e,t){for(var n=[],i=0;i<e.length;i++){var s=e[i];s&&"."!==s&&(".."===s?n.length&&".."!==n[n.length-1]?n.pop():t&&n.push(".."):n.push(s))}return n}function o(e){for(var t=e.length-1,n=0;n<=t&&!e[n];n++);for(var i=t;i>=0&&!e[i];i--);return 0===n&&i===t?e:n>i?[]:e.slice(n,i+1)}var a=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/,l=/^([\s\S]*?)((?:\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))(?:[\\\/]*)$/,d={};function u(e){var t=a.exec(e),n=(t[1]||"")+(t[2]||""),i=t[3]||"",s=l.exec(i);return[n,s[1],s[2],s[3]]}function h(e){var t=a.exec(e),n=t[1]||"",i=!!n&&":"!==n[1];return{device:n,isUnc:i,isAbsolute:i||!!t[2],tail:t[3]}}function c(e){return"\\\\"+e.replace(/^[\\\/]+/,"").replace(/[\\\/]+/g,"\\")}d.resolve=function(){for(var e="",t="",n=!1,i=arguments.length-1;i>=-1;i--){var o;if(i>=0?o=arguments[i]:e?(o=process.env["="+e])&&o.substr(0,3).toLowerCase()===e.toLowerCase()+"\\"||(o=e+"\\"):o=process.cwd(),!s.isString(o))throw new TypeError("Arguments to path.resolve must be strings");if(o){var a=h(o),l=a.device,d=a.isUnc,u=a.isAbsolute,p=a.tail;if((!l||!e||l.toLowerCase()===e.toLowerCase())&&(e||(e=l),n||(t=p+"\\"+t,n=u),e&&n))break}}return d&&(e=c(e)),e+(n?"\\":"")+(t=r(t.split(/[\\\/]+/),!n).join("\\"))||"."},d.normalize=function(e){var t=h(e),n=t.device,i=t.isUnc,s=t.isAbsolute,o=t.tail,a=/[\\\/]$/.test(o);return(o=r(o.split(/[\\\/]+/),!s).join("\\"))||s||(o="."),o&&a&&(o+="\\"),i&&(n=c(n)),n+(s?"\\":"")+o},d.isAbsolute=function(e){return h(e).isAbsolute},d.join=function(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(!s.isString(n))throw new TypeError("Arguments to path.join must be strings");n&&e.push(n)}var i=e.join("\\");return/^[\\\/]{2}[^\\\/]/.test(e[0])||(i=i.replace(/^[\\\/]{2,}/,"\\")),d.normalize(i)},d.relative=function(e,t){e=d.resolve(e),t=d.resolve(t);for(var n=e.toLowerCase(),i=t.toLowerCase(),s=o(t.split("\\")),r=o(n.split("\\")),a=o(i.split("\\")),l=Math.min(r.length,a.length),u=l,h=0;h<l;h++)if(r[h]!==a[h]){u=h;break}if(0==u)return t;var c=[];for(h=u;h<r.length;h++)c.push("..");return(c=c.concat(s.slice(u))).join("\\")},d._makeLong=function(e){if(!s.isString(e))return e;if(!e)return"";var t=d.resolve(e);return/^[a-zA-Z]\:\\/.test(t)?"\\\\?\\"+t:/^\\\\[^?.]/.test(t)?"\\\\?\\UNC\\"+t.substring(2):e},d.dirname=function(e){var t=u(e),n=t[0],i=t[1];return n||i?(i&&(i=i.substr(0,i.length-1)),n+i):"."},d.basename=function(e,t){var n=u(e)[2];return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},d.extname=function(e){return u(e)[3]},d.format=function(e){if(!s.isObject(e))throw new TypeError("Parameter 'pathObject' must be an object, not "+typeof e);var t=e.root||"";if(!s.isString(t))throw new TypeError("'pathObject.root' must be a string or undefined, not "+typeof e.root);var n=e.dir,i=e.base||"";return n?n[n.length-1]===d.sep?n+i:n+d.sep+i:i},d.parse=function(e){if(!s.isString(e))throw new TypeError("Parameter 'pathString' must be a string, not "+typeof e);var t=u(e);if(!t||4!==t.length)throw new TypeError("Invalid path '"+e+"'");return{root:t[0],dir:t[0]+t[1].slice(0,-1),base:t[2],ext:t[3],name:t[2].slice(0,t[2].length-t[3].length)}},d.sep="\\",d.delimiter=";";var p=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,v={};function y(e){return p.exec(e).slice(1)}v.resolve=function(){for(var e="",t=!1,n=arguments.length-1;n>=-1&&!t;n--){var i=n>=0?arguments[n]:process.cwd();if(!s.isString(i))throw new TypeError("Arguments to path.resolve must be strings");i&&(e=i+"/"+e,t="/"===i[0])}return(t?"/":"")+(e=r(e.split("/"),!t).join("/"))||"."},v.normalize=function(e){var t=v.isAbsolute(e),n=e&&"/"===e[e.length-1];return(e=r(e.split("/"),!t).join("/"))||t||(e="."),e&&n&&(e+="/"),(t?"/":"")+e},v.isAbsolute=function(e){return"/"===e.charAt(0)},v.join=function(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];if(!s.isString(n))throw new TypeError("Arguments to path.join must be strings");n&&(e+=e?"/"+n:n)}return v.normalize(e)},v.relative=function(e,t){e=v.resolve(e).substr(1),t=v.resolve(t).substr(1);for(var n=o(e.split("/")),i=o(t.split("/")),s=Math.min(n.length,i.length),r=s,a=0;a<s;a++)if(n[a]!==i[a]){r=a;break}var l=[];for(a=r;a<n.length;a++)l.push("..");return(l=l.concat(i.slice(r))).join("/")},v._makeLong=function(e){return e},v.dirname=function(e){var t=y(e),n=t[0],i=t[1];return n||i?(i&&(i=i.substr(0,i.length-1)),n+i):"."},v.basename=function(e,t){var n=y(e)[2];return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},v.extname=function(e){return y(e)[3]},v.format=function(e){if(!s.isObject(e))throw new TypeError("Parameter 'pathObject' must be an object, not "+typeof e);var t=e.root||"";if(!s.isString(t))throw new TypeError("'pathObject.root' must be a string or undefined, not "+typeof e.root);return(e.dir?e.dir+v.sep:"")+(e.base||"")},v.parse=function(e){if(!s.isString(e))throw new TypeError("Parameter 'pathString' must be a string, not "+typeof e);var t=y(e);if(!t||4!==t.length)throw new TypeError("Invalid path '"+e+"'");return t[1]=t[1]||"",t[2]=t[2]||"",t[3]=t[3]||"",{root:t[0],dir:t[0]+t[1].slice(0,-1),base:t[2],ext:t[3],name:t[2].slice(0,t[2].length-t[3].length)}},v.sep="/",v.delimiter=":",e.exports=i?d:v,e.exports.posix=v,e.exports.win32=d},799(){},818(e,t,n){var i=/%[sdj%]/g;t.format=function(e){if(!g(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(o(arguments[n]));return t.join(" ")}n=1;for(var s=arguments,r=s.length,a=String(e).replace(i,function(e){if("%%"===e)return"%";if(n>=r)return e;switch(e){case"%s":return String(s[n++]);case"%d":return Number(s[n++]);case"%j":try{return JSON.stringify(s[n++])}catch(e){return"[Circular]"}default:return e}}),l=s[n];n<r;l=s[++n])v(l)||!$(l)?a+=" "+l:a+=" "+o(l);return a},t.deprecate=function(e,i){if(m(n.g.process))return function(){return t.deprecate(e,i).apply(this,arguments)};if(!0===process.noDeprecation)return e;var s=!1;return function(){if(!s){if(process.throwDeprecation)throw new Error(i);process.traceDeprecation?console.trace(i):console.error(i),s=!0}return e.apply(this,arguments)}};var s,r={};function o(e,n){var i={seen:[],stylize:l};return arguments.length>=3&&(i.depth=arguments[2]),arguments.length>=4&&(i.colors=arguments[3]),p(n)?i.showHidden=n:n&&t._extend(i,n),m(i.showHidden)&&(i.showHidden=!1),m(i.depth)&&(i.depth=2),m(i.colors)&&(i.colors=!1),m(i.customInspect)&&(i.customInspect=!0),i.colors&&(i.stylize=a),d(i,e,i.depth)}function a(e,t){var n=o.styles[t];return n?"["+o.colors[n][0]+"m"+e+"["+o.colors[n][1]+"m":e}function l(e,t){return e}function d(e,n,i){if(e.customInspect&&n&&b(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var s=n.inspect(i,e);return g(s)||(s=d(e,s,i)),s}var r=function(e,t){if(m(t))return e.stylize("undefined","undefined");if(g(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return y(t)?e.stylize(""+t,"number"):p(t)?e.stylize(""+t,"boolean"):v(t)?e.stylize("null","null"):void 0}(e,n);if(r)return r;var o=Object.keys(n),a=function(e){var t={};return e.forEach(function(e,n){t[e]=!0}),t}(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(n)),T(n)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return u(n);if(0===o.length){if(b(n)){var l=n.name?": "+n.name:"";return e.stylize("[Function"+l+"]","special")}if(f(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(w(n))return e.stylize(Date.prototype.toString.call(n),"date");if(T(n))return u(n)}var $,k="",F=!1,O=["{","}"];return c(n)&&(F=!0,O=["[","]"]),b(n)&&(k=" [Function"+(n.name?": "+n.name:"")+"]"),f(n)&&(k=" "+RegExp.prototype.toString.call(n)),w(n)&&(k=" "+Date.prototype.toUTCString.call(n)),T(n)&&(k=" "+u(n)),0!==o.length||F&&0!=n.length?i<0?f(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),$=F?function(e,t,n,i,s){for(var r=[],o=0,a=t.length;o<a;++o)j(t,String(o))?r.push(h(e,t,n,i,String(o),!0)):r.push("");return s.forEach(function(s){s.match(/^\d+$/)||r.push(h(e,t,n,i,s,!0))}),r}(e,n,i,a,o):o.map(function(t){return h(e,n,i,a,t,F)}),e.seen.pop(),function(e,t,n){return e.reduce(function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}($,k,O)):O[0]+k+O[1]}function u(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,n,i,s,r){var o,a,l;if((l=Object.getOwnPropertyDescriptor(t,s)||{value:t[s]}).get?a=l.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):l.set&&(a=e.stylize("[Setter]","special")),j(i,s)||(o="["+s+"]"),a||(e.seen.indexOf(l.value)<0?(a=v(n)?d(e,l.value,null):d(e,l.value,n-1)).indexOf("\n")>-1&&(a=r?a.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+a.split("\n").map(function(e){return" "+e}).join("\n")):a=e.stylize("[Circular]","special")),m(o)){if(r&&s.match(/^\d+$/))return a;(o=JSON.stringify(""+s)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+a}function c(e){return Array.isArray(e)}function p(e){return"boolean"==typeof e}function v(e){return null===e}function y(e){return"number"==typeof e}function g(e){return"string"==typeof e}function m(e){return void 0===e}function f(e){return $(e)&&"[object RegExp]"===k(e)}function $(e){return"object"==typeof e&&null!==e}function w(e){return $(e)&&"[object Date]"===k(e)}function T(e){return $(e)&&("[object Error]"===k(e)||e instanceof Error)}function b(e){return"function"==typeof e}function k(e){return Object.prototype.toString.call(e)}function F(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(m(s)&&(s=process.env.NODE_DEBUG||""),e=e.toUpperCase(),!r[e])if(new RegExp("\\b"+e+"\\b","i").test(s)){var n=process.pid;r[e]=function(){var i=t.format.apply(t,arguments);console.error("%s %d: %s",e,n,i)}}else r[e]=function(){};return r[e]},t.inspect=o,o.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},o.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=c,t.isBoolean=p,t.isNull=v,t.isNullOrUndefined=function(e){return null==e},t.isNumber=y,t.isString=g,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=m,t.isRegExp=f,t.isObject=$,t.isDate=w,t.isError=T,t.isFunction=b,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(98);var O=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function j(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,n;console.log("%s - %s",(n=[F((e=new Date).getHours()),F(e.getMinutes()),F(e.getSeconds())].join(":"),[e.getDate(),O[e.getMonth()],n].join(" ")),t.format.apply(t,arguments))},t.inherits=n(597),t._extend=function(e,t){if(!t||!$(t))return e;for(var n=Object.keys(t),i=n.length;i--;)e[n[i]]=t[n[i]];return e}},897(e,t){"use strict";t.type=function(e){return e.split(/ *; */).shift()},t.params=function(e){return e.split(/ *; */).reduce(function(e,t){var n=t.split(/ *= */),i=n.shift(),s=n.shift();return i&&s&&(e[i]=s),e},{})},t.parseLinks=function(e){return e.split(/ *, */).reduce(function(e,t){var n=t.split(/ *; */),i=n[0].slice(1,-1);return e[n[1].split(/ *= */)[1].slice(1,-1)]=i,e},{})},t.cleanHeader=function(e,t){return delete e["content-type"],delete e["content-length"],delete e["transfer-encoding"],delete e.host,t&&(delete e.authorization,delete e.cookie),e}},960(e){function t(e){if(e)return function(e){for(var n in t.prototype)e[n]=t.prototype[n];return e}(e)}e.exports=t,t.prototype.on=t.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},t.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,i=this._callbacks["$"+e];if(!i)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var s=0;s<i.length;s++)if((n=i[s])===t||n.fn===t){i.splice(s,1);break}return 0===i.length&&delete this._callbacks["$"+e],this},t.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],i=1;i<arguments.length;i++)t[i-1]=arguments[i];if(n){i=0;for(var s=(n=n.slice(0)).length;i<s;++i)n[i].apply(this,t)}return this},t.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},t.prototype.hasListeners=function(e){return!!this.listeners(e).length}},965(){}},t={};function n(i){var s=t[i];if(void 0!==s)return s.exports;var r=t[i]={exports:{}};return e[i](r,r.exports,n),r.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var i={};return(()=>{"use strict";n.d(i,{default:()=>ho});var e,t=n(585),s=n.n(t);class r{constructor(){}static constructFromObject(e,t){if(e){if(t=t||new r,e.hasOwnProperty("links")&&null!==e.links&&void 0!==e.links)for(const n of e.links)if(n.hasOwnProperty("rel")&&n.hasOwnProperty("href"))switch(n.rel){case"first":t.linkFirst=n.href;break;case"prev":t.linkPrev=n.href;break;case"next":t.linkNext=n.href;break;case"last":t.linkLast=n.href}e.hasOwnProperty("totalAvailableResults")&&(t.resultsTotal=e.totalAvailableResults)}return t}getFirstPage(){return this.isFirstPage()?Promise.reject("Cannot navigate to first page : already on first page"):null===this.linkFirst?Promise.reject("No link to first page provided in previous API response"):this._getLink(this.linkFirst)}getPrevPage(){return this.isFirstPage()?Promise.reject("Cannot navigate to previous page : already on first page"):null===this.linkPrev?Promise.reject("No link to previous page provided in previous API response"):this._getLink(this.linkPrev)}getNextPage(){return this.isLastPage()?Promise.reject("Cannot navigate to next page : already on last page"):null===this.linkNext?Promise.reject("No link to next page provided in previous API response"):this._getLink(this.linkNext)}getLastPage(){return this.isLastPage()?Promise.reject("Cannot navigate to last page : already on last page"):null===this.linkLast?Promise.reject("No link to last page provided in previous API response"):this._getLink(this.linkLast)}currentPage(){return null===this.page?0:this.page}countPages(){return null===this.resultsPerPage||null===this.resultsTotal||0===this.resultsPerPage?1:Math.ceil(this.resultsTotal/this.resultsPerPage)}isFirstPage(){return 0===this.currentPage()}isLastPage(){return this.currentPage()===this.countPages()-1}populatePaginationMetadata(e,t,n){this.apiClient=e,this.page=t,this.resultsPerPage=n}_getLink(e){null===this.apiClient&&(this.apiClient=le.instance);const t=this.constructor;return this.apiClient.callApi(e,"GET",{},{},{},{},{},[],[],["application/json"],t)}}r.prototype.linkFirst=null,r.prototype.linkPrev=null,r.prototype.linkNext=null,r.prototype.linkLast=null,r.prototype.apiClient=null,r.prototype.page=null,r.prototype.resultsPerPage=null,r.prototype.resultsTotal=null;var o=new Uint8Array(16);function a(){if(!e&&!(e="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return e(o)}const l=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var d=[],u=0;u<256;++u)d.push((u+256).toString(16).substr(1));const h=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(d[e[t+0]]+d[e[t+1]]+d[e[t+2]]+d[e[t+3]]+"-"+d[e[t+4]]+d[e[t+5]]+"-"+d[e[t+6]]+d[e[t+7]]+"-"+d[e[t+8]]+d[e[t+9]]+"-"+d[e[t+10]]+d[e[t+11]]+d[e[t+12]]+d[e[t+13]]+d[e[t+14]]+d[e[t+15]]).toLowerCase();if(!function(e){return"string"==typeof e&&l.test(e)}(n))throw TypeError("Stringified UUID is invalid");return n},c=function(e,t,n){var i=(e=e||{}).random||(e.rng||a)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){n=n||0;for(var s=0;s<16;++s)t[n+s]=i[s];return t}return h(i)};var p=n(540),v=n.n(p),y=n(545),g=n.n(y),m=n(799),f=n.n(m),$=n(784),w=n.n($),T=n(548);const b={DEFAULT:"DEFAULT",constructFromObject:function(e){if("string"==typeof e||e instanceof String)return b[e];throw new Error("Received object name is not an instance of String")},validate:function(e){if(null!=e){if(e===b.DEFAULT)return;throw new Error("Invalid : must be ValidationScopes.{ }")}}};Object.freeze(b);const k=b;class F{static validateMaximum(e,t){return!(null===t||e>t)}static validateMinimum(e,t){return!(null===t||e<t)}static validateExclusiveMaximum(e,t){return!(null===t||e>t)}static validateExclusiveMinimum(e,t){return!(null===t||e>t)}static validateMultipleOf(e,t){return!(null===t||e%t===0)}static validateMaxLength(e,t){return!(null===t||e.length>t)}static validateMinLength(e,t){return!(null===t||e.length<t)}static validatePattern(e,t){return!(null===t||null===e.match(t))}static validateMaxItems(e,t){return!(null===t||e.length>t)}static validateMinItems(e,t){return!(null===t||e.length<t)}static validateUniqueItems(e,t){return!(null===t||!t||e.length!==new Set(e).size)}}class O{constructor(e,t){this.name=e,this.message=t}getName(){return this.name}setName(e){this.name=e}getMessage(){return this.message}setMessage(e){this.message=e}toJson(){return{name:this.getName(),message:this.getMessage()}}}var j=new WeakSet;class E{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=j),t.add(e),this.$objectType="common.v1.config.Flag",this.$reserved={$fv:"v1.r0"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new E,e.hasOwnProperty("name")&&null!==e.name&&void 0!==e.name&&t.setName(e.name),e.hasOwnProperty("value")&&null!==e.value&&void 0!==e.value&&t.setValue(e.value),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getName(){return this.name}setName(e){this.name=e}getValue(){return this.value}setValue(e){this.value=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getName()&&null!==this.getName()?{name:this.getName()}:{},...void 0!==this.getValue()&&null!==this.getValue()?{value:this.getValue()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("name"===t){if(void 0===this.name||null===this.name)return new O("name","undefined or null");if(!F.validateMaxLength(this.name,128))return new O("name","does not satisfy required maxLength constraint: 128");if(!F.validateMinLength(this.name,3))return new O("name","does not satisfy required minLength constraint: 3")}return"value"!==t||void 0!==this.value&&null!==this.value?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("value","undefined or null")}}function P(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")}E.prototype.name=void 0,E.prototype.value=!1,E.prototype.$reserved=void 0,E.prototype.$objectType=void 0,E.prototype.$unknownFields=void 0;var A=new WeakSet;class C{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=A),t.add(e),this.$objectType="common.v1.config.MapOfStringWrapper",this.$reserved={$fv:"v1.r0"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new C,e.hasOwnProperty("map")&&null!==e.map&&void 0!==e.map&&t.setMap(e.map),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMap(){return this.map}setMap(e){this.map=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getMap()&&null!==this.getMap()?{map:P(A,this,I).call(this,this.getMap(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getMap()&&null!==this.getMap()?{map:P(A,this,I).call(this,this.getMap())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"map"!==t||void 0!==this.map&&null!==this.map?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("map","undefined or null")}}function I(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}function U(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")}C.prototype.map=void 0,C.prototype.$reserved=void 0,C.prototype.$objectType=void 0,C.prototype.$unknownFields=void 0;var D=new WeakSet;class S{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=D),t.add(e),this.$objectType="common.v1.config.KVPair",this.$reserved={$fv:"v1.r0"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,r,o,a;if(e){if(t=t||new S,e.hasOwnProperty("name")&&null!==e.name&&void 0!==e.name&&t.setName(e.name),e.hasOwnProperty("value")&&null!==e.value&&void 0!==e.value)if(Array.isArray(e.value))if(0===e.value.length)t.setValue([]);else{for(o=[],i=e.value,a=i[0].hasOwnProperty("$objectType")?i[0].$objectType:typeof i[0],r=0;r<i.length;r++)switch(a){case"string":case"integer":case"number":o.push(i[r]);break;case"common.v1.config.MapOfStringWrapper":s=C.constructFromObject(i[r],void 0),o.push(s);break;default:throw"Unknown list of type "+a+" in data"}t.setValue(o)}else switch(a=e.value.hasOwnProperty("$objectType")?e.value.$objectType:typeof e.value,a){case"string":case"boolean":case"number":t.setValue(e.value);break;case"object":t.setValue(new Map(Object.entries(e.value)));break;default:throw"Unknown datatype "+a+" in data"}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getName(){return this.name}setName(e){this.name=e}getValue(){return this.value}setValue(e){this.value=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getName()&&null!==this.getName()?{name:this.getName()}:{},...void 0!==this.getValue()&&null!==this.getValue()?{value:void 0!==this.getValue().toJson?this.getValue().toJson(!1):Array.isArray(this.getValue())?this.getValue().map(e=>void 0!==e.toJson?e.toJson(!1):e):U(D,this,R).call(this,this.getValue(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getName()&&null!==this.getName()?{name:this.getName()}:{},...void 0!==this.getValue()&&null!==this.getValue()?{value:void 0!==this.getValue().toJson?this.getValue().toJson():Array.isArray(this.getValue())?this.getValue().map(e=>void 0!==e.toJson?e.toJson():e):U(D,this,R).call(this,this.getValue())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("name"===t){if(void 0===this.name||null===this.name)return new O("name","undefined or null");if(!F.validateMaxLength(this.name,128))return new O("name","does not satisfy required maxLength constraint: 128");if(!F.validateMinLength(this.name,3))return new O("name","does not satisfy required minLength constraint: 3")}return"value"!==t||void 0!==this.value&&null!==this.value?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("value","undefined or null")}}function R(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}S.prototype.name=void 0,S.prototype.value=void 0,S.prototype.$reserved=void 0,S.prototype.$objectType=void 0,S.prototype.$unknownFields=void 0;const N={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",INFO:"INFO",WARNING:"WARNING",ERROR:"ERROR",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(N).find(t=>N[t]===e);return null==t?N.$UNKNOWN:N[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case N.$UNKNOWN:case N.$REDACTED:case N.INFO:case N.WARNING:case N.ERROR:return;default:throw new Error("Invalid : must be MessageSeverity.{ $UNKNOWN|$REDACTED|INFO|WARNING|ERROR }")}}};Object.freeze(N);const x=N;var M=new WeakSet;class V{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=M),t.add(e),this.$objectType="common.v1.config.Message",this.$reserved={$fv:"v1.r0"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new V,e.hasOwnProperty("code")&&null!==e.code&&void 0!==e.code&&t.setCode(e.code),e.hasOwnProperty("message")&&null!==e.message&&void 0!==e.message&&t.setMessage(e.message),e.hasOwnProperty("locale")&&null!==e.locale&&void 0!==e.locale&&t.setLocale(e.locale),e.hasOwnProperty("severity")&&null!==e.severity&&void 0!==e.severity&&t.setSeverity(x.constructFromObject(e.severity)),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getCode(){return this.code}setCode(e){this.code=e}getMessage(){return this.message}setMessage(e){this.message=e}getLocale(){return this.locale}setLocale(e){this.locale=e}getSeverity(){return this.severity}setSeverity(e){this.severity=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getCode()&&null!==this.getCode()?{code:this.getCode()}:{},...void 0!==this.getMessage()&&null!==this.getMessage()?{message:this.getMessage()}:{},...void 0!==this.getLocale()&&null!==this.getLocale()?{locale:this.getLocale()}:{},...void 0!==this.getSeverity()&&null!==this.getSeverity()?{severity:this.getSeverity()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"code"!==t||void 0!==this.code&&null!==this.code?"message"!==t||void 0!==this.message&&null!==this.message?"locale"!==t||void 0!==this.locale&&null!==this.locale?"severity"!==t||void 0!==this.severity&&null!==this.severity?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("severity","undefined or null"):new O("locale","undefined or null"):new O("message","undefined or null"):new O("code","undefined or null")}}V.prototype.code=void 0,V.prototype.message=void 0,V.prototype.locale="en_US",V.prototype.severity=void 0,V.prototype.$reserved=void 0,V.prototype.$objectType=void 0,V.prototype.$unknownFields=void 0;var L=new WeakSet;class J{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=L),t.add(e),this.$objectType="common.v1.response.ApiLink",this.$reserved={$fv:"v1.r0"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new J,e.hasOwnProperty("href")&&null!==e.href&&void 0!==e.href&&t.setHref(e.href),e.hasOwnProperty("rel")&&null!==e.rel&&void 0!==e.rel&&t.setRel(e.rel),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getHref(){return this.href}setHref(e){this.href=e}getRel(){return this.rel}setRel(e){this.rel=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getHref()&&null!==this.getHref()?{href:this.getHref()}:{},...void 0!==this.getRel()&&null!==this.getRel()?{rel:this.getRel()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"href"!==t||void 0!==this.href&&null!==this.href?"rel"!==t||void 0!==this.rel&&null!==this.rel?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("rel","undefined or null"):new O("href","undefined or null")}}J.prototype.href=void 0,J.prototype.rel=void 0,J.prototype.$reserved=void 0,J.prototype.$objectType=void 0,J.prototype.$unknownFields=void 0;var _,W=new WeakSet;class B{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=W),t.add(e),this.$objectType="common.v1.response.ApiResponseMetadata",this.$reserved={$fv:"v1.r0"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,r,o;if(e){if(t=t||new B,e.hasOwnProperty("flags")&&null!==e.flags&&void 0!==e.flags){for(o=[],i=e.flags,r=0;r<i.length;r++)s=E.constructFromObject(i[r],void 0),o.push(s);t.setFlags(o)}if(e.hasOwnProperty("links")&&null!==e.links&&void 0!==e.links){for(o=[],i=e.links,r=0;r<i.length;r++)s=J.constructFromObject(i[r],void 0),o.push(s);t.setLinks(o)}if(e.hasOwnProperty("totalAvailableResults")&&null!==e.totalAvailableResults&&void 0!==e.totalAvailableResults&&t.setTotalAvailableResults(e.totalAvailableResults),e.hasOwnProperty("messages")&&null!==e.messages&&void 0!==e.messages){for(o=[],i=e.messages,r=0;r<i.length;r++)s=V.constructFromObject(i[r],void 0),o.push(s);t.setMessages(o)}if(e.hasOwnProperty("extraInfo")&&null!==e.extraInfo&&void 0!==e.extraInfo){for(o=[],i=e.extraInfo,r=0;r<i.length;r++)s=S.constructFromObject(i[r],void 0),o.push(s);t.setExtraInfo(o)}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getFlags(){return this.flags}setFlags(e){this.flags=e}getLinks(){return this.links}setLinks(e){this.links=e}getTotalAvailableResults(){return this.totalAvailableResults}setTotalAvailableResults(e){this.totalAvailableResults=e}getMessages(){return this.messages}setMessages(e){this.messages=e}getExtraInfo(){return this.extraInfo}setExtraInfo(e){this.extraInfo=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getFlags()&&null!==this.getFlags()?{flags:this.getFlags().map(e=>e.toJson(!1))}:{},...void 0!==this.getLinks()&&null!==this.getLinks()?{links:this.getLinks().map(e=>e.toJson(!1))}:{},...void 0!==this.getTotalAvailableResults()&&null!==this.getTotalAvailableResults()?{totalAvailableResults:this.getTotalAvailableResults()}:{},...void 0!==this.getMessages()&&null!==this.getMessages()?{messages:this.getMessages().map(e=>e.toJson(!1))}:{},...void 0!==this.getExtraInfo()&&null!==this.getExtraInfo()?{extraInfo:this.getExtraInfo().map(e=>e.toJson(!1))}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("flags"===t){if(void 0===this.flags||null===this.flags)return new O("flags","undefined or null");if(!F.validateMaxItems(this.flags,20))return new O("flags","does not satisfy required maxItems constraint: 20")}if("links"===t){if(void 0===this.links||null===this.links)return new O("links","undefined or null");if(!F.validateMaxItems(this.links,20))return new O("links","does not satisfy required maxItems constraint: 20")}if("totalAvailableResults"===t&&(void 0===this.totalAvailableResults||null===this.totalAvailableResults))return new O("totalAvailableResults","undefined or null");if("messages"===t){if(void 0===this.messages||null===this.messages)return new O("messages","undefined or null");if(!F.validateMaxItems(this.messages,20))return new O("messages","does not satisfy required maxItems constraint: 20")}if("extraInfo"===t){if(void 0===this.extraInfo||null===this.extraInfo)return new O("extraInfo","undefined or null");if(!F.validateMaxItems(this.extraInfo,20))return new O("extraInfo","does not satisfy required maxItems constraint: 20")}return"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null")}}function G(e,t,n){z(e,t),t.set(e,n)}function z(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function q(e,t){return e.get(H(e,t))}function K(e,t,n){return e.set(H(e,t),n),n}function H(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")}B.prototype.flags=void 0,B.prototype.links=void 0,B.prototype.totalAvailableResults=void 0,B.prototype.messages=void 0,B.prototype.extraInfo=void 0,B.prototype.$reserved=void 0,B.prototype.$objectType=void 0,B.prototype.$unknownFields=void 0,v()(s());var Y=new WeakMap,X=new WeakMap,Q=new WeakMap,Z=new WeakMap,ee=new WeakMap,te=new WeakMap,ne=new WeakMap,ie=new WeakMap,se=new WeakMap,re=new WeakMap,oe=new WeakMap,ae=new WeakSet;class le{constructor(){var e;z(this,e=ae),e.add(this),G(this,Y,void 0),G(this,X,void 0),G(this,Q,void 0),G(this,Z,void 0),G(this,ee,void 0),G(this,te,void 0),G(this,ne,void 0),G(this,ie,void 0),G(this,se,void 0),G(this,re,void 0),G(this,oe,void 0),K(oe,this,Object.freeze({DEBUG:{key:"DEBUG",value:Symbol(0)},INFO:{key:"INFO",value:Symbol(1)},WARN:{key:"WARN",value:Symbol(2)},ERROR:{key:"ERROR",value:Symbol(3)}})),this.scheme="https",K(ie,this,"undefined"==typeof self?"localhost":self.location.hostname),this.port="undefined"==typeof self?"9440":self.location.port,this.authentications={apiKeyAuthScheme:{type:"apiKey",in:"header",name:"X-ntnx-api-key"},basicAuthScheme:{type:"basic"}},this.defaultHeaders={},K(ee,this,3e4),K(te,this,3e4),K(ne,this,108e5),this.readTimeout=q(te,this),this.connectTimeout=q(ee,this),this.cache=!0,K(X,this,null),this.maxRedirects=1,this.maxRetryAttempts=5,this.retryInterval=3e3,this.withCredentials=!1,"undefined"==typeof self&&(this.agent=new(s().agent)),this.requestAgent=null,K(re,this,null),this.allowVersionNegotiation=!0,K(se,this,!1),this.debug=!1,K(Q,this,null),this.username=null,this.password=null,K(Z,this,!0),this.downloadDestination=null,this.loggerFile=null}set verifySsl(e){this.requestAgent=e?null:new(g().Agent)({rejectUnauthorized:e}),K(Z,this,e)}get verifySsl(){return q(Z,this)}set host(e){K(ie,this,e),K(se,this,!1),K(re,this,null)}get host(){return q(ie,this)}set loggerFile(e){null!=e&&(("string"==typeof e||e instanceof String)&&(e=f().createWriteStream(e,{flags:"a"})),K(Q,this,new console.Console({stdout:e,stderr:e})))}addDefaultHeader(e,t){"Authorization"===e&&K(X,this,null),this.defaultHeaders[e]=t}paramToString(e){return null==e||null==e?"":e instanceof Date?e.toJSON():e.toString()}buildUrl(e,t){if(e.match(/^\//)||(e="/"+e),void 0!==q(re,this)&&null!==q(re,this)&&null!==q(re,this).match(/v\d+\.\d+(\.[a|b]\d+)?/)&&"v4.2"!==q(re,this)){H(ae,this,ke).call(this,q(oe,this).INFO,null,"Changing uri",e,"to negotiated version",q(re,this));var n=new RegExp("(?<=/[-\\w]+/)v\\d+\\.\\d+(\\.[a|b]\\d+)?(?=/.*)","i");e=e.replace(n,q(re,this))}K(Y,this,"undefined"==typeof self?this.scheme+":":self.location.protocol);let i="";""!==q(Y,this)&&""!==this.host&&""!==this.port?i=q(Y,this)+"//"+this.host+":"+this.port:"undefined"!=typeof self&&(i=self.origin);var s=i+e;return s.replace(/\{([\w-]+)\}/g,(e,n)=>{var i;return i=t.hasOwnProperty(n)?this.paramToString(t[n]):e,encodeURIComponent(i)})}buildCollectionParam(e,t){if(null==e)return null;switch(t){case"csv":return e.map(this.paramToString).join(",");case"ssv":return e.map(this.paramToString).join(" ");case"tsv":return e.map(this.paramToString).join("\t");case"pipes":return e.map(this.paramToString).join("|");case"multi":return e.map(this.paramToString);default:throw new Error("Unknown collection format: "+t)}}setApiKey(e){this.authentications.apiKeyAuthScheme.apiKey=null==e||"string"==typeof e||e instanceof String?e:void 0}addEtagToReservedMap(e,t){if(e.hasOwnProperty("headers")&&e.headers.hasOwnProperty("etag")){let i=e.headers.etag;if(void 0!==t.getData())if(Array.isArray(t.getData())&&t.getData().length>0)for(var n of t.getData())n.hasOwnProperty("$reserved")&&void 0!==n.get$Reserved()&&(n.get$Reserved().ETag=i);else t.getData().hasOwnProperty("$reserved")&&void 0!==t.getData().get$Reserved()&&(t.getData().get$Reserved().ETag=i)}return t}static getEtag(e){let t=null;return void 0!==e&&(e.hasOwnProperty("$reserved")&&void 0!==e.get$Reserved()&&(t=this.getValueForCaseInsensitiveKeyMatch(e.get$Reserved(),"ETag")),null==t&&e.hasOwnProperty("data")&&e.getData().hasOwnProperty("$reserved")&&void 0!==e.getData().get$Reserved()&&(t=this.getValueForCaseInsensitiveKeyMatch(e.getData().get$Reserved(),"ETag"))),t}static getValueForCaseInsensitiveKeyMatch(e,t){if(e&&t){const n=t.toLowerCase(),i=Object.keys(e).find(e=>e.toLowerCase()===n);return i?e[i]:null}return null}getNegotiatedVersion(){return q(re,this)}negotiateVersion(e,t){return new Promise(n=>{!0===this.allowVersionNegotiation&&!1===q(se,this)?this.callApiInternal("/api/monitoring/unversioned/info","OPTIONS",{},{},{},{},null,t,[],["application/json"],Object).then(({data:t,response:i})=>{if(200===i.status&&t.hasOwnProperty("data")&&null!==t.data){const i=t.data,s="v4.2";if(H(ae,this,fe).call(this,H(ae,this,$e).call(this,i),H(ae,this,$e).call(this,s)))return H(ae,this,ke).call(this,q(oe,this).WARN,null,"Server version",i,"is below minimum supported version",s,". Version negotiation will not be performed."),K(re,this,null),K(se,this,!1),void n(e);K(re,this,H(ae,this,me).call(this,"v4.2",i)),K(se,this,!0),H(ae,this,ke).call(this,q(oe,this).INFO,null,"Negotiated Version with server :",q(re,this)),n(e)}else H(ae,this,ke).call(this,q(oe,this).ERROR,null,"Could not fetch supported versions from server"),K(re,this,null),K(se,this,!1),n(e)}).catch(t=>{H(ae,this,ke).call(this,q(oe,this).ERROR,null,"Could not fetch supported versions from server"),K(re,this,null),K(se,this,!1),n(e)}):n(e)})}callApi(e,t,n,i,s,r,o,a,l,d,u){return this.negotiateVersion(this,a).then(function(h){return h.callApiInternal(e,t,n,i,s,r,o,a,l,d,u)})}callApiInternal(e,t,i,r,o,a,l,d,u,h,p){var v=this.buildUrl(e,i);const y="undefined"!=typeof window&&void 0!==window.document;let g=["application/octet-stream","application/pdf","application/zip"];if(h&&h.length>0&&h.some(e=>g.includes(e))&&y&&this.downloadDestination)return new Promise((e,n)=>{const i=H(ae,this,Ee).call(this,v,t,r,o,l,d,u,h);fetch(i.url,i.options).then(t=>{if(!t.ok){const e=new Error(`HTTP error ${t.status}`);e.status=t.status,H(ae,this,ke).call(this,q(oe,this).ERROR,null,"Error downloading file:",e),n(e)}if(!(this.downloadDestination instanceof WritableStream)){let e="Incompatible downloadDestination for Browser Environment, must be WritableStream";H(ae,this,ke).call(this,q(oe,this).ERROR,null,e),n(e)}const i=t.body.getReader(),s=this.downloadDestination.getWriter(),r=()=>i.read().then(({done:n,value:i})=>(n&&(s.close(),H(ae,this,ke).call(this,q(oe,this).INFO,null,"Finished streaming response"),e({data:{},response:t})),s.write(i).then(r)));return r()}).catch(e=>{H(ae,this,ke).call(this,q(oe,this).ERROR,null,"Caught the following error :",e),n(e)})});var m=s()(t,v);if(m.oldCallback=m.callback,m.callback=function(e,t){if(t&&t.status){const e=t.status;if(e>=400&&408!==e&&429!==e&&503!==e&&504!==e&&(this._maxRetries=0),401===t.status&&this.header.Cookie&&(this.unset("Cookie"),this._maxRetries=1),429===e){let e=t.headers["retry-after"];if(e){let t=1e3*parseInt(e,10);this._retryDelays[this._retries]=t}}}this.oldCallback(e,t)},H(ae,this,pe).call(this,m,d),"GET"===t.toUpperCase()&&!1===this.cache&&(r._=(new Date).getTime()),m.query(H(ae,this,ce).call(this,r)),m.set(this.defaultHeaders).set(H(ae,this,ce).call(this,o)),!(null!==this.defaultHeaders["NTNX-Request-Id"]&&void 0!==this.defaultHeaders["NTNX-Request-Id"]||null!==o["NTNX-Request-Id"]&&void 0!==o["NTNX-Request-Id"])){let e=c();m.set(H(ae,this,ce).call(this,{"NTNX-Request-Id":e}))}y||(this.downloadDestination=".",m.set(H(ae,this,ce).call(this,{"User-Agent":"Nutanix-monitoring-js-client/4.2.1"}))),this.requestAgent&&m.agent(this.requestAgent);var $={};$.response=H(ae,this,we).call(this,this.connectTimeout,q(ee,this)),$.deadline=H(ae,this,we).call(this,this.readTimeout,q(te,this)),m.timeout($);var w=o.hasOwnProperty("Content-Type")?o["Content-Type"]:H(ae,this,ue).call(this,u);if(w?"multipart/form-data"!=w&&m.type(w):m.header["Content-Type"]||m.type("application/json"),H(ae,this,ke).call(this,q(oe,this).INFO,null,"Request URL :",t,v),H(ae,this,ke).call(this,q(oe,this).DEBUG,H(ae,this,Oe),"Request Headers :",void 0===m.header?"":m.header),"application/x-www-form-urlencoded"===w)m.send(H(ae,this,ce).call(this,a));else if("multipart/form-data"==w){var T=H(ae,this,ce).call(this,a);for(var b in T)T.hasOwnProperty(b)&&(H(ae,this,he).call(this,T[b])?m.attach(b,T[b]):m.field(b,T[b]))}else{if("application/octet-stream"===w&&null!=l&&"function"==typeof l.pipe){if(H(ae,this,ke).call(this,q(oe,this).INFO,null,"Piping octet-stream request"),"function"==typeof l.pipe)l.pipe(m);else{let e;try{e=n(965)}catch(e){H(ae,this,ke).call(this,q(oe,this).ERROR,null,"Error fetching steam/web")}l instanceof e.ReadableStream?l.pipeTo(new e.WritableStream({write(e){m.write(e)},close(){H(ae,this,ke).call(this,q(oe,this).INFO,null,"READABLE STREAM CLOSED")},abort(e){H(ae,this,ke).call(this,q(oe,this).ERROR,null,"READABLE STREAM ABORTED")}})):m.send(l)}return new Promise((t,n)=>{m.on("error",e=>{H(ae,this,ke).call(this,q(oe,this).DEBUG,null,"Caught the following error :",e),n(e)}).on("response",i=>{H(ae,this,je).call(this,i,e,r,p,t,n)})})}["POST","PUT","PATCH"].includes(t.toUpperCase())&&l&&m.send(l)}"Blob"==typeof p?m.responseType("blob"):"String"===p&&m.responseType("string"),H(ae,this,be).call(this,m),H(ae,this,ke).call(this,q(oe,this).DEBUG,null,"Request Body :",void 0===m._data?"":m._data);var k=o.hasOwnProperty("Accept")&&null!=o.Accept?o.Accept:h.join(", ");return k&&m.accept(k),new Promise((n,i)=>{m.buffer(!1).redirects(0).retry(this.maxRetryAttempts,this.retryInterval,[]).withCredentials(this.withCredentials).on("error",e=>{H(ae,this,ke).call(this,q(oe,this).DEBUG,null,"Caught the following error :",e)}).end((o,a)=>{if(o)H(ae,this,ke).call(this,q(oe,this).DEBUG,null,"Caught error during the request!"),H(ae,this,ke).call(this,q(oe,this).ERROR,null,o),404===o.status&&(K(se,this,!1),K(re,this,null)),null!==o.response&&void 0!==o.response?o.data=H(ae,this,ye).call(this,o.response,p):o.data=H(ae,this,ve).call(this,o),i(o);else{H(ae,this,ke).call(this,q(oe,this).INFO,null,"Response Status :",a.status),H(ae,this,ke).call(this,q(oe,this).DEBUG,H(ae,this,Oe),"Response Headers :",a.headers);let o="";if(a.headers.hasOwnProperty("content-type")&&(o=a.headers["content-type"]),g.includes(o)){if(!y){let e=this.downloadDestination+"/downloaded_file_"+Date.now()+".txt",t=f().createWriteStream(e);H(ae,this,Pe).call(this,a,t,e,n,i,p)}}else if(302==a.status){let e=this.downloadDestination+"/downloaded_file_"+Date.now()+".txt",r=this;H(ae,this,ke).call(this,q(oe,this).INFO,null,"Redirecting to :",a.headers.location);var l=s()(t,a.headers.location);l.set(m.header),a.headers.hasOwnProperty("x-redirect-token")&&(H(ae,this,ke).call(this,q(oe,this).INFO,null,"Writing X-Redirect-Token into Cookie"),l.set("Cookie",a.headers["x-redirect-token"])),this.requestAgent&&l.agent(this.requestAgent),l.redirects(0),l.withCredentials(this.withCredentials),l.buffer(!1);let o=f().createWriteStream(e);l.pipe(o),l.on("response",function(t){H(ae,r,ke).call(r,q(oe,r).INFO,null,"Received response after redirection :",t.status),H(ae,r,Pe).call(r,t,o,e,n,i,p)})}else H(ae,this,je).call(this,a,e,r,p,n,i)}})})}static addEtagReferenceToHeader(e,t){if(null!=e&&e.hasOwnProperty("$reserved")&&e.$reserved.hasOwnProperty("ETag")){let n=e.$reserved.ETag;null!=n&&""!==n&&(t["If-Match"]=n)}}static parseDate(e){return new Date(e)}static parseQueryParam(e,t,n,i){let s=null;if(void 0!==t&&t.hasOwnProperty(n)&&(s=t[n]),null===s&&("string"==typeof e||e instanceof String)){const t=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=e.match(new RegExp(`${t}=([0-9]+)`));i&&(s=i[1])}return null===s&&(s=i),s}static convertToType(e,t){if(null==e)return e;switch(t){case"Boolean":return Boolean(e);case"Integer":return parseInt(e,10);case"Number":return parseFloat(e);case"String":return String(e);case"Date":return le.parseDate(String(e));case"Blob":return e;default:if(t===Object)return e;if("function"==typeof t)return t.constructFromObject(e);if(Array.isArray(t)){var n=t[0];return e.map(e=>le.convertToType(e,n))}if("object"==typeof t){var i,s;for(var r in t)if(t.hasOwnProperty(r)){i=r,s=t[r];break}var o={};for(var r in e)if(e.hasOwnProperty(r)){var a=le.convertToType(r,i),l=le.convertToType(e[r],s);o[a]=l}return o}return e}}static constructFromObject(e,t,n){if(Array.isArray(e))for(var i=0;i<e.length;i++)e.hasOwnProperty(i)&&(t[i]=le.convertToType(e[i],n));else for(var s in e)e.hasOwnProperty(s)&&(t[s]=le.convertToType(e[s],n))}}function de(e){return Boolean(null!=e&&e.match(/^application\/json(;.*)?$/i))}function ue(e){for(var t=0;t<e.length;t++)if(H(ae,this,de).call(this,e[t]))return e[t];return e[0]}function he(e){{let t;try{t=n(799)}catch(e){}if(t&&t.ReadStream&&e instanceof t.ReadStream)return!0}return"function"==typeof Buffer&&e instanceof Buffer||"function"==typeof T.Blob&&e instanceof T.Blob||"function"==typeof File&&e instanceof File}function ce(e){var t={};for(var n in e)if(e.hasOwnProperty(n)&&null!=e[n]&&null!=e[n]){var i=e[n];H(ae,this,he).call(this,i)||Array.isArray(i)?t[n]=i:t[n]=this.paramToString(i)}return t}function pe(e,t){t.forEach(t=>{var n=this.authentications[t];switch(n.type){case"basic":n.username||n.password?e.auth(n.username||"",n.password||""):(this.username||this.password)&&e.auth(this.username||"",this.password||""),H(ae,this,ke).call(this,q(oe,this).DEBUG,null,"Basic Auth applied to request");break;case"apiKey":if(n.apiKey){var i={};n.apiKeyPrefix?i[n.name]=n.apiKeyPrefix+" "+n.apiKey:i[n.name]=n.apiKey,"header"===n.in?e.set(i):e.query(i)}H(ae,this,ke).call(this,q(oe,this).DEBUG,null,"apiKey applied to request");break;case"oauth2":n.accessToken&&e.set({Authorization:"Bearer "+n.accessToken}),H(ae,this,ke).call(this,q(oe,this).DEBUG,null,"oauth2 applied to request");break;default:throw H(ae,this,ke).call(this,q(oe,this).ERROR,null,"Unknown authentication type:",n.type),new Error("Unknown authentication type: "+n.type)}})}function ve(e){var t={data:{},metadata:{}};t.data.status=e.status,t.data.message=e.message}function ye(e,t){if(null==e||null==t||204==e.status)return null;if(e.headers&&["text/event-stream","text/html","text/xml","text/csv","text/javascript","text/markdown","text/vcard"].includes(e.headers["content-type"])){(n=new t).data=new T.Blob([e.text],{type:e.headers["content-type"]});let i=new E;i.name="hasError",i.value=!1;let s=[i],r=new B;return r.flags=s,n.metadata=r,n}var n;return(null==(n=e.body)||"object"==typeof n&&void 0===n.length&&!Object.keys(n).length)&&(n=e.text),_.convertToType(n,t)}function ge(e,t,n){if(!(e instanceof r))return;const i=parseInt(this.constructor.parseQueryParam(t,n,"$page","0"),10),s=parseInt(this.constructor.parseQueryParam(t,n,"$limit","50"),10);e.populatePaginationMetadata(this,i,s)}function me(e,t){if(!e||!t)return e;let n=H(ae,this,$e).call(this,e),i=H(ae,this,$e).call(this,t);return!n.family===i.family||H(ae,this,fe).call(this,n,i)?e:t}function fe(e,t){if(parseInt(e.revision)!=parseInt(t.revision))return parseInt(e.revision)<parseInt(t.revision);if("released"===e.versionType)return!1;let n=e.versionType.substring(0,1),i=t.versionType.substring(0,1),s=parseInt(e.versionType.substring(1)),r="released"===t.versionType?0:parseInt(t.versionType.substring(1));return n===i?s<r:"a"===n||"released"===t.versionType}function $e(e){let t={};if("unversioned"===e)t.family="unversioned",t.versionType="released";else{let n=e.toString().split(".");"unversioned"===n[0]?(t.family="unversioned",t.versionType=n[1]):(t.family=n[0].substring(1),t.revision=n[1],2==n.length?t.versionType="released":t.versionType=n[2])}return t}function we(e,t){return e<=0?e=t:e>q(ne,this)&&(e=q(ne,this)),e}function Te(e){if(e.hasOwnProperty("headers")&&e.headers.hasOwnProperty("set-cookie")){let t="",n=e.headers["set-cookie"];if(n.length>0){for(let e of n)e=e.split(";")[0],e.includes("=")&&(e.trim(),t=t.concat(e).concat(";"));""!==t&&(t=t.substr(0,t.length-1))}K(X,this,t),H(ae,this,ke).call(this,q(oe,this).DEBUG,null,"Retained cookie :",t)}else K(X,this,null)}function be(e){null!=q(X,this)&&e.set(H(ae,this,ce).call(this,{Cookie:q(X,this)}))}function ke(e,t,...n){if("object"==typeof e&&"key"in e&&"value"in e&&"symbol"==typeof e.value||(e=q(oe,this).INFO),!H(ae,this,Fe).call(this,e)){n=n.map(e=>"string"==typeof e?e:t?t(e):JSON.stringify(e));let i=n.join(" ");i=(new Date).toISOString()+" "+e.key+" - "+i,void 0!==q(Q,this)&&null!==q(Q,this)&&"function"==typeof q(Q,this).log?q(Q,this).log(i):console.log(i)}}function Fe(e){return!this.debug&&e===q(oe,this).DEBUG}function Oe(e){if("object"!=typeof e)return e;let t="\n";return e&&Object.keys(e).forEach(n=>{t+=n+"=["+e[n]+"]\n"}),"\n"===t?e:t}function je(e,t,n,i,s,r){try{var o=H(ae,this,ye).call(this,e,i);H(ae,this,ke).call(this,q(oe,this).INFO,null,"Response Status :",e.status),H(ae,this,ke).call(this,q(oe,this).DEBUG,H(ae,this,Oe),"Response Headers :",e.headers),H(ae,this,Te).call(this,e||{}),H(ae,this,ke).call(this,q(oe,this).DEBUG,null,"Response Body :",o),204==e.status&&null==o?s({data:o,response:e}):e.ok&&null!=o?(this.addEtagToReservedMap(e,o),H(ae,this,ge).call(this,o,t,n),s({data:o,response:e})):(H(ae,this,ke).call(this,q(oe,this).ERROR,null,o),r({...e.error,data:o}))}catch(e){H(ae,this,ke).call(this,q(oe,this).DEBUG,null,"Caught error while processing response!"),H(ae,this,ke).call(this,q(oe,this).ERROR,null,e),e.data=H(ae,this,ve).call(this,e),r(e)}}function Ee(e,t,n,i,s,r,o,a){let l={};r.forEach(e=>{const t=this.authentications[e];switch(t.type){case"basic":let e="",i="";if(t.username||t.password?(e=t.username||"",i=t.password||""):(this.username||this.password)&&(e=this.username||"",i=this.password||""),e||i){const t=btoa(`${e}:${i}`);l.Authorization=`Basic ${t}`}H(ae,this,ke).call(this,q(oe,this).DEBUG,null,"Basic Auth applied to request");break;case"apiKey":if(t.apiKey){let e="";e=t.apiKeyPrefix?t.apiKeyPrefix+" "+t.apiKey:t.apiKey,"header"===t.in?l[t.name]="Bearer "+e:"query"===t.in&&(n[t.name]=e)}H(ae,this,ke).call(this,q(oe,this).DEBUG,null,"apiKey applied to request");break;case"oauth2":t.accessToken&&(l.Authorization="Bearer "+t.accessToken),H(ae,this,ke).call(this,q(oe,this).DEBUG,null,"oauth2 applied to request");break;default:throw H(ae,this,ke).call(this,q(oe,this).ERROR,null,"Unknown authentication type:",t.type),new Error("Unknown authentication type: "+t.type)}}),"GET"===t.toUpperCase()&&!1===this.cache&&(n.cache="false");const d=H(ae,this,ce).call(this,n),u=Object.keys(d).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(d[e])}`).join("&");let h=e;u&&(h+=(h.includes("?")?"&":"?")+u);const p={...this.defaultHeaders,...H(ae,this,ce).call(this,i),...l};if(!(null!==this.defaultHeaders["NTNX-Request-Id"]&&void 0!==this.defaultHeaders["NTNX-Request-Id"]||null!==i["NTNX-Request-Id"]&&void 0!==i["NTNX-Request-Id"])){let e=c();p["NTNX-Request-Id"]=e}null!=q(X,this)&&(p.Cookie=H(ae,this,ce).call(this,{Cookie:q(X,this)}));var v=i.hasOwnProperty("Content-Type")?i["Content-Type"]:H(ae,this,ue).call(this,o);p["Content-Type"]=v;var y=i.hasOwnProperty("Accept")&&null!=i.Accept?i.Accept:a.join(", ");return y&&(p.Accept=y),H(ae,this,ke).call(this,q(oe,this).INFO,null,"Request URL :",t,e),H(ae,this,ke).call(this,q(oe,this).DEBUG,H(ae,this,Oe),"Request Headers :",p),H(ae,this,ke).call(this,q(oe,this).DEBUG,null,"Request Body :",s||""),{url:h,options:{method:t,headers:p,body:s,credentials:this.withCredentials?"include":"same-origin"}}}function Pe(e,t,n,i,s,r){H(ae,this,ke).call(this,q(oe,this).INFO,null,"Streaming response to : ",n);try{e.on("data",e=>{t.write(e)})}catch(e){H(ae,this,ke).call(this,q(oe,this).ERROR,null,"Issue while downloading file",e)}let o=new r,a="";if(void 0!==e.headers["content-disposition"]&&null!==e.headers["content-disposition"]){let t=e.headers["content-disposition"].match(/.*filename=\"(?<filename>.*)\".*/),n=w().parse(t.groups.filename);a=this.downloadDestination+"/"+n.name+"_"+Date.now()+n.ext,o.data={path:w().parse(a),$objectType:"Path"};let i=new E;i.name="hasError",i.value=!1;let s=[i],r=new B;r.flags=s,o.metadata=r}e.on("end",()=>{H(ae,this,ke).call(this,q(oe,this).INFO,null,"Finished streaming response"),0!==a.length?(H(ae,this,ke).call(this,q(oe,this).INFO,null,"Content-Disposition header found [",a,"] is final filename"),t.close(),f().renameSync(n,a),i({data:o,response:e})):(H(ae,this,ke).call(this,q(oe,this).ERROR,null,"Content-Disposition header not found [",n,"] is final filename"),i({data:o,response:e}))}),e.on("error",e=>{H(ae,this,ke).call(this,q(oe,this).ERROR,null,"Caught the following error :",e),error.data=H(ae,this,ve).call(this,error),s(e)})}function Ae(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")}_=le,le.instance=new le;var Ce=new WeakSet;class Ie{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=Ce),t.add(e),this.$objectType="monitoring.v4.error.AppMessage",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new Ie,e.hasOwnProperty("message")&&null!==e.message&&void 0!==e.message&&t.setMessage(e.message),e.hasOwnProperty("severity")&&null!==e.severity&&void 0!==e.severity&&t.setSeverity(x.constructFromObject(e.severity)),e.hasOwnProperty("code")&&null!==e.code&&void 0!==e.code&&t.setCode(e.code),e.hasOwnProperty("locale")&&null!==e.locale&&void 0!==e.locale&&t.setLocale(e.locale),e.hasOwnProperty("errorGroup")&&null!==e.errorGroup&&void 0!==e.errorGroup&&t.setErrorGroup(e.errorGroup),e.hasOwnProperty("argumentsMap")&&null!==e.argumentsMap&&void 0!==e.argumentsMap&&t.setArgumentsMap(e.argumentsMap),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMessage(){return this.message}setMessage(e){this.message=e}getSeverity(){return this.severity}setSeverity(e){this.severity=e}getCode(){return this.code}setCode(e){this.code=e}getLocale(){return this.locale}setLocale(e){this.locale=e}getErrorGroup(){return this.errorGroup}setErrorGroup(e){this.errorGroup=e}getArgumentsMap(){return this.argumentsMap}setArgumentsMap(e){this.argumentsMap=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getMessage()&&null!==this.getMessage()?{message:this.getMessage()}:{},...void 0!==this.getSeverity()&&null!==this.getSeverity()?{severity:this.getSeverity()}:{},...void 0!==this.getCode()&&null!==this.getCode()?{code:this.getCode()}:{},...void 0!==this.getLocale()&&null!==this.getLocale()?{locale:this.getLocale()}:{},...void 0!==this.getErrorGroup()&&null!==this.getErrorGroup()?{errorGroup:this.getErrorGroup()}:{},...void 0!==this.getArgumentsMap()&&null!==this.getArgumentsMap()?{argumentsMap:Ae(Ce,this,Ue).call(this,this.getArgumentsMap(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getMessage()&&null!==this.getMessage()?{message:this.getMessage()}:{},...void 0!==this.getSeverity()&&null!==this.getSeverity()?{severity:this.getSeverity()}:{},...void 0!==this.getCode()&&null!==this.getCode()?{code:this.getCode()}:{},...void 0!==this.getLocale()&&null!==this.getLocale()?{locale:this.getLocale()}:{},...void 0!==this.getErrorGroup()&&null!==this.getErrorGroup()?{errorGroup:this.getErrorGroup()}:{},...void 0!==this.getArgumentsMap()&&null!==this.getArgumentsMap()?{argumentsMap:Ae(Ce,this,Ue).call(this,this.getArgumentsMap())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"message"!==t||void 0!==this.message&&null!==this.message?"severity"!==t||void 0!==this.severity&&null!==this.severity?"code"!==t||void 0!==this.code&&null!==this.code?"locale"!==t||void 0!==this.locale&&null!==this.locale?"errorGroup"!==t||void 0!==this.errorGroup&&null!==this.errorGroup?"argumentsMap"!==t||void 0!==this.argumentsMap&&null!==this.argumentsMap?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("argumentsMap","undefined or null"):new O("errorGroup","undefined or null"):new O("locale","undefined or null"):new O("code","undefined or null"):new O("severity","undefined or null"):new O("message","undefined or null")}}function Ue(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}Ie.prototype.message=void 0,Ie.prototype.severity=void 0,Ie.prototype.code=void 0,Ie.prototype.locale="en_US",Ie.prototype.errorGroup=void 0,Ie.prototype.argumentsMap=void 0,Ie.prototype.$reserved=void 0,Ie.prototype.$objectType=void 0,Ie.prototype.$unknownFields=void 0;var De=new WeakSet;class Se{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=De),t.add(e),this.$objectType="monitoring.v4.error.SchemaValidationErrorMessage",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new Se,e.hasOwnProperty("location")&&null!==e.location&&void 0!==e.location&&t.setLocation(e.location),e.hasOwnProperty("message")&&null!==e.message&&void 0!==e.message&&t.setMessage(e.message),e.hasOwnProperty("attributePath")&&null!==e.attributePath&&void 0!==e.attributePath&&t.setAttributePath(e.attributePath),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getLocation(){return this.location}setLocation(e){this.location=e}getMessage(){return this.message}setMessage(e){this.message=e}getAttributePath(){return this.attributePath}setAttributePath(e){this.attributePath=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getLocation()&&null!==this.getLocation()?{location:this.getLocation()}:{},...void 0!==this.getMessage()&&null!==this.getMessage()?{message:this.getMessage()}:{},...void 0!==this.getAttributePath()&&null!==this.getAttributePath()?{attributePath:this.getAttributePath()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"location"!==t||void 0!==this.location&&null!==this.location?"message"!==t||void 0!==this.message&&null!==this.message?"attributePath"!==t||void 0!==this.attributePath&&null!==this.attributePath?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("attributePath","undefined or null"):new O("message","undefined or null"):new O("location","undefined or null")}}function Re(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")}Se.prototype.location=void 0,Se.prototype.message=void 0,Se.prototype.attributePath=void 0,Se.prototype.$reserved=void 0,Se.prototype.$objectType=void 0,Se.prototype.$unknownFields=void 0;var Ne=new WeakSet;class xe{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=Ne),t.add(e),this.$objectType="monitoring.v4.error.SchemaValidationError",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,r,o;if(e){if(t=t||new xe,e.hasOwnProperty("timestamp")&&null!==e.timestamp&&void 0!==e.timestamp&&t.setTimestamp(e.timestamp),e.hasOwnProperty("statusCode")&&null!==e.statusCode&&void 0!==e.statusCode&&t.setStatusCode(e.statusCode),e.hasOwnProperty("error")&&null!==e.error&&void 0!==e.error&&t.setError(e.error),e.hasOwnProperty("path")&&null!==e.path&&void 0!==e.path&&t.setPath(e.path),e.hasOwnProperty("validationErrorMessages")&&null!==e.validationErrorMessages&&void 0!==e.validationErrorMessages){for(o=[],i=e.validationErrorMessages,r=0;r<i.length;r++)s=Se.constructFromObject(i[r],void 0),o.push(s);t.setValidationErrorMessages(o)}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getTimestamp(){return this.timestamp}setTimestamp(e){this.timestamp=e}getStatusCode(){return this.statusCode}setStatusCode(e){this.statusCode=e}getError(){return this.error}setError(e){this.error=e}getPath(){return this.path}setPath(e){this.path=e}getValidationErrorMessages(){return this.validationErrorMessages}setValidationErrorMessages(e){this.validationErrorMessages=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getTimestamp()&&null!==this.getTimestamp()?{timestamp:Re(Ne,this,Me).call(this,this.getTimestamp(),!1)}:{},...void 0!==this.getStatusCode()&&null!==this.getStatusCode()?{statusCode:this.getStatusCode()}:{},...void 0!==this.getError()&&null!==this.getError()?{error:this.getError()}:{},...void 0!==this.getPath()&&null!==this.getPath()?{path:this.getPath()}:{},...void 0!==this.getValidationErrorMessages()&&null!==this.getValidationErrorMessages()?{validationErrorMessages:this.getValidationErrorMessages().map(e=>e.toJson(!1))}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"timestamp"!==t||void 0!==this.timestamp&&null!==this.timestamp?"statusCode"!==t||void 0!==this.statusCode&&null!==this.statusCode?"error"!==t||void 0!==this.error&&null!==this.error?"path"!==t||void 0!==this.path&&null!==this.path?"validationErrorMessages"!==t||void 0!==this.validationErrorMessages&&null!==this.validationErrorMessages?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("validationErrorMessages","undefined or null"):new O("path","undefined or null"):new O("error","undefined or null"):new O("statusCode","undefined or null"):new O("timestamp","undefined or null")}}function Me(e,t){return e instanceof Date&&void 0!==t?t?e.toISOString().slice(0,10):e.toISOString():e}function Ve(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")}xe.prototype.timestamp=void 0,xe.prototype.statusCode=void 0,xe.prototype.error=void 0,xe.prototype.path=void 0,xe.prototype.validationErrorMessages=void 0,xe.prototype.$reserved=void 0,xe.prototype.$objectType=void 0,xe.prototype.$unknownFields=void 0;var Le=new WeakSet;class Je{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=Le),t.add(e),this.$objectType="monitoring.v4.error.ErrorResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,r,o,a;if(e){if(t=t||new Je,e.hasOwnProperty("error")&&null!==e.error&&void 0!==e.error)if(Array.isArray(e.error))if(0===e.error.length)t.setError([]);else{for(o=[],i=e.error,a=i[0].hasOwnProperty("$objectType")?i[0].$objectType:typeof i[0],r=0;r<i.length;r++){if("monitoring.v4.error.AppMessage"!==a)throw"Unknown list of type "+a+" in data";s=Ie.constructFromObject(i[r],void 0),o.push(s)}t.setError(o)}else{if(a=e.error.hasOwnProperty("$objectType")?e.error.$objectType:typeof e.error,"monitoring.v4.error.SchemaValidationError"!==a)throw"Unknown datatype "+a+" in data";t.setError(xe.constructFromObject(e.error,void 0))}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getError(){return this.error}setError(e){this.error=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getError()&&null!==this.getError()?{error:void 0!==this.getError().toJson?this.getError().toJson(!1):Array.isArray(this.getError())?this.getError().map(e=>void 0!==e.toJson?e.toJson(!1):e):Ve(Le,this,_e).call(this,this.getError(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getError()&&null!==this.getError()?{error:void 0!==this.getError().toJson?this.getError().toJson():Array.isArray(this.getError())?this.getError().map(e=>void 0!==e.toJson?e.toJson():e):Ve(Le,this,_e).call(this,this.getError())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"error"!==t||void 0!==this.error&&null!==this.error?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("error","undefined or null")}}function _e(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}Je.prototype.error=void 0,Je.prototype.$reserved=void 0,Je.prototype.$objectType=void 0,Je.prototype.$unknownFields=void 0;var We=new WeakSet;class Be{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=We),t.add(e),this.$objectType="common.v1.config.TenantAwareModel",this.$reserved={$fv:"v1.r0"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new Be,e.hasOwnProperty("tenantId")&&null!==e.tenantId&&void 0!==e.tenantId&&t.setTenantId(e.tenantId),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getTenantId(){return this.tenantId}setTenantId(e){this.tenantId=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getTenantId()&&null!==this.getTenantId()?{tenantId:this.getTenantId()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("tenantId"===t){if(void 0===this.tenantId||null===this.tenantId)return new O("tenantId","undefined or null");if(!F.validatePattern(this.tenantId,/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/))return new O("tenantId","does not satisfy required pattern: /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/")}return"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null")}}Be.prototype.tenantId=void 0,Be.prototype.$reserved=void 0,Be.prototype.$objectType=void 0,Be.prototype.$unknownFields=void 0;var Ge=new WeakSet;class ze extends Be{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=Ge),t.add(e),this.$objectType="common.v1.response.ExternalizableAbstractModel",this.$reserved={$fv:"v1.r0"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,r,o;if(e){if(t=t||new ze,Be.constructFromObject(e,t,!0),e.hasOwnProperty("extId")&&null!==e.extId&&void 0!==e.extId&&t.setExtId(e.extId),e.hasOwnProperty("links")&&null!==e.links&&void 0!==e.links){for(o=[],i=e.links,r=0;r<i.length;r++)s=J.constructFromObject(i[r],void 0),o.push(s);t.setLinks(o)}if(!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getExtId(){return this.extId}setExtId(e){this.extId=e}getLinks(){return this.links}setLinks(e){this.links=e}toJson(e){return!1===e?{...void 0!==this.getExtId()&&null!==this.getExtId()?{extId:this.getExtId()}:{},...void 0!==this.getLinks()&&null!==this.getLinks()?{links:this.getLinks().map(e=>e.toJson(!1))}:{},...void 0!==this.getTenantId()&&null!==this.getTenantId()?{tenantId:this.getTenantId()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("extId"===t){if(void 0===this.extId||null===this.extId)return new O("extId","undefined or null");if(null==e){if(!F.validatePattern(this.extId,/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/))return new O("extId","does not satisfy required pattern: /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/")}else if(e===k.update&&!F.validatePattern(this.extId,/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/))return new O("extId","does not satisfy pattern: /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/")}if("links"===t){if(void 0===this.links||null===this.links)return new O("links","undefined or null");if(!F.validateMaxItems(this.links,20))return new O("links","does not satisfy required maxItems constraint: 20")}return new O(t,"no such property exists")}}ze.prototype.extId=void 0,ze.prototype.links=void 0,Be.prototype.tenantId=void 0;var qe=new WeakSet;class Ke{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=qe),t.add(e),this.$objectType="monitoring.v4.common.AlertEntityReference",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new Ke,e.hasOwnProperty("type")&&null!==e.type&&void 0!==e.type&&t.setType(e.type),e.hasOwnProperty("name")&&null!==e.name&&void 0!==e.name&&t.setName(e.name),e.hasOwnProperty("extId")&&null!==e.extId&&void 0!==e.extId&&t.setExtId(e.extId),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getType(){return this.type}setType(e){this.type=e}getName(){return this.name}setName(e){this.name=e}getExtId(){return this.extId}setExtId(e){this.extId=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getType()&&null!==this.getType()?{type:this.getType()}:{},...void 0!==this.getName()&&null!==this.getName()?{name:this.getName()}:{},...void 0!==this.getExtId()&&null!==this.getExtId()?{extId:this.getExtId()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("type"===t&&(void 0===this.type||null===this.type))return new O("type","undefined or null");if("name"===t){if(void 0===this.name||null===this.name)return new O("name","undefined or null");if(!F.validateMaxLength(this.name,1e3))return new O("name","does not satisfy required maxLength constraint: 1000")}if("extId"===t){if(void 0===this.extId||null===this.extId)return new O("extId","undefined or null");if(!F.validatePattern(this.extId,/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/))return new O("extId","does not satisfy required pattern: /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/")}return"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null")}}Ke.prototype.type=void 0,Ke.prototype.name=void 0,Ke.prototype.extId=void 0,Ke.prototype.$reserved=void 0,Ke.prototype.$objectType=void 0,Ke.prototype.$unknownFields=void 0;var He=new WeakSet;class Ye{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=He),t.add(e),this.$objectType="monitoring.v4.common.EntityReference",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new Ye,e.hasOwnProperty("type")&&null!==e.type&&void 0!==e.type&&t.setType(e.type),e.hasOwnProperty("name")&&null!==e.name&&void 0!==e.name&&t.setName(e.name),e.hasOwnProperty("extId")&&null!==e.extId&&void 0!==e.extId&&t.setExtId(e.extId),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getType(){return this.type}setType(e){this.type=e}getName(){return this.name}setName(e){this.name=e}getExtId(){return this.extId}setExtId(e){this.extId=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getType()&&null!==this.getType()?{type:this.getType()}:{},...void 0!==this.getName()&&null!==this.getName()?{name:this.getName()}:{},...void 0!==this.getExtId()&&null!==this.getExtId()?{extId:this.getExtId()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("type"===t&&(void 0===this.type||null===this.type))return new O("type","undefined or null");if("name"===t){if(void 0===this.name||null===this.name)return new O("name","undefined or null");if(!F.validateMaxLength(this.name,1e3))return new O("name","does not satisfy required maxLength constraint: 1000")}if("extId"===t){if(void 0===this.extId||null===this.extId)return new O("extId","undefined or null");if(!F.validatePattern(this.extId,/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/))return new O("extId","does not satisfy required pattern: /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/")}return"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null")}}Ye.prototype.type=void 0,Ye.prototype.name=void 0,Ye.prototype.extId=void 0,Ye.prototype.$reserved=void 0,Ye.prototype.$objectType=void 0,Ye.prototype.$unknownFields=void 0;const Xe={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",AVAILABILITY:"AVAILABILITY",CAPACITY:"CAPACITY",CONFIGURATION:"CONFIGURATION",PERFORMANCE:"PERFORMANCE",SYSTEM_INDICATOR:"SYSTEM_INDICATOR",CPU_CAPACITY:"CPU_CAPACITY",MEMORY_CAPACITY:"MEMORY_CAPACITY",STORAGE_CAPACITY:"STORAGE_CAPACITY",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(Xe).find(t=>Xe[t]===e);return null==t?Xe.$UNKNOWN:Xe[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case Xe.$UNKNOWN:case Xe.$REDACTED:case Xe.AVAILABILITY:case Xe.CAPACITY:case Xe.CONFIGURATION:case Xe.PERFORMANCE:case Xe.SYSTEM_INDICATOR:case Xe.CPU_CAPACITY:case Xe.MEMORY_CAPACITY:case Xe.STORAGE_CAPACITY:return;default:throw new Error("Invalid : must be ImpactType.{ $UNKNOWN|$REDACTED|AVAILABILITY|CAPACITY|CONFIGURATION|PERFORMANCE|SYSTEM_INDICATOR|CPU_CAPACITY|MEMORY_CAPACITY|STORAGE_CAPACITY }")}}};Object.freeze(Xe);const Qe=Xe;var Ze=new WeakSet;class et{constructor(e){var t,n;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t=this,n=Ze),n.add(t),this.boolValue=e,this.$objectType="monitoring.v4.common.BoolValue",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new et,e.hasOwnProperty("boolValue")&&null!==e.boolValue&&void 0!==e.boolValue&&t.setBoolValue(e.boolValue),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getBoolValue(){return this.boolValue}setBoolValue(e){this.boolValue=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getBoolValue()&&null!==this.getBoolValue()?{boolValue:this.getBoolValue()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=["boolValue"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"boolValue"!==t||void 0!==this.boolValue&&null!==this.boolValue?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("boolValue","undefined or null")}}et.prototype.boolValue=void 0,et.prototype.$reserved=void 0,et.prototype.$objectType=void 0,et.prototype.$unknownFields=void 0;const tt={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",EQUAL_TO:"EQUAL_TO",GREATER_THAN:"GREATER_THAN",GREATER_THAN_OR_EQUAL_TO:"GREATER_THAN_OR_EQUAL_TO",LESS_THAN:"LESS_THAN",LESS_THAN_OR_EQUAL_TO:"LESS_THAN_OR_EQUAL_TO",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(tt).find(t=>tt[t]===e);return null==t?tt.$UNKNOWN:tt[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case tt.$UNKNOWN:case tt.$REDACTED:case tt.EQUAL_TO:case tt.GREATER_THAN:case tt.GREATER_THAN_OR_EQUAL_TO:case tt.LESS_THAN:case tt.LESS_THAN_OR_EQUAL_TO:return;default:throw new Error("Invalid : must be ComparisonOperator.{ $UNKNOWN|$REDACTED|EQUAL_TO|GREATER_THAN|GREATER_THAN_OR_EQUAL_TO|LESS_THAN|LESS_THAN_OR_EQUAL_TO }")}}};Object.freeze(tt);const nt=tt,it={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",STATIC_THRESHOLD:"STATIC_THRESHOLD",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(it).find(t=>it[t]===e);return null==t?it.$UNKNOWN:it[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case it.$UNKNOWN:case it.$REDACTED:case it.STATIC_THRESHOLD:return;default:throw new Error("Invalid : must be ConditionType.{ $UNKNOWN|$REDACTED|STATIC_THRESHOLD }")}}};Object.freeze(it);const st=it,rt={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",STRING:"STRING",BOOLEAN:"BOOLEAN",DOUBLE:"DOUBLE",LONG:"LONG",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(rt).find(t=>rt[t]===e);return null==t?rt.$UNKNOWN:rt[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case rt.$UNKNOWN:case rt.$REDACTED:case rt.STRING:case rt.BOOLEAN:case rt.DOUBLE:case rt.LONG:return;default:throw new Error("Invalid : must be DataType.{ $UNKNOWN|$REDACTED|STRING|BOOLEAN|DOUBLE|LONG }")}}};Object.freeze(rt);const ot=rt;var at=new WeakSet;class lt{constructor(e){var t,n;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t=this,n=at),n.add(t),this.doubleValue=e,this.$objectType="monitoring.v4.common.DoubleValue",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new lt,e.hasOwnProperty("doubleValue")&&null!==e.doubleValue&&void 0!==e.doubleValue&&t.setDoubleValue(e.doubleValue),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getDoubleValue(){return this.doubleValue}setDoubleValue(e){this.doubleValue=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getDoubleValue()&&null!==this.getDoubleValue()?{doubleValue:this.getDoubleValue()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=["doubleValue"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"doubleValue"!==t||void 0!==this.doubleValue&&null!==this.doubleValue?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("doubleValue","undefined or null")}}lt.prototype.doubleValue=void 0,lt.prototype.$reserved=void 0,lt.prototype.$objectType=void 0,lt.prototype.$unknownFields=void 0;var dt=new WeakSet;class ut{constructor(e){var t,n;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t=this,n=dt),n.add(t),this.intValue=e,this.$objectType="monitoring.v4.common.IntValue",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new ut,e.hasOwnProperty("intValue")&&null!==e.intValue&&void 0!==e.intValue&&t.setIntValue(e.intValue),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getIntValue(){return this.intValue}setIntValue(e){this.intValue=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getIntValue()&&null!==this.getIntValue()?{intValue:this.getIntValue()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=["intValue"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"intValue"!==t||void 0!==this.intValue&&null!==this.intValue?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("intValue","undefined or null")}}ut.prototype.intValue=void 0,ut.prototype.$reserved=void 0,ut.prototype.$objectType=void 0,ut.prototype.$unknownFields=void 0;var ht=new WeakSet;class ct{constructor(e){var t,n;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t=this,n=ht),n.add(t),this.stringValue=e,this.$objectType="monitoring.v4.common.StringValue",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new ct,e.hasOwnProperty("stringValue")&&null!==e.stringValue&&void 0!==e.stringValue&&t.setStringValue(e.stringValue),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getStringValue(){return this.stringValue}setStringValue(e){this.stringValue=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getStringValue()&&null!==this.getStringValue()?{stringValue:this.getStringValue()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=["stringValue"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"stringValue"!==t||void 0!==this.stringValue&&null!==this.stringValue?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("stringValue","undefined or null")}}function pt(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")}ct.prototype.stringValue=void 0,ct.prototype.$reserved=void 0,ct.prototype.$objectType=void 0,ct.prototype.$unknownFields=void 0;var vt=new WeakSet;class yt{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=vt),t.add(e),this.$objectType="monitoring.v4.common.MetricDetail",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i;if(e){if(t=t||new yt,e.hasOwnProperty("metricName")&&null!==e.metricName&&void 0!==e.metricName&&t.setMetricName(e.metricName),e.hasOwnProperty("metricDisplayName")&&null!==e.metricDisplayName&&void 0!==e.metricDisplayName&&t.setMetricDisplayName(e.metricDisplayName),e.hasOwnProperty("unit")&&null!==e.unit&&void 0!==e.unit&&t.setUnit(e.unit),e.hasOwnProperty("triggerWaitTimeSeconds")&&null!==e.triggerWaitTimeSeconds&&void 0!==e.triggerWaitTimeSeconds&&t.setTriggerWaitTimeSeconds(e.triggerWaitTimeSeconds),e.hasOwnProperty("triggerTime")&&null!==e.triggerTime&&void 0!==e.triggerTime&&t.setTriggerTime(e.triggerTime),e.hasOwnProperty("comparisonOperator")&&null!==e.comparisonOperator&&void 0!==e.comparisonOperator&&t.setComparisonOperator(nt.constructFromObject(e.comparisonOperator)),e.hasOwnProperty("conditionType")&&null!==e.conditionType&&void 0!==e.conditionType&&t.setConditionType(st.constructFromObject(e.conditionType)),e.hasOwnProperty("metricCategory")&&null!==e.metricCategory&&void 0!==e.metricCategory&&t.setMetricCategory(e.metricCategory),e.hasOwnProperty("dataType")&&null!==e.dataType&&void 0!==e.dataType&&t.setDataType(ot.constructFromObject(e.dataType)),e.hasOwnProperty("thresholdValue")&&null!==e.thresholdValue&&void 0!==e.thresholdValue)switch(i=e.thresholdValue.hasOwnProperty("$objectType")?e.thresholdValue.$objectType:typeof e.thresholdValue,i){case"monitoring.v4.common.StringValue":t.setThresholdValue(ct.constructFromObject(e.thresholdValue,void 0));break;case"monitoring.v4.common.BoolValue":t.setThresholdValue(et.constructFromObject(e.thresholdValue,void 0));break;case"monitoring.v4.common.DoubleValue":t.setThresholdValue(lt.constructFromObject(e.thresholdValue,void 0));break;case"monitoring.v4.common.IntValue":t.setThresholdValue(ut.constructFromObject(e.thresholdValue,void 0));break;default:throw"Unknown datatype "+i+" in data"}if(e.hasOwnProperty("metricValue")&&null!==e.metricValue&&void 0!==e.metricValue)switch(i=e.metricValue.hasOwnProperty("$objectType")?e.metricValue.$objectType:typeof e.metricValue,i){case"monitoring.v4.common.StringValue":t.setMetricValue(ct.constructFromObject(e.metricValue,void 0));break;case"monitoring.v4.common.BoolValue":t.setMetricValue(et.constructFromObject(e.metricValue,void 0));break;case"monitoring.v4.common.DoubleValue":t.setMetricValue(lt.constructFromObject(e.metricValue,void 0));break;case"monitoring.v4.common.IntValue":t.setMetricValue(ut.constructFromObject(e.metricValue,void 0));break;default:throw"Unknown datatype "+i+" in data"}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMetricName(){return this.metricName}setMetricName(e){this.metricName=e}getMetricDisplayName(){return this.metricDisplayName}setMetricDisplayName(e){this.metricDisplayName=e}getUnit(){return this.unit}setUnit(e){this.unit=e}getTriggerWaitTimeSeconds(){return this.triggerWaitTimeSeconds}setTriggerWaitTimeSeconds(e){this.triggerWaitTimeSeconds=e}getTriggerTime(){return this.triggerTime}setTriggerTime(e){this.triggerTime=e}getComparisonOperator(){return this.comparisonOperator}setComparisonOperator(e){this.comparisonOperator=e}getConditionType(){return this.conditionType}setConditionType(e){this.conditionType=e}getMetricCategory(){return this.metricCategory}setMetricCategory(e){this.metricCategory=e}getDataType(){return this.dataType}setDataType(e){this.dataType=e}getThresholdValue(){return this.thresholdValue}setThresholdValue(e){this.thresholdValue=e}getMetricValue(){return this.metricValue}setMetricValue(e){this.metricValue=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getMetricName()&&null!==this.getMetricName()?{metricName:this.getMetricName()}:{},...void 0!==this.getMetricDisplayName()&&null!==this.getMetricDisplayName()?{metricDisplayName:this.getMetricDisplayName()}:{},...void 0!==this.getUnit()&&null!==this.getUnit()?{unit:this.getUnit()}:{},...void 0!==this.getTriggerWaitTimeSeconds()&&null!==this.getTriggerWaitTimeSeconds()?{triggerWaitTimeSeconds:this.getTriggerWaitTimeSeconds()}:{},...void 0!==this.getTriggerTime()&&null!==this.getTriggerTime()?{triggerTime:pt(vt,this,mt).call(this,this.getTriggerTime(),!1)}:{},...void 0!==this.getComparisonOperator()&&null!==this.getComparisonOperator()?{comparisonOperator:this.getComparisonOperator()}:{},...void 0!==this.getConditionType()&&null!==this.getConditionType()?{conditionType:this.getConditionType()}:{},...void 0!==this.getMetricCategory()&&null!==this.getMetricCategory()?{metricCategory:this.getMetricCategory()}:{},...void 0!==this.getDataType()&&null!==this.getDataType()?{dataType:this.getDataType()}:{},...void 0!==this.getThresholdValue()&&null!==this.getThresholdValue()?{thresholdValue:void 0!==this.getThresholdValue().toJson?this.getThresholdValue().toJson(!1):Array.isArray(this.getThresholdValue())?this.getThresholdValue().map(e=>void 0!==e.toJson?e.toJson(!1):e):pt(vt,this,gt).call(this,this.getThresholdValue(),!1)}:{},...void 0!==this.getMetricValue()&&null!==this.getMetricValue()?{metricValue:void 0!==this.getMetricValue().toJson?this.getMetricValue().toJson(!1):Array.isArray(this.getMetricValue())?this.getMetricValue().map(e=>void 0!==e.toJson?e.toJson(!1):e):pt(vt,this,gt).call(this,this.getMetricValue(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getMetricName()&&null!==this.getMetricName()?{metricName:this.getMetricName()}:{},...void 0!==this.getMetricDisplayName()&&null!==this.getMetricDisplayName()?{metricDisplayName:this.getMetricDisplayName()}:{},...void 0!==this.getUnit()&&null!==this.getUnit()?{unit:this.getUnit()}:{},...void 0!==this.getTriggerWaitTimeSeconds()&&null!==this.getTriggerWaitTimeSeconds()?{triggerWaitTimeSeconds:this.getTriggerWaitTimeSeconds()}:{},...void 0!==this.getTriggerTime()&&null!==this.getTriggerTime()?{triggerTime:pt(vt,this,mt).call(this,this.getTriggerTime(),!1)}:{},...void 0!==this.getComparisonOperator()&&null!==this.getComparisonOperator()?{comparisonOperator:this.getComparisonOperator()}:{},...void 0!==this.getConditionType()&&null!==this.getConditionType()?{conditionType:this.getConditionType()}:{},...void 0!==this.getMetricCategory()&&null!==this.getMetricCategory()?{metricCategory:this.getMetricCategory()}:{},...void 0!==this.getDataType()&&null!==this.getDataType()?{dataType:this.getDataType()}:{},...void 0!==this.getThresholdValue()&&null!==this.getThresholdValue()?{thresholdValue:void 0!==this.getThresholdValue().toJson?this.getThresholdValue().toJson():Array.isArray(this.getThresholdValue())?this.getThresholdValue().map(e=>void 0!==e.toJson?e.toJson():e):pt(vt,this,gt).call(this,this.getThresholdValue())}:{},...void 0!==this.getMetricValue()&&null!==this.getMetricValue()?{metricValue:void 0!==this.getMetricValue().toJson?this.getMetricValue().toJson():Array.isArray(this.getMetricValue())?this.getMetricValue().map(e=>void 0!==e.toJson?e.toJson():e):pt(vt,this,gt).call(this,this.getMetricValue())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("metricName"===t){if(void 0===this.metricName||null===this.metricName)return new O("metricName","undefined or null");if(!F.validateMaxLength(this.metricName,1e3))return new O("metricName","does not satisfy required maxLength constraint: 1000")}if("metricDisplayName"===t){if(void 0===this.metricDisplayName||null===this.metricDisplayName)return new O("metricDisplayName","undefined or null");if(!F.validateMaxLength(this.metricDisplayName,1e3))return new O("metricDisplayName","does not satisfy required maxLength constraint: 1000")}return"unit"!==t||void 0!==this.unit&&null!==this.unit?"triggerWaitTimeSeconds"!==t||void 0!==this.triggerWaitTimeSeconds&&null!==this.triggerWaitTimeSeconds?"triggerTime"!==t||void 0!==this.triggerTime&&null!==this.triggerTime?"comparisonOperator"!==t||void 0!==this.comparisonOperator&&null!==this.comparisonOperator?"conditionType"!==t||void 0!==this.conditionType&&null!==this.conditionType?"metricCategory"!==t||void 0!==this.metricCategory&&null!==this.metricCategory?"dataType"!==t||void 0!==this.dataType&&null!==this.dataType?"thresholdValue"!==t||void 0!==this.thresholdValue&&null!==this.thresholdValue?"metricValue"!==t||void 0!==this.metricValue&&null!==this.metricValue?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("metricValue","undefined or null"):new O("thresholdValue","undefined or null"):new O("dataType","undefined or null"):new O("metricCategory","undefined or null"):new O("conditionType","undefined or null"):new O("comparisonOperator","undefined or null"):new O("triggerTime","undefined or null"):new O("triggerWaitTimeSeconds","undefined or null"):new O("unit","undefined or null")}}function gt(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}function mt(e,t){return e instanceof Date&&void 0!==t?t?e.toISOString().slice(0,10):e.toISOString():e}function ft(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")}yt.prototype.metricName=void 0,yt.prototype.metricDisplayName=void 0,yt.prototype.unit=void 0,yt.prototype.triggerWaitTimeSeconds=void 0,yt.prototype.triggerTime=void 0,yt.prototype.comparisonOperator=void 0,yt.prototype.conditionType=void 0,yt.prototype.metricCategory=void 0,yt.prototype.dataType=void 0,yt.prototype.thresholdValue=void 0,yt.prototype.metricValue=void 0,yt.prototype.$reserved=void 0,yt.prototype.$objectType=void 0,yt.prototype.$unknownFields=void 0;var $t=new WeakSet;class wt{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=$t),t.add(e),this.$objectType="monitoring.v4.common.Parameter",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i;if(e){if(t=t||new wt,e.hasOwnProperty("paramName")&&null!==e.paramName&&void 0!==e.paramName&&t.setParamName(e.paramName),e.hasOwnProperty("paramValue")&&null!==e.paramValue&&void 0!==e.paramValue)switch(i=e.paramValue.hasOwnProperty("$objectType")?e.paramValue.$objectType:typeof e.paramValue,i){case"monitoring.v4.common.StringValue":t.setParamValue(ct.constructFromObject(e.paramValue,void 0));break;case"monitoring.v4.common.BoolValue":t.setParamValue(et.constructFromObject(e.paramValue,void 0));break;case"monitoring.v4.common.IntValue":t.setParamValue(ut.constructFromObject(e.paramValue,void 0));break;default:throw"Unknown datatype "+i+" in data"}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getParamName(){return this.paramName}setParamName(e){this.paramName=e}getParamValue(){return this.paramValue}setParamValue(e){this.paramValue=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getParamName()&&null!==this.getParamName()?{paramName:this.getParamName()}:{},...void 0!==this.getParamValue()&&null!==this.getParamValue()?{paramValue:void 0!==this.getParamValue().toJson?this.getParamValue().toJson(!1):Array.isArray(this.getParamValue())?this.getParamValue().map(e=>void 0!==e.toJson?e.toJson(!1):e):ft($t,this,Tt).call(this,this.getParamValue(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getParamName()&&null!==this.getParamName()?{paramName:this.getParamName()}:{},...void 0!==this.getParamValue()&&null!==this.getParamValue()?{paramValue:void 0!==this.getParamValue().toJson?this.getParamValue().toJson():Array.isArray(this.getParamValue())?this.getParamValue().map(e=>void 0!==e.toJson?e.toJson():e):ft($t,this,Tt).call(this,this.getParamValue())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("paramName"===t){if(void 0===this.paramName||null===this.paramName)return new O("paramName","undefined or null");if(!F.validateMaxLength(this.paramName,100))return new O("paramName","does not satisfy required maxLength constraint: 100")}return"paramValue"!==t||void 0!==this.paramValue&&null!==this.paramValue?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("paramValue","undefined or null")}}function Tt(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}wt.prototype.paramName=void 0,wt.prototype.paramValue=void 0,wt.prototype.$reserved=void 0,wt.prototype.$objectType=void 0,wt.prototype.$unknownFields=void 0;const bt={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",INFO:"INFO",WARNING:"WARNING",CRITICAL:"CRITICAL",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(bt).find(t=>bt[t]===e);return null==t?bt.$UNKNOWN:bt[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case bt.$UNKNOWN:case bt.$REDACTED:case bt.INFO:case bt.WARNING:case bt.CRITICAL:return;default:throw new Error("Invalid : must be Severity.{ $UNKNOWN|$REDACTED|INFO|WARNING|CRITICAL }")}}};Object.freeze(bt);const kt=bt;var Ft=new WeakSet;class Ot{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=Ft),t.add(e),this.$objectType="monitoring.v4.serviceability.RootCauseAnalysis",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new Ot,e.hasOwnProperty("cause")&&null!==e.cause&&void 0!==e.cause&&t.setCause(e.cause),e.hasOwnProperty("resolution")&&null!==e.resolution&&void 0!==e.resolution&&t.setResolution(e.resolution),e.hasOwnProperty("detail")&&null!==e.detail&&void 0!==e.detail&&t.setDetail(e.detail),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getCause(){return this.cause}setCause(e){this.cause=e}getResolution(){return this.resolution}setResolution(e){this.resolution=e}getDetail(){return this.detail}setDetail(e){this.detail=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getCause()&&null!==this.getCause()?{cause:this.getCause()}:{},...void 0!==this.getResolution()&&null!==this.getResolution()?{resolution:this.getResolution()}:{},...void 0!==this.getDetail()&&null!==this.getDetail()?{detail:this.getDetail()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"cause"!==t||void 0!==this.cause&&null!==this.cause?"resolution"!==t||void 0!==this.resolution&&null!==this.resolution?"detail"!==t||void 0!==this.detail&&null!==this.detail?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("detail","undefined or null"):new O("resolution","undefined or null"):new O("cause","undefined or null")}}function jt(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")}Ot.prototype.cause=void 0,Ot.prototype.resolution=void 0,Ot.prototype.detail=void 0,Ot.prototype.$reserved=void 0,Ot.prototype.$objectType=void 0,Ot.prototype.$unknownFields=void 0;var Et=new WeakSet;class Pt{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=Et),t.add(e),this.$objectType="monitoring.v4.serviceability.SeverityTrail",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new Pt,e.hasOwnProperty("severity")&&null!==e.severity&&void 0!==e.severity&&t.setSeverity(kt.constructFromObject(e.severity)),e.hasOwnProperty("severityChangeTime")&&null!==e.severityChangeTime&&void 0!==e.severityChangeTime&&t.setSeverityChangeTime(e.severityChangeTime),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getSeverity(){return this.severity}setSeverity(e){this.severity=e}getSeverityChangeTime(){return this.severityChangeTime}setSeverityChangeTime(e){this.severityChangeTime=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getSeverity()&&null!==this.getSeverity()?{severity:this.getSeverity()}:{},...void 0!==this.getSeverityChangeTime()&&null!==this.getSeverityChangeTime()?{severityChangeTime:jt(Et,this,At).call(this,this.getSeverityChangeTime(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"severity"!==t||void 0!==this.severity&&null!==this.severity?"severityChangeTime"!==t||void 0!==this.severityChangeTime&&null!==this.severityChangeTime?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("severityChangeTime","undefined or null"):new O("severity","undefined or null")}}function At(e,t){return e instanceof Date&&void 0!==t?t?e.toISOString().slice(0,10):e.toISOString():e}function Ct(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")}Pt.prototype.severity=void 0,Pt.prototype.severityChangeTime=void 0,Pt.prototype.$reserved=void 0,Pt.prototype.$objectType=void 0,Pt.prototype.$unknownFields=void 0;var It=new WeakSet;class Ut extends ze{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=It),t.add(e),this.$objectType="monitoring.v4.serviceability.Alert",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,r,o;if(e){if(t=t||new Ut,ze.constructFromObject(e,t,!0),e.hasOwnProperty("isAcknowledged")&&null!==e.isAcknowledged&&void 0!==e.isAcknowledged&&t.setIsAcknowledged(e.isAcknowledged),e.hasOwnProperty("acknowledgedByUsername")&&null!==e.acknowledgedByUsername&&void 0!==e.acknowledgedByUsername&&t.setAcknowledgedByUsername(e.acknowledgedByUsername),e.hasOwnProperty("acknowledgedTime")&&null!==e.acknowledgedTime&&void 0!==e.acknowledgedTime&&t.setAcknowledgedTime(e.acknowledgedTime),e.hasOwnProperty("isAutoResolved")&&null!==e.isAutoResolved&&void 0!==e.isAutoResolved&&t.setIsAutoResolved(e.isAutoResolved),e.hasOwnProperty("isResolved")&&null!==e.isResolved&&void 0!==e.isResolved&&t.setIsResolved(e.isResolved),e.hasOwnProperty("resolvedByUsername")&&null!==e.resolvedByUsername&&void 0!==e.resolvedByUsername&&t.setResolvedByUsername(e.resolvedByUsername),e.hasOwnProperty("resolvedTime")&&null!==e.resolvedTime&&void 0!==e.resolvedTime&&t.setResolvedTime(e.resolvedTime),e.hasOwnProperty("sourceEntity")&&null!==e.sourceEntity&&void 0!==e.sourceEntity&&t.setSourceEntity(Ke.constructFromObject(e.sourceEntity)),e.hasOwnProperty("affectedEntities")&&null!==e.affectedEntities&&void 0!==e.affectedEntities){for(o=[],i=e.affectedEntities,r=0;r<i.length;r++)s=Ye.constructFromObject(i[r],void 0),o.push(s);t.setAffectedEntities(o)}if(e.hasOwnProperty("severityTrails")&&null!==e.severityTrails&&void 0!==e.severityTrails){for(o=[],i=e.severityTrails,r=0;r<i.length;r++)s=Pt.constructFromObject(i[r],void 0),o.push(s);t.setSeverityTrails(o)}if(e.hasOwnProperty("metricDetails")&&null!==e.metricDetails&&void 0!==e.metricDetails){for(o=[],i=e.metricDetails,r=0;r<i.length;r++)s=yt.constructFromObject(i[r],void 0),o.push(s);t.setMetricDetails(o)}if(e.hasOwnProperty("title")&&null!==e.title&&void 0!==e.title&&t.setTitle(e.title),e.hasOwnProperty("alertType")&&null!==e.alertType&&void 0!==e.alertType&&t.setAlertType(e.alertType),e.hasOwnProperty("classifications")&&null!==e.classifications&&void 0!==e.classifications){for(o=[],i=e.classifications,r=0;r<i.length;r++)o.push(i[r]);t.setClassifications(o)}if(e.hasOwnProperty("clusterUUID")&&null!==e.clusterUUID&&void 0!==e.clusterUUID&&t.setClusterUUID(e.clusterUUID),e.hasOwnProperty("creationTime")&&null!==e.creationTime&&void 0!==e.creationTime&&t.setCreationTime(e.creationTime),e.hasOwnProperty("impactTypes")&&null!==e.impactTypes&&void 0!==e.impactTypes){for(o=[],i=e.impactTypes,r=0;r<i.length;r++)s=Qe.constructFromObject(i[r],void 0),o.push(s);t.setImpactTypes(o)}if(e.hasOwnProperty("lastUpdatedTime")&&null!==e.lastUpdatedTime&&void 0!==e.lastUpdatedTime&&t.setLastUpdatedTime(e.lastUpdatedTime),e.hasOwnProperty("message")&&null!==e.message&&void 0!==e.message&&t.setMessage(e.message),e.hasOwnProperty("originatingClusterUUID")&&null!==e.originatingClusterUUID&&void 0!==e.originatingClusterUUID&&t.setOriginatingClusterUUID(e.originatingClusterUUID),e.hasOwnProperty("severity")&&null!==e.severity&&void 0!==e.severity&&t.setSeverity(kt.constructFromObject(e.severity)),e.hasOwnProperty("isUserDefined")&&null!==e.isUserDefined&&void 0!==e.isUserDefined&&t.setIsUserDefined(e.isUserDefined),e.hasOwnProperty("parameters")&&null!==e.parameters&&void 0!==e.parameters){for(o=[],i=e.parameters,r=0;r<i.length;r++)s=wt.constructFromObject(i[r],void 0),o.push(s);t.setParameters(o)}if(e.hasOwnProperty("serviceName")&&null!==e.serviceName&&void 0!==e.serviceName&&t.setServiceName(e.serviceName),e.hasOwnProperty("rootCauseAnalysis")&&null!==e.rootCauseAnalysis&&void 0!==e.rootCauseAnalysis){for(o=[],i=e.rootCauseAnalysis,r=0;r<i.length;r++)s=Ot.constructFromObject(i[r],void 0),o.push(s);t.setRootCauseAnalysis(o)}if(e.hasOwnProperty("kbArticles")&&null!==e.kbArticles&&void 0!==e.kbArticles){for(o=[],i=e.kbArticles,r=0;r<i.length;r++)o.push(i[r]);t.setKbArticles(o)}if(e.hasOwnProperty("clusterName")&&null!==e.clusterName&&void 0!==e.clusterName&&t.setClusterName(e.clusterName),e.hasOwnProperty("isRunnable")&&null!==e.isRunnable&&void 0!==e.isRunnable&&t.setIsRunnable(e.isRunnable),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getIsAcknowledged(){return this.isAcknowledged}setIsAcknowledged(e){this.isAcknowledged=e}getAcknowledgedByUsername(){return this.acknowledgedByUsername}setAcknowledgedByUsername(e){this.acknowledgedByUsername=e}getAcknowledgedTime(){return this.acknowledgedTime}setAcknowledgedTime(e){this.acknowledgedTime=e}getIsAutoResolved(){return this.isAutoResolved}setIsAutoResolved(e){this.isAutoResolved=e}getIsResolved(){return this.isResolved}setIsResolved(e){this.isResolved=e}getResolvedByUsername(){return this.resolvedByUsername}setResolvedByUsername(e){this.resolvedByUsername=e}getResolvedTime(){return this.resolvedTime}setResolvedTime(e){this.resolvedTime=e}getSourceEntity(){return this.sourceEntity}setSourceEntity(e){this.sourceEntity=e}getAffectedEntities(){return this.affectedEntities}setAffectedEntities(e){this.affectedEntities=e}getSeverityTrails(){return this.severityTrails}setSeverityTrails(e){this.severityTrails=e}getMetricDetails(){return this.metricDetails}setMetricDetails(e){this.metricDetails=e}getTitle(){return this.title}setTitle(e){this.title=e}getAlertType(){return this.alertType}setAlertType(e){this.alertType=e}getClassifications(){return this.classifications}setClassifications(e){this.classifications=e}getClusterUUID(){return this.clusterUUID}setClusterUUID(e){this.clusterUUID=e}getCreationTime(){return this.creationTime}setCreationTime(e){this.creationTime=e}getImpactTypes(){return this.impactTypes}setImpactTypes(e){this.impactTypes=e}getLastUpdatedTime(){return this.lastUpdatedTime}setLastUpdatedTime(e){this.lastUpdatedTime=e}getMessage(){return this.message}setMessage(e){this.message=e}getOriginatingClusterUUID(){return this.originatingClusterUUID}setOriginatingClusterUUID(e){this.originatingClusterUUID=e}getSeverity(){return this.severity}setSeverity(e){this.severity=e}getIsUserDefined(){return this.isUserDefined}setIsUserDefined(e){this.isUserDefined=e}getParameters(){return this.parameters}setParameters(e){this.parameters=e}getServiceName(){return this.serviceName}setServiceName(e){this.serviceName=e}getRootCauseAnalysis(){return this.rootCauseAnalysis}setRootCauseAnalysis(e){this.rootCauseAnalysis=e}getKbArticles(){return this.kbArticles}setKbArticles(e){this.kbArticles=e}getClusterName(){return this.clusterName}setClusterName(e){this.clusterName=e}getIsRunnable(){return this.isRunnable}setIsRunnable(e){this.isRunnable=e}toJson(e){return!1===e?{...void 0!==this.getIsAcknowledged()&&null!==this.getIsAcknowledged()?{isAcknowledged:this.getIsAcknowledged()}:{},...void 0!==this.getAcknowledgedByUsername()&&null!==this.getAcknowledgedByUsername()?{acknowledgedByUsername:this.getAcknowledgedByUsername()}:{},...void 0!==this.getAcknowledgedTime()&&null!==this.getAcknowledgedTime()?{acknowledgedTime:Ct(It,this,Dt).call(this,this.getAcknowledgedTime(),!1)}:{},...void 0!==this.getIsAutoResolved()&&null!==this.getIsAutoResolved()?{isAutoResolved:this.getIsAutoResolved()}:{},...void 0!==this.getIsResolved()&&null!==this.getIsResolved()?{isResolved:this.getIsResolved()}:{},...void 0!==this.getResolvedByUsername()&&null!==this.getResolvedByUsername()?{resolvedByUsername:this.getResolvedByUsername()}:{},...void 0!==this.getResolvedTime()&&null!==this.getResolvedTime()?{resolvedTime:Ct(It,this,Dt).call(this,this.getResolvedTime(),!1)}:{},...void 0!==this.getSourceEntity()&&null!==this.getSourceEntity()?{sourceEntity:this.getSourceEntity().toJson(!1)}:{},...void 0!==this.getAffectedEntities()&&null!==this.getAffectedEntities()?{affectedEntities:this.getAffectedEntities().map(e=>e.toJson(!1))}:{},...void 0!==this.getSeverityTrails()&&null!==this.getSeverityTrails()?{severityTrails:this.getSeverityTrails().map(e=>e.toJson(!1))}:{},...void 0!==this.getMetricDetails()&&null!==this.getMetricDetails()?{metricDetails:this.getMetricDetails().map(e=>e.toJson(!1))}:{},...void 0!==this.getTitle()&&null!==this.getTitle()?{title:this.getTitle()}:{},...void 0!==this.getAlertType()&&null!==this.getAlertType()?{alertType:this.getAlertType()}:{},...void 0!==this.getClassifications()&&null!==this.getClassifications()?{classifications:this.getClassifications()}:{},...void 0!==this.getClusterUUID()&&null!==this.getClusterUUID()?{clusterUUID:this.getClusterUUID()}:{},...void 0!==this.getCreationTime()&&null!==this.getCreationTime()?{creationTime:Ct(It,this,Dt).call(this,this.getCreationTime(),!1)}:{},...void 0!==this.getImpactTypes()&&null!==this.getImpactTypes()?{impactTypes:this.getImpactTypes()}:{},...void 0!==this.getLastUpdatedTime()&&null!==this.getLastUpdatedTime()?{lastUpdatedTime:Ct(It,this,Dt).call(this,this.getLastUpdatedTime(),!1)}:{},...void 0!==this.getMessage()&&null!==this.getMessage()?{message:this.getMessage()}:{},...void 0!==this.getOriginatingClusterUUID()&&null!==this.getOriginatingClusterUUID()?{originatingClusterUUID:this.getOriginatingClusterUUID()}:{},...void 0!==this.getSeverity()&&null!==this.getSeverity()?{severity:this.getSeverity()}:{},...void 0!==this.getIsUserDefined()&&null!==this.getIsUserDefined()?{isUserDefined:this.getIsUserDefined()}:{},...void 0!==this.getParameters()&&null!==this.getParameters()?{parameters:this.getParameters().map(e=>e.toJson(!1))}:{},...void 0!==this.getServiceName()&&null!==this.getServiceName()?{serviceName:this.getServiceName()}:{},...void 0!==this.getRootCauseAnalysis()&&null!==this.getRootCauseAnalysis()?{rootCauseAnalysis:this.getRootCauseAnalysis().map(e=>e.toJson(!1))}:{},...void 0!==this.getKbArticles()&&null!==this.getKbArticles()?{kbArticles:this.getKbArticles()}:{},...void 0!==this.getClusterName()&&null!==this.getClusterName()?{clusterName:this.getClusterName()}:{},...void 0!==this.getIsRunnable()&&null!==this.getIsRunnable()?{isRunnable:this.getIsRunnable()}:{},...void 0!==this.getExtId()&&null!==this.getExtId()?{extId:this.getExtId()}:{},...void 0!==this.getLinks()&&null!==this.getLinks()?{links:this.getLinks().map(e=>e.toJson(!1))}:{},...void 0!==this.getTenantId()&&null!==this.getTenantId()?{tenantId:this.getTenantId()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getIsAcknowledged()&&null!==this.getIsAcknowledged()?{isAcknowledged:this.getIsAcknowledged()}:{},...void 0!==this.getAcknowledgedByUsername()&&null!==this.getAcknowledgedByUsername()?{acknowledgedByUsername:this.getAcknowledgedByUsername()}:{},...void 0!==this.getAcknowledgedTime()&&null!==this.getAcknowledgedTime()?{acknowledgedTime:Ct(It,this,Dt).call(this,this.getAcknowledgedTime(),!1)}:{},...void 0!==this.getIsAutoResolved()&&null!==this.getIsAutoResolved()?{isAutoResolved:this.getIsAutoResolved()}:{},...void 0!==this.getIsResolved()&&null!==this.getIsResolved()?{isResolved:this.getIsResolved()}:{},...void 0!==this.getResolvedByUsername()&&null!==this.getResolvedByUsername()?{resolvedByUsername:this.getResolvedByUsername()}:{},...void 0!==this.getResolvedTime()&&null!==this.getResolvedTime()?{resolvedTime:Ct(It,this,Dt).call(this,this.getResolvedTime(),!1)}:{},...void 0!==this.getSourceEntity()&&null!==this.getSourceEntity()?{sourceEntity:this.getSourceEntity().toJson(!1)}:{},...void 0!==this.getAffectedEntities()&&null!==this.getAffectedEntities()?{affectedEntities:this.getAffectedEntities().map(e=>e.toJson(!1))}:{},...void 0!==this.getSeverityTrails()&&null!==this.getSeverityTrails()?{severityTrails:this.getSeverityTrails().map(e=>e.toJson(!1))}:{},...void 0!==this.getMetricDetails()&&null!==this.getMetricDetails()?{metricDetails:this.getMetricDetails().map(e=>e.toJson(!1))}:{},...void 0!==this.getTitle()&&null!==this.getTitle()?{title:this.getTitle()}:{},...void 0!==this.getAlertType()&&null!==this.getAlertType()?{alertType:this.getAlertType()}:{},...void 0!==this.getClassifications()&&null!==this.getClassifications()?{classifications:this.getClassifications()}:{},...void 0!==this.getClusterUUID()&&null!==this.getClusterUUID()?{clusterUUID:this.getClusterUUID()}:{},...void 0!==this.getCreationTime()&&null!==this.getCreationTime()?{creationTime:Ct(It,this,Dt).call(this,this.getCreationTime(),!1)}:{},...void 0!==this.getImpactTypes()&&null!==this.getImpactTypes()?{impactTypes:this.getImpactTypes()}:{},...void 0!==this.getLastUpdatedTime()&&null!==this.getLastUpdatedTime()?{lastUpdatedTime:Ct(It,this,Dt).call(this,this.getLastUpdatedTime(),!1)}:{},...void 0!==this.getMessage()&&null!==this.getMessage()?{message:this.getMessage()}:{},...void 0!==this.getOriginatingClusterUUID()&&null!==this.getOriginatingClusterUUID()?{originatingClusterUUID:this.getOriginatingClusterUUID()}:{},...void 0!==this.getSeverity()&&null!==this.getSeverity()?{severity:this.getSeverity()}:{},...void 0!==this.getIsUserDefined()&&null!==this.getIsUserDefined()?{isUserDefined:this.getIsUserDefined()}:{},...void 0!==this.getParameters()&&null!==this.getParameters()?{parameters:this.getParameters().map(e=>e.toJson(!1))}:{},...void 0!==this.getServiceName()&&null!==this.getServiceName()?{serviceName:this.getServiceName()}:{},...void 0!==this.getRootCauseAnalysis()&&null!==this.getRootCauseAnalysis()?{rootCauseAnalysis:this.getRootCauseAnalysis().map(e=>e.toJson(!1))}:{},...void 0!==this.getKbArticles()&&null!==this.getKbArticles()?{kbArticles:this.getKbArticles()}:{},...void 0!==this.getClusterName()&&null!==this.getClusterName()?{clusterName:this.getClusterName()}:{},...void 0!==this.getIsRunnable()&&null!==this.getIsRunnable()?{isRunnable:this.getIsRunnable()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("isAcknowledged"===t&&(void 0===this.isAcknowledged||null===this.isAcknowledged))return new O("isAcknowledged","undefined or null");if("acknowledgedByUsername"===t){if(void 0===this.acknowledgedByUsername||null===this.acknowledgedByUsername)return new O("acknowledgedByUsername","undefined or null");if(!F.validateMaxLength(this.acknowledgedByUsername,255))return new O("acknowledgedByUsername","does not satisfy required maxLength constraint: 255")}if("acknowledgedTime"===t&&(void 0===this.acknowledgedTime||null===this.acknowledgedTime))return new O("acknowledgedTime","undefined or null");if("isAutoResolved"===t&&(void 0===this.isAutoResolved||null===this.isAutoResolved))return new O("isAutoResolved","undefined or null");if("isResolved"===t&&(void 0===this.isResolved||null===this.isResolved))return new O("isResolved","undefined or null");if("resolvedByUsername"===t){if(void 0===this.resolvedByUsername||null===this.resolvedByUsername)return new O("resolvedByUsername","undefined or null");if(!F.validateMaxLength(this.resolvedByUsername,255))return new O("resolvedByUsername","does not satisfy required maxLength constraint: 255")}if("resolvedTime"===t&&(void 0===this.resolvedTime||null===this.resolvedTime))return new O("resolvedTime","undefined or null");if("sourceEntity"===t&&(void 0===this.sourceEntity||null===this.sourceEntity))return new O("sourceEntity","undefined or null");if("affectedEntities"===t){if(void 0===this.affectedEntities||null===this.affectedEntities)return new O("affectedEntities","undefined or null");if(!F.validateMaxItems(this.affectedEntities,50))return new O("affectedEntities","does not satisfy required maxItems constraint: 50")}if("severityTrails"===t){if(void 0===this.severityTrails||null===this.severityTrails)return new O("severityTrails","undefined or null");if(!F.validateMaxItems(this.severityTrails,3))return new O("severityTrails","does not satisfy required maxItems constraint: 3")}if("metricDetails"===t){if(void 0===this.metricDetails||null===this.metricDetails)return new O("metricDetails","undefined or null");if(!F.validateMaxItems(this.metricDetails,50))return new O("metricDetails","does not satisfy required maxItems constraint: 50")}if("title"===t&&(void 0===this.title||null===this.title))return new O("title","undefined or null");if("alertType"===t&&(void 0===this.alertType||null===this.alertType))return new O("alertType","undefined or null");if("classifications"===t){if(void 0===this.classifications||null===this.classifications)return new O("classifications","undefined or null");if(!F.validateMaxItems(this.classifications,15))return new O("classifications","does not satisfy required maxItems constraint: 15")}if("clusterUUID"===t){if(void 0===this.clusterUUID||null===this.clusterUUID)return new O("clusterUUID","undefined or null");if(!F.validatePattern(this.clusterUUID,/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/))return new O("clusterUUID","does not satisfy required pattern: /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/")}if("creationTime"===t&&(void 0===this.creationTime||null===this.creationTime))return new O("creationTime","undefined or null");if("impactTypes"===t){if(void 0===this.impactTypes||null===this.impactTypes)return new O("impactTypes","undefined or null");if(!F.validateMaxItems(this.impactTypes,8))return new O("impactTypes","does not satisfy required maxItems constraint: 8")}if("lastUpdatedTime"===t&&(void 0===this.lastUpdatedTime||null===this.lastUpdatedTime))return new O("lastUpdatedTime","undefined or null");if("message"===t&&(void 0===this.message||null===this.message))return new O("message","undefined or null");if("originatingClusterUUID"===t){if(void 0===this.originatingClusterUUID||null===this.originatingClusterUUID)return new O("originatingClusterUUID","undefined or null");if(!F.validatePattern(this.originatingClusterUUID,/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/))return new O("originatingClusterUUID","does not satisfy required pattern: /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/")}if("severity"===t&&(void 0===this.severity||null===this.severity))return new O("severity","undefined or null");if("isUserDefined"===t&&(void 0===this.isUserDefined||null===this.isUserDefined))return new O("isUserDefined","undefined or null");if("parameters"===t){if(void 0===this.parameters||null===this.parameters)return new O("parameters","undefined or null");if(!F.validateMaxItems(this.parameters,50))return new O("parameters","does not satisfy required maxItems constraint: 50")}if("serviceName"===t){if(void 0===this.serviceName||null===this.serviceName)return new O("serviceName","undefined or null");if(!F.validateMaxLength(this.serviceName,50))return new O("serviceName","does not satisfy required maxLength constraint: 50")}if("rootCauseAnalysis"===t){if(void 0===this.rootCauseAnalysis||null===this.rootCauseAnalysis)return new O("rootCauseAnalysis","undefined or null");if(!F.validateMaxItems(this.rootCauseAnalysis,15))return new O("rootCauseAnalysis","does not satisfy required maxItems constraint: 15")}if("kbArticles"===t){if(void 0===this.kbArticles||null===this.kbArticles)return new O("kbArticles","undefined or null");if(!F.validateMaxItems(this.kbArticles,10))return new O("kbArticles","does not satisfy required maxItems constraint: 10")}if("clusterName"===t){if(void 0===this.clusterName||null===this.clusterName)return new O("clusterName","undefined or null");if(!F.validateMaxLength(this.clusterName,1e3))return new O("clusterName","does not satisfy required maxLength constraint: 1000")}return"isRunnable"!==t||void 0!==this.isRunnable&&null!==this.isRunnable?new O(t,"no such property exists"):new O("isRunnable","undefined or null")}}function Dt(e,t){return e instanceof Date&&void 0!==t?t?e.toISOString().slice(0,10):e.toISOString():e}function St(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")}Ut.prototype.isAcknowledged=!1,Ut.prototype.acknowledgedByUsername=void 0,Ut.prototype.acknowledgedTime=void 0,Ut.prototype.isAutoResolved=!1,Ut.prototype.isResolved=!1,Ut.prototype.resolvedByUsername=void 0,Ut.prototype.resolvedTime=void 0,Ut.prototype.sourceEntity=void 0,Ut.prototype.affectedEntities=void 0,Ut.prototype.severityTrails=void 0,Ut.prototype.metricDetails=void 0,Ut.prototype.title=void 0,Ut.prototype.alertType=void 0,Ut.prototype.classifications=void 0,Ut.prototype.clusterUUID=void 0,Ut.prototype.creationTime=void 0,Ut.prototype.impactTypes=void 0,Ut.prototype.lastUpdatedTime=void 0,Ut.prototype.message=void 0,Ut.prototype.originatingClusterUUID=void 0,Ut.prototype.severity=void 0,Ut.prototype.isUserDefined=!1,Ut.prototype.parameters=void 0,Ut.prototype.serviceName=void 0,Ut.prototype.rootCauseAnalysis=void 0,Ut.prototype.kbArticles=void 0,Ut.prototype.clusterName=void 0,Ut.prototype.isRunnable=!1,ze.prototype.extId=void 0,ze.prototype.links=void 0,Be.prototype.tenantId=void 0;var Rt=new WeakSet;class Nt extends r{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=Rt),t.add(e),this.$objectType="monitoring.v4.serviceability.ListAlertsApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,o,a,l;if(e){if(t=t||new Nt,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(B.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)if(Array.isArray(e.data))if(0===e.data.length)t.setData([]);else{for(a=[],i=e.data,l=i[0].hasOwnProperty("$objectType")?i[0].$objectType:typeof i[0],o=0;o<i.length;o++){if("monitoring.v4.serviceability.Alert"!==l)throw"Unknown list of type "+l+" in data";s=Ut.constructFromObject(i[o],void 0),a.push(s)}t.setData(a)}else{if(l=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,"monitoring.v4.error.ErrorResponse"!==l)throw"Unknown datatype "+l+" in data";t.setData(Je.constructFromObject(e.data,void 0))}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMetadata(){return this.metadata}setMetadata(e){this.metadata=e}getData(){return this.data}setData(e){this.data=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson(!1):Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson(!1):e):St(Rt,this,xt).call(this,this.getData(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson():Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson():e):St(Rt,this,xt).call(this,this.getData())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"metadata"!==t||void 0!==this.metadata&&null!==this.metadata?"data"!==t||void 0!==this.data&&null!==this.data?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("data","undefined or null"):new O("metadata","undefined or null")}}function xt(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}function Mt(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")}Nt.prototype.metadata=void 0,Nt.prototype.data=void 0,Nt.prototype.$reserved=void 0,Nt.prototype.$objectType=void 0,Nt.prototype.$unknownFields=void 0;var Vt=new WeakSet;class Lt extends r{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=Vt),t.add(e),this.$objectType="monitoring.v4.serviceability.GetAlertApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i;if(e){if(t=t||new Lt,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(B.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(i=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,i){case"monitoring.v4.serviceability.Alert":t.setData(Ut.constructFromObject(e.data,void 0));break;case"monitoring.v4.error.ErrorResponse":t.setData(Je.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+i+" in data"}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMetadata(){return this.metadata}setMetadata(e){this.metadata=e}getData(){return this.data}setData(e){this.data=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson(!1):Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson(!1):e):Mt(Vt,this,Jt).call(this,this.getData(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson():Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson():e):Mt(Vt,this,Jt).call(this,this.getData())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"metadata"!==t||void 0!==this.metadata&&null!==this.metadata?"data"!==t||void 0!==this.data&&null!==this.data?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("data","undefined or null"):new O("metadata","undefined or null")}}function Jt(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}Lt.prototype.metadata=void 0,Lt.prototype.data=void 0,Lt.prototype.$reserved=void 0,Lt.prototype.$objectType=void 0,Lt.prototype.$unknownFields=void 0;const _t={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",ENABLED:"ENABLED",DISABLED:"DISABLED",NOT_SUPPORTED:"NOT_SUPPORTED",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(_t).find(t=>_t[t]===e);return null==t?_t.$UNKNOWN:_t[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case _t.$UNKNOWN:case _t.$REDACTED:case _t.ENABLED:case _t.DISABLED:case _t.NOT_SUPPORTED:return;default:throw new Error("Invalid : must be AutoResolveState.{ $UNKNOWN|$REDACTED|ENABLED|DISABLED|NOT_SUPPORTED }")}}};Object.freeze(_t);const Wt=_t;var Bt=new WeakSet;class Gt{constructor(e){var t,n;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t=this,n=Bt),n.add(t),this.currentBoolValue=e,this.$objectType="monitoring.v4.serviceability.BooleanConfigurableParamValue",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new Gt,e.hasOwnProperty("defaultBoolValue")&&null!==e.defaultBoolValue&&void 0!==e.defaultBoolValue&&t.setDefaultBoolValue(e.defaultBoolValue),e.hasOwnProperty("currentBoolValue")&&null!==e.currentBoolValue&&void 0!==e.currentBoolValue&&t.setCurrentBoolValue(e.currentBoolValue),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getDefaultBoolValue(){return this.defaultBoolValue}setDefaultBoolValue(e){this.defaultBoolValue=e}getCurrentBoolValue(){return this.currentBoolValue}setCurrentBoolValue(e){this.currentBoolValue=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getDefaultBoolValue()&&null!==this.getDefaultBoolValue()?{defaultBoolValue:this.getDefaultBoolValue()}:{},...void 0!==this.getCurrentBoolValue()&&null!==this.getCurrentBoolValue()?{currentBoolValue:this.getCurrentBoolValue()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getCurrentBoolValue()&&null!==this.getCurrentBoolValue()?{currentBoolValue:this.getCurrentBoolValue()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=["currentBoolValue"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"defaultBoolValue"!==t||void 0!==this.defaultBoolValue&&null!==this.defaultBoolValue?"currentBoolValue"!==t||void 0!==this.currentBoolValue&&null!==this.currentBoolValue?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("currentBoolValue","undefined or null"):new O("defaultBoolValue","undefined or null")}}function zt(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")}Gt.prototype.defaultBoolValue=void 0,Gt.prototype.currentBoolValue=void 0,Gt.prototype.$reserved=void 0,Gt.prototype.$objectType=void 0,Gt.prototype.$unknownFields=void 0;var qt=new WeakSet;class Kt{constructor(e,t){var n,i;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(n=this,i=qt),i.add(n),this.minimumValue=e,this.maximumValue=t,this.$objectType="monitoring.v4.serviceability.ConfigurableParamValueRange",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i;if(e){if(t=t||new Kt,e.hasOwnProperty("minimumValue")&&null!==e.minimumValue&&void 0!==e.minimumValue){if(i=e.minimumValue.hasOwnProperty("$objectType")?e.minimumValue.$objectType:typeof e.minimumValue,"number"!==i)throw"Unknown datatype "+i+" in data";t.setMinimumValue(e.minimumValue)}if(e.hasOwnProperty("maximumValue")&&null!==e.maximumValue&&void 0!==e.maximumValue){if(i=e.maximumValue.hasOwnProperty("$objectType")?e.maximumValue.$objectType:typeof e.maximumValue,"number"!==i)throw"Unknown datatype "+i+" in data";t.setMaximumValue(e.maximumValue)}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMinimumValue(){return this.minimumValue}setMinimumValue(e){this.minimumValue=e}getMaximumValue(){return this.maximumValue}setMaximumValue(e){this.maximumValue=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getMinimumValue()&&null!==this.getMinimumValue()?{minimumValue:void 0!==this.getMinimumValue().toJson?this.getMinimumValue().toJson(!1):Array.isArray(this.getMinimumValue())?this.getMinimumValue().map(e=>void 0!==e.toJson?e.toJson(!1):e):zt(qt,this,Ht).call(this,this.getMinimumValue(),!1)}:{},...void 0!==this.getMaximumValue()&&null!==this.getMaximumValue()?{maximumValue:void 0!==this.getMaximumValue().toJson?this.getMaximumValue().toJson(!1):Array.isArray(this.getMaximumValue())?this.getMaximumValue().map(e=>void 0!==e.toJson?e.toJson(!1):e):zt(qt,this,Ht).call(this,this.getMaximumValue(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getMinimumValue()&&null!==this.getMinimumValue()?{minimumValue:void 0!==this.getMinimumValue().toJson?this.getMinimumValue().toJson():Array.isArray(this.getMinimumValue())?this.getMinimumValue().map(e=>void 0!==e.toJson?e.toJson():e):zt(qt,this,Ht).call(this,this.getMinimumValue())}:{},...void 0!==this.getMaximumValue()&&null!==this.getMaximumValue()?{maximumValue:void 0!==this.getMaximumValue().toJson?this.getMaximumValue().toJson():Array.isArray(this.getMaximumValue())?this.getMaximumValue().map(e=>void 0!==e.toJson?e.toJson():e):zt(qt,this,Ht).call(this,this.getMaximumValue())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=["minimumValue","maximumValue"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"minimumValue"!==t||void 0!==this.minimumValue&&null!==this.minimumValue?"maximumValue"!==t||void 0!==this.maximumValue&&null!==this.maximumValue?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("maximumValue","undefined or null"):new O("minimumValue","undefined or null")}}function Ht(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}Kt.prototype.minimumValue=void 0,Kt.prototype.maximumValue=void 0,Kt.prototype.$reserved=void 0,Kt.prototype.$objectType=void 0,Kt.prototype.$unknownFields=void 0;var Yt=new WeakSet;class Xt{constructor(e){var t,n;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t=this,n=Yt),n.add(t),this.currentFloatValue=e,this.$objectType="monitoring.v4.serviceability.FloatConfigurableParamValue",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,r,o;if(e){if(t=t||new Xt,e.hasOwnProperty("defaultFloatValue")&&null!==e.defaultFloatValue&&void 0!==e.defaultFloatValue&&t.setDefaultFloatValue(e.defaultFloatValue),e.hasOwnProperty("currentFloatValue")&&null!==e.currentFloatValue&&void 0!==e.currentFloatValue&&t.setCurrentFloatValue(e.currentFloatValue),e.hasOwnProperty("validValueRanges")&&null!==e.validValueRanges&&void 0!==e.validValueRanges){for(o=[],i=e.validValueRanges,r=0;r<i.length;r++)s=Kt.constructFromObject(i[r],void 0),o.push(s);t.setValidValueRanges(o)}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getDefaultFloatValue(){return this.defaultFloatValue}setDefaultFloatValue(e){this.defaultFloatValue=e}getCurrentFloatValue(){return this.currentFloatValue}setCurrentFloatValue(e){this.currentFloatValue=e}getValidValueRanges(){return this.validValueRanges}setValidValueRanges(e){this.validValueRanges=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getDefaultFloatValue()&&null!==this.getDefaultFloatValue()?{defaultFloatValue:this.getDefaultFloatValue()}:{},...void 0!==this.getCurrentFloatValue()&&null!==this.getCurrentFloatValue()?{currentFloatValue:this.getCurrentFloatValue()}:{},...void 0!==this.getValidValueRanges()&&null!==this.getValidValueRanges()?{validValueRanges:this.getValidValueRanges().map(e=>e.toJson(!1))}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getCurrentFloatValue()&&null!==this.getCurrentFloatValue()?{currentFloatValue:this.getCurrentFloatValue()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=["currentFloatValue"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("defaultFloatValue"===t&&(void 0===this.defaultFloatValue||null===this.defaultFloatValue))return new O("defaultFloatValue","undefined or null");if("currentFloatValue"===t&&(void 0===this.currentFloatValue||null===this.currentFloatValue))return new O("currentFloatValue","undefined or null");if("validValueRanges"===t){if(void 0===this.validValueRanges||null===this.validValueRanges)return new O("validValueRanges","undefined or null");if(!F.validateMaxItems(this.validValueRanges,5))return new O("validValueRanges","does not satisfy required maxItems constraint: 5")}return"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null")}}Xt.prototype.defaultFloatValue=void 0,Xt.prototype.currentFloatValue=void 0,Xt.prototype.validValueRanges=void 0,Xt.prototype.$reserved=void 0,Xt.prototype.$objectType=void 0,Xt.prototype.$unknownFields=void 0;var Qt=new WeakSet;class Zt{constructor(e){var t,n;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t=this,n=Qt),n.add(t),this.currentIntValue=e,this.$objectType="monitoring.v4.serviceability.IntConfigurableParamValue",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,r,o;if(e){if(t=t||new Zt,e.hasOwnProperty("defaultIntValue")&&null!==e.defaultIntValue&&void 0!==e.defaultIntValue&&t.setDefaultIntValue(e.defaultIntValue),e.hasOwnProperty("currentIntValue")&&null!==e.currentIntValue&&void 0!==e.currentIntValue&&t.setCurrentIntValue(e.currentIntValue),e.hasOwnProperty("validValueRanges")&&null!==e.validValueRanges&&void 0!==e.validValueRanges){for(o=[],i=e.validValueRanges,r=0;r<i.length;r++)s=Kt.constructFromObject(i[r],void 0),o.push(s);t.setValidValueRanges(o)}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getDefaultIntValue(){return this.defaultIntValue}setDefaultIntValue(e){this.defaultIntValue=e}getCurrentIntValue(){return this.currentIntValue}setCurrentIntValue(e){this.currentIntValue=e}getValidValueRanges(){return this.validValueRanges}setValidValueRanges(e){this.validValueRanges=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getDefaultIntValue()&&null!==this.getDefaultIntValue()?{defaultIntValue:this.getDefaultIntValue()}:{},...void 0!==this.getCurrentIntValue()&&null!==this.getCurrentIntValue()?{currentIntValue:this.getCurrentIntValue()}:{},...void 0!==this.getValidValueRanges()&&null!==this.getValidValueRanges()?{validValueRanges:this.getValidValueRanges().map(e=>e.toJson(!1))}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getCurrentIntValue()&&null!==this.getCurrentIntValue()?{currentIntValue:this.getCurrentIntValue()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=["currentIntValue"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("defaultIntValue"===t&&(void 0===this.defaultIntValue||null===this.defaultIntValue))return new O("defaultIntValue","undefined or null");if("currentIntValue"===t&&(void 0===this.currentIntValue||null===this.currentIntValue))return new O("currentIntValue","undefined or null");if("validValueRanges"===t){if(void 0===this.validValueRanges||null===this.validValueRanges)return new O("validValueRanges","undefined or null");if(!F.validateMaxItems(this.validValueRanges,5))return new O("validValueRanges","does not satisfy required maxItems constraint: 5")}return"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null")}}Zt.prototype.defaultIntValue=void 0,Zt.prototype.currentIntValue=void 0,Zt.prototype.validValueRanges=void 0,Zt.prototype.$reserved=void 0,Zt.prototype.$objectType=void 0,Zt.prototype.$unknownFields=void 0;var en=new WeakSet;class tn{constructor(e){var t,n;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t=this,n=en),n.add(t),this.currentStrValue=e,this.$objectType="monitoring.v4.serviceability.StringConfigurableParamValue",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new tn,e.hasOwnProperty("defaultStrValue")&&null!==e.defaultStrValue&&void 0!==e.defaultStrValue&&t.setDefaultStrValue(e.defaultStrValue),e.hasOwnProperty("currentStrValue")&&null!==e.currentStrValue&&void 0!==e.currentStrValue&&t.setCurrentStrValue(e.currentStrValue),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getDefaultStrValue(){return this.defaultStrValue}setDefaultStrValue(e){this.defaultStrValue=e}getCurrentStrValue(){return this.currentStrValue}setCurrentStrValue(e){this.currentStrValue=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getDefaultStrValue()&&null!==this.getDefaultStrValue()?{defaultStrValue:this.getDefaultStrValue()}:{},...void 0!==this.getCurrentStrValue()&&null!==this.getCurrentStrValue()?{currentStrValue:this.getCurrentStrValue()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getCurrentStrValue()&&null!==this.getCurrentStrValue()?{currentStrValue:this.getCurrentStrValue()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=["currentStrValue"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"defaultStrValue"!==t||void 0!==this.defaultStrValue&&null!==this.defaultStrValue?"currentStrValue"!==t||void 0!==this.currentStrValue&&null!==this.currentStrValue?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("currentStrValue","undefined or null"):new O("defaultStrValue","undefined or null")}}function nn(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")}tn.prototype.defaultStrValue=void 0,tn.prototype.currentStrValue=void 0,tn.prototype.$reserved=void 0,tn.prototype.$objectType=void 0,tn.prototype.$unknownFields=void 0;var sn=new WeakSet;class rn{constructor(e,t){var n,i;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(n=this,i=sn),i.add(n),this.name=e,this.paramValue=t,this.$objectType="monitoring.v4.serviceability.AlertPolicyConfigurableParameter",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i;if(e){if(t=t||new rn,e.hasOwnProperty("name")&&null!==e.name&&void 0!==e.name&&t.setName(e.name),e.hasOwnProperty("displayName")&&null!==e.displayName&&void 0!==e.displayName&&t.setDisplayName(e.displayName),e.hasOwnProperty("unit")&&null!==e.unit&&void 0!==e.unit&&t.setUnit(e.unit),e.hasOwnProperty("paramValue")&&null!==e.paramValue&&void 0!==e.paramValue)switch(i=e.paramValue.hasOwnProperty("$objectType")?e.paramValue.$objectType:typeof e.paramValue,i){case"monitoring.v4.serviceability.IntConfigurableParamValue":t.setParamValue(Zt.constructFromObject(e.paramValue,void 0));break;case"monitoring.v4.serviceability.FloatConfigurableParamValue":t.setParamValue(Xt.constructFromObject(e.paramValue,void 0));break;case"monitoring.v4.serviceability.BooleanConfigurableParamValue":t.setParamValue(Gt.constructFromObject(e.paramValue,void 0));break;case"monitoring.v4.serviceability.StringConfigurableParamValue":t.setParamValue(tn.constructFromObject(e.paramValue,void 0));break;default:throw"Unknown datatype "+i+" in data"}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getName(){return this.name}setName(e){this.name=e}getDisplayName(){return this.displayName}setDisplayName(e){this.displayName=e}getUnit(){return this.unit}setUnit(e){this.unit=e}getParamValue(){return this.paramValue}setParamValue(e){this.paramValue=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getName()&&null!==this.getName()?{name:this.getName()}:{},...void 0!==this.getDisplayName()&&null!==this.getDisplayName()?{displayName:this.getDisplayName()}:{},...void 0!==this.getUnit()&&null!==this.getUnit()?{unit:this.getUnit()}:{},...void 0!==this.getParamValue()&&null!==this.getParamValue()?{paramValue:void 0!==this.getParamValue().toJson?this.getParamValue().toJson(!1):Array.isArray(this.getParamValue())?this.getParamValue().map(e=>void 0!==e.toJson?e.toJson(!1):e):nn(sn,this,on).call(this,this.getParamValue(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getName()&&null!==this.getName()?{name:this.getName()}:{},...void 0!==this.getParamValue()&&null!==this.getParamValue()?{paramValue:void 0!==this.getParamValue().toJson?this.getParamValue().toJson():Array.isArray(this.getParamValue())?this.getParamValue().map(e=>void 0!==e.toJson?e.toJson():e):nn(sn,this,on).call(this,this.getParamValue())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=["name","paramValue"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("name"===t){if(void 0===this.name||null===this.name)return new O("name","undefined or null");if(null==e&&!F.validateMaxLength(this.name,100))return new O("name","does not satisfy required maxLength constraint: 100")}if("displayName"===t){if(void 0===this.displayName||null===this.displayName)return new O("displayName","undefined or null");if(!F.validateMaxLength(this.displayName,200))return new O("displayName","does not satisfy required maxLength constraint: 200")}if("unit"===t){if(void 0===this.unit||null===this.unit)return new O("unit","undefined or null");if(!F.validateMaxLength(this.unit,100))return new O("unit","does not satisfy required maxLength constraint: 100")}return"paramValue"!==t||void 0!==this.paramValue&&null!==this.paramValue?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("paramValue","undefined or null")}}function on(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}rn.prototype.name=void 0,rn.prototype.displayName=void 0,rn.prototype.unit=void 0,rn.prototype.paramValue=void 0,rn.prototype.$reserved=void 0,rn.prototype.$objectType=void 0,rn.prototype.$unknownFields=void 0;const an={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",ENABLED:"ENABLED",DISABLED:"DISABLED",NOT_SUPPORTED:"NOT_SUPPORTED",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(an).find(t=>an[t]===e);return null==t?an.$UNKNOWN:an[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case an.$UNKNOWN:case an.$REDACTED:case an.ENABLED:case an.DISABLED:case an.NOT_SUPPORTED:return;default:throw new Error("Invalid : must be PropertyState.{ $UNKNOWN|$REDACTED|ENABLED|DISABLED|NOT_SUPPORTED }")}}};Object.freeze(an);const ln=an;var dn=new WeakSet;class un{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=dn),t.add(e),this.$objectType="monitoring.v4.serviceability.SeverityConfig",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,r,o;if(e){if(t=t||new un,e.hasOwnProperty("state")&&null!==e.state&&void 0!==e.state&&t.setState(ln.constructFromObject(e.state)),e.hasOwnProperty("thresholdParameters")&&null!==e.thresholdParameters&&void 0!==e.thresholdParameters){for(o=[],i=e.thresholdParameters,r=0;r<i.length;r++)s=rn.constructFromObject(i[r],void 0),o.push(s);t.setThresholdParameters(o)}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getState(){return this.state}setState(e){this.state=e}getThresholdParameters(){return this.thresholdParameters}setThresholdParameters(e){this.thresholdParameters=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getState()&&null!==this.getState()?{state:this.getState()}:{},...void 0!==this.getThresholdParameters()&&null!==this.getThresholdParameters()?{thresholdParameters:this.getThresholdParameters().map(e=>e.toJson(!1))}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("state"===t&&(void 0===this.state||null===this.state))return new O("state","undefined or null");if("thresholdParameters"===t){if(void 0===this.thresholdParameters||null===this.thresholdParameters)return new O("thresholdParameters","undefined or null");if(!F.validateMaxItems(this.thresholdParameters,5))return new O("thresholdParameters","does not satisfy required maxItems constraint: 5")}return"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null")}}un.prototype.state=void 0,un.prototype.thresholdParameters=void 0,un.prototype.$reserved=void 0,un.prototype.$objectType=void 0,un.prototype.$unknownFields=void 0;var hn=new WeakSet;class cn{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=hn),t.add(e),this.$objectType="monitoring.v4.serviceability.AlertConfig",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new cn,e.hasOwnProperty("autoResolve")&&null!==e.autoResolve&&void 0!==e.autoResolve&&t.setAutoResolve(Wt.constructFromObject(e.autoResolve)),e.hasOwnProperty("criticalSeverity")&&null!==e.criticalSeverity&&void 0!==e.criticalSeverity&&t.setCriticalSeverity(un.constructFromObject(e.criticalSeverity)),e.hasOwnProperty("warningSeverity")&&null!==e.warningSeverity&&void 0!==e.warningSeverity&&t.setWarningSeverity(un.constructFromObject(e.warningSeverity)),e.hasOwnProperty("infoSeverity")&&null!==e.infoSeverity&&void 0!==e.infoSeverity&&t.setInfoSeverity(un.constructFromObject(e.infoSeverity)),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getAutoResolve(){return this.autoResolve}setAutoResolve(e){this.autoResolve=e}getCriticalSeverity(){return this.criticalSeverity}setCriticalSeverity(e){this.criticalSeverity=e}getWarningSeverity(){return this.warningSeverity}setWarningSeverity(e){this.warningSeverity=e}getInfoSeverity(){return this.infoSeverity}setInfoSeverity(e){this.infoSeverity=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getAutoResolve()&&null!==this.getAutoResolve()?{autoResolve:this.getAutoResolve()}:{},...void 0!==this.getCriticalSeverity()&&null!==this.getCriticalSeverity()?{criticalSeverity:this.getCriticalSeverity().toJson(!1)}:{},...void 0!==this.getWarningSeverity()&&null!==this.getWarningSeverity()?{warningSeverity:this.getWarningSeverity().toJson(!1)}:{},...void 0!==this.getInfoSeverity()&&null!==this.getInfoSeverity()?{infoSeverity:this.getInfoSeverity().toJson(!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"autoResolve"!==t||void 0!==this.autoResolve&&null!==this.autoResolve?"criticalSeverity"!==t||void 0!==this.criticalSeverity&&null!==this.criticalSeverity?"warningSeverity"!==t||void 0!==this.warningSeverity&&null!==this.warningSeverity?"infoSeverity"!==t||void 0!==this.infoSeverity&&null!==this.infoSeverity?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("infoSeverity","undefined or null"):new O("warningSeverity","undefined or null"):new O("criticalSeverity","undefined or null"):new O("autoResolve","undefined or null")}}function pn(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")}cn.prototype.autoResolve=void 0,cn.prototype.criticalSeverity=void 0,cn.prototype.warningSeverity=void 0,cn.prototype.infoSeverity=void 0,cn.prototype.$reserved=void 0,cn.prototype.$objectType=void 0,cn.prototype.$unknownFields=void 0;var vn=new WeakSet;class yn extends ze{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=vn),t.add(e),this.$objectType="monitoring.v4.serviceability.ClusterConfig",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,r,o;if(e){if(t=t||new yn,ze.constructFromObject(e,t,!0),e.hasOwnProperty("isEnabled")&&null!==e.isEnabled&&void 0!==e.isEnabled&&t.setIsEnabled(e.isEnabled),e.hasOwnProperty("lastModifiedByUser")&&null!==e.lastModifiedByUser&&void 0!==e.lastModifiedByUser&&t.setLastModifiedByUser(e.lastModifiedByUser),e.hasOwnProperty("lastModifiedTime")&&null!==e.lastModifiedTime&&void 0!==e.lastModifiedTime&&t.setLastModifiedTime(e.lastModifiedTime),e.hasOwnProperty("scheduleIntervalSeconds")&&null!==e.scheduleIntervalSeconds&&void 0!==e.scheduleIntervalSeconds&&t.setScheduleIntervalSeconds(e.scheduleIntervalSeconds),e.hasOwnProperty("configurableParameters")&&null!==e.configurableParameters&&void 0!==e.configurableParameters){for(o=[],i=e.configurableParameters,r=0;r<i.length;r++)s=rn.constructFromObject(i[r],void 0),o.push(s);t.setConfigurableParameters(o)}if(e.hasOwnProperty("alertConfig")&&null!==e.alertConfig&&void 0!==e.alertConfig&&t.setAlertConfig(cn.constructFromObject(e.alertConfig)),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getIsEnabled(){return this.isEnabled}setIsEnabled(e){this.isEnabled=e}getLastModifiedByUser(){return this.lastModifiedByUser}setLastModifiedByUser(e){this.lastModifiedByUser=e}getLastModifiedTime(){return this.lastModifiedTime}setLastModifiedTime(e){this.lastModifiedTime=e}getScheduleIntervalSeconds(){return this.scheduleIntervalSeconds}setScheduleIntervalSeconds(e){this.scheduleIntervalSeconds=e}getConfigurableParameters(){return this.configurableParameters}setConfigurableParameters(e){this.configurableParameters=e}getAlertConfig(){return this.alertConfig}setAlertConfig(e){this.alertConfig=e}toJson(e){return!1===e?{...void 0!==this.getIsEnabled()&&null!==this.getIsEnabled()?{isEnabled:this.getIsEnabled()}:{},...void 0!==this.getLastModifiedByUser()&&null!==this.getLastModifiedByUser()?{lastModifiedByUser:this.getLastModifiedByUser()}:{},...void 0!==this.getLastModifiedTime()&&null!==this.getLastModifiedTime()?{lastModifiedTime:pn(vn,this,gn).call(this,this.getLastModifiedTime(),!1)}:{},...void 0!==this.getScheduleIntervalSeconds()&&null!==this.getScheduleIntervalSeconds()?{scheduleIntervalSeconds:this.getScheduleIntervalSeconds()}:{},...void 0!==this.getConfigurableParameters()&&null!==this.getConfigurableParameters()?{configurableParameters:this.getConfigurableParameters().map(e=>e.toJson(!1))}:{},...void 0!==this.getAlertConfig()&&null!==this.getAlertConfig()?{alertConfig:this.getAlertConfig().toJson(!1)}:{},...void 0!==this.getExtId()&&null!==this.getExtId()?{extId:this.getExtId()}:{},...void 0!==this.getLinks()&&null!==this.getLinks()?{links:this.getLinks().map(e=>e.toJson(!1))}:{},...void 0!==this.getTenantId()&&null!==this.getTenantId()?{tenantId:this.getTenantId()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getIsEnabled()&&null!==this.getIsEnabled()?{isEnabled:this.getIsEnabled()}:{},...void 0!==this.getScheduleIntervalSeconds()&&null!==this.getScheduleIntervalSeconds()?{scheduleIntervalSeconds:this.getScheduleIntervalSeconds()}:{},...void 0!==this.getConfigurableParameters()&&null!==this.getConfigurableParameters()?{configurableParameters:this.getConfigurableParameters().map(e=>e.toJson(!1))}:{},...void 0!==this.getAlertConfig()&&null!==this.getAlertConfig()?{alertConfig:this.getAlertConfig().toJson(!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("isEnabled"===t&&(void 0===this.isEnabled||null===this.isEnabled))return new O("isEnabled","undefined or null");if("lastModifiedByUser"===t&&(void 0===this.lastModifiedByUser||null===this.lastModifiedByUser))return new O("lastModifiedByUser","undefined or null");if("lastModifiedTime"===t&&(void 0===this.lastModifiedTime||null===this.lastModifiedTime))return new O("lastModifiedTime","undefined or null");if("scheduleIntervalSeconds"===t&&(void 0===this.scheduleIntervalSeconds||null===this.scheduleIntervalSeconds))return new O("scheduleIntervalSeconds","undefined or null");if("configurableParameters"===t){if(void 0===this.configurableParameters||null===this.configurableParameters)return new O("configurableParameters","undefined or null");if(!F.validateMaxItems(this.configurableParameters,5))return new O("configurableParameters","does not satisfy required maxItems constraint: 5")}return"alertConfig"!==t||void 0!==this.alertConfig&&null!==this.alertConfig?new O(t,"no such property exists"):new O("alertConfig","undefined or null")}}function gn(e,t){return e instanceof Date&&void 0!==t?t?e.toISOString().slice(0,10):e.toISOString():e}yn.prototype.isEnabled=void 0,yn.prototype.lastModifiedByUser=void 0,yn.prototype.lastModifiedTime=void 0,yn.prototype.scheduleIntervalSeconds=void 0,yn.prototype.configurableParameters=void 0,yn.prototype.alertConfig=void 0,ze.prototype.extId=void 0,ze.prototype.links=void 0,Be.prototype.tenantId=void 0;const mn={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",PC:"PC",PE:"PE",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(mn).find(t=>mn[t]===e);return null==t?mn.$UNKNOWN:mn[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case mn.$UNKNOWN:case mn.$REDACTED:case mn.PC:case mn.PE:return;default:throw new Error("Invalid : must be ClusterType.{ $UNKNOWN|$REDACTED|PC|PE }")}}};Object.freeze(mn);const fn=mn,$n={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",DISK:"DISK",VIRTUAL_DISK:"VIRTUAL_DISK",VM:"VM",CONTAINER:"CONTAINER",HOST:"HOST",CLUSTER:"CLUSTER",VOLUME_GROUP:"VOLUME_GROUP",FILE_SERVER:"FILE_SERVER",HOST_NIC:"HOST_NIC",RECOVERY_PLAN:"RECOVERY_PLAN",PROTECTION_DOMAIN:"PROTECTION_DOMAIN",PROTECTION_RULE:"PROTECTION_RULE",ACTION_RULE_RESULT:"ACTION_RULE_RESULT",AVAILABILITY_ZONE_PHYSICAL:"AVAILABILITY_ZONE_PHYSICAL",CONSISTENCY_GROUP_CONFIG:"CONSISTENCY_GROUP_CONFIG",OVA:"OVA",VOLUME_GROUP_CONFIG:"VOLUME_GROUP_CONFIG",VPN_CONNECTION:"VPN_CONNECTION",REMOTE_SITE:"REMOTE_SITE",STORAGE_POOL:"STORAGE_POOL",LAYER2_STRETCH:"LAYER2_STRETCH",ATLAS_VIRTUAL_NETWORK:"ATLAS_VIRTUAL_NETWORK",IPFIX_EXPORTER:"IPFIX_EXPORTER",ATLAS_ROUTING_POLICY:"ATLAS_ROUTING_POLICY",BGP_SESSION:"BGP_SESSION",MSP:"MSP",VPN_GATEWAY:"VPN_GATEWAY",ATLAS_LOAD_BALANCER_SESSION:"ATLAS_LOAD_BALANCER_SESSION",ATLAS_FLOW_GATEWAY:"ATLAS_FLOW_GATEWAY",PRISM_CENTRAL:"PRISM_CENTRAL",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys($n).find(t=>$n[t]===e);return null==t?$n.$UNKNOWN:$n[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case $n.$UNKNOWN:case $n.$REDACTED:case $n.DISK:case $n.VIRTUAL_DISK:case $n.VM:case $n.CONTAINER:case $n.HOST:case $n.CLUSTER:case $n.VOLUME_GROUP:case $n.FILE_SERVER:case $n.HOST_NIC:case $n.RECOVERY_PLAN:case $n.PROTECTION_DOMAIN:case $n.PROTECTION_RULE:case $n.ACTION_RULE_RESULT:case $n.AVAILABILITY_ZONE_PHYSICAL:case $n.CONSISTENCY_GROUP_CONFIG:case $n.OVA:case $n.VOLUME_GROUP_CONFIG:case $n.VPN_CONNECTION:case $n.REMOTE_SITE:case $n.STORAGE_POOL:case $n.LAYER2_STRETCH:case $n.ATLAS_VIRTUAL_NETWORK:case $n.IPFIX_EXPORTER:case $n.ATLAS_ROUTING_POLICY:case $n.BGP_SESSION:case $n.MSP:case $n.VPN_GATEWAY:case $n.ATLAS_LOAD_BALANCER_SESSION:case $n.ATLAS_FLOW_GATEWAY:case $n.PRISM_CENTRAL:return;default:throw new Error("Invalid : must be EntityType.{ $UNKNOWN|$REDACTED|DISK|VIRTUAL_DISK|VM|CONTAINER|HOST|CLUSTER|VOLUME_GROUP|FILE_SERVER|HOST_NIC|RECOVERY_PLAN|PROTECTION_DOMAIN|PROTECTION_RULE|ACTION_RULE_RESULT|AVAILABILITY_ZONE_PHYSICAL|CONSISTENCY_GROUP_CONFIG|OVA|VOLUME_GROUP_CONFIG|VPN_CONNECTION|REMOTE_SITE|STORAGE_POOL|LAYER2_STRETCH|ATLAS_VIRTUAL_NETWORK|IPFIX_EXPORTER|ATLAS_ROUTING_POLICY|BGP_SESSION|MSP|VPN_GATEWAY|ATLAS_LOAD_BALANCER_SESSION|ATLAS_FLOW_GATEWAY|PRISM_CENTRAL }")}}};Object.freeze($n);const wn=$n,Tn={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",CLUSTER:"CLUSTER",NODE:"NODE",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(Tn).find(t=>Tn[t]===e);return null==t?Tn.$UNKNOWN:Tn[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case Tn.$UNKNOWN:case Tn.$REDACTED:case Tn.CLUSTER:case Tn.NODE:return;default:throw new Error("Invalid : must be Scope.{ $UNKNOWN|$REDACTED|CLUSTER|NODE }")}}};Object.freeze(Tn);const bn=Tn,kn={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",SCHEDULED:"SCHEDULED",NOT_SCHEDULED:"NOT_SCHEDULED",EVENT_DRIVEN:"EVENT_DRIVEN",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(kn).find(t=>kn[t]===e);return null==t?kn.$UNKNOWN:kn[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case kn.$UNKNOWN:case kn.$REDACTED:case kn.SCHEDULED:case kn.NOT_SCHEDULED:case kn.EVENT_DRIVEN:return;default:throw new Error("Invalid : must be SdaSubType.{ $UNKNOWN|$REDACTED|SCHEDULED|NOT_SCHEDULED|EVENT_DRIVEN }")}}};Object.freeze(kn);const Fn=kn,On={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",HEALTH_CHECK:"HEALTH_CHECK",SERVICE_DEFINED:"SERVICE_DEFINED",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(On).find(t=>On[t]===e);return null==t?On.$UNKNOWN:On[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case On.$UNKNOWN:case On.$REDACTED:case On.HEALTH_CHECK:case On.SERVICE_DEFINED:return;default:throw new Error("Invalid : must be SdaType.{ $UNKNOWN|$REDACTED|HEALTH_CHECK|SERVICE_DEFINED }")}}};Object.freeze(On);const jn=On;var En=new WeakSet;class Pn extends Be{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=En),t.add(e),this.$objectType="monitoring.v4.serviceability.SystemDefinedPolicy",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,r,o;if(e){if(t=t||new Pn,Be.constructFromObject(e,t,!0),e.hasOwnProperty("extId")&&null!==e.extId&&void 0!==e.extId&&t.setExtId(e.extId),e.hasOwnProperty("links")&&null!==e.links&&void 0!==e.links){for(o=[],i=e.links,r=0;r<i.length;r++)s=J.constructFromObject(i[r],void 0),o.push(s);t.setLinks(o)}if(e.hasOwnProperty("name")&&null!==e.name&&void 0!==e.name&&t.setName(e.name),e.hasOwnProperty("description")&&null!==e.description&&void 0!==e.description&&t.setDescription(e.description),e.hasOwnProperty("policyId")&&null!==e.policyId&&void 0!==e.policyId&&t.setPolicyId(e.policyId),e.hasOwnProperty("title")&&null!==e.title&&void 0!==e.title&&t.setTitle(e.title),e.hasOwnProperty("type")&&null!==e.type&&void 0!==e.type&&t.setType(jn.constructFromObject(e.type)),e.hasOwnProperty("subType")&&null!==e.subType&&void 0!==e.subType&&t.setSubType(Fn.constructFromObject(e.subType)),e.hasOwnProperty("scope")&&null!==e.scope&&void 0!==e.scope&&t.setScope(bn.constructFromObject(e.scope)),e.hasOwnProperty("entityType")&&null!==e.entityType&&void 0!==e.entityType&&t.setEntityType(wn.constructFromObject(e.entityType)),e.hasOwnProperty("classifications")&&null!==e.classifications&&void 0!==e.classifications){for(o=[],i=e.classifications,r=0;r<i.length;r++)o.push(i[r]);t.setClassifications(o)}if(e.hasOwnProperty("impactTypes")&&null!==e.impactTypes&&void 0!==e.impactTypes){for(o=[],i=e.impactTypes,r=0;r<i.length;r++)s=Qe.constructFromObject(i[r],void 0),o.push(s);t.setImpactTypes(o)}if(e.hasOwnProperty("kbArticles")&&null!==e.kbArticles&&void 0!==e.kbArticles){for(o=[],i=e.kbArticles,r=0;r<i.length;r++)o.push(i[r]);t.setKbArticles(o)}if(e.hasOwnProperty("targetClusters")&&null!==e.targetClusters&&void 0!==e.targetClusters){for(o=[],i=e.targetClusters,r=0;r<i.length;r++)s=fn.constructFromObject(i[r],void 0),o.push(s);t.setTargetClusters(o)}if(e.hasOwnProperty("publisher")&&null!==e.publisher&&void 0!==e.publisher&&t.setPublisher(e.publisher),e.hasOwnProperty("clusterConfigs")&&null!==e.clusterConfigs&&void 0!==e.clusterConfigs){for(o=[],i=e.clusterConfigs,r=0;r<i.length;r++)s=yn.constructFromObject(i[r],void 0),o.push(s);t.setClusterConfigs(o)}if(!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getExtId(){return this.extId}setExtId(e){this.extId=e}getLinks(){return this.links}setLinks(e){this.links=e}getName(){return this.name}setName(e){this.name=e}getDescription(){return this.description}setDescription(e){this.description=e}getPolicyId(){return this.policyId}setPolicyId(e){this.policyId=e}getTitle(){return this.title}setTitle(e){this.title=e}getType(){return this.type}setType(e){this.type=e}getSubType(){return this.subType}setSubType(e){this.subType=e}getScope(){return this.scope}setScope(e){this.scope=e}getEntityType(){return this.entityType}setEntityType(e){this.entityType=e}getClassifications(){return this.classifications}setClassifications(e){this.classifications=e}getImpactTypes(){return this.impactTypes}setImpactTypes(e){this.impactTypes=e}getKbArticles(){return this.kbArticles}setKbArticles(e){this.kbArticles=e}getTargetClusters(){return this.targetClusters}setTargetClusters(e){this.targetClusters=e}getPublisher(){return this.publisher}setPublisher(e){this.publisher=e}getClusterConfigs(){return this.clusterConfigs}setClusterConfigs(e){this.clusterConfigs=e}toJson(e){return!1===e?{...void 0!==this.getExtId()&&null!==this.getExtId()?{extId:this.getExtId()}:{},...void 0!==this.getLinks()&&null!==this.getLinks()?{links:this.getLinks().map(e=>e.toJson(!1))}:{},...void 0!==this.getName()&&null!==this.getName()?{name:this.getName()}:{},...void 0!==this.getDescription()&&null!==this.getDescription()?{description:this.getDescription()}:{},...void 0!==this.getPolicyId()&&null!==this.getPolicyId()?{policyId:this.getPolicyId()}:{},...void 0!==this.getTitle()&&null!==this.getTitle()?{title:this.getTitle()}:{},...void 0!==this.getType()&&null!==this.getType()?{type:this.getType()}:{},...void 0!==this.getSubType()&&null!==this.getSubType()?{subType:this.getSubType()}:{},...void 0!==this.getScope()&&null!==this.getScope()?{scope:this.getScope()}:{},...void 0!==this.getEntityType()&&null!==this.getEntityType()?{entityType:this.getEntityType()}:{},...void 0!==this.getClassifications()&&null!==this.getClassifications()?{classifications:this.getClassifications()}:{},...void 0!==this.getImpactTypes()&&null!==this.getImpactTypes()?{impactTypes:this.getImpactTypes()}:{},...void 0!==this.getKbArticles()&&null!==this.getKbArticles()?{kbArticles:this.getKbArticles()}:{},...void 0!==this.getTargetClusters()&&null!==this.getTargetClusters()?{targetClusters:this.getTargetClusters()}:{},...void 0!==this.getPublisher()&&null!==this.getPublisher()?{publisher:this.getPublisher()}:{},...void 0!==this.getClusterConfigs()&&null!==this.getClusterConfigs()?{clusterConfigs:this.getClusterConfigs().map(e=>e.toJson(!1))}:{},...void 0!==this.getTenantId()&&null!==this.getTenantId()?{tenantId:this.getTenantId()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getExtId()&&null!==this.getExtId()?{extId:this.getExtId()}:{},...void 0!==this.getName()&&null!==this.getName()?{name:this.getName()}:{},...void 0!==this.getDescription()&&null!==this.getDescription()?{description:this.getDescription()}:{},...void 0!==this.getPolicyId()&&null!==this.getPolicyId()?{policyId:this.getPolicyId()}:{},...void 0!==this.getTitle()&&null!==this.getTitle()?{title:this.getTitle()}:{},...void 0!==this.getType()&&null!==this.getType()?{type:this.getType()}:{},...void 0!==this.getSubType()&&null!==this.getSubType()?{subType:this.getSubType()}:{},...void 0!==this.getScope()&&null!==this.getScope()?{scope:this.getScope()}:{},...void 0!==this.getEntityType()&&null!==this.getEntityType()?{entityType:this.getEntityType()}:{},...void 0!==this.getClassifications()&&null!==this.getClassifications()?{classifications:this.getClassifications()}:{},...void 0!==this.getImpactTypes()&&null!==this.getImpactTypes()?{impactTypes:this.getImpactTypes()}:{},...void 0!==this.getKbArticles()&&null!==this.getKbArticles()?{kbArticles:this.getKbArticles()}:{},...void 0!==this.getTargetClusters()&&null!==this.getTargetClusters()?{targetClusters:this.getTargetClusters()}:{},...void 0!==this.getPublisher()&&null!==this.getPublisher()?{publisher:this.getPublisher()}:{},...void 0!==this.getClusterConfigs()&&null!==this.getClusterConfigs()?{clusterConfigs:this.getClusterConfigs().map(e=>e.toJson(!1))}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("extId"===t){if(void 0===this.extId||null===this.extId)return new O("extId","undefined or null");if(!F.validateMaxLength(this.extId,100))return new O("extId","does not satisfy required maxLength constraint: 100");if(!F.validatePattern(this.extId,/^\\d+$/))return new O("extId","does not satisfy required pattern: /^\\d+$/")}if("links"===t){if(void 0===this.links||null===this.links)return new O("links","undefined or null");if(!F.validateMaxItems(this.links,20))return new O("links","does not satisfy required maxItems constraint: 20")}if("name"===t){if(void 0===this.name||null===this.name)return new O("name","undefined or null");if(!F.validateMaxLength(this.name,1e3))return new O("name","does not satisfy required maxLength constraint: 1000")}if("description"===t){if(void 0===this.description||null===this.description)return new O("description","undefined or null");if(!F.validateMaxLength(this.description,400))return new O("description","does not satisfy required maxLength constraint: 400")}if("policyId"===t){if(void 0===this.policyId||null===this.policyId)return new O("policyId","undefined or null");if(!F.validatePattern(this.policyId,/^{A}\\d+$/))return new O("policyId","does not satisfy required pattern: /^{A}\\d+$/")}if("title"===t){if(void 0===this.title||null===this.title)return new O("title","undefined or null");if(!F.validateMaxLength(this.title,250))return new O("title","does not satisfy required maxLength constraint: 250")}if("type"===t&&(void 0===this.type||null===this.type))return new O("type","undefined or null");if("subType"===t&&(void 0===this.subType||null===this.subType))return new O("subType","undefined or null");if("scope"===t&&(void 0===this.scope||null===this.scope))return new O("scope","undefined or null");if("entityType"===t&&(void 0===this.entityType||null===this.entityType))return new O("entityType","undefined or null");if("classifications"===t){if(void 0===this.classifications||null===this.classifications)return new O("classifications","undefined or null");if(!F.validateMaxItems(this.classifications,15))return new O("classifications","does not satisfy required maxItems constraint: 15")}if("impactTypes"===t){if(void 0===this.impactTypes||null===this.impactTypes)return new O("impactTypes","undefined or null");if(!F.validateMaxItems(this.impactTypes,8))return new O("impactTypes","does not satisfy required maxItems constraint: 8")}if("kbArticles"===t){if(void 0===this.kbArticles||null===this.kbArticles)return new O("kbArticles","undefined or null");if(!F.validateMaxItems(this.kbArticles,10))return new O("kbArticles","does not satisfy required maxItems constraint: 10")}if("targetClusters"===t){if(void 0===this.targetClusters||null===this.targetClusters)return new O("targetClusters","undefined or null");if(!F.validateMaxItems(this.targetClusters,2))return new O("targetClusters","does not satisfy required maxItems constraint: 2");if(!F.validateMinItems(this.targetClusters,1))return new O("targetClusters","does not satisfy required minItems constraint: 1")}if("publisher"===t){if(void 0===this.publisher||null===this.publisher)return new O("publisher","undefined or null");if(!F.validateMinLength(this.publisher,1))return new O("publisher","does not satisfy required minLength constraint: 1")}if("clusterConfigs"===t){if(void 0===this.clusterConfigs||null===this.clusterConfigs)return new O("clusterConfigs","undefined or null");if(!F.validateMaxItems(this.clusterConfigs,350))return new O("clusterConfigs","does not satisfy required maxItems constraint: 350");if(!F.validateMinItems(this.clusterConfigs,1))return new O("clusterConfigs","does not satisfy required minItems constraint: 1")}return new O(t,"no such property exists")}}function An(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")}Pn.prototype.extId=void 0,Pn.prototype.links=void 0,Pn.prototype.name=void 0,Pn.prototype.description=void 0,Pn.prototype.policyId=void 0,Pn.prototype.title=void 0,Pn.prototype.type=void 0,Pn.prototype.subType=void 0,Pn.prototype.scope=void 0,Pn.prototype.entityType=void 0,Pn.prototype.classifications=void 0,Pn.prototype.impactTypes=void 0,Pn.prototype.kbArticles=void 0,Pn.prototype.targetClusters=["PE"],Pn.prototype.publisher="NCC",Pn.prototype.clusterConfigs=void 0,Be.prototype.tenantId=void 0;var Cn=new WeakSet;class In extends r{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=Cn),t.add(e),this.$objectType="monitoring.v4.serviceability.GetSdaPolicyApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i;if(e){if(t=t||new In,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(B.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(i=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,i){case"monitoring.v4.serviceability.SystemDefinedPolicy":t.setData(Pn.constructFromObject(e.data,void 0));break;case"monitoring.v4.error.ErrorResponse":t.setData(Je.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+i+" in data"}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMetadata(){return this.metadata}setMetadata(e){this.metadata=e}getData(){return this.data}setData(e){this.data=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson(!1):Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson(!1):e):An(Cn,this,Un).call(this,this.getData(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson():Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson():e):An(Cn,this,Un).call(this,this.getData())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"metadata"!==t||void 0!==this.metadata&&null!==this.metadata?"data"!==t||void 0!==this.data&&null!==this.data?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("data","undefined or null"):new O("metadata","undefined or null")}}function Un(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}In.prototype.metadata=void 0,In.prototype.data=void 0,In.prototype.$reserved=void 0,In.prototype.$objectType=void 0,In.prototype.$unknownFields=void 0;class Dn extends yn{constructor(){super(),this.$objectType="monitoring.v4.serviceability.ClusterConfigProjection",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new Dn,yn.constructFromObject(e,t,!0),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return new O(t,"no such property exists")}}function Sn(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")}var Rn=new WeakSet;class Nn extends r{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=Rn),t.add(e),this.$objectType="monitoring.v4.serviceability.ListClusterConfigsApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,o,a,l;if(e){if(t=t||new Nn,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(B.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)if(Array.isArray(e.data))if(0===e.data.length)t.setData([]);else{for(a=[],i=e.data,l=i[0].hasOwnProperty("$objectType")?i[0].$objectType:typeof i[0],o=0;o<i.length;o++)switch(l){case"monitoring.v4.serviceability.ClusterConfig":s=yn.constructFromObject(i[o],void 0),a.push(s);break;case"monitoring.v4.serviceability.ClusterConfigProjection":s=Dn.constructFromObject(i[o],void 0),a.push(s);break;default:throw"Unknown list of type "+l+" in data"}t.setData(a)}else{if(l=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,"monitoring.v4.error.ErrorResponse"!==l)throw"Unknown datatype "+l+" in data";t.setData(Je.constructFromObject(e.data,void 0))}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMetadata(){return this.metadata}setMetadata(e){this.metadata=e}getData(){return this.data}setData(e){this.data=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson(!1):Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson(!1):e):Sn(Rn,this,xn).call(this,this.getData(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson():Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson():e):Sn(Rn,this,xn).call(this,this.getData())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"metadata"!==t||void 0!==this.metadata&&null!==this.metadata?"data"!==t||void 0!==this.data&&null!==this.data?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("data","undefined or null"):new O("metadata","undefined or null")}}function xn(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}function Mn(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")}Nn.prototype.metadata=void 0,Nn.prototype.data=void 0,Nn.prototype.$reserved=void 0,Nn.prototype.$objectType=void 0,Nn.prototype.$unknownFields=void 0;var Vn=new WeakSet;class Ln extends r{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=Vn),t.add(e),this.$objectType="monitoring.v4.serviceability.GetClusterConfigApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i;if(e){if(t=t||new Ln,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(B.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(i=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,i){case"monitoring.v4.serviceability.ClusterConfig":t.setData(yn.constructFromObject(e.data,void 0));break;case"monitoring.v4.error.ErrorResponse":t.setData(Je.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+i+" in data"}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMetadata(){return this.metadata}setMetadata(e){this.metadata=e}getData(){return this.data}setData(e){this.data=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson(!1):Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson(!1):e):Mn(Vn,this,Jn).call(this,this.getData(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson():Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson():e):Mn(Vn,this,Jn).call(this,this.getData())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"metadata"!==t||void 0!==this.metadata&&null!==this.metadata?"data"!==t||void 0!==this.data&&null!==this.data?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("data","undefined or null"):new O("metadata","undefined or null")}}function Jn(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}Ln.prototype.metadata=void 0,Ln.prototype.data=void 0,Ln.prototype.$reserved=void 0,Ln.prototype.$objectType=void 0,Ln.prototype.$unknownFields=void 0;var _n=new WeakSet;class Wn{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=_n),t.add(e),this.$objectType="prism.v4.config.TaskReference",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new Wn,e.hasOwnProperty("extId")&&null!==e.extId&&void 0!==e.extId&&t.setExtId(e.extId),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getExtId(){return this.extId}setExtId(e){this.extId=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getExtId()&&null!==this.getExtId()?{extId:this.getExtId()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("extId"===t){if(void 0===this.extId||null===this.extId)return new O("extId","undefined or null");if(!F.validatePattern(this.extId,/^[a-zA-Z0-9\/+]*={0,2}:[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/))return new O("extId","does not satisfy required pattern: /^[a-zA-Z0-9/+]*={0,2}:[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/")}return"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null")}}function Bn(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")}Wn.prototype.extId=void 0,Wn.prototype.$reserved=void 0,Wn.prototype.$objectType=void 0,Wn.prototype.$unknownFields=void 0;var Gn=new WeakSet;class zn extends r{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=Gn),t.add(e),this.$objectType="monitoring.v4.serviceability.UpdateClusterConfigApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i;if(e){if(t=t||new zn,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(B.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(i=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,i){case"prism.v4.config.TaskReference":t.setData(Wn.constructFromObject(e.data,void 0));break;case"monitoring.v4.error.ErrorResponse":t.setData(Je.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+i+" in data"}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMetadata(){return this.metadata}setMetadata(e){this.metadata=e}getData(){return this.data}setData(e){this.data=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson(!1):Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson(!1):e):Bn(Gn,this,qn).call(this,this.getData(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson():Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson():e):Bn(Gn,this,qn).call(this,this.getData())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"metadata"!==t||void 0!==this.metadata&&null!==this.metadata?"data"!==t||void 0!==this.data&&null!==this.data?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("data","undefined or null"):new O("metadata","undefined or null")}}function qn(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}function Kn(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")}zn.prototype.metadata=void 0,zn.prototype.data=void 0,zn.prototype.$reserved=void 0,zn.prototype.$objectType=void 0,zn.prototype.$unknownFields=void 0;var Hn=new WeakSet;class Yn extends r{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=Hn),t.add(e),this.$objectType="monitoring.v4.serviceability.ListSdaPoliciesApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,o,a,l;if(e){if(t=t||new Yn,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(B.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)if(Array.isArray(e.data))if(0===e.data.length)t.setData([]);else{for(a=[],i=e.data,l=i[0].hasOwnProperty("$objectType")?i[0].$objectType:typeof i[0],o=0;o<i.length;o++){if("monitoring.v4.serviceability.SystemDefinedPolicy"!==l)throw"Unknown list of type "+l+" in data";s=Pn.constructFromObject(i[o],void 0),a.push(s)}t.setData(a)}else{if(l=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,"monitoring.v4.error.ErrorResponse"!==l)throw"Unknown datatype "+l+" in data";t.setData(Je.constructFromObject(e.data,void 0))}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMetadata(){return this.metadata}setMetadata(e){this.metadata=e}getData(){return this.data}setData(e){this.data=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson(!1):Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson(!1):e):Kn(Hn,this,Xn).call(this,this.getData(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson():Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson():e):Kn(Hn,this,Xn).call(this,this.getData())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"metadata"!==t||void 0!==this.metadata&&null!==this.metadata?"data"!==t||void 0!==this.data&&null!==this.data?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("data","undefined or null"):new O("metadata","undefined or null")}}function Xn(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}Yn.prototype.metadata=void 0,Yn.prototype.data=void 0,Yn.prototype.$reserved=void 0,Yn.prototype.$objectType=void 0,Yn.prototype.$unknownFields=void 0;var Qn=new WeakSet;class Zn{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=Qn),t.add(e),this.$objectType="monitoring.v4.serviceability.EmailConfigurationRule",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,r,o;if(e){if(t=t||new Zn,e.hasOwnProperty("clusterUuids")&&null!==e.clusterUuids&&void 0!==e.clusterUuids){for(o=[],i=e.clusterUuids,r=0;r<i.length;r++)o.push(i[r]);t.setClusterUuids(o)}if(e.hasOwnProperty("impactTypes")&&null!==e.impactTypes&&void 0!==e.impactTypes){for(o=[],i=e.impactTypes,r=0;r<i.length;r++)s=Qe.constructFromObject(i[r],void 0),o.push(s);t.setImpactTypes(o)}if(e.hasOwnProperty("hasGlobalEmailContactList")&&null!==e.hasGlobalEmailContactList&&void 0!==e.hasGlobalEmailContactList&&t.setHasGlobalEmailContactList(e.hasGlobalEmailContactList),e.hasOwnProperty("matchPhrases")&&null!==e.matchPhrases&&void 0!==e.matchPhrases){for(o=[],i=e.matchPhrases,r=0;r<i.length;r++)o.push(i[r]);t.setMatchPhrases(o)}if(e.hasOwnProperty("recipients")&&null!==e.recipients&&void 0!==e.recipients){for(o=[],i=e.recipients,r=0;r<i.length;r++)o.push(i[r]);t.setRecipients(o)}if(e.hasOwnProperty("severities")&&null!==e.severities&&void 0!==e.severities){for(o=[],i=e.severities,r=0;r<i.length;r++)s=kt.constructFromObject(i[r],void 0),o.push(s);t.setSeverities(o)}if(e.hasOwnProperty("isEnabled")&&null!==e.isEnabled&&void 0!==e.isEnabled&&t.setIsEnabled(e.isEnabled),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getClusterUuids(){return this.clusterUuids}setClusterUuids(e){this.clusterUuids=e}getImpactTypes(){return this.impactTypes}setImpactTypes(e){this.impactTypes=e}getHasGlobalEmailContactList(){return this.hasGlobalEmailContactList}setHasGlobalEmailContactList(e){this.hasGlobalEmailContactList=e}getMatchPhrases(){return this.matchPhrases}setMatchPhrases(e){this.matchPhrases=e}getRecipients(){return this.recipients}setRecipients(e){this.recipients=e}getSeverities(){return this.severities}setSeverities(e){this.severities=e}getIsEnabled(){return this.isEnabled}setIsEnabled(e){this.isEnabled=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getClusterUuids()&&null!==this.getClusterUuids()?{clusterUuids:this.getClusterUuids()}:{},...void 0!==this.getImpactTypes()&&null!==this.getImpactTypes()?{impactTypes:this.getImpactTypes()}:{},...void 0!==this.getHasGlobalEmailContactList()&&null!==this.getHasGlobalEmailContactList()?{hasGlobalEmailContactList:this.getHasGlobalEmailContactList()}:{},...void 0!==this.getMatchPhrases()&&null!==this.getMatchPhrases()?{matchPhrases:this.getMatchPhrases()}:{},...void 0!==this.getRecipients()&&null!==this.getRecipients()?{recipients:this.getRecipients()}:{},...void 0!==this.getSeverities()&&null!==this.getSeverities()?{severities:this.getSeverities()}:{},...void 0!==this.getIsEnabled()&&null!==this.getIsEnabled()?{isEnabled:this.getIsEnabled()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("clusterUuids"===t){if(void 0===this.clusterUuids||null===this.clusterUuids)return new O("clusterUuids","undefined or null");if(!F.validateMaxItems(this.clusterUuids,50))return new O("clusterUuids","does not satisfy required maxItems constraint: 50")}if("impactTypes"===t){if(void 0===this.impactTypes||null===this.impactTypes)return new O("impactTypes","undefined or null");if(!F.validateMaxItems(this.impactTypes,8))return new O("impactTypes","does not satisfy required maxItems constraint: 8")}if("hasGlobalEmailContactList"===t&&(void 0===this.hasGlobalEmailContactList||null===this.hasGlobalEmailContactList))return new O("hasGlobalEmailContactList","undefined or null");if("matchPhrases"===t){if(void 0===this.matchPhrases||null===this.matchPhrases)return new O("matchPhrases","undefined or null");if(!F.validateMaxItems(this.matchPhrases,100))return new O("matchPhrases","does not satisfy required maxItems constraint: 100")}if("recipients"===t){if(void 0===this.recipients||null===this.recipients)return new O("recipients","undefined or null");if(!F.validateMaxItems(this.recipients,100))return new O("recipients","does not satisfy required maxItems constraint: 100")}if("severities"===t){if(void 0===this.severities||null===this.severities)return new O("severities","undefined or null");if(!F.validateMaxItems(this.severities,3))return new O("severities","does not satisfy required maxItems constraint: 3")}return"isEnabled"!==t||void 0!==this.isEnabled&&null!==this.isEnabled?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("isEnabled","undefined or null")}}Zn.prototype.clusterUuids=void 0,Zn.prototype.impactTypes=void 0,Zn.prototype.hasGlobalEmailContactList=!1,Zn.prototype.matchPhrases=void 0,Zn.prototype.recipients=void 0,Zn.prototype.severities=void 0,Zn.prototype.isEnabled=!0,Zn.prototype.$reserved=void 0,Zn.prototype.$objectType=void 0,Zn.prototype.$unknownFields=void 0;var ei=new WeakSet;class ti{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=ei),t.add(e),this.$objectType="monitoring.v4.serviceability.EmailTemplate",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new ti,e.hasOwnProperty("bodySuffix")&&null!==e.bodySuffix&&void 0!==e.bodySuffix&&t.setBodySuffix(e.bodySuffix),e.hasOwnProperty("subjectPrefix")&&null!==e.subjectPrefix&&void 0!==e.subjectPrefix&&t.setSubjectPrefix(e.subjectPrefix),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getBodySuffix(){return this.bodySuffix}setBodySuffix(e){this.bodySuffix=e}getSubjectPrefix(){return this.subjectPrefix}setSubjectPrefix(e){this.subjectPrefix=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getBodySuffix()&&null!==this.getBodySuffix()?{bodySuffix:this.getBodySuffix()}:{},...void 0!==this.getSubjectPrefix()&&null!==this.getSubjectPrefix()?{subjectPrefix:this.getSubjectPrefix()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("bodySuffix"===t&&(void 0===this.bodySuffix||null===this.bodySuffix))return new O("bodySuffix","undefined or null");if("subjectPrefix"===t){if(void 0===this.subjectPrefix||null===this.subjectPrefix)return new O("subjectPrefix","undefined or null");if(!F.validateMaxLength(this.subjectPrefix,256))return new O("subjectPrefix","does not satisfy required maxLength constraint: 256")}return"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null")}}ti.prototype.bodySuffix=void 0,ti.prototype.subjectPrefix=void 0,ti.prototype.$reserved=void 0,ti.prototype.$objectType=void 0,ti.prototype.$unknownFields=void 0;const ni={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",SUCCESS:"SUCCESS",FAILED:"FAILED",RETRYING:"RETRYING",DISABLED:"DISABLED",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(ni).find(t=>ni[t]===e);return null==t?ni.$UNKNOWN:ni[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case ni.$UNKNOWN:case ni.$REDACTED:case ni.SUCCESS:case ni.FAILED:case ni.RETRYING:case ni.DISABLED:return;default:throw new Error("Invalid : must be ConnectionStatus.{ $UNKNOWN|$REDACTED|SUCCESS|FAILED|RETRYING|DISABLED }")}}};Object.freeze(ni);const ii=ni;var si=new WeakSet;class ri{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=si),t.add(e),this.$objectType="common.v1.config.KVStringPair",this.$reserved={$fv:"v1.r0"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new ri,e.hasOwnProperty("name")&&null!==e.name&&void 0!==e.name&&t.setName(e.name),e.hasOwnProperty("value")&&null!==e.value&&void 0!==e.value&&t.setValue(e.value),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getName(){return this.name}setName(e){this.name=e}getValue(){return this.value}setValue(e){this.value=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getName()&&null!==this.getName()?{name:this.getName()}:{},...void 0!==this.getValue()&&null!==this.getValue()?{value:this.getValue()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("name"===t){if(void 0===this.name||null===this.name)return new O("name","undefined or null");if(!F.validateMaxLength(this.name,128))return new O("name","does not satisfy required maxLength constraint: 128");if(!F.validateMinLength(this.name,3))return new O("name","does not satisfy required minLength constraint: 3")}return"value"!==t||void 0!==this.value&&null!==this.value?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("value","undefined or null")}}ri.prototype.name=void 0,ri.prototype.value="",ri.prototype.$reserved=void 0,ri.prototype.$objectType=void 0,ri.prototype.$unknownFields=void 0;var oi=new WeakSet;class ai{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=oi),t.add(e),this.$objectType="monitoring.v4.serviceability.ParameterizedMessage",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,r,o;if(e){if(t=t||new ai,e.hasOwnProperty("message")&&null!==e.message&&void 0!==e.message&&t.setMessage(e.message),e.hasOwnProperty("attributes")&&null!==e.attributes&&void 0!==e.attributes){for(o=[],i=e.attributes,r=0;r<i.length;r++)s=ri.constructFromObject(i[r],void 0),o.push(s);t.setAttributes(o)}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMessage(){return this.message}setMessage(e){this.message=e}getAttributes(){return this.attributes}setAttributes(e){this.attributes=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getMessage()&&null!==this.getMessage()?{message:this.getMessage()}:{},...void 0!==this.getAttributes()&&null!==this.getAttributes()?{attributes:this.getAttributes().map(e=>e.toJson(!1))}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("message"===t&&(void 0===this.message||null===this.message))return new O("message","undefined or null");if("attributes"===t){if(void 0===this.attributes||null===this.attributes)return new O("attributes","undefined or null");if(!F.validateMaxItems(this.attributes,100))return new O("attributes","does not satisfy required maxItems constraint: 100")}return"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null")}}function li(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")}ai.prototype.message=void 0,ai.prototype.attributes=void 0,ai.prototype.$reserved=void 0,ai.prototype.$objectType=void 0,ai.prototype.$unknownFields=void 0;var di=new WeakSet;class ui{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=di),t.add(e),this.$objectType="monitoring.v4.serviceability.CommunicationStatus",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new ui,e.hasOwnProperty("lastCheckedTime")&&null!==e.lastCheckedTime&&void 0!==e.lastCheckedTime&&t.setLastCheckedTime(e.lastCheckedTime),e.hasOwnProperty("lastChangedTime")&&null!==e.lastChangedTime&&void 0!==e.lastChangedTime&&t.setLastChangedTime(e.lastChangedTime),e.hasOwnProperty("lastSuccessfulTransmissionTime")&&null!==e.lastSuccessfulTransmissionTime&&void 0!==e.lastSuccessfulTransmissionTime&&t.setLastSuccessfulTransmissionTime(e.lastSuccessfulTransmissionTime),e.hasOwnProperty("status")&&null!==e.status&&void 0!==e.status&&t.setStatus(ii.constructFromObject(e.status)),e.hasOwnProperty("message")&&null!==e.message&&void 0!==e.message&&t.setMessage(ai.constructFromObject(e.message)),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getLastCheckedTime(){return this.lastCheckedTime}setLastCheckedTime(e){this.lastCheckedTime=e}getLastChangedTime(){return this.lastChangedTime}setLastChangedTime(e){this.lastChangedTime=e}getLastSuccessfulTransmissionTime(){return this.lastSuccessfulTransmissionTime}setLastSuccessfulTransmissionTime(e){this.lastSuccessfulTransmissionTime=e}getStatus(){return this.status}setStatus(e){this.status=e}getMessage(){return this.message}setMessage(e){this.message=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getLastCheckedTime()&&null!==this.getLastCheckedTime()?{lastCheckedTime:li(di,this,hi).call(this,this.getLastCheckedTime(),!1)}:{},...void 0!==this.getLastChangedTime()&&null!==this.getLastChangedTime()?{lastChangedTime:li(di,this,hi).call(this,this.getLastChangedTime(),!1)}:{},...void 0!==this.getLastSuccessfulTransmissionTime()&&null!==this.getLastSuccessfulTransmissionTime()?{lastSuccessfulTransmissionTime:li(di,this,hi).call(this,this.getLastSuccessfulTransmissionTime(),!1)}:{},...void 0!==this.getStatus()&&null!==this.getStatus()?{status:this.getStatus()}:{},...void 0!==this.getMessage()&&null!==this.getMessage()?{message:this.getMessage().toJson(!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"lastCheckedTime"!==t||void 0!==this.lastCheckedTime&&null!==this.lastCheckedTime?"lastChangedTime"!==t||void 0!==this.lastChangedTime&&null!==this.lastChangedTime?"lastSuccessfulTransmissionTime"!==t||void 0!==this.lastSuccessfulTransmissionTime&&null!==this.lastSuccessfulTransmissionTime?"status"!==t||void 0!==this.status&&null!==this.status?"message"!==t||void 0!==this.message&&null!==this.message?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("message","undefined or null"):new O("status","undefined or null"):new O("lastSuccessfulTransmissionTime","undefined or null"):new O("lastChangedTime","undefined or null"):new O("lastCheckedTime","undefined or null")}}function hi(e,t){return e instanceof Date&&void 0!==t?t?e.toISOString().slice(0,10):e.toISOString():e}ui.prototype.lastCheckedTime=void 0,ui.prototype.lastChangedTime=void 0,ui.prototype.lastSuccessfulTransmissionTime=void 0,ui.prototype.status=void 0,ui.prototype.message=void 0,ui.prototype.$reserved=void 0,ui.prototype.$objectType=void 0,ui.prototype.$unknownFields=void 0;var ci=new WeakSet;class pi{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=ci),t.add(e),this.$objectType="common.v1.config.FQDN",this.$reserved={$fv:"v1.r0"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new pi,e.hasOwnProperty("value")&&null!==e.value&&void 0!==e.value&&t.setValue(e.value),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getValue(){return this.value}setValue(e){this.value=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getValue()&&null!==this.getValue()?{value:this.getValue()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("value"===t){if(void 0===this.value||null===this.value)return new O("value","undefined or null");if(!F.validatePattern(this.value,/^([a-zA-Z0-9À-ÿ]+(?:-[a-zA-Z0-9À-ÿ]+)*\\.)+[a-zA-ZÀ-ÿ]{2,63}$/))return new O("value","does not satisfy required pattern: /^([a-zA-Z0-9À-ÿ]+(?:-[a-zA-Z0-9À-ÿ]+)*\\.)+[a-zA-ZÀ-ÿ]{2,63}$/")}return"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null")}}pi.prototype.value=void 0,pi.prototype.$reserved=void 0,pi.prototype.$objectType=void 0,pi.prototype.$unknownFields=void 0;var vi=new WeakSet;class yi{constructor(e){var t,n;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t=this,n=vi),n.add(t),this.value=e,this.$objectType="common.v1.config.IPv4Address",this.$reserved={$fv:"v1.r0"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new yi,e.hasOwnProperty("value")&&null!==e.value&&void 0!==e.value&&t.setValue(e.value),e.hasOwnProperty("prefixLength")&&null!==e.prefixLength&&void 0!==e.prefixLength&&t.setPrefixLength(e.prefixLength),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getValue(){return this.value}setValue(e){this.value=e}getPrefixLength(){return this.prefixLength}setPrefixLength(e){this.prefixLength=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getValue()&&null!==this.getValue()?{value:this.getValue()}:{},...void 0!==this.getPrefixLength()&&null!==this.getPrefixLength()?{prefixLength:this.getPrefixLength()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=["value"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("value"===t){if(void 0===this.value||null===this.value)return new O("value","undefined or null");if(!F.validatePattern(this.value,/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/))return new O("value","does not satisfy required pattern: /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/")}if("prefixLength"===t){if(void 0===this.prefixLength||null===this.prefixLength)return new O("prefixLength","undefined or null");if(!F.validateMaximum(this.prefixLength,32))return new O("prefixLength","does not satisfy required maximum constraint: 32");if(!F.validateMinimum(this.prefixLength,0))return new O("prefixLength","does not satisfy required minimum constraint: 0")}return"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null")}}yi.prototype.value=void 0,yi.prototype.prefixLength=32,yi.prototype.$reserved=void 0,yi.prototype.$objectType=void 0,yi.prototype.$unknownFields=void 0;var gi=new WeakSet;class mi{constructor(e){var t,n;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t=this,n=gi),n.add(t),this.value=e,this.$objectType="common.v1.config.IPv6Address",this.$reserved={$fv:"v1.r0"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new mi,e.hasOwnProperty("value")&&null!==e.value&&void 0!==e.value&&t.setValue(e.value),e.hasOwnProperty("prefixLength")&&null!==e.prefixLength&&void 0!==e.prefixLength&&t.setPrefixLength(e.prefixLength),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getValue(){return this.value}setValue(e){this.value=e}getPrefixLength(){return this.prefixLength}setPrefixLength(e){this.prefixLength=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getValue()&&null!==this.getValue()?{value:this.getValue()}:{},...void 0!==this.getPrefixLength()&&null!==this.getPrefixLength()?{prefixLength:this.getPrefixLength()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=["value"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("value"===t){if(void 0===this.value||null===this.value)return new O("value","undefined or null");if(!F.validatePattern(this.value,/^(?:(?:(?:[A-Fa-f0-9]{1,4}:){6}|(?=(?:[A-Fa-f0-9]{0,4}:){0,6}(?:[0-9]{1,3}\\.){3}[0-9]{1,3}$)(([0-9a-fA-F]{1,4}:){0,5}|:)((:[0-9a-fA-F]{1,4}){1,5}:|:)|::(?:[A-Fa-f0-9]{1,4}:){5})(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])|(?:[A-Fa-f0-9]{1,4}:){7}[A-Fa-f0-9]{1,4}|(?=(?:[A-Fa-f0-9]{0,4}:){0,7}[A-Fa-f0-9]{0,4}$)(([0-9a-fA-F]{1,4}:){1,7}|:)((:[0-9a-fA-F]{1,4}){1,7}|:)|(?:[A-Fa-f0-9]{1,4}:){7}:|:(:[A-Fa-f0-9]{1,4}){7})$/))return new O("value","does not satisfy required pattern: /^(?:(?:(?:[A-Fa-f0-9]{1,4}:){6}|(?=(?:[A-Fa-f0-9]{0,4}:){0,6}(?:[0-9]{1,3}\\.){3}[0-9]{1,3}$)(([0-9a-fA-F]{1,4}:){0,5}|:)((:[0-9a-fA-F]{1,4}){1,5}:|:)|::(?:[A-Fa-f0-9]{1,4}:){5})(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])|(?:[A-Fa-f0-9]{1,4}:){7}[A-Fa-f0-9]{1,4}|(?=(?:[A-Fa-f0-9]{0,4}:){0,7}[A-Fa-f0-9]{0,4}$)(([0-9a-fA-F]{1,4}:){1,7}|:)((:[0-9a-fA-F]{1,4}){1,7}|:)|(?:[A-Fa-f0-9]{1,4}:){7}:|:(:[A-Fa-f0-9]{1,4}){7})$/")}if("prefixLength"===t){if(void 0===this.prefixLength||null===this.prefixLength)return new O("prefixLength","undefined or null");if(!F.validateMaximum(this.prefixLength,128))return new O("prefixLength","does not satisfy required maximum constraint: 128");if(!F.validateMinimum(this.prefixLength,0))return new O("prefixLength","does not satisfy required minimum constraint: 0")}return"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null")}}mi.prototype.value=void 0,mi.prototype.prefixLength=128,mi.prototype.$reserved=void 0,mi.prototype.$objectType=void 0,mi.prototype.$unknownFields=void 0;var fi=new WeakSet;class $i{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=fi),t.add(e),this.$objectType="common.v1.config.IPAddressOrFQDN",this.$reserved={$fv:"v1.r0"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new $i,e.hasOwnProperty("ipv4")&&null!==e.ipv4&&void 0!==e.ipv4&&t.setIpv4(yi.constructFromObject(e.ipv4)),e.hasOwnProperty("ipv6")&&null!==e.ipv6&&void 0!==e.ipv6&&t.setIpv6(mi.constructFromObject(e.ipv6)),e.hasOwnProperty("fqdn")&&null!==e.fqdn&&void 0!==e.fqdn&&t.setFqdn(pi.constructFromObject(e.fqdn)),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getIpv4(){return this.ipv4}setIpv4(e){this.ipv4=e}getIpv6(){return this.ipv6}setIpv6(e){this.ipv6=e}getFqdn(){return this.fqdn}setFqdn(e){this.fqdn=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}hasIpv4(){return!(void 0===this.ipv4||null===this.ipv4)}hasIpv6(){return!(void 0===this.ipv6||null===this.ipv6)}hasFqdn(){return!(void 0===this.fqdn||null===this.fqdn)}isValid(){return this.hasIpv4()||this.hasIpv6()||this.hasFqdn()}toJson(e){return{...void 0!==this.getIpv4()&&null!==this.getIpv4()?{ipv4:this.getIpv4().toJson(!1)}:{},...void 0!==this.getIpv6()&&null!==this.getIpv6()?{ipv6:this.getIpv6().toJson(!1)}:{},...void 0!==this.getFqdn()&&null!==this.getFqdn()?{fqdn:this.getFqdn().toJson(!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"ipv4"!==t||void 0!==this.ipv4&&null!==this.ipv4?"ipv6"!==t||void 0!==this.ipv6&&null!==this.ipv6?"fqdn"!==t||void 0!==this.fqdn&&null!==this.fqdn?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("fqdn","undefined or null"):new O("ipv6","undefined or null"):new O("ipv4","undefined or null")}}$i.prototype.ipv4=void 0,$i.prototype.ipv6=void 0,$i.prototype.fqdn=void 0,$i.prototype.$reserved=void 0,$i.prototype.$objectType=void 0,$i.prototype.$unknownFields=void 0;const wi={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",HTTP:"HTTP",HTTPS:"HTTPS",SOCKS:"SOCKS",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(wi).find(t=>wi[t]===e);return null==t?wi.$UNKNOWN:wi[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case wi.$UNKNOWN:case wi.$REDACTED:case wi.HTTP:case wi.HTTPS:case wi.SOCKS:return;default:throw new Error("Invalid : must be ProxyType.{ $UNKNOWN|$REDACTED|HTTP|HTTPS|SOCKS }")}}};Object.freeze(wi);const Ti=wi;var bi=new WeakSet;class ki{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=bi),t.add(e),this.$objectType="monitoring.v4.serviceability.HttpProxy",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,r,o;if(e){if(t=t||new ki,e.hasOwnProperty("name")&&null!==e.name&&void 0!==e.name&&t.setName(e.name),e.hasOwnProperty("addressValue")&&null!==e.addressValue&&void 0!==e.addressValue&&t.setAddressValue($i.constructFromObject(e.addressValue)),e.hasOwnProperty("port")&&null!==e.port&&void 0!==e.port&&t.setPort(e.port),e.hasOwnProperty("username")&&null!==e.username&&void 0!==e.username&&t.setUsername(e.username),e.hasOwnProperty("password")&&null!==e.password&&void 0!==e.password&&t.setPassword(e.password),e.hasOwnProperty("proxyTypes")&&null!==e.proxyTypes&&void 0!==e.proxyTypes){for(o=[],i=e.proxyTypes,r=0;r<i.length;r++)s=Ti.constructFromObject(i[r],void 0),o.push(s);t.setProxyTypes(o)}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getName(){return this.name}setName(e){this.name=e}getAddressValue(){return this.addressValue}setAddressValue(e){this.addressValue=e}getPort(){return this.port}setPort(e){this.port=e}getUsername(){return this.username}setUsername(e){this.username=e}getPassword(){return this.password}setPassword(e){this.password=e}getProxyTypes(){return this.proxyTypes}setProxyTypes(e){this.proxyTypes=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getName()&&null!==this.getName()?{name:this.getName()}:{},...void 0!==this.getAddressValue()&&null!==this.getAddressValue()?{addressValue:this.getAddressValue().toJson(!1)}:{},...void 0!==this.getPort()&&null!==this.getPort()?{port:this.getPort()}:{},...void 0!==this.getUsername()&&null!==this.getUsername()?{username:this.getUsername()}:{},...void 0!==this.getPassword()&&null!==this.getPassword()?{password:this.getPassword()}:{},...void 0!==this.getProxyTypes()&&null!==this.getProxyTypes()?{proxyTypes:this.getProxyTypes()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("name"===t){if(void 0===this.name||null===this.name)return new O("name","undefined or null");if(!F.validateMaxLength(this.name,1e3))return new O("name","does not satisfy required maxLength constraint: 1000")}if("addressValue"===t&&(void 0===this.addressValue||null===this.addressValue))return new O("addressValue","undefined or null");if("port"===t){if(void 0===this.port||null===this.port)return new O("port","undefined or null");if(!F.validateMaximum(this.port,65536))return new O("port","does not satisfy required maximum constraint: 65536");if(!F.validateMinimum(this.port,0))return new O("port","does not satisfy required minimum constraint: 0")}if("username"===t){if(void 0===this.username||null===this.username)return new O("username","undefined or null");if(!F.validateMaxLength(this.username,255))return new O("username","does not satisfy required maxLength constraint: 255")}if("password"===t&&(void 0===this.password||null===this.password))return new O("password","undefined or null");if("proxyTypes"===t){if(void 0===this.proxyTypes||null===this.proxyTypes)return new O("proxyTypes","undefined or null");if(!F.validateMaxItems(this.proxyTypes,100))return new O("proxyTypes","does not satisfy required maxItems constraint: 100")}return"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null")}}ki.prototype.name=void 0,ki.prototype.addressValue=void 0,ki.prototype.port=void 0,ki.prototype.username=void 0,ki.prototype.password=void 0,ki.prototype.proxyTypes=void 0,ki.prototype.$reserved=void 0,ki.prototype.$objectType=void 0,ki.prototype.$unknownFields=void 0;var Fi=new WeakSet;class Oi{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=Fi),t.add(e),this.$objectType="monitoring.v4.serviceability.ServiceCenter",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new Oi,e.hasOwnProperty("name")&&null!==e.name&&void 0!==e.name&&t.setName(e.name),e.hasOwnProperty("ipAddress")&&null!==e.ipAddress&&void 0!==e.ipAddress&&t.setIpAddress(e.ipAddress),e.hasOwnProperty("username")&&null!==e.username&&void 0!==e.username&&t.setUsername(e.username),e.hasOwnProperty("port")&&null!==e.port&&void 0!==e.port&&t.setPort(e.port),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getName(){return this.name}setName(e){this.name=e}getIpAddress(){return this.ipAddress}setIpAddress(e){this.ipAddress=e}getUsername(){return this.username}setUsername(e){this.username=e}getPort(){return this.port}setPort(e){this.port=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getName()&&null!==this.getName()?{name:this.getName()}:{},...void 0!==this.getIpAddress()&&null!==this.getIpAddress()?{ipAddress:this.getIpAddress()}:{},...void 0!==this.getUsername()&&null!==this.getUsername()?{username:this.getUsername()}:{},...void 0!==this.getPort()&&null!==this.getPort()?{port:this.getPort()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("name"===t){if(void 0===this.name||null===this.name)return new O("name","undefined or null");if(!F.validateMaxLength(this.name,1e3))return new O("name","does not satisfy required maxLength constraint: 1000")}if("ipAddress"===t){if(void 0===this.ipAddress||null===this.ipAddress)return new O("ipAddress","undefined or null");if(!F.validatePattern(this.ipAddress,/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/))return new O("ipAddress","does not satisfy required pattern: /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/")}if("username"===t){if(void 0===this.username||null===this.username)return new O("username","undefined or null");if(!F.validateMaxLength(this.username,255))return new O("username","does not satisfy required maxLength constraint: 255")}if("port"===t){if(void 0===this.port||null===this.port)return new O("port","undefined or null");if(!F.validateMaximum(this.port,65536))return new O("port","does not satisfy required maximum constraint: 65536");if(!F.validateMinimum(this.port,0))return new O("port","does not satisfy required minimum constraint: 0")}return"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null")}}Oi.prototype.name=void 0,Oi.prototype.ipAddress=void 0,Oi.prototype.username=void 0,Oi.prototype.port=void 0,Oi.prototype.$reserved=void 0,Oi.prototype.$objectType=void 0,Oi.prototype.$unknownFields=void 0;var ji=new WeakSet;class Ei{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=ji),t.add(e),this.$objectType="monitoring.v4.serviceability.RemoteTunnelDetails",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new Ei,e.hasOwnProperty("httpProxy")&&null!==e.httpProxy&&void 0!==e.httpProxy&&t.setHttpProxy(ki.constructFromObject(e.httpProxy)),e.hasOwnProperty("serviceCenter")&&null!==e.serviceCenter&&void 0!==e.serviceCenter&&t.setServiceCenter(Oi.constructFromObject(e.serviceCenter)),e.hasOwnProperty("connectionStatus")&&null!==e.connectionStatus&&void 0!==e.connectionStatus&&t.setConnectionStatus(ui.constructFromObject(e.connectionStatus)),e.hasOwnProperty("transportStatus")&&null!==e.transportStatus&&void 0!==e.transportStatus&&t.setTransportStatus(ui.constructFromObject(e.transportStatus)),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getHttpProxy(){return this.httpProxy}setHttpProxy(e){this.httpProxy=e}getServiceCenter(){return this.serviceCenter}setServiceCenter(e){this.serviceCenter=e}getConnectionStatus(){return this.connectionStatus}setConnectionStatus(e){this.connectionStatus=e}getTransportStatus(){return this.transportStatus}setTransportStatus(e){this.transportStatus=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getHttpProxy()&&null!==this.getHttpProxy()?{httpProxy:this.getHttpProxy().toJson(!1)}:{},...void 0!==this.getServiceCenter()&&null!==this.getServiceCenter()?{serviceCenter:this.getServiceCenter().toJson(!1)}:{},...void 0!==this.getConnectionStatus()&&null!==this.getConnectionStatus()?{connectionStatus:this.getConnectionStatus().toJson(!1)}:{},...void 0!==this.getTransportStatus()&&null!==this.getTransportStatus()?{transportStatus:this.getTransportStatus().toJson(!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"httpProxy"!==t||void 0!==this.httpProxy&&null!==this.httpProxy?"serviceCenter"!==t||void 0!==this.serviceCenter&&null!==this.serviceCenter?"connectionStatus"!==t||void 0!==this.connectionStatus&&null!==this.connectionStatus?"transportStatus"!==t||void 0!==this.transportStatus&&null!==this.transportStatus?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("transportStatus","undefined or null"):new O("connectionStatus","undefined or null"):new O("serviceCenter","undefined or null"):new O("httpProxy","undefined or null")}}Ei.prototype.httpProxy=void 0,Ei.prototype.serviceCenter=void 0,Ei.prototype.connectionStatus=void 0,Ei.prototype.transportStatus=void 0,Ei.prototype.$reserved=void 0,Ei.prototype.$objectType=void 0,Ei.prototype.$unknownFields=void 0;var Pi=new WeakSet;class Ai extends ze{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=Pi),t.add(e),this.$objectType="monitoring.v4.serviceability.AlertEmailConfiguration",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,r,o;if(e){if(t=t||new Ai,ze.constructFromObject(e,t,!0),e.hasOwnProperty("defaultNutanixEmail")&&null!==e.defaultNutanixEmail&&void 0!==e.defaultNutanixEmail&&t.setDefaultNutanixEmail(e.defaultNutanixEmail),e.hasOwnProperty("isEnabled")&&null!==e.isEnabled&&void 0!==e.isEnabled&&t.setIsEnabled(e.isEnabled),e.hasOwnProperty("hasDefaultNutanixEmail")&&null!==e.hasDefaultNutanixEmail&&void 0!==e.hasDefaultNutanixEmail&&t.setHasDefaultNutanixEmail(e.hasDefaultNutanixEmail),e.hasOwnProperty("isEmailDigestEnabled")&&null!==e.isEmailDigestEnabled&&void 0!==e.isEmailDigestEnabled&&t.setIsEmailDigestEnabled(e.isEmailDigestEnabled),e.hasOwnProperty("isEmptyAlertEmailDigestSkipped")&&null!==e.isEmptyAlertEmailDigestSkipped&&void 0!==e.isEmptyAlertEmailDigestSkipped&&t.setIsEmptyAlertEmailDigestSkipped(e.isEmptyAlertEmailDigestSkipped),e.hasOwnProperty("emailConfigRules")&&null!==e.emailConfigRules&&void 0!==e.emailConfigRules){for(o=[],i=e.emailConfigRules,r=0;r<i.length;r++)s=Zn.constructFromObject(i[r],void 0),o.push(s);t.setEmailConfigRules(o)}if(e.hasOwnProperty("emailContactList")&&null!==e.emailContactList&&void 0!==e.emailContactList){for(o=[],i=e.emailContactList,r=0;r<i.length;r++)o.push(i[r]);t.setEmailContactList(o)}if(e.hasOwnProperty("emailTemplate")&&null!==e.emailTemplate&&void 0!==e.emailTemplate&&t.setEmailTemplate(ti.constructFromObject(e.emailTemplate)),e.hasOwnProperty("tunnelDetails")&&null!==e.tunnelDetails&&void 0!==e.tunnelDetails&&t.setTunnelDetails(Ei.constructFromObject(e.tunnelDetails)),e.hasOwnProperty("alertEmailDigestSendTime")&&null!==e.alertEmailDigestSendTime&&void 0!==e.alertEmailDigestSendTime&&t.setAlertEmailDigestSendTime(e.alertEmailDigestSendTime),e.hasOwnProperty("alertEmailDigestSendTimezone")&&null!==e.alertEmailDigestSendTimezone&&void 0!==e.alertEmailDigestSendTimezone&&t.setAlertEmailDigestSendTimezone(e.alertEmailDigestSendTimezone),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getDefaultNutanixEmail(){return this.defaultNutanixEmail}setDefaultNutanixEmail(e){this.defaultNutanixEmail=e}getIsEnabled(){return this.isEnabled}setIsEnabled(e){this.isEnabled=e}getHasDefaultNutanixEmail(){return this.hasDefaultNutanixEmail}setHasDefaultNutanixEmail(e){this.hasDefaultNutanixEmail=e}getIsEmailDigestEnabled(){return this.isEmailDigestEnabled}setIsEmailDigestEnabled(e){this.isEmailDigestEnabled=e}getIsEmptyAlertEmailDigestSkipped(){return this.isEmptyAlertEmailDigestSkipped}setIsEmptyAlertEmailDigestSkipped(e){this.isEmptyAlertEmailDigestSkipped=e}getEmailConfigRules(){return this.emailConfigRules}setEmailConfigRules(e){this.emailConfigRules=e}getEmailContactList(){return this.emailContactList}setEmailContactList(e){this.emailContactList=e}getEmailTemplate(){return this.emailTemplate}setEmailTemplate(e){this.emailTemplate=e}getTunnelDetails(){return this.tunnelDetails}setTunnelDetails(e){this.tunnelDetails=e}getAlertEmailDigestSendTime(){return this.alertEmailDigestSendTime}setAlertEmailDigestSendTime(e){this.alertEmailDigestSendTime=e}getAlertEmailDigestSendTimezone(){return this.alertEmailDigestSendTimezone}setAlertEmailDigestSendTimezone(e){this.alertEmailDigestSendTimezone=e}toJson(e){return!1===e?{...void 0!==this.getDefaultNutanixEmail()&&null!==this.getDefaultNutanixEmail()?{defaultNutanixEmail:this.getDefaultNutanixEmail()}:{},...void 0!==this.getIsEnabled()&&null!==this.getIsEnabled()?{isEnabled:this.getIsEnabled()}:{},...void 0!==this.getHasDefaultNutanixEmail()&&null!==this.getHasDefaultNutanixEmail()?{hasDefaultNutanixEmail:this.getHasDefaultNutanixEmail()}:{},...void 0!==this.getIsEmailDigestEnabled()&&null!==this.getIsEmailDigestEnabled()?{isEmailDigestEnabled:this.getIsEmailDigestEnabled()}:{},...void 0!==this.getIsEmptyAlertEmailDigestSkipped()&&null!==this.getIsEmptyAlertEmailDigestSkipped()?{isEmptyAlertEmailDigestSkipped:this.getIsEmptyAlertEmailDigestSkipped()}:{},...void 0!==this.getEmailConfigRules()&&null!==this.getEmailConfigRules()?{emailConfigRules:this.getEmailConfigRules().map(e=>e.toJson(!1))}:{},...void 0!==this.getEmailContactList()&&null!==this.getEmailContactList()?{emailContactList:this.getEmailContactList()}:{},...void 0!==this.getEmailTemplate()&&null!==this.getEmailTemplate()?{emailTemplate:this.getEmailTemplate().toJson(!1)}:{},...void 0!==this.getTunnelDetails()&&null!==this.getTunnelDetails()?{tunnelDetails:this.getTunnelDetails().toJson(!1)}:{},...void 0!==this.getAlertEmailDigestSendTime()&&null!==this.getAlertEmailDigestSendTime()?{alertEmailDigestSendTime:this.getAlertEmailDigestSendTime()}:{},...void 0!==this.getAlertEmailDigestSendTimezone()&&null!==this.getAlertEmailDigestSendTimezone()?{alertEmailDigestSendTimezone:this.getAlertEmailDigestSendTimezone()}:{},...void 0!==this.getExtId()&&null!==this.getExtId()?{extId:this.getExtId()}:{},...void 0!==this.getLinks()&&null!==this.getLinks()?{links:this.getLinks().map(e=>e.toJson(!1))}:{},...void 0!==this.getTenantId()&&null!==this.getTenantId()?{tenantId:this.getTenantId()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getDefaultNutanixEmail()&&null!==this.getDefaultNutanixEmail()?{defaultNutanixEmail:this.getDefaultNutanixEmail()}:{},...void 0!==this.getIsEnabled()&&null!==this.getIsEnabled()?{isEnabled:this.getIsEnabled()}:{},...void 0!==this.getHasDefaultNutanixEmail()&&null!==this.getHasDefaultNutanixEmail()?{hasDefaultNutanixEmail:this.getHasDefaultNutanixEmail()}:{},...void 0!==this.getIsEmailDigestEnabled()&&null!==this.getIsEmailDigestEnabled()?{isEmailDigestEnabled:this.getIsEmailDigestEnabled()}:{},...void 0!==this.getIsEmptyAlertEmailDigestSkipped()&&null!==this.getIsEmptyAlertEmailDigestSkipped()?{isEmptyAlertEmailDigestSkipped:this.getIsEmptyAlertEmailDigestSkipped()}:{},...void 0!==this.getEmailConfigRules()&&null!==this.getEmailConfigRules()?{emailConfigRules:this.getEmailConfigRules().map(e=>e.toJson(!1))}:{},...void 0!==this.getEmailContactList()&&null!==this.getEmailContactList()?{emailContactList:this.getEmailContactList()}:{},...void 0!==this.getEmailTemplate()&&null!==this.getEmailTemplate()?{emailTemplate:this.getEmailTemplate().toJson(!1)}:{},...void 0!==this.getTunnelDetails()&&null!==this.getTunnelDetails()?{tunnelDetails:this.getTunnelDetails().toJson(!1)}:{},...void 0!==this.getAlertEmailDigestSendTime()&&null!==this.getAlertEmailDigestSendTime()?{alertEmailDigestSendTime:this.getAlertEmailDigestSendTime()}:{},...void 0!==this.getAlertEmailDigestSendTimezone()&&null!==this.getAlertEmailDigestSendTimezone()?{alertEmailDigestSendTimezone:this.getAlertEmailDigestSendTimezone()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("defaultNutanixEmail"===t){if(void 0===this.defaultNutanixEmail||null===this.defaultNutanixEmail)return new O("defaultNutanixEmail","undefined or null");if(!F.validatePattern(this.defaultNutanixEmail,/^([a-zA-Z0-9_\\-\\.]+)@([a-zA-Z0-9_\\-\\.]+)\\.([a-zA-Z]{2,5})$/))return new O("defaultNutanixEmail","does not satisfy required pattern: /^([a-zA-Z0-9_\\-\\.]+)@([a-zA-Z0-9_\\-\\.]+)\\.([a-zA-Z]{2,5})$/")}if("isEnabled"===t&&(void 0===this.isEnabled||null===this.isEnabled))return new O("isEnabled","undefined or null");if("hasDefaultNutanixEmail"===t&&(void 0===this.hasDefaultNutanixEmail||null===this.hasDefaultNutanixEmail))return new O("hasDefaultNutanixEmail","undefined or null");if("isEmailDigestEnabled"===t&&(void 0===this.isEmailDigestEnabled||null===this.isEmailDigestEnabled))return new O("isEmailDigestEnabled","undefined or null");if("isEmptyAlertEmailDigestSkipped"===t&&(void 0===this.isEmptyAlertEmailDigestSkipped||null===this.isEmptyAlertEmailDigestSkipped))return new O("isEmptyAlertEmailDigestSkipped","undefined or null");if("emailConfigRules"===t){if(void 0===this.emailConfigRules||null===this.emailConfigRules)return new O("emailConfigRules","undefined or null");if(!F.validateMaxItems(this.emailConfigRules,100))return new O("emailConfigRules","does not satisfy required maxItems constraint: 100")}if("emailContactList"===t){if(void 0===this.emailContactList||null===this.emailContactList)return new O("emailContactList","undefined or null");if(!F.validateMaxItems(this.emailContactList,100))return new O("emailContactList","does not satisfy required maxItems constraint: 100")}return"emailTemplate"!==t||void 0!==this.emailTemplate&&null!==this.emailTemplate?"tunnelDetails"!==t||void 0!==this.tunnelDetails&&null!==this.tunnelDetails?"alertEmailDigestSendTime"!==t||void 0!==this.alertEmailDigestSendTime&&null!==this.alertEmailDigestSendTime?"alertEmailDigestSendTimezone"!==t||void 0!==this.alertEmailDigestSendTimezone&&null!==this.alertEmailDigestSendTimezone?new O(t,"no such property exists"):new O("alertEmailDigestSendTimezone","undefined or null"):new O("alertEmailDigestSendTime","undefined or null"):new O("tunnelDetails","undefined or null"):new O("emailTemplate","undefined or null")}}function Ci(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")}Ai.prototype.defaultNutanixEmail=void 0,Ai.prototype.isEnabled=!1,Ai.prototype.hasDefaultNutanixEmail=!1,Ai.prototype.isEmailDigestEnabled=!1,Ai.prototype.isEmptyAlertEmailDigestSkipped=!1,Ai.prototype.emailConfigRules=void 0,Ai.prototype.emailContactList=void 0,Ai.prototype.emailTemplate=void 0,Ai.prototype.tunnelDetails=void 0,Ai.prototype.alertEmailDigestSendTime=void 0,Ai.prototype.alertEmailDigestSendTimezone=void 0,ze.prototype.extId=void 0,ze.prototype.links=void 0,Be.prototype.tenantId=void 0;var Ii=new WeakSet;class Ui extends r{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=Ii),t.add(e),this.$objectType="monitoring.v4.serviceability.GetAlertEmailConfigurationApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i;if(e){if(t=t||new Ui,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(B.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(i=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,i){case"monitoring.v4.serviceability.AlertEmailConfiguration":t.setData(Ai.constructFromObject(e.data,void 0));break;case"monitoring.v4.error.ErrorResponse":t.setData(Je.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+i+" in data"}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMetadata(){return this.metadata}setMetadata(e){this.metadata=e}getData(){return this.data}setData(e){this.data=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson(!1):Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson(!1):e):Ci(Ii,this,Di).call(this,this.getData(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson():Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson():e):Ci(Ii,this,Di).call(this,this.getData())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"metadata"!==t||void 0!==this.metadata&&null!==this.metadata?"data"!==t||void 0!==this.data&&null!==this.data?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("data","undefined or null"):new O("metadata","undefined or null")}}function Di(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}function Si(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")}Ui.prototype.metadata=void 0,Ui.prototype.data=void 0,Ui.prototype.$reserved=void 0,Ui.prototype.$objectType=void 0,Ui.prototype.$unknownFields=void 0;var Ri=new WeakSet;class Ni extends r{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=Ri),t.add(e),this.$objectType="monitoring.v4.serviceability.UpdateAlertEmailConfigurationApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,o,a,l;if(e){if(t=t||new Ni,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(B.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)if(Array.isArray(e.data))if(0===e.data.length)t.setData([]);else{for(a=[],i=e.data,l=i[0].hasOwnProperty("$objectType")?i[0].$objectType:typeof i[0],o=0;o<i.length;o++){if("monitoring.v4.error.AppMessage"!==l)throw"Unknown list of type "+l+" in data";s=Ie.constructFromObject(i[o],void 0),a.push(s)}t.setData(a)}else{if(l=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,"monitoring.v4.error.ErrorResponse"!==l)throw"Unknown datatype "+l+" in data";t.setData(Je.constructFromObject(e.data,void 0))}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMetadata(){return this.metadata}setMetadata(e){this.metadata=e}getData(){return this.data}setData(e){this.data=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson(!1):Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson(!1):e):Si(Ri,this,xi).call(this,this.getData(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson():Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson():e):Si(Ri,this,xi).call(this,this.getData())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"metadata"!==t||void 0!==this.metadata&&null!==this.metadata?"data"!==t||void 0!==this.data&&null!==this.data?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("data","undefined or null"):new O("metadata","undefined or null")}}function xi(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}Ni.prototype.metadata=void 0,Ni.prototype.data=void 0,Ni.prototype.$reserved=void 0,Ni.prototype.$objectType=void 0,Ni.prototype.$unknownFields=void 0;const Mi={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",CREATE:"CREATE",UPDATE:"UPDATE",DELETE:"DELETE",POWERSTATECHANGE:"POWERSTATECHANGE",HA:"HA",RESTORE:"RESTORE",MIGRATE:"MIGRATE",ENABLE:"ENABLE",DISABLE:"DISABLE",RESET:"RESET",LOGIN:"LOGIN",LOGOUT:"LOGOUT",VALIDATE:"VALIDATE",FAILOVER:"FAILOVER",INPROGRESS:"INPROGRESS",ON:"ON",OFF:"OFF",JOINED:"JOINED",UNJOINED:"UNJOINED",PROTECTED:"PROTECTED",UNPROTECTED:"UNPROTECTED",QUARENTINED:"QUARENTINED",UNQUARENTINED:"UNQUARENTINED",START:"START",END:"END",TESTFAILOVER:"TESTFAILOVER",IMPORT:"IMPORT",EXPORT:"EXPORT",IMAGEIMPORT:"IMAGEIMPORT",IMAGETRANSFER:"IMAGETRANSFER",IMAGEREMOVE:"IMAGEREMOVE",IMAGEUPLOAD:"IMAGEUPLOAD",TEMPLATEGUESTUPDATEINITIATE:"TEMPLATEGUESTUPDATEINITIATE",TEMPLATEGUESTUPDATECANCEL:"TEMPLATEGUESTUPDATECANCEL",TEMPLATEGUESTUPDATECOMPLETE:"TEMPLATEGUESTUPDATECOMPLETE",TEMPLATEDEPLOY:"TEMPLATEDEPLOY",TEMPLATEVERSIONPUBLISH:"TEMPLATEVERSIONPUBLISH",CROSSCLUSTERMIGRATE:"CROSSCLUSTERMIGRATE",FLOWCONFIGMIGRATE:"FLOWCONFIGMIGRATE",SUSPEND:"SUSPEND",RESUME:"RESUME",GENERATEURL:"GENERATEURL",DOWNLOAD:"DOWNLOAD",IMAGEMIGRATETOCR:"IMAGEMIGRATETOCR",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(Mi).find(t=>Mi[t]===e);return null==t?Mi.$UNKNOWN:Mi[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case Mi.$UNKNOWN:case Mi.$REDACTED:case Mi.CREATE:case Mi.UPDATE:case Mi.DELETE:case Mi.POWERSTATECHANGE:case Mi.HA:case Mi.RESTORE:case Mi.MIGRATE:case Mi.ENABLE:case Mi.DISABLE:case Mi.RESET:case Mi.LOGIN:case Mi.LOGOUT:case Mi.VALIDATE:case Mi.FAILOVER:case Mi.INPROGRESS:case Mi.ON:case Mi.OFF:case Mi.JOINED:case Mi.UNJOINED:case Mi.PROTECTED:case Mi.UNPROTECTED:case Mi.QUARENTINED:case Mi.UNQUARENTINED:case Mi.START:case Mi.END:case Mi.TESTFAILOVER:case Mi.IMPORT:case Mi.EXPORT:case Mi.IMAGEIMPORT:case Mi.IMAGETRANSFER:case Mi.IMAGEREMOVE:case Mi.IMAGEUPLOAD:case Mi.TEMPLATEGUESTUPDATEINITIATE:case Mi.TEMPLATEGUESTUPDATECANCEL:case Mi.TEMPLATEGUESTUPDATECOMPLETE:case Mi.TEMPLATEDEPLOY:case Mi.TEMPLATEVERSIONPUBLISH:case Mi.CROSSCLUSTERMIGRATE:case Mi.FLOWCONFIGMIGRATE:case Mi.SUSPEND:case Mi.RESUME:case Mi.GENERATEURL:case Mi.DOWNLOAD:case Mi.IMAGEMIGRATETOCR:return;default:throw new Error("Invalid : must be OperationType.{ $UNKNOWN|$REDACTED|CREATE|UPDATE|DELETE|POWERSTATECHANGE|HA|RESTORE|MIGRATE|ENABLE|DISABLE|RESET|LOGIN|LOGOUT|VALIDATE|FAILOVER|INPROGRESS|ON|OFF|JOINED|UNJOINED|PROTECTED|UNPROTECTED|QUARENTINED|UNQUARENTINED|START|END|TESTFAILOVER|IMPORT|EXPORT|IMAGEIMPORT|IMAGETRANSFER|IMAGEREMOVE|IMAGEUPLOAD|TEMPLATEGUESTUPDATEINITIATE|TEMPLATEGUESTUPDATECANCEL|TEMPLATEGUESTUPDATECOMPLETE|TEMPLATEDEPLOY|TEMPLATEVERSIONPUBLISH|CROSSCLUSTERMIGRATE|FLOWCONFIGMIGRATE|SUSPEND|RESUME|GENERATEURL|DOWNLOAD|IMAGEMIGRATETOCR }")}}};Object.freeze(Mi);const Vi=Mi;var Li=new WeakSet;class Ji{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=Li),t.add(e),this.$objectType="monitoring.v4.serviceability.AuditEntityReference",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new Ji,e.hasOwnProperty("type")&&null!==e.type&&void 0!==e.type&&t.setType(e.type),e.hasOwnProperty("name")&&null!==e.name&&void 0!==e.name&&t.setName(e.name),e.hasOwnProperty("extId")&&null!==e.extId&&void 0!==e.extId&&t.setExtId(e.extId),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getType(){return this.type}setType(e){this.type=e}getName(){return this.name}setName(e){this.name=e}getExtId(){return this.extId}setExtId(e){this.extId=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getType()&&null!==this.getType()?{type:this.getType()}:{},...void 0!==this.getName()&&null!==this.getName()?{name:this.getName()}:{},...void 0!==this.getExtId()&&null!==this.getExtId()?{extId:this.getExtId()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("type"===t&&(void 0===this.type||null===this.type))return new O("type","undefined or null");if("name"===t){if(void 0===this.name||null===this.name)return new O("name","undefined or null");if(!F.validateMaxLength(this.name,1e3))return new O("name","does not satisfy required maxLength constraint: 1000")}if("extId"===t){if(void 0===this.extId||null===this.extId)return new O("extId","undefined or null");if(!F.validatePattern(this.extId,/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/))return new O("extId","does not satisfy required pattern: /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/")}return"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null")}}Ji.prototype.type=void 0,Ji.prototype.name=void 0,Ji.prototype.extId=void 0,Ji.prototype.$reserved=void 0,Ji.prototype.$objectType=void 0,Ji.prototype.$unknownFields=void 0;const _i={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",SUCCEEDED:"SUCCEEDED",FAILED:"FAILED",ABORTED:"ABORTED",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(_i).find(t=>_i[t]===e);return null==t?_i.$UNKNOWN:_i[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case _i.$UNKNOWN:case _i.$REDACTED:case _i.SUCCEEDED:case _i.FAILED:case _i.ABORTED:return;default:throw new Error("Invalid : must be Status.{ $UNKNOWN|$REDACTED|SUCCEEDED|FAILED|ABORTED }")}}};Object.freeze(_i);const Wi=_i;var Bi=new WeakSet;class Gi{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=Bi),t.add(e),this.$objectType="monitoring.v4.serviceability.UserReference",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new Gi,e.hasOwnProperty("extId")&&null!==e.extId&&void 0!==e.extId&&t.setExtId(e.extId),e.hasOwnProperty("name")&&null!==e.name&&void 0!==e.name&&t.setName(e.name),e.hasOwnProperty("ipAddress")&&null!==e.ipAddress&&void 0!==e.ipAddress&&t.setIpAddress(e.ipAddress),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getExtId(){return this.extId}setExtId(e){this.extId=e}getName(){return this.name}setName(e){this.name=e}getIpAddress(){return this.ipAddress}setIpAddress(e){this.ipAddress=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getExtId()&&null!==this.getExtId()?{extId:this.getExtId()}:{},...void 0!==this.getName()&&null!==this.getName()?{name:this.getName()}:{},...void 0!==this.getIpAddress()&&null!==this.getIpAddress()?{ipAddress:this.getIpAddress()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("extId"===t){if(void 0===this.extId||null===this.extId)return new O("extId","undefined or null");if(!F.validatePattern(this.extId,/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/))return new O("extId","does not satisfy required pattern: /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/")}if("name"===t){if(void 0===this.name||null===this.name)return new O("name","undefined or null");if(!F.validateMaxLength(this.name,1e3))return new O("name","does not satisfy required maxLength constraint: 1000")}if("ipAddress"===t){if(void 0===this.ipAddress||null===this.ipAddress)return new O("ipAddress","undefined or null");if(!F.validatePattern(this.ipAddress,/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/))return new O("ipAddress","does not satisfy required pattern: /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/")}return"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null")}}function zi(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")}Gi.prototype.extId=void 0,Gi.prototype.name=void 0,Gi.prototype.ipAddress=void 0,Gi.prototype.$reserved=void 0,Gi.prototype.$objectType=void 0,Gi.prototype.$unknownFields=void 0;var qi=new WeakSet;class Ki extends ze{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=qi),t.add(e),this.$objectType="monitoring.v4.serviceability.Audit",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,r,o;if(e){if(t=t||new Ki,ze.constructFromObject(e,t,!0),e.hasOwnProperty("sourceEntity")&&null!==e.sourceEntity&&void 0!==e.sourceEntity&&t.setSourceEntity(Ji.constructFromObject(e.sourceEntity)),e.hasOwnProperty("clusterReference")&&null!==e.clusterReference&&void 0!==e.clusterReference&&t.setClusterReference(Ye.constructFromObject(e.clusterReference)),e.hasOwnProperty("affectedEntities")&&null!==e.affectedEntities&&void 0!==e.affectedEntities){for(o=[],i=e.affectedEntities,r=0;r<i.length;r++)s=Ye.constructFromObject(i[r],void 0),o.push(s);t.setAffectedEntities(o)}if(e.hasOwnProperty("operationType")&&null!==e.operationType&&void 0!==e.operationType&&t.setOperationType(Vi.constructFromObject(e.operationType)),e.hasOwnProperty("message")&&null!==e.message&&void 0!==e.message&&t.setMessage(e.message),e.hasOwnProperty("parameters")&&null!==e.parameters&&void 0!==e.parameters){for(o=[],i=e.parameters,r=0;r<i.length;r++)s=wt.constructFromObject(i[r],void 0),o.push(s);t.setParameters(o)}if(e.hasOwnProperty("operationStartTime")&&null!==e.operationStartTime&&void 0!==e.operationStartTime&&t.setOperationStartTime(e.operationStartTime),e.hasOwnProperty("operationEndTime")&&null!==e.operationEndTime&&void 0!==e.operationEndTime&&t.setOperationEndTime(e.operationEndTime),e.hasOwnProperty("userReference")&&null!==e.userReference&&void 0!==e.userReference&&t.setUserReference(Gi.constructFromObject(e.userReference)),e.hasOwnProperty("serviceName")&&null!==e.serviceName&&void 0!==e.serviceName&&t.setServiceName(e.serviceName),e.hasOwnProperty("auditType")&&null!==e.auditType&&void 0!==e.auditType&&t.setAuditType(e.auditType),e.hasOwnProperty("status")&&null!==e.status&&void 0!==e.status&&t.setStatus(Wi.constructFromObject(e.status)),e.hasOwnProperty("creationTime")&&null!==e.creationTime&&void 0!==e.creationTime&&t.setCreationTime(e.creationTime),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getSourceEntity(){return this.sourceEntity}setSourceEntity(e){this.sourceEntity=e}getClusterReference(){return this.clusterReference}setClusterReference(e){this.clusterReference=e}getAffectedEntities(){return this.affectedEntities}setAffectedEntities(e){this.affectedEntities=e}getOperationType(){return this.operationType}setOperationType(e){this.operationType=e}getMessage(){return this.message}setMessage(e){this.message=e}getParameters(){return this.parameters}setParameters(e){this.parameters=e}getOperationStartTime(){return this.operationStartTime}setOperationStartTime(e){this.operationStartTime=e}getOperationEndTime(){return this.operationEndTime}setOperationEndTime(e){this.operationEndTime=e}getUserReference(){return this.userReference}setUserReference(e){this.userReference=e}getServiceName(){return this.serviceName}setServiceName(e){this.serviceName=e}getAuditType(){return this.auditType}setAuditType(e){this.auditType=e}getStatus(){return this.status}setStatus(e){this.status=e}getCreationTime(){return this.creationTime}setCreationTime(e){this.creationTime=e}toJson(e){return!1===e?{...void 0!==this.getSourceEntity()&&null!==this.getSourceEntity()?{sourceEntity:this.getSourceEntity().toJson(!1)}:{},...void 0!==this.getClusterReference()&&null!==this.getClusterReference()?{clusterReference:this.getClusterReference().toJson(!1)}:{},...void 0!==this.getAffectedEntities()&&null!==this.getAffectedEntities()?{affectedEntities:this.getAffectedEntities().map(e=>e.toJson(!1))}:{},...void 0!==this.getOperationType()&&null!==this.getOperationType()?{operationType:this.getOperationType()}:{},...void 0!==this.getMessage()&&null!==this.getMessage()?{message:this.getMessage()}:{},...void 0!==this.getParameters()&&null!==this.getParameters()?{parameters:this.getParameters().map(e=>e.toJson(!1))}:{},...void 0!==this.getOperationStartTime()&&null!==this.getOperationStartTime()?{operationStartTime:zi(qi,this,Hi).call(this,this.getOperationStartTime(),!1)}:{},...void 0!==this.getOperationEndTime()&&null!==this.getOperationEndTime()?{operationEndTime:zi(qi,this,Hi).call(this,this.getOperationEndTime(),!1)}:{},...void 0!==this.getUserReference()&&null!==this.getUserReference()?{userReference:this.getUserReference().toJson(!1)}:{},...void 0!==this.getServiceName()&&null!==this.getServiceName()?{serviceName:this.getServiceName()}:{},...void 0!==this.getAuditType()&&null!==this.getAuditType()?{auditType:this.getAuditType()}:{},...void 0!==this.getStatus()&&null!==this.getStatus()?{status:this.getStatus()}:{},...void 0!==this.getCreationTime()&&null!==this.getCreationTime()?{creationTime:zi(qi,this,Hi).call(this,this.getCreationTime(),!1)}:{},...void 0!==this.getExtId()&&null!==this.getExtId()?{extId:this.getExtId()}:{},...void 0!==this.getLinks()&&null!==this.getLinks()?{links:this.getLinks().map(e=>e.toJson(!1))}:{},...void 0!==this.getTenantId()&&null!==this.getTenantId()?{tenantId:this.getTenantId()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getSourceEntity()&&null!==this.getSourceEntity()?{sourceEntity:this.getSourceEntity().toJson(!1)}:{},...void 0!==this.getClusterReference()&&null!==this.getClusterReference()?{clusterReference:this.getClusterReference().toJson(!1)}:{},...void 0!==this.getAffectedEntities()&&null!==this.getAffectedEntities()?{affectedEntities:this.getAffectedEntities().map(e=>e.toJson(!1))}:{},...void 0!==this.getOperationType()&&null!==this.getOperationType()?{operationType:this.getOperationType()}:{},...void 0!==this.getMessage()&&null!==this.getMessage()?{message:this.getMessage()}:{},...void 0!==this.getParameters()&&null!==this.getParameters()?{parameters:this.getParameters().map(e=>e.toJson(!1))}:{},...void 0!==this.getOperationStartTime()&&null!==this.getOperationStartTime()?{operationStartTime:zi(qi,this,Hi).call(this,this.getOperationStartTime(),!1)}:{},...void 0!==this.getOperationEndTime()&&null!==this.getOperationEndTime()?{operationEndTime:zi(qi,this,Hi).call(this,this.getOperationEndTime(),!1)}:{},...void 0!==this.getUserReference()&&null!==this.getUserReference()?{userReference:this.getUserReference().toJson(!1)}:{},...void 0!==this.getServiceName()&&null!==this.getServiceName()?{serviceName:this.getServiceName()}:{},...void 0!==this.getAuditType()&&null!==this.getAuditType()?{auditType:this.getAuditType()}:{},...void 0!==this.getStatus()&&null!==this.getStatus()?{status:this.getStatus()}:{},...void 0!==this.getCreationTime()&&null!==this.getCreationTime()?{creationTime:zi(qi,this,Hi).call(this,this.getCreationTime(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("sourceEntity"===t&&(void 0===this.sourceEntity||null===this.sourceEntity))return new O("sourceEntity","undefined or null");if("clusterReference"===t&&(void 0===this.clusterReference||null===this.clusterReference))return new O("clusterReference","undefined or null");if("affectedEntities"===t){if(void 0===this.affectedEntities||null===this.affectedEntities)return new O("affectedEntities","undefined or null");if(!F.validateMaxItems(this.affectedEntities,50))return new O("affectedEntities","does not satisfy required maxItems constraint: 50")}if("operationType"===t&&(void 0===this.operationType||null===this.operationType))return new O("operationType","undefined or null");if("message"===t){if(void 0===this.message||null===this.message)return new O("message","undefined or null");if(!F.validateMaxLength(this.message,1024))return new O("message","does not satisfy required maxLength constraint: 1024")}if("parameters"===t){if(void 0===this.parameters||null===this.parameters)return new O("parameters","undefined or null");if(!F.validateMaxItems(this.parameters,100))return new O("parameters","does not satisfy required maxItems constraint: 100")}if("operationStartTime"===t&&(void 0===this.operationStartTime||null===this.operationStartTime))return new O("operationStartTime","undefined or null");if("operationEndTime"===t&&(void 0===this.operationEndTime||null===this.operationEndTime))return new O("operationEndTime","undefined or null");if("userReference"===t&&(void 0===this.userReference||null===this.userReference))return new O("userReference","undefined or null");if("serviceName"===t){if(void 0===this.serviceName||null===this.serviceName)return new O("serviceName","undefined or null");if(!F.validateMaxLength(this.serviceName,50))return new O("serviceName","does not satisfy required maxLength constraint: 50")}return"auditType"!==t||void 0!==this.auditType&&null!==this.auditType?"status"!==t||void 0!==this.status&&null!==this.status?"creationTime"!==t||void 0!==this.creationTime&&null!==this.creationTime?new O(t,"no such property exists"):new O("creationTime","undefined or null"):new O("status","undefined or null"):new O("auditType","undefined or null")}}function Hi(e,t){return e instanceof Date&&void 0!==t?t?e.toISOString().slice(0,10):e.toISOString():e}function Yi(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")}Ki.prototype.sourceEntity=void 0,Ki.prototype.clusterReference=void 0,Ki.prototype.affectedEntities=void 0,Ki.prototype.operationType=void 0,Ki.prototype.message=void 0,Ki.prototype.parameters=void 0,Ki.prototype.operationStartTime=void 0,Ki.prototype.operationEndTime=void 0,Ki.prototype.userReference=void 0,Ki.prototype.serviceName=void 0,Ki.prototype.auditType=void 0,Ki.prototype.status=void 0,Ki.prototype.creationTime=void 0,ze.prototype.extId=void 0,ze.prototype.links=void 0,Be.prototype.tenantId=void 0;var Xi=new WeakSet;class Qi extends r{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=Xi),t.add(e),this.$objectType="monitoring.v4.serviceability.GetAuditApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i;if(e){if(t=t||new Qi,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(B.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(i=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,i){case"monitoring.v4.serviceability.Audit":t.setData(Ki.constructFromObject(e.data,void 0));break;case"monitoring.v4.error.ErrorResponse":t.setData(Je.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+i+" in data"}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMetadata(){return this.metadata}setMetadata(e){this.metadata=e}getData(){return this.data}setData(e){this.data=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson(!1):Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson(!1):e):Yi(Xi,this,Zi).call(this,this.getData(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson():Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson():e):Yi(Xi,this,Zi).call(this,this.getData())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"metadata"!==t||void 0!==this.metadata&&null!==this.metadata?"data"!==t||void 0!==this.data&&null!==this.data?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("data","undefined or null"):new O("metadata","undefined or null")}}function Zi(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}function es(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")}Qi.prototype.metadata=void 0,Qi.prototype.data=void 0,Qi.prototype.$reserved=void 0,Qi.prototype.$objectType=void 0,Qi.prototype.$unknownFields=void 0;var ts=new WeakSet;class ns extends r{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=ts),t.add(e),this.$objectType="monitoring.v4.serviceability.ListAuditsApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,o,a,l;if(e){if(t=t||new ns,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(B.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)if(Array.isArray(e.data))if(0===e.data.length)t.setData([]);else{for(a=[],i=e.data,l=i[0].hasOwnProperty("$objectType")?i[0].$objectType:typeof i[0],o=0;o<i.length;o++){if("monitoring.v4.serviceability.Audit"!==l)throw"Unknown list of type "+l+" in data";s=Ki.constructFromObject(i[o],void 0),a.push(s)}t.setData(a)}else{if(l=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,"monitoring.v4.error.ErrorResponse"!==l)throw"Unknown datatype "+l+" in data";t.setData(Je.constructFromObject(e.data,void 0))}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMetadata(){return this.metadata}setMetadata(e){this.metadata=e}getData(){return this.data}setData(e){this.data=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson(!1):Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson(!1):e):es(ts,this,is).call(this,this.getData(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson():Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson():e):es(ts,this,is).call(this,this.getData())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"metadata"!==t||void 0!==this.metadata&&null!==this.metadata?"data"!==t||void 0!==this.data&&null!==this.data?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("data","undefined or null"):new O("metadata","undefined or null")}}function is(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}ns.prototype.metadata=void 0,ns.prototype.data=void 0,ns.prototype.$reserved=void 0,ns.prototype.$objectType=void 0,ns.prototype.$unknownFields=void 0;var ss=new WeakSet;class rs{constructor(e){var t,n;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t=this,n=ss),n.add(t),this.userName=e,this.$objectType="monitoring.v4.serviceability.Credential",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new rs,e.hasOwnProperty("userName")&&null!==e.userName&&void 0!==e.userName&&t.setUserName(e.userName),e.hasOwnProperty("password")&&null!==e.password&&void 0!==e.password&&t.setPassword(e.password),e.hasOwnProperty("keyFilePath")&&null!==e.keyFilePath&&void 0!==e.keyFilePath&&t.setKeyFilePath(e.keyFilePath),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getUserName(){return this.userName}setUserName(e){this.userName=e}getPassword(){return this.password}setPassword(e){this.password=e}getKeyFilePath(){return this.keyFilePath}setKeyFilePath(e){this.keyFilePath=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getUserName()&&null!==this.getUserName()?{userName:this.getUserName()}:{},...void 0!==this.getPassword()&&null!==this.getPassword()?{password:this.getPassword()}:{},...void 0!==this.getKeyFilePath()&&null!==this.getKeyFilePath()?{keyFilePath:this.getKeyFilePath()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=["userName"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("userName"===t){if(void 0===this.userName||null===this.userName)return new O("userName","undefined or null");if(!F.validateMaxLength(this.userName,100))return new O("userName","does not satisfy required maxLength constraint: 100")}if("password"===t){if(void 0===this.password||null===this.password)return new O("password","undefined or null");if(!F.validateMaxLength(this.password,100))return new O("password","does not satisfy required maxLength constraint: 100")}if("keyFilePath"===t){if(void 0===this.keyFilePath||null===this.keyFilePath)return new O("keyFilePath","undefined or null");if(!F.validateMaxLength(this.keyFilePath,100))return new O("keyFilePath","does not satisfy required maxLength constraint: 100")}return"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null")}}rs.prototype.userName=void 0,rs.prototype.password=void 0,rs.prototype.keyFilePath=void 0,rs.prototype.$reserved=void 0,rs.prototype.$objectType=void 0,rs.prototype.$unknownFields=void 0;const os={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",SFTP:"SFTP",FTP:"FTP",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(os).find(t=>os[t]===e);return null==t?os.$UNKNOWN:os[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case os.$UNKNOWN:case os.$REDACTED:case os.SFTP:case os.FTP:return;default:throw new Error("Invalid : must be ServerUploadProtocol.{ $UNKNOWN|$REDACTED|SFTP|FTP }")}}};Object.freeze(os);const as=os;var ls=new WeakSet;class ds{constructor(e,t,n){var i,s;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(i=this,s=ls),s.add(i),this.protocol=e,this.serverAddress=t,this.credential=n,this.$objectType="monitoring.v4.serviceability.CustomServerUploadParams",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new ds,e.hasOwnProperty("protocol")&&null!==e.protocol&&void 0!==e.protocol&&t.setProtocol(as.constructFromObject(e.protocol)),e.hasOwnProperty("serverAddress")&&null!==e.serverAddress&&void 0!==e.serverAddress&&t.setServerAddress($i.constructFromObject(e.serverAddress)),e.hasOwnProperty("port")&&null!==e.port&&void 0!==e.port&&t.setPort(e.port),e.hasOwnProperty("credential")&&null!==e.credential&&void 0!==e.credential&&t.setCredential(rs.constructFromObject(e.credential)),e.hasOwnProperty("path")&&null!==e.path&&void 0!==e.path&&t.setPath(e.path),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getProtocol(){return this.protocol}setProtocol(e){this.protocol=e}getServerAddress(){return this.serverAddress}setServerAddress(e){this.serverAddress=e}getPort(){return this.port}setPort(e){this.port=e}getCredential(){return this.credential}setCredential(e){this.credential=e}getPath(){return this.path}setPath(e){this.path=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getProtocol()&&null!==this.getProtocol()?{protocol:this.getProtocol()}:{},...void 0!==this.getServerAddress()&&null!==this.getServerAddress()?{serverAddress:this.getServerAddress().toJson(!1)}:{},...void 0!==this.getPort()&&null!==this.getPort()?{port:this.getPort()}:{},...void 0!==this.getCredential()&&null!==this.getCredential()?{credential:this.getCredential().toJson(!1)}:{},...void 0!==this.getPath()&&null!==this.getPath()?{path:this.getPath()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=["protocol","serverAddress","credential"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("protocol"===t&&(void 0===this.protocol||null===this.protocol))return new O("protocol","undefined or null");if("serverAddress"===t&&(void 0===this.serverAddress||null===this.serverAddress))return new O("serverAddress","undefined or null");if("port"===t&&(void 0===this.port||null===this.port))return new O("port","undefined or null");if("credential"===t&&(void 0===this.credential||null===this.credential))return new O("credential","undefined or null");if("path"===t){if(void 0===this.path||null===this.path)return new O("path","undefined or null");if(!F.validateMaxLength(this.path,100))return new O("path","does not satisfy required maxLength constraint: 100")}return"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null")}}ds.prototype.protocol=void 0,ds.prototype.serverAddress=void 0,ds.prototype.port=void 0,ds.prototype.credential=void 0,ds.prototype.path=void 0,ds.prototype.$reserved=void 0,ds.prototype.$objectType=void 0,ds.prototype.$unknownFields=void 0;var us=new WeakSet;class hs{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=us),t.add(e),this.$objectType="monitoring.v4.serviceability.LocalUploadParams",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new hs,e.hasOwnProperty("path")&&null!==e.path&&void 0!==e.path&&t.setPath(e.path),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getPath(){return this.path}setPath(e){this.path=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getPath()&&null!==this.getPath()?{path:this.getPath()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("path"===t){if(void 0===this.path||null===this.path)return new O("path","undefined or null");if(!F.validateMaxLength(this.path,100))return new O("path","does not satisfy required maxLength constraint: 100")}return"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null")}}hs.prototype.path="/home/nutanix/data/logbay/bundles",hs.prototype.$reserved=void 0,hs.prototype.$objectType=void 0,hs.prototype.$unknownFields=void 0;var cs=new WeakSet;class ps{constructor(e){var t,n;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t=this,n=cs),n.add(t),this.caseNumber=e,this.$objectType="monitoring.v4.serviceability.NtnxServerUploadParams",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new ps,e.hasOwnProperty("caseNumber")&&null!==e.caseNumber&&void 0!==e.caseNumber&&t.setCaseNumber(e.caseNumber),e.hasOwnProperty("protocol")&&null!==e.protocol&&void 0!==e.protocol&&t.setProtocol(as.constructFromObject(e.protocol)),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getCaseNumber(){return this.caseNumber}setCaseNumber(e){this.caseNumber=e}getProtocol(){return this.protocol}setProtocol(e){this.protocol=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getCaseNumber()&&null!==this.getCaseNumber()?{caseNumber:this.getCaseNumber()}:{},...void 0!==this.getProtocol()&&null!==this.getProtocol()?{protocol:this.getProtocol()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=["caseNumber"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("caseNumber"===t){if(void 0===this.caseNumber||null===this.caseNumber)return new O("caseNumber","undefined or null");if(!F.validateMinimum(this.caseNumber,1e6))return new O("caseNumber","does not satisfy required minimum constraint: 1000000")}return"protocol"!==t||void 0!==this.protocol&&null!==this.protocol?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("protocol","undefined or null")}}ps.prototype.caseNumber=void 0,ps.prototype.protocol=void 0,ps.prototype.$reserved=void 0,ps.prototype.$objectType=void 0,ps.prototype.$unknownFields=void 0;var vs=new WeakSet;class ys{constructor(e,t){var n,i;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(n=this,i=vs),i.add(n),this.credential=e,this.path=t,this.$objectType="monitoring.v4.serviceability.StorageContainerUploadParams",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new ys,e.hasOwnProperty("ipAddress")&&null!==e.ipAddress&&void 0!==e.ipAddress&&t.setIpAddress(yi.constructFromObject(e.ipAddress)),e.hasOwnProperty("port")&&null!==e.port&&void 0!==e.port&&t.setPort(e.port),e.hasOwnProperty("credential")&&null!==e.credential&&void 0!==e.credential&&t.setCredential(rs.constructFromObject(e.credential)),e.hasOwnProperty("path")&&null!==e.path&&void 0!==e.path&&t.setPath(e.path),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getIpAddress(){return this.ipAddress}setIpAddress(e){this.ipAddress=e}getPort(){return this.port}setPort(e){this.port=e}getCredential(){return this.credential}setCredential(e){this.credential=e}getPath(){return this.path}setPath(e){this.path=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getIpAddress()&&null!==this.getIpAddress()?{ipAddress:this.getIpAddress().toJson(!1)}:{},...void 0!==this.getPort()&&null!==this.getPort()?{port:this.getPort()}:{},...void 0!==this.getCredential()&&null!==this.getCredential()?{credential:this.getCredential().toJson(!1)}:{},...void 0!==this.getPath()&&null!==this.getPath()?{path:this.getPath()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=["credential","path"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("ipAddress"===t&&(void 0===this.ipAddress||null===this.ipAddress))return new O("ipAddress","undefined or null");if("port"===t&&(void 0===this.port||null===this.port))return new O("port","undefined or null");if("credential"===t&&(void 0===this.credential||null===this.credential))return new O("credential","undefined or null");if("path"===t){if(void 0===this.path||null===this.path)return new O("path","undefined or null");if(!F.validateMaxLength(this.path,100))return new O("path","does not satisfy required maxLength constraint: 100")}return"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null")}}function gs(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")}ys.prototype.ipAddress=void 0,ys.prototype.port=2222,ys.prototype.credential=void 0,ys.prototype.path=void 0,ys.prototype.$reserved=void 0,ys.prototype.$objectType=void 0,ys.prototype.$unknownFields=void 0;var ms=new WeakSet;class fs{constructor(e){var t,n;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t=this,n=ms),n.add(t),this.uploadParams=e,this.$objectType="monitoring.v4.serviceability.ArchiveOpts",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i;if(e){if(t=t||new fs,e.hasOwnProperty("archiveName")&&null!==e.archiveName&&void 0!==e.archiveName&&t.setArchiveName(e.archiveName),e.hasOwnProperty("uploadParams")&&null!==e.uploadParams&&void 0!==e.uploadParams)switch(i=e.uploadParams.hasOwnProperty("$objectType")?e.uploadParams.$objectType:typeof e.uploadParams,i){case"monitoring.v4.serviceability.LocalUploadParams":t.setUploadParams(hs.constructFromObject(e.uploadParams,void 0));break;case"monitoring.v4.serviceability.NtnxServerUploadParams":t.setUploadParams(ps.constructFromObject(e.uploadParams,void 0));break;case"monitoring.v4.serviceability.CustomServerUploadParams":t.setUploadParams(ds.constructFromObject(e.uploadParams,void 0));break;case"monitoring.v4.serviceability.StorageContainerUploadParams":t.setUploadParams(ys.constructFromObject(e.uploadParams,void 0));break;default:throw"Unknown datatype "+i+" in data"}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getArchiveName(){return this.archiveName}setArchiveName(e){this.archiveName=e}getUploadParams(){return this.uploadParams}setUploadParams(e){this.uploadParams=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getArchiveName()&&null!==this.getArchiveName()?{archiveName:this.getArchiveName()}:{},...void 0!==this.getUploadParams()&&null!==this.getUploadParams()?{uploadParams:void 0!==this.getUploadParams().toJson?this.getUploadParams().toJson(!1):Array.isArray(this.getUploadParams())?this.getUploadParams().map(e=>void 0!==e.toJson?e.toJson(!1):e):gs(ms,this,$s).call(this,this.getUploadParams(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getArchiveName()&&null!==this.getArchiveName()?{archiveName:this.getArchiveName()}:{},...void 0!==this.getUploadParams()&&null!==this.getUploadParams()?{uploadParams:void 0!==this.getUploadParams().toJson?this.getUploadParams().toJson():Array.isArray(this.getUploadParams())?this.getUploadParams().map(e=>void 0!==e.toJson?e.toJson():e):gs(ms,this,$s).call(this,this.getUploadParams())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=["uploadParams"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("archiveName"===t){if(void 0===this.archiveName||null===this.archiveName)return new O("archiveName","undefined or null");if(!F.validateMaxLength(this.archiveName,100))return new O("archiveName","does not satisfy required maxLength constraint: 100")}return"uploadParams"!==t||void 0!==this.uploadParams&&null!==this.uploadParams?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("uploadParams","undefined or null")}}function $s(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}fs.prototype.archiveName="NTNX-Log",fs.prototype.uploadParams=void 0,fs.prototype.$reserved=void 0,fs.prototype.$objectType=void 0,fs.prototype.$unknownFields=void 0;var ws=new WeakSet;class Ts{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=ws),t.add(e),this.$objectType="monitoring.v4.serviceability.MspOpts",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,r;if(e){if(t=t||new Ts,e.hasOwnProperty("clusterExtIds")&&null!==e.clusterExtIds&&void 0!==e.clusterExtIds){for(r=[],i=e.clusterExtIds,s=0;s<i.length;s++)r.push(i[s]);t.setClusterExtIds(r)}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getClusterExtIds(){return this.clusterExtIds}setClusterExtIds(e){this.clusterExtIds=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getClusterExtIds()&&null!==this.getClusterExtIds()?{clusterExtIds:this.getClusterExtIds()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("clusterExtIds"===t){if(void 0===this.clusterExtIds||null===this.clusterExtIds)return new O("clusterExtIds","undefined or null");if(!F.validateMaxItems(this.clusterExtIds,3))return new O("clusterExtIds","does not satisfy required maxItems constraint: 3");if(!F.validateMinItems(this.clusterExtIds,1))return new O("clusterExtIds","does not satisfy required minItems constraint: 1")}return"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null")}}Ts.prototype.clusterExtIds=void 0,Ts.prototype.$reserved=void 0,Ts.prototype.$objectType=void 0,Ts.prototype.$unknownFields=void 0;var bs=new WeakSet;class ks{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=bs),t.add(e),this.$objectType="monitoring.v4.serviceability.TagOpts",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new ks,e.hasOwnProperty("mspOpts")&&null!==e.mspOpts&&void 0!==e.mspOpts&&t.setMspOpts(Ts.constructFromObject(e.mspOpts)),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMspOpts(){return this.mspOpts}setMspOpts(e){this.mspOpts=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getMspOpts()&&null!==this.getMspOpts()?{mspOpts:this.getMspOpts().toJson(!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"mspOpts"!==t||void 0!==this.mspOpts&&null!==this.mspOpts?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("mspOpts","undefined or null")}}function Fs(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")}ks.prototype.mspOpts=void 0,ks.prototype.$reserved=void 0,ks.prototype.$objectType=void 0,ks.prototype.$unknownFields=void 0;var Os=new WeakSet;class js{constructor(e,t,n){var i,s;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(i=this,s=Os),s.add(i),this.startTime=e,this.endTime=t,this.archiveOpts=n,this.$objectType="monitoring.v4.serviceability.LogCollectionSpec",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,r,o;if(e){if(t=t||new js,e.hasOwnProperty("startTime")&&null!==e.startTime&&void 0!==e.startTime&&t.setStartTime(e.startTime),e.hasOwnProperty("endTime")&&null!==e.endTime&&void 0!==e.endTime&&t.setEndTime(e.endTime),e.hasOwnProperty("includeTags")&&null!==e.includeTags&&void 0!==e.includeTags){for(o=[],i=e.includeTags,r=0;r<i.length;r++)o.push(i[r]);t.setIncludeTags(o)}if(e.hasOwnProperty("shouldAnonymize")&&null!==e.shouldAnonymize&&void 0!==e.shouldAnonymize&&t.setShouldAnonymize(e.shouldAnonymize),e.hasOwnProperty("nodeIpList")&&null!==e.nodeIpList&&void 0!==e.nodeIpList){for(o=[],i=e.nodeIpList,r=0;r<i.length;r++)s=yi.constructFromObject(i[r],void 0),o.push(s);t.setNodeIpList(o)}if(e.hasOwnProperty("shouldCollectFromDisabledNode")&&null!==e.shouldCollectFromDisabledNode&&void 0!==e.shouldCollectFromDisabledNode&&t.setShouldCollectFromDisabledNode(e.shouldCollectFromDisabledNode),e.hasOwnProperty("excludeTags")&&null!==e.excludeTags&&void 0!==e.excludeTags){for(o=[],i=e.excludeTags,r=0;r<i.length;r++)o.push(i[r]);t.setExcludeTags(o)}if(e.hasOwnProperty("archiveOpts")&&null!==e.archiveOpts&&void 0!==e.archiveOpts&&t.setArchiveOpts(fs.constructFromObject(e.archiveOpts)),e.hasOwnProperty("description")&&null!==e.description&&void 0!==e.description&&t.setDescription(e.description),e.hasOwnProperty("tagOpts")&&null!==e.tagOpts&&void 0!==e.tagOpts&&t.setTagOpts(ks.constructFromObject(e.tagOpts)),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getStartTime(){return this.startTime}setStartTime(e){this.startTime=e}getEndTime(){return this.endTime}setEndTime(e){this.endTime=e}getIncludeTags(){return this.includeTags}setIncludeTags(e){this.includeTags=e}getShouldAnonymize(){return this.shouldAnonymize}setShouldAnonymize(e){this.shouldAnonymize=e}getNodeIpList(){return this.nodeIpList}setNodeIpList(e){this.nodeIpList=e}getShouldCollectFromDisabledNode(){return this.shouldCollectFromDisabledNode}setShouldCollectFromDisabledNode(e){this.shouldCollectFromDisabledNode=e}getExcludeTags(){return this.excludeTags}setExcludeTags(e){this.excludeTags=e}getArchiveOpts(){return this.archiveOpts}setArchiveOpts(e){this.archiveOpts=e}getDescription(){return this.description}setDescription(e){this.description=e}getTagOpts(){return this.tagOpts}setTagOpts(e){this.tagOpts=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getStartTime()&&null!==this.getStartTime()?{startTime:Fs(Os,this,Es).call(this,this.getStartTime(),!1)}:{},...void 0!==this.getEndTime()&&null!==this.getEndTime()?{endTime:Fs(Os,this,Es).call(this,this.getEndTime(),!1)}:{},...void 0!==this.getIncludeTags()&&null!==this.getIncludeTags()?{includeTags:this.getIncludeTags()}:{},...void 0!==this.getShouldAnonymize()&&null!==this.getShouldAnonymize()?{shouldAnonymize:this.getShouldAnonymize()}:{},...void 0!==this.getNodeIpList()&&null!==this.getNodeIpList()?{nodeIpList:this.getNodeIpList().map(e=>e.toJson(!1))}:{},...void 0!==this.getShouldCollectFromDisabledNode()&&null!==this.getShouldCollectFromDisabledNode()?{shouldCollectFromDisabledNode:this.getShouldCollectFromDisabledNode()}:{},...void 0!==this.getExcludeTags()&&null!==this.getExcludeTags()?{excludeTags:this.getExcludeTags()}:{},...void 0!==this.getArchiveOpts()&&null!==this.getArchiveOpts()?{archiveOpts:this.getArchiveOpts().toJson(!1)}:{},...void 0!==this.getDescription()&&null!==this.getDescription()?{description:this.getDescription()}:{},...void 0!==this.getTagOpts()&&null!==this.getTagOpts()?{tagOpts:this.getTagOpts().toJson(!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=["startTime","endTime","archiveOpts"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("startTime"===t&&(void 0===this.startTime||null===this.startTime))return new O("startTime","undefined or null");if("endTime"===t&&(void 0===this.endTime||null===this.endTime))return new O("endTime","undefined or null");if("includeTags"===t){if(void 0===this.includeTags||null===this.includeTags)return new O("includeTags","undefined or null");if(!F.validateMaxItems(this.includeTags,300))return new O("includeTags","does not satisfy required maxItems constraint: 300")}if("shouldAnonymize"===t&&(void 0===this.shouldAnonymize||null===this.shouldAnonymize))return new O("shouldAnonymize","undefined or null");if("nodeIpList"===t){if(void 0===this.nodeIpList||null===this.nodeIpList)return new O("nodeIpList","undefined or null");if(!F.validateMaxItems(this.nodeIpList,48))return new O("nodeIpList","does not satisfy required maxItems constraint: 48")}if("shouldCollectFromDisabledNode"===t&&(void 0===this.shouldCollectFromDisabledNode||null===this.shouldCollectFromDisabledNode))return new O("shouldCollectFromDisabledNode","undefined or null");if("excludeTags"===t){if(void 0===this.excludeTags||null===this.excludeTags)return new O("excludeTags","undefined or null");if(!F.validateMaxItems(this.excludeTags,50))return new O("excludeTags","does not satisfy required maxItems constraint: 50")}return"archiveOpts"!==t||void 0!==this.archiveOpts&&null!==this.archiveOpts?"description"!==t||void 0!==this.description&&null!==this.description?"tagOpts"!==t||void 0!==this.tagOpts&&null!==this.tagOpts?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("tagOpts","undefined or null"):new O("description","undefined or null"):new O("archiveOpts","undefined or null")}}function Es(e,t){return e instanceof Date&&void 0!==t?t?e.toISOString().slice(0,10):e.toISOString():e}js.prototype.startTime=void 0,js.prototype.endTime=void 0,js.prototype.includeTags=void 0,js.prototype.shouldAnonymize=!1,js.prototype.nodeIpList=void 0,js.prototype.shouldCollectFromDisabledNode=!1,js.prototype.excludeTags=void 0,js.prototype.archiveOpts=void 0,js.prototype.description="Log collection via V4 API",js.prototype.tagOpts=void 0,js.prototype.$reserved=void 0,js.prototype.$objectType=void 0,js.prototype.$unknownFields=void 0;var Ps=new WeakSet;class As extends ze{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=Ps),t.add(e),this.$objectType="monitoring.v4.serviceability.Tag",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new As,ze.constructFromObject(e,t,!0),e.hasOwnProperty("description")&&null!==e.description&&void 0!==e.description&&t.setDescription(e.description),e.hasOwnProperty("name")&&null!==e.name&&void 0!==e.name&&t.setName(e.name),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getDescription(){return this.description}setDescription(e){this.description=e}getName(){return this.name}setName(e){this.name=e}toJson(e){return!1===e?{...void 0!==this.getDescription()&&null!==this.getDescription()?{description:this.getDescription()}:{},...void 0!==this.getName()&&null!==this.getName()?{name:this.getName()}:{},...void 0!==this.getExtId()&&null!==this.getExtId()?{extId:this.getExtId()}:{},...void 0!==this.getLinks()&&null!==this.getLinks()?{links:this.getLinks().map(e=>e.toJson(!1))}:{},...void 0!==this.getTenantId()&&null!==this.getTenantId()?{tenantId:this.getTenantId()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getDescription()&&null!==this.getDescription()?{description:this.getDescription()}:{},...void 0!==this.getName()&&null!==this.getName()?{name:this.getName()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("description"===t){if(void 0===this.description||null===this.description)return new O("description","undefined or null");if(!F.validateMaxLength(this.description,100))return new O("description","does not satisfy required maxLength constraint: 100")}if("name"===t){if(void 0===this.name||null===this.name)return new O("name","undefined or null");if(!F.validateMaxLength(this.name,100))return new O("name","does not satisfy required maxLength constraint: 100")}return new O(t,"no such property exists")}}function Cs(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")}As.prototype.description=void 0,As.prototype.name=void 0,ze.prototype.extId=void 0,ze.prototype.links=void 0,Be.prototype.tenantId=void 0;var Is=new WeakSet;class Us extends r{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=Is),t.add(e),this.$objectType="monitoring.v4.serviceability.ListTagsApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,o,a,l;if(e){if(t=t||new Us,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(B.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)if(Array.isArray(e.data))if(0===e.data.length)t.setData([]);else{for(a=[],i=e.data,l=i[0].hasOwnProperty("$objectType")?i[0].$objectType:typeof i[0],o=0;o<i.length;o++){if("monitoring.v4.serviceability.Tag"!==l)throw"Unknown list of type "+l+" in data";s=As.constructFromObject(i[o],void 0),a.push(s)}t.setData(a)}else{if(l=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,"monitoring.v4.error.ErrorResponse"!==l)throw"Unknown datatype "+l+" in data";t.setData(Je.constructFromObject(e.data,void 0))}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMetadata(){return this.metadata}setMetadata(e){this.metadata=e}getData(){return this.data}setData(e){this.data=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson(!1):Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson(!1):e):Cs(Is,this,Ds).call(this,this.getData(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson():Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson():e):Cs(Is,this,Ds).call(this,this.getData())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"metadata"!==t||void 0!==this.metadata&&null!==this.metadata?"data"!==t||void 0!==this.data&&null!==this.data?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("data","undefined or null"):new O("metadata","undefined or null")}}function Ds(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}function Ss(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")}Us.prototype.metadata=void 0,Us.prototype.data=void 0,Us.prototype.$reserved=void 0,Us.prototype.$objectType=void 0,Us.prototype.$unknownFields=void 0;var Rs=new WeakSet;class Ns extends r{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=Rs),t.add(e),this.$objectType="monitoring.v4.serviceability.CollectLogsApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i;if(e){if(t=t||new Ns,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(B.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(i=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,i){case"prism.v4.config.TaskReference":t.setData(Wn.constructFromObject(e.data,void 0));break;case"monitoring.v4.error.ErrorResponse":t.setData(Je.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+i+" in data"}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMetadata(){return this.metadata}setMetadata(e){this.metadata=e}getData(){return this.data}setData(e){this.data=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson(!1):Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson(!1):e):Ss(Rs,this,xs).call(this,this.getData(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson():Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson():e):Ss(Rs,this,xs).call(this,this.getData())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"metadata"!==t||void 0!==this.metadata&&null!==this.metadata?"data"!==t||void 0!==this.data&&null!==this.data?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("data","undefined or null"):new O("metadata","undefined or null")}}function xs(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}Ns.prototype.metadata=void 0,Ns.prototype.data=void 0,Ns.prototype.$reserved=void 0,Ns.prototype.$objectType=void 0,Ns.prototype.$unknownFields=void 0;var Ms=new WeakSet;class Vs{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=Ms),t.add(e),this.$objectType="monitoring.v4.serviceability.EventEntityReference",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new Vs,e.hasOwnProperty("type")&&null!==e.type&&void 0!==e.type&&t.setType(e.type),e.hasOwnProperty("name")&&null!==e.name&&void 0!==e.name&&t.setName(e.name),e.hasOwnProperty("extId")&&null!==e.extId&&void 0!==e.extId&&t.setExtId(e.extId),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getType(){return this.type}setType(e){this.type=e}getName(){return this.name}setName(e){this.name=e}getExtId(){return this.extId}setExtId(e){this.extId=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getType()&&null!==this.getType()?{type:this.getType()}:{},...void 0!==this.getName()&&null!==this.getName()?{name:this.getName()}:{},...void 0!==this.getExtId()&&null!==this.getExtId()?{extId:this.getExtId()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("type"===t&&(void 0===this.type||null===this.type))return new O("type","undefined or null");if("name"===t){if(void 0===this.name||null===this.name)return new O("name","undefined or null");if(!F.validateMaxLength(this.name,1e3))return new O("name","does not satisfy required maxLength constraint: 1000")}if("extId"===t){if(void 0===this.extId||null===this.extId)return new O("extId","undefined or null");if(!F.validatePattern(this.extId,/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/))return new O("extId","does not satisfy required pattern: /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/")}return"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null")}}function Ls(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")}Vs.prototype.type=void 0,Vs.prototype.name=void 0,Vs.prototype.extId=void 0,Vs.prototype.$reserved=void 0,Vs.prototype.$objectType=void 0,Vs.prototype.$unknownFields=void 0;var Js=new WeakSet;class _s extends ze{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=Js),t.add(e),this.$objectType="monitoring.v4.serviceability.Event",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,r,o;if(e){if(t=t||new _s,ze.constructFromObject(e,t,!0),e.hasOwnProperty("sourceEntity")&&null!==e.sourceEntity&&void 0!==e.sourceEntity&&t.setSourceEntity(Vs.constructFromObject(e.sourceEntity)),e.hasOwnProperty("affectedEntities")&&null!==e.affectedEntities&&void 0!==e.affectedEntities){for(o=[],i=e.affectedEntities,r=0;r<i.length;r++)s=Ye.constructFromObject(i[r],void 0),o.push(s);t.setAffectedEntities(o)}if(e.hasOwnProperty("metricDetails")&&null!==e.metricDetails&&void 0!==e.metricDetails){for(o=[],i=e.metricDetails,r=0;r<i.length;r++)s=yt.constructFromObject(i[r],void 0),o.push(s);t.setMetricDetails(o)}if(e.hasOwnProperty("eventType")&&null!==e.eventType&&void 0!==e.eventType&&t.setEventType(e.eventType),e.hasOwnProperty("classifications")&&null!==e.classifications&&void 0!==e.classifications){for(o=[],i=e.classifications,r=0;r<i.length;r++)o.push(i[r]);t.setClassifications(o)}if(e.hasOwnProperty("sourceClusterUUID")&&null!==e.sourceClusterUUID&&void 0!==e.sourceClusterUUID&&t.setSourceClusterUUID(e.sourceClusterUUID),e.hasOwnProperty("creationTime")&&null!==e.creationTime&&void 0!==e.creationTime&&t.setCreationTime(e.creationTime),e.hasOwnProperty("message")&&null!==e.message&&void 0!==e.message&&t.setMessage(e.message),e.hasOwnProperty("clusterUUID")&&null!==e.clusterUUID&&void 0!==e.clusterUUID&&t.setClusterUUID(e.clusterUUID),e.hasOwnProperty("parameters")&&null!==e.parameters&&void 0!==e.parameters){for(o=[],i=e.parameters,r=0;r<i.length;r++)s=wt.constructFromObject(i[r],void 0),o.push(s);t.setParameters(o)}if(e.hasOwnProperty("serviceName")&&null!==e.serviceName&&void 0!==e.serviceName&&t.setServiceName(e.serviceName),e.hasOwnProperty("operationType")&&null!==e.operationType&&void 0!==e.operationType&&t.setOperationType(Vi.constructFromObject(e.operationType)),e.hasOwnProperty("clusterName")&&null!==e.clusterName&&void 0!==e.clusterName&&t.setClusterName(e.clusterName),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getSourceEntity(){return this.sourceEntity}setSourceEntity(e){this.sourceEntity=e}getAffectedEntities(){return this.affectedEntities}setAffectedEntities(e){this.affectedEntities=e}getMetricDetails(){return this.metricDetails}setMetricDetails(e){this.metricDetails=e}getEventType(){return this.eventType}setEventType(e){this.eventType=e}getClassifications(){return this.classifications}setClassifications(e){this.classifications=e}getSourceClusterUUID(){return this.sourceClusterUUID}setSourceClusterUUID(e){this.sourceClusterUUID=e}getCreationTime(){return this.creationTime}setCreationTime(e){this.creationTime=e}getMessage(){return this.message}setMessage(e){this.message=e}getClusterUUID(){return this.clusterUUID}setClusterUUID(e){this.clusterUUID=e}getParameters(){return this.parameters}setParameters(e){this.parameters=e}getServiceName(){return this.serviceName}setServiceName(e){this.serviceName=e}getOperationType(){return this.operationType}setOperationType(e){this.operationType=e}getClusterName(){return this.clusterName}setClusterName(e){this.clusterName=e}toJson(e){return!1===e?{...void 0!==this.getSourceEntity()&&null!==this.getSourceEntity()?{sourceEntity:this.getSourceEntity().toJson(!1)}:{},...void 0!==this.getAffectedEntities()&&null!==this.getAffectedEntities()?{affectedEntities:this.getAffectedEntities().map(e=>e.toJson(!1))}:{},...void 0!==this.getMetricDetails()&&null!==this.getMetricDetails()?{metricDetails:this.getMetricDetails().map(e=>e.toJson(!1))}:{},...void 0!==this.getEventType()&&null!==this.getEventType()?{eventType:this.getEventType()}:{},...void 0!==this.getClassifications()&&null!==this.getClassifications()?{classifications:this.getClassifications()}:{},...void 0!==this.getSourceClusterUUID()&&null!==this.getSourceClusterUUID()?{sourceClusterUUID:this.getSourceClusterUUID()}:{},...void 0!==this.getCreationTime()&&null!==this.getCreationTime()?{creationTime:Ls(Js,this,Ws).call(this,this.getCreationTime(),!1)}:{},...void 0!==this.getMessage()&&null!==this.getMessage()?{message:this.getMessage()}:{},...void 0!==this.getClusterUUID()&&null!==this.getClusterUUID()?{clusterUUID:this.getClusterUUID()}:{},...void 0!==this.getParameters()&&null!==this.getParameters()?{parameters:this.getParameters().map(e=>e.toJson(!1))}:{},...void 0!==this.getServiceName()&&null!==this.getServiceName()?{serviceName:this.getServiceName()}:{},...void 0!==this.getOperationType()&&null!==this.getOperationType()?{operationType:this.getOperationType()}:{},...void 0!==this.getClusterName()&&null!==this.getClusterName()?{clusterName:this.getClusterName()}:{},...void 0!==this.getExtId()&&null!==this.getExtId()?{extId:this.getExtId()}:{},...void 0!==this.getLinks()&&null!==this.getLinks()?{links:this.getLinks().map(e=>e.toJson(!1))}:{},...void 0!==this.getTenantId()&&null!==this.getTenantId()?{tenantId:this.getTenantId()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getSourceEntity()&&null!==this.getSourceEntity()?{sourceEntity:this.getSourceEntity().toJson(!1)}:{},...void 0!==this.getAffectedEntities()&&null!==this.getAffectedEntities()?{affectedEntities:this.getAffectedEntities().map(e=>e.toJson(!1))}:{},...void 0!==this.getMetricDetails()&&null!==this.getMetricDetails()?{metricDetails:this.getMetricDetails().map(e=>e.toJson(!1))}:{},...void 0!==this.getEventType()&&null!==this.getEventType()?{eventType:this.getEventType()}:{},...void 0!==this.getClassifications()&&null!==this.getClassifications()?{classifications:this.getClassifications()}:{},...void 0!==this.getSourceClusterUUID()&&null!==this.getSourceClusterUUID()?{sourceClusterUUID:this.getSourceClusterUUID()}:{},...void 0!==this.getCreationTime()&&null!==this.getCreationTime()?{creationTime:Ls(Js,this,Ws).call(this,this.getCreationTime(),!1)}:{},...void 0!==this.getMessage()&&null!==this.getMessage()?{message:this.getMessage()}:{},...void 0!==this.getClusterUUID()&&null!==this.getClusterUUID()?{clusterUUID:this.getClusterUUID()}:{},...void 0!==this.getParameters()&&null!==this.getParameters()?{parameters:this.getParameters().map(e=>e.toJson(!1))}:{},...void 0!==this.getServiceName()&&null!==this.getServiceName()?{serviceName:this.getServiceName()}:{},...void 0!==this.getOperationType()&&null!==this.getOperationType()?{operationType:this.getOperationType()}:{},...void 0!==this.getClusterName()&&null!==this.getClusterName()?{clusterName:this.getClusterName()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("sourceEntity"===t&&(void 0===this.sourceEntity||null===this.sourceEntity))return new O("sourceEntity","undefined or null");if("affectedEntities"===t){if(void 0===this.affectedEntities||null===this.affectedEntities)return new O("affectedEntities","undefined or null");if(!F.validateMaxItems(this.affectedEntities,50))return new O("affectedEntities","does not satisfy required maxItems constraint: 50")}if("metricDetails"===t){if(void 0===this.metricDetails||null===this.metricDetails)return new O("metricDetails","undefined or null");if(!F.validateMaxItems(this.metricDetails,100))return new O("metricDetails","does not satisfy required maxItems constraint: 100")}if("eventType"===t&&(void 0===this.eventType||null===this.eventType))return new O("eventType","undefined or null");if("classifications"===t){if(void 0===this.classifications||null===this.classifications)return new O("classifications","undefined or null");if(!F.validateMaxItems(this.classifications,15))return new O("classifications","does not satisfy required maxItems constraint: 15")}if("sourceClusterUUID"===t){if(void 0===this.sourceClusterUUID||null===this.sourceClusterUUID)return new O("sourceClusterUUID","undefined or null");if(!F.validatePattern(this.sourceClusterUUID,/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/))return new O("sourceClusterUUID","does not satisfy required pattern: /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/")}if("creationTime"===t&&(void 0===this.creationTime||null===this.creationTime))return new O("creationTime","undefined or null");if("message"===t){if(void 0===this.message||null===this.message)return new O("message","undefined or null");if(!F.validateMaxLength(this.message,1024))return new O("message","does not satisfy required maxLength constraint: 1024")}if("clusterUUID"===t){if(void 0===this.clusterUUID||null===this.clusterUUID)return new O("clusterUUID","undefined or null");if(!F.validatePattern(this.clusterUUID,/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/))return new O("clusterUUID","does not satisfy required pattern: /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/")}if("parameters"===t){if(void 0===this.parameters||null===this.parameters)return new O("parameters","undefined or null");if(!F.validateMaxItems(this.parameters,100))return new O("parameters","does not satisfy required maxItems constraint: 100")}if("serviceName"===t){if(void 0===this.serviceName||null===this.serviceName)return new O("serviceName","undefined or null");if(!F.validateMaxLength(this.serviceName,50))return new O("serviceName","does not satisfy required maxLength constraint: 50")}if("operationType"===t&&(void 0===this.operationType||null===this.operationType))return new O("operationType","undefined or null");if("clusterName"===t){if(void 0===this.clusterName||null===this.clusterName)return new O("clusterName","undefined or null");if(!F.validateMaxLength(this.clusterName,1e3))return new O("clusterName","does not satisfy required maxLength constraint: 1000")}return new O(t,"no such property exists")}}function Ws(e,t){return e instanceof Date&&void 0!==t?t?e.toISOString().slice(0,10):e.toISOString():e}function Bs(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")}_s.prototype.sourceEntity=void 0,_s.prototype.affectedEntities=void 0,_s.prototype.metricDetails=void 0,_s.prototype.eventType=void 0,_s.prototype.classifications=void 0,_s.prototype.sourceClusterUUID=void 0,_s.prototype.creationTime=void 0,_s.prototype.message=void 0,_s.prototype.clusterUUID=void 0,_s.prototype.parameters=void 0,_s.prototype.serviceName=void 0,_s.prototype.operationType=void 0,_s.prototype.clusterName=void 0,ze.prototype.extId=void 0,ze.prototype.links=void 0,Be.prototype.tenantId=void 0;var Gs=new WeakSet;class zs extends r{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=Gs),t.add(e),this.$objectType="monitoring.v4.serviceability.ListEventsApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,o,a,l;if(e){if(t=t||new zs,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(B.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)if(Array.isArray(e.data))if(0===e.data.length)t.setData([]);else{for(a=[],i=e.data,l=i[0].hasOwnProperty("$objectType")?i[0].$objectType:typeof i[0],o=0;o<i.length;o++){if("monitoring.v4.serviceability.Event"!==l)throw"Unknown list of type "+l+" in data";s=_s.constructFromObject(i[o],void 0),a.push(s)}t.setData(a)}else{if(l=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,"monitoring.v4.error.ErrorResponse"!==l)throw"Unknown datatype "+l+" in data";t.setData(Je.constructFromObject(e.data,void 0))}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMetadata(){return this.metadata}setMetadata(e){this.metadata=e}getData(){return this.data}setData(e){this.data=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson(!1):Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson(!1):e):Bs(Gs,this,qs).call(this,this.getData(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson():Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson():e):Bs(Gs,this,qs).call(this,this.getData())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"metadata"!==t||void 0!==this.metadata&&null!==this.metadata?"data"!==t||void 0!==this.data&&null!==this.data?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("data","undefined or null"):new O("metadata","undefined or null")}}function qs(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}function Ks(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")}zs.prototype.metadata=void 0,zs.prototype.data=void 0,zs.prototype.$reserved=void 0,zs.prototype.$objectType=void 0,zs.prototype.$unknownFields=void 0;var Hs=new WeakSet;class Ys extends r{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=Hs),t.add(e),this.$objectType="monitoring.v4.serviceability.GetEventApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i;if(e){if(t=t||new Ys,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(B.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(i=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,i){case"monitoring.v4.serviceability.Event":t.setData(_s.constructFromObject(e.data,void 0));break;case"monitoring.v4.error.ErrorResponse":t.setData(Je.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+i+" in data"}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMetadata(){return this.metadata}setMetadata(e){this.metadata=e}getData(){return this.data}setData(e){this.data=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson(!1):Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson(!1):e):Ks(Hs,this,Xs).call(this,this.getData(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson():Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson():e):Ks(Hs,this,Xs).call(this,this.getData())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"metadata"!==t||void 0!==this.metadata&&null!==this.metadata?"data"!==t||void 0!==this.data&&null!==this.data?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("data","undefined or null"):new O("metadata","undefined or null")}}function Xs(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}function Qs(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")}Ys.prototype.metadata=void 0,Ys.prototype.data=void 0,Ys.prototype.$reserved=void 0,Ys.prototype.$objectType=void 0,Ys.prototype.$unknownFields=void 0;var Zs=new WeakSet;class er extends r{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=Zs),t.add(e),this.$objectType="monitoring.v4.serviceability.ManageAlertApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i;if(e){if(t=t||new er,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(B.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(i=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,i){case"prism.v4.config.TaskReference":t.setData(Wn.constructFromObject(e.data,void 0));break;case"monitoring.v4.error.ErrorResponse":t.setData(Je.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+i+" in data"}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMetadata(){return this.metadata}setMetadata(e){this.metadata=e}getData(){return this.data}setData(e){this.data=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson(!1):Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson(!1):e):Qs(Zs,this,tr).call(this,this.getData(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson():Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson():e):Qs(Zs,this,tr).call(this,this.getData())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"metadata"!==t||void 0!==this.metadata&&null!==this.metadata?"data"!==t||void 0!==this.data&&null!==this.data?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("data","undefined or null"):new O("metadata","undefined or null")}}function tr(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}er.prototype.metadata=void 0,er.prototype.data=void 0,er.prototype.$reserved=void 0,er.prototype.$objectType=void 0,er.prototype.$unknownFields=void 0;const nr={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",RESOLVE:"RESOLVE",ACKNOWLEDGE:"ACKNOWLEDGE",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(nr).find(t=>nr[t]===e);return null==t?nr.$UNKNOWN:nr[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case nr.$UNKNOWN:case nr.$REDACTED:case nr.RESOLVE:case nr.ACKNOWLEDGE:return;default:throw new Error("Invalid : must be ActionType.{ $UNKNOWN|$REDACTED|RESOLVE|ACKNOWLEDGE }")}}};Object.freeze(nr);const ir=nr;var sr=new WeakSet;class rr{constructor(e){var t,n;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t=this,n=sr),n.add(t),this.actionType=e,this.$objectType="monitoring.v4.serviceability.AlertActionSpec",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new rr,e.hasOwnProperty("actionType")&&null!==e.actionType&&void 0!==e.actionType&&t.setActionType(ir.constructFromObject(e.actionType)),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getActionType(){return this.actionType}setActionType(e){this.actionType=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getActionType()&&null!==this.getActionType()?{actionType:this.getActionType()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=["actionType"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"actionType"!==t||void 0!==this.actionType&&null!==this.actionType?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("actionType","undefined or null")}}function or(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")}rr.prototype.actionType=void 0,rr.prototype.$reserved=void 0,rr.prototype.$objectType=void 0,rr.prototype.$unknownFields=void 0;var ar=new WeakSet;class lr extends r{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=ar),t.add(e),this.$objectType="monitoring.v4.serviceability.RunSystemDefinedChecksApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i;if(e){if(t=t||new lr,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(B.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(i=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,i){case"prism.v4.config.TaskReference":t.setData(Wn.constructFromObject(e.data,void 0));break;case"monitoring.v4.error.ErrorResponse":t.setData(Je.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+i+" in data"}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMetadata(){return this.metadata}setMetadata(e){this.metadata=e}getData(){return this.data}setData(e){this.data=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson(!1):Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson(!1):e):or(ar,this,dr).call(this,this.getData(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson():Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson():e):or(ar,this,dr).call(this,this.getData())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"metadata"!==t||void 0!==this.metadata&&null!==this.metadata?"data"!==t||void 0!==this.data&&null!==this.data?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("data","undefined or null"):new O("metadata","undefined or null")}}function dr(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}lr.prototype.metadata=void 0,lr.prototype.data=void 0,lr.prototype.$reserved=void 0,lr.prototype.$objectType=void 0,lr.prototype.$unknownFields=void 0;var ur=new WeakSet;class hr{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=ur),t.add(e),this.$objectType="monitoring.v4.serviceability.RunSystemDefinedChecksSpec",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,r,o;if(e){if(t=t||new hr,e.hasOwnProperty("sdaExtIds")&&null!==e.sdaExtIds&&void 0!==e.sdaExtIds){for(o=[],i=e.sdaExtIds,r=0;r<i.length;r++)o.push(i[r]);t.setSdaExtIds(o)}if(e.hasOwnProperty("shouldAnonymize")&&null!==e.shouldAnonymize&&void 0!==e.shouldAnonymize&&t.setShouldAnonymize(e.shouldAnonymize),e.hasOwnProperty("shouldSendReportToConfiguredRecipients")&&null!==e.shouldSendReportToConfiguredRecipients&&void 0!==e.shouldSendReportToConfiguredRecipients&&t.setShouldSendReportToConfiguredRecipients(e.shouldSendReportToConfiguredRecipients),e.hasOwnProperty("additionalRecipients")&&null!==e.additionalRecipients&&void 0!==e.additionalRecipients){for(o=[],i=e.additionalRecipients,r=0;r<i.length;r++)o.push(i[r]);t.setAdditionalRecipients(o)}if(e.hasOwnProperty("nodeIps")&&null!==e.nodeIps&&void 0!==e.nodeIps){for(o=[],i=e.nodeIps,r=0;r<i.length;r++)s=yi.constructFromObject(i[r],void 0),o.push(s);t.setNodeIps(o)}if(e.hasOwnProperty("shouldRunAllChecks")&&null!==e.shouldRunAllChecks&&void 0!==e.shouldRunAllChecks&&t.setShouldRunAllChecks(e.shouldRunAllChecks),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getSdaExtIds(){return this.sdaExtIds}setSdaExtIds(e){this.sdaExtIds=e}getShouldAnonymize(){return this.shouldAnonymize}setShouldAnonymize(e){this.shouldAnonymize=e}getShouldSendReportToConfiguredRecipients(){return this.shouldSendReportToConfiguredRecipients}setShouldSendReportToConfiguredRecipients(e){this.shouldSendReportToConfiguredRecipients=e}getAdditionalRecipients(){return this.additionalRecipients}setAdditionalRecipients(e){this.additionalRecipients=e}getNodeIps(){return this.nodeIps}setNodeIps(e){this.nodeIps=e}getShouldRunAllChecks(){return this.shouldRunAllChecks}setShouldRunAllChecks(e){this.shouldRunAllChecks=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getSdaExtIds()&&null!==this.getSdaExtIds()?{sdaExtIds:this.getSdaExtIds()}:{},...void 0!==this.getShouldAnonymize()&&null!==this.getShouldAnonymize()?{shouldAnonymize:this.getShouldAnonymize()}:{},...void 0!==this.getShouldSendReportToConfiguredRecipients()&&null!==this.getShouldSendReportToConfiguredRecipients()?{shouldSendReportToConfiguredRecipients:this.getShouldSendReportToConfiguredRecipients()}:{},...void 0!==this.getAdditionalRecipients()&&null!==this.getAdditionalRecipients()?{additionalRecipients:this.getAdditionalRecipients()}:{},...void 0!==this.getNodeIps()&&null!==this.getNodeIps()?{nodeIps:this.getNodeIps().map(e=>e.toJson(!1))}:{},...void 0!==this.getShouldRunAllChecks()&&null!==this.getShouldRunAllChecks()?{shouldRunAllChecks:this.getShouldRunAllChecks()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("sdaExtIds"===t){if(void 0===this.sdaExtIds||null===this.sdaExtIds)return new O("sdaExtIds","undefined or null");if(!F.validateMaxItems(this.sdaExtIds,50))return new O("sdaExtIds","does not satisfy required maxItems constraint: 50");if(!F.validateMinItems(this.sdaExtIds,1))return new O("sdaExtIds","does not satisfy required minItems constraint: 1")}if("shouldAnonymize"===t&&(void 0===this.shouldAnonymize||null===this.shouldAnonymize))return new O("shouldAnonymize","undefined or null");if("shouldSendReportToConfiguredRecipients"===t&&(void 0===this.shouldSendReportToConfiguredRecipients||null===this.shouldSendReportToConfiguredRecipients))return new O("shouldSendReportToConfiguredRecipients","undefined or null");if("additionalRecipients"===t){if(void 0===this.additionalRecipients||null===this.additionalRecipients)return new O("additionalRecipients","undefined or null");if(!F.validateMaxItems(this.additionalRecipients,5))return new O("additionalRecipients","does not satisfy required maxItems constraint: 5");if(!F.validateMinItems(this.additionalRecipients,1))return new O("additionalRecipients","does not satisfy required minItems constraint: 1")}if("nodeIps"===t){if(void 0===this.nodeIps||null===this.nodeIps)return new O("nodeIps","undefined or null");if(!F.validateMaxItems(this.nodeIps,48))return new O("nodeIps","does not satisfy required maxItems constraint: 48");if(!F.validateMinItems(this.nodeIps,1))return new O("nodeIps","does not satisfy required minItems constraint: 1")}return"shouldRunAllChecks"!==t||void 0!==this.shouldRunAllChecks&&null!==this.shouldRunAllChecks?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("shouldRunAllChecks","undefined or null")}}hr.prototype.sdaExtIds=void 0,hr.prototype.shouldAnonymize=!0,hr.prototype.shouldSendReportToConfiguredRecipients=!0,hr.prototype.additionalRecipients=void 0,hr.prototype.nodeIps=void 0,hr.prototype.shouldRunAllChecks=!1,hr.prototype.$reserved=void 0,hr.prototype.$objectType=void 0,hr.prototype.$unknownFields=void 0;var cr=new WeakSet;class pr{constructor(e){var t,n;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t=this,n=cr),n.add(t),this.extId=e,this.$objectType="monitoring.v4.serviceability.EntityFilter",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new pr,e.hasOwnProperty("extId")&&null!==e.extId&&void 0!==e.extId&&t.setExtId(e.extId),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getExtId(){return this.extId}setExtId(e){this.extId=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getExtId()&&null!==this.getExtId()?{extId:this.getExtId()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=["extId"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("extId"===t){if(void 0===this.extId||null===this.extId)return new O("extId","undefined or null");if(!F.validatePattern(this.extId,/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/))return new O("extId","does not satisfy required pattern: /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/")}return"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null")}}pr.prototype.extId=void 0,pr.prototype.$reserved=void 0,pr.prototype.$objectType=void 0,pr.prototype.$unknownFields=void 0;const vr={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",CATEGORY:"CATEGORY",CLUSTER:"CLUSTER",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(vr).find(t=>vr[t]===e);return null==t?vr.$UNKNOWN:vr[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case vr.$UNKNOWN:case vr.$REDACTED:case vr.CATEGORY:case vr.CLUSTER:return;default:throw new Error("Invalid : must be GroupEntityType.{ $UNKNOWN|$REDACTED|CATEGORY|CLUSTER }")}}};Object.freeze(vr);const yr=vr;var gr=new WeakSet;class mr{constructor(e,t){var n,i;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(n=this,i=gr),i.add(n),this.extId=e,this.type=t,this.$objectType="monitoring.v4.serviceability.GroupFilter",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new mr,e.hasOwnProperty("extId")&&null!==e.extId&&void 0!==e.extId&&t.setExtId(e.extId),e.hasOwnProperty("type")&&null!==e.type&&void 0!==e.type&&t.setType(yr.constructFromObject(e.type)),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getExtId(){return this.extId}setExtId(e){this.extId=e}getType(){return this.type}setType(e){this.type=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getExtId()&&null!==this.getExtId()?{extId:this.getExtId()}:{},...void 0!==this.getType()&&null!==this.getType()?{type:this.getType()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=["extId","type"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("extId"===t){if(void 0===this.extId||null===this.extId)return new O("extId","undefined or null");if(!F.validatePattern(this.extId,/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/))return new O("extId","does not satisfy required pattern: /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/")}return"type"!==t||void 0!==this.type&&null!==this.type?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("type","undefined or null")}}mr.prototype.extId=void 0,mr.prototype.type=void 0,mr.prototype.$reserved=void 0,mr.prototype.$objectType=void 0,mr.prototype.$unknownFields=void 0;var fr=new WeakSet;class $r{constructor(e,t){var n,i;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(n=this,i=fr),i.add(n),this.entityUuid=e,this.policyIds=t,this.$objectType="monitoring.v4.serviceability.RelatedPolicy",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,r;if(e){if(t=t||new $r,e.hasOwnProperty("entityUuid")&&null!==e.entityUuid&&void 0!==e.entityUuid&&t.setEntityUuid(e.entityUuid),e.hasOwnProperty("policyIds")&&null!==e.policyIds&&void 0!==e.policyIds){for(r=[],i=e.policyIds,s=0;s<i.length;s++)r.push(i[s]);t.setPolicyIds(r)}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getEntityUuid(){return this.entityUuid}setEntityUuid(e){this.entityUuid=e}getPolicyIds(){return this.policyIds}setPolicyIds(e){this.policyIds=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getEntityUuid()&&null!==this.getEntityUuid()?{entityUuid:this.getEntityUuid()}:{},...void 0!==this.getPolicyIds()&&null!==this.getPolicyIds()?{policyIds:this.getPolicyIds()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=["entityUuid","policyIds"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("entityUuid"===t){if(void 0===this.entityUuid||null===this.entityUuid)return new O("entityUuid","undefined or null");if(!F.validatePattern(this.entityUuid,/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/))return new O("entityUuid","does not satisfy required pattern: /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/")}if("policyIds"===t){if(void 0===this.policyIds||null===this.policyIds)return new O("policyIds","undefined or null");if(!F.validateMaxItems(this.policyIds,100))return new O("policyIds","does not satisfy required maxItems constraint: 100")}return"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null")}}function wr(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")}$r.prototype.entityUuid=void 0,$r.prototype.policyIds=void 0,$r.prototype.$reserved=void 0,$r.prototype.$objectType=void 0,$r.prototype.$unknownFields=void 0;var Tr=new WeakSet;class br{constructor(e,t,n){var i,s;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(i=this,s=Tr),s.add(i),this.metricName=e,this.operator=t,this.thresholdValue=n,this.$objectType="monitoring.v4.serviceability.Condition",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i;if(e){if(t=t||new br,e.hasOwnProperty("metricName")&&null!==e.metricName&&void 0!==e.metricName&&t.setMetricName(e.metricName),e.hasOwnProperty("operator")&&null!==e.operator&&void 0!==e.operator&&t.setOperator(nt.constructFromObject(e.operator)),e.hasOwnProperty("thresholdValue")&&null!==e.thresholdValue&&void 0!==e.thresholdValue)switch(i=e.thresholdValue.hasOwnProperty("$objectType")?e.thresholdValue.$objectType:typeof e.thresholdValue,i){case"monitoring.v4.common.DoubleValue":t.setThresholdValue(lt.constructFromObject(e.thresholdValue,void 0));break;case"monitoring.v4.common.IntValue":t.setThresholdValue(ut.constructFromObject(e.thresholdValue,void 0));break;default:throw"Unknown datatype "+i+" in data"}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMetricName(){return this.metricName}setMetricName(e){this.metricName=e}getOperator(){return this.operator}setOperator(e){this.operator=e}getThresholdValue(){return this.thresholdValue}setThresholdValue(e){this.thresholdValue=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getMetricName()&&null!==this.getMetricName()?{metricName:this.getMetricName()}:{},...void 0!==this.getOperator()&&null!==this.getOperator()?{operator:this.getOperator()}:{},...void 0!==this.getThresholdValue()&&null!==this.getThresholdValue()?{thresholdValue:void 0!==this.getThresholdValue().toJson?this.getThresholdValue().toJson(!1):Array.isArray(this.getThresholdValue())?this.getThresholdValue().map(e=>void 0!==e.toJson?e.toJson(!1):e):wr(Tr,this,kr).call(this,this.getThresholdValue(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getMetricName()&&null!==this.getMetricName()?{metricName:this.getMetricName()}:{},...void 0!==this.getOperator()&&null!==this.getOperator()?{operator:this.getOperator()}:{},...void 0!==this.getThresholdValue()&&null!==this.getThresholdValue()?{thresholdValue:void 0!==this.getThresholdValue().toJson?this.getThresholdValue().toJson():Array.isArray(this.getThresholdValue())?this.getThresholdValue().map(e=>void 0!==e.toJson?e.toJson():e):wr(Tr,this,kr).call(this,this.getThresholdValue())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=["metricName","operator","thresholdValue"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("metricName"===t){if(void 0===this.metricName||null===this.metricName)return new O("metricName","undefined or null");if(!F.validateMaxLength(this.metricName,150))return new O("metricName","does not satisfy required maxLength constraint: 150");if(!F.validateMinLength(this.metricName,1))return new O("metricName","does not satisfy required minLength constraint: 1")}return"operator"!==t||void 0!==this.operator&&null!==this.operator?"thresholdValue"!==t||void 0!==this.thresholdValue&&null!==this.thresholdValue?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("thresholdValue","undefined or null"):new O("operator","undefined or null")}}function kr(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}br.prototype.metricName=void 0,br.prototype.operator=void 0,br.prototype.thresholdValue=void 0,br.prototype.$reserved=void 0,br.prototype.$objectType=void 0,br.prototype.$unknownFields=void 0;const Fr={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",WARNING:"WARNING",CRITICAL:"CRITICAL",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(Fr).find(t=>Fr[t]===e);return null==t?Fr.$UNKNOWN:Fr[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case Fr.$UNKNOWN:case Fr.$REDACTED:case Fr.WARNING:case Fr.CRITICAL:return;default:throw new Error("Invalid : must be PolicySeverityLevel.{ $UNKNOWN|$REDACTED|WARNING|CRITICAL }")}}};Object.freeze(Fr);const Or=Fr;var jr=new WeakSet;class Er{constructor(e,t,n){var i,s;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(i=this,s=jr),s.add(i),this.conditionType=e,this.condition=t,this.severityLevel=n,this.$objectType="monitoring.v4.serviceability.TriggerCondition",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new Er,e.hasOwnProperty("conditionType")&&null!==e.conditionType&&void 0!==e.conditionType&&t.setConditionType(st.constructFromObject(e.conditionType)),e.hasOwnProperty("condition")&&null!==e.condition&&void 0!==e.condition&&t.setCondition(br.constructFromObject(e.condition)),e.hasOwnProperty("severityLevel")&&null!==e.severityLevel&&void 0!==e.severityLevel&&t.setSeverityLevel(Or.constructFromObject(e.severityLevel)),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getConditionType(){return this.conditionType}setConditionType(e){this.conditionType=e}getCondition(){return this.condition}setCondition(e){this.condition=e}getSeverityLevel(){return this.severityLevel}setSeverityLevel(e){this.severityLevel=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getConditionType()&&null!==this.getConditionType()?{conditionType:this.getConditionType()}:{},...void 0!==this.getCondition()&&null!==this.getCondition()?{condition:this.getCondition().toJson(!1)}:{},...void 0!==this.getSeverityLevel()&&null!==this.getSeverityLevel()?{severityLevel:this.getSeverityLevel()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=["conditionType","condition","severityLevel"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"conditionType"!==t||void 0!==this.conditionType&&null!==this.conditionType?"condition"!==t||void 0!==this.condition&&null!==this.condition?"severityLevel"!==t||void 0!==this.severityLevel&&null!==this.severityLevel?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("severityLevel","undefined or null"):new O("condition","undefined or null"):new O("conditionType","undefined or null")}}function Pr(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")}Er.prototype.conditionType=void 0,Er.prototype.condition=void 0,Er.prototype.severityLevel=void 0,Er.prototype.$reserved=void 0,Er.prototype.$objectType=void 0,Er.prototype.$unknownFields=void 0;var Ar=new WeakSet;class Cr extends ze{constructor(e,t,n){var i,s;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(i=this,s=Ar),s.add(i),this.title=e,this.triggerConditions=t,this.entityType=n,this.$objectType="monitoring.v4.serviceability.UserDefinedPolicy",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,r,o,a;if(e){if(t=t||new Cr,ze.constructFromObject(e,t,!0),e.hasOwnProperty("title")&&null!==e.title&&void 0!==e.title&&t.setTitle(e.title),e.hasOwnProperty("description")&&null!==e.description&&void 0!==e.description&&t.setDescription(e.description),e.hasOwnProperty("isEnabled")&&null!==e.isEnabled&&void 0!==e.isEnabled&&t.setIsEnabled(e.isEnabled),e.hasOwnProperty("isAutoResolved")&&null!==e.isAutoResolved&&void 0!==e.isAutoResolved&&t.setIsAutoResolved(e.isAutoResolved),e.hasOwnProperty("filters")&&null!==e.filters&&void 0!==e.filters){if(!Array.isArray(e.filters))throw a=e.filters.hasOwnProperty("$objectType")?e.filters.$objectType:typeof e.filters,"Unknown datatype "+a+" in data";if(0===e.filters.length)t.setFilters([]);else{for(o=[],i=e.filters,a=i[0].hasOwnProperty("$objectType")?i[0].$objectType:typeof i[0],r=0;r<i.length;r++)switch(a){case"monitoring.v4.serviceability.EntityFilter":s=pr.constructFromObject(i[r],void 0),o.push(s);break;case"monitoring.v4.serviceability.GroupFilter":s=mr.constructFromObject(i[r],void 0),o.push(s);break;default:throw"Unknown list of type "+a+" in data"}t.setFilters(o)}}if(e.hasOwnProperty("triggerConditions")&&null!==e.triggerConditions&&void 0!==e.triggerConditions){for(o=[],i=e.triggerConditions,r=0;r<i.length;r++)s=Er.constructFromObject(i[r],void 0),o.push(s);t.setTriggerConditions(o)}if(e.hasOwnProperty("impactTypes")&&null!==e.impactTypes&&void 0!==e.impactTypes){for(o=[],i=e.impactTypes,r=0;r<i.length;r++)s=Qe.constructFromObject(i[r],void 0),o.push(s);t.setImpactTypes(o)}if(e.hasOwnProperty("createdBy")&&null!==e.createdBy&&void 0!==e.createdBy&&t.setCreatedBy(e.createdBy),e.hasOwnProperty("lastUpdatedTime")&&null!==e.lastUpdatedTime&&void 0!==e.lastUpdatedTime&&t.setLastUpdatedTime(e.lastUpdatedTime),e.hasOwnProperty("isExpectedToErrorOnConflict")&&null!==e.isExpectedToErrorOnConflict&&void 0!==e.isExpectedToErrorOnConflict&&t.setIsExpectedToErrorOnConflict(e.isExpectedToErrorOnConflict),e.hasOwnProperty("policiesToOverride")&&null!==e.policiesToOverride&&void 0!==e.policiesToOverride){for(o=[],i=e.policiesToOverride,r=0;r<i.length;r++)o.push(i[r]);t.setPoliciesToOverride(o)}if(e.hasOwnProperty("triggerWaitPeriod")&&null!==e.triggerWaitPeriod&&void 0!==e.triggerWaitPeriod&&t.setTriggerWaitPeriod(e.triggerWaitPeriod),e.hasOwnProperty("relatedPolicies")&&null!==e.relatedPolicies&&void 0!==e.relatedPolicies){for(o=[],i=e.relatedPolicies,r=0;r<i.length;r++)s=$r.constructFromObject(i[r],void 0),o.push(s);t.setRelatedPolicies(o)}if(e.hasOwnProperty("entityType")&&null!==e.entityType&&void 0!==e.entityType&&t.setEntityType(e.entityType),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getTitle(){return this.title}setTitle(e){this.title=e}getDescription(){return this.description}setDescription(e){this.description=e}getIsEnabled(){return this.isEnabled}setIsEnabled(e){this.isEnabled=e}getIsAutoResolved(){return this.isAutoResolved}setIsAutoResolved(e){this.isAutoResolved=e}getFilters(){return this.filters}setFilters(e){this.filters=e}getTriggerConditions(){return this.triggerConditions}setTriggerConditions(e){this.triggerConditions=e}getImpactTypes(){return this.impactTypes}setImpactTypes(e){this.impactTypes=e}getCreatedBy(){return this.createdBy}setCreatedBy(e){this.createdBy=e}getLastUpdatedTime(){return this.lastUpdatedTime}setLastUpdatedTime(e){this.lastUpdatedTime=e}getIsExpectedToErrorOnConflict(){return this.isExpectedToErrorOnConflict}setIsExpectedToErrorOnConflict(e){this.isExpectedToErrorOnConflict=e}getPoliciesToOverride(){return this.policiesToOverride}setPoliciesToOverride(e){this.policiesToOverride=e}getTriggerWaitPeriod(){return this.triggerWaitPeriod}setTriggerWaitPeriod(e){this.triggerWaitPeriod=e}getRelatedPolicies(){return this.relatedPolicies}setRelatedPolicies(e){this.relatedPolicies=e}getEntityType(){return this.entityType}setEntityType(e){this.entityType=e}toJson(e){return!1===e?{...void 0!==this.getTitle()&&null!==this.getTitle()?{title:this.getTitle()}:{},...void 0!==this.getDescription()&&null!==this.getDescription()?{description:this.getDescription()}:{},...void 0!==this.getIsEnabled()&&null!==this.getIsEnabled()?{isEnabled:this.getIsEnabled()}:{},...void 0!==this.getIsAutoResolved()&&null!==this.getIsAutoResolved()?{isAutoResolved:this.getIsAutoResolved()}:{},...void 0!==this.getFilters()&&null!==this.getFilters()?{filters:void 0!==this.getFilters().toJson?this.getFilters().toJson(!1):Array.isArray(this.getFilters())?this.getFilters().map(e=>void 0!==e.toJson?e.toJson(!1):e):Pr(Ar,this,Ir).call(this,this.getFilters(),!1)}:{},...void 0!==this.getTriggerConditions()&&null!==this.getTriggerConditions()?{triggerConditions:this.getTriggerConditions().map(e=>e.toJson(!1))}:{},...void 0!==this.getImpactTypes()&&null!==this.getImpactTypes()?{impactTypes:this.getImpactTypes()}:{},...void 0!==this.getCreatedBy()&&null!==this.getCreatedBy()?{createdBy:this.getCreatedBy()}:{},...void 0!==this.getLastUpdatedTime()&&null!==this.getLastUpdatedTime()?{lastUpdatedTime:Pr(Ar,this,Ur).call(this,this.getLastUpdatedTime(),!1)}:{},...void 0!==this.getIsExpectedToErrorOnConflict()&&null!==this.getIsExpectedToErrorOnConflict()?{isExpectedToErrorOnConflict:this.getIsExpectedToErrorOnConflict()}:{},...void 0!==this.getPoliciesToOverride()&&null!==this.getPoliciesToOverride()?{policiesToOverride:this.getPoliciesToOverride()}:{},...void 0!==this.getTriggerWaitPeriod()&&null!==this.getTriggerWaitPeriod()?{triggerWaitPeriod:this.getTriggerWaitPeriod()}:{},...void 0!==this.getRelatedPolicies()&&null!==this.getRelatedPolicies()?{relatedPolicies:this.getRelatedPolicies().map(e=>e.toJson(!1))}:{},...void 0!==this.getEntityType()&&null!==this.getEntityType()?{entityType:this.getEntityType()}:{},...void 0!==this.getExtId()&&null!==this.getExtId()?{extId:this.getExtId()}:{},...void 0!==this.getLinks()&&null!==this.getLinks()?{links:this.getLinks().map(e=>e.toJson(!1))}:{},...void 0!==this.getTenantId()&&null!==this.getTenantId()?{tenantId:this.getTenantId()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getTitle()&&null!==this.getTitle()?{title:this.getTitle()}:{},...void 0!==this.getDescription()&&null!==this.getDescription()?{description:this.getDescription()}:{},...void 0!==this.getIsEnabled()&&null!==this.getIsEnabled()?{isEnabled:this.getIsEnabled()}:{},...void 0!==this.getIsAutoResolved()&&null!==this.getIsAutoResolved()?{isAutoResolved:this.getIsAutoResolved()}:{},...void 0!==this.getFilters()&&null!==this.getFilters()?{filters:void 0!==this.getFilters().toJson?this.getFilters().toJson():Array.isArray(this.getFilters())?this.getFilters().map(e=>void 0!==e.toJson?e.toJson():e):Pr(Ar,this,Ir).call(this,this.getFilters())}:{},...void 0!==this.getTriggerConditions()&&null!==this.getTriggerConditions()?{triggerConditions:this.getTriggerConditions().map(e=>e.toJson(!1))}:{},...void 0!==this.getImpactTypes()&&null!==this.getImpactTypes()?{impactTypes:this.getImpactTypes()}:{},...void 0!==this.getIsExpectedToErrorOnConflict()&&null!==this.getIsExpectedToErrorOnConflict()?{isExpectedToErrorOnConflict:this.getIsExpectedToErrorOnConflict()}:{},...void 0!==this.getPoliciesToOverride()&&null!==this.getPoliciesToOverride()?{policiesToOverride:this.getPoliciesToOverride()}:{},...void 0!==this.getTriggerWaitPeriod()&&null!==this.getTriggerWaitPeriod()?{triggerWaitPeriod:this.getTriggerWaitPeriod()}:{},...void 0!==this.getRelatedPolicies()&&null!==this.getRelatedPolicies()?{relatedPolicies:this.getRelatedPolicies().map(e=>e.toJson(!1))}:{},...void 0!==this.getEntityType()&&null!==this.getEntityType()?{entityType:this.getEntityType()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=["title","triggerConditions","entityType"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("title"===t){if(void 0===this.title||null===this.title)return new O("title","undefined or null");if(!F.validateMaxLength(this.title,150))return new O("title","does not satisfy required maxLength constraint: 150");if(!F.validateMinLength(this.title,1))return new O("title","does not satisfy required minLength constraint: 1")}if("description"===t){if(void 0===this.description||null===this.description)return new O("description","undefined or null");if(!F.validateMaxLength(this.description,500))return new O("description","does not satisfy required maxLength constraint: 500")}if("isEnabled"===t&&(void 0===this.isEnabled||null===this.isEnabled))return new O("isEnabled","undefined or null");if("isAutoResolved"===t&&(void 0===this.isAutoResolved||null===this.isAutoResolved))return new O("isAutoResolved","undefined or null");if("filters"===t&&(void 0===this.filters||null===this.filters))return new O("filters","undefined or null");if("triggerConditions"===t){if(void 0===this.triggerConditions||null===this.triggerConditions)return new O("triggerConditions","undefined or null");if(!F.validateMaxItems(this.triggerConditions,4))return new O("triggerConditions","does not satisfy required maxItems constraint: 4");if(!F.validateMinItems(this.triggerConditions,1))return new O("triggerConditions","does not satisfy required minItems constraint: 1")}if("impactTypes"===t){if(void 0===this.impactTypes||null===this.impactTypes)return new O("impactTypes","undefined or null");if(!F.validateMaxItems(this.impactTypes,8))return new O("impactTypes","does not satisfy required maxItems constraint: 8")}if("createdBy"===t&&(void 0===this.createdBy||null===this.createdBy))return new O("createdBy","undefined or null");if("lastUpdatedTime"===t&&(void 0===this.lastUpdatedTime||null===this.lastUpdatedTime))return new O("lastUpdatedTime","undefined or null");if("isExpectedToErrorOnConflict"===t&&(void 0===this.isExpectedToErrorOnConflict||null===this.isExpectedToErrorOnConflict))return new O("isExpectedToErrorOnConflict","undefined or null");if("policiesToOverride"===t){if(void 0===this.policiesToOverride||null===this.policiesToOverride)return new O("policiesToOverride","undefined or null");if(!F.validateMaxItems(this.policiesToOverride,100))return new O("policiesToOverride","does not satisfy required maxItems constraint: 100")}if("triggerWaitPeriod"===t&&(void 0===this.triggerWaitPeriod||null===this.triggerWaitPeriod))return new O("triggerWaitPeriod","undefined or null");if("relatedPolicies"===t){if(void 0===this.relatedPolicies||null===this.relatedPolicies)return new O("relatedPolicies","undefined or null");if(!F.validateMaxItems(this.relatedPolicies,100))return new O("relatedPolicies","does not satisfy required maxItems constraint: 100")}if("entityType"===t){if(void 0===this.entityType||null===this.entityType)return new O("entityType","undefined or null");if(!F.validateMaxLength(this.entityType,10))return new O("entityType","does not satisfy required maxLength constraint: 10");if(!F.validateMinLength(this.entityType,1))return new O("entityType","does not satisfy required minLength constraint: 1")}return new O(t,"no such property exists")}}function Ir(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}function Ur(e,t){return e instanceof Date&&void 0!==t?t?e.toISOString().slice(0,10):e.toISOString():e}function Dr(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")}Cr.prototype.title=void 0,Cr.prototype.description=void 0,Cr.prototype.isEnabled=!1,Cr.prototype.isAutoResolved=!0,Cr.prototype.filters=void 0,Cr.prototype.triggerConditions=void 0,Cr.prototype.impactTypes=void 0,Cr.prototype.createdBy=void 0,Cr.prototype.lastUpdatedTime=void 0,Cr.prototype.isExpectedToErrorOnConflict=!0,Cr.prototype.policiesToOverride=void 0,Cr.prototype.triggerWaitPeriod=void 0,Cr.prototype.relatedPolicies=void 0,Cr.prototype.entityType=void 0,ze.prototype.extId=void 0,ze.prototype.links=void 0,Be.prototype.tenantId=void 0;var Sr=new WeakSet;class Rr extends r{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=Sr),t.add(e),this.$objectType="monitoring.v4.serviceability.CreateUdaPolicyApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i;if(e){if(t=t||new Rr,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(B.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(i=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,i){case"monitoring.v4.serviceability.UserDefinedPolicy":t.setData(Cr.constructFromObject(e.data,void 0));break;case"monitoring.v4.error.ErrorResponse":t.setData(Je.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+i+" in data"}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMetadata(){return this.metadata}setMetadata(e){this.metadata=e}getData(){return this.data}setData(e){this.data=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson(!1):Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson(!1):e):Dr(Sr,this,Nr).call(this,this.getData(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson():Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson():e):Dr(Sr,this,Nr).call(this,this.getData())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"metadata"!==t||void 0!==this.metadata&&null!==this.metadata?"data"!==t||void 0!==this.data&&null!==this.data?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("data","undefined or null"):new O("metadata","undefined or null")}}function Nr(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}Rr.prototype.metadata=void 0,Rr.prototype.data=void 0,Rr.prototype.$reserved=void 0,Rr.prototype.$objectType=void 0,Rr.prototype.$unknownFields=void 0;var xr=new WeakSet;class Mr{constructor(e){var t,n;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t=this,n=xr),n.add(t),this.extId=e,this.$objectType="monitoring.v4.serviceability.ConflictingPolicy",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new Mr,e.hasOwnProperty("extId")&&null!==e.extId&&void 0!==e.extId&&t.setExtId(e.extId),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getExtId(){return this.extId}setExtId(e){this.extId=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getExtId()&&null!==this.getExtId()?{extId:this.getExtId()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=["extId"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("extId"===t){if(void 0===this.extId||null===this.extId)return new O("extId","undefined or null");if(!F.validatePattern(this.extId,/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/))return new O("extId","does not satisfy required pattern: /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/")}return"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null")}}function Vr(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")}Mr.prototype.extId=void 0,Mr.prototype.$reserved=void 0,Mr.prototype.$objectType=void 0,Mr.prototype.$unknownFields=void 0;var Lr=new WeakSet;class Jr extends r{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=Lr),t.add(e),this.$objectType="monitoring.v4.serviceability.FindConflictingUdaPoliciesApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,o,a,l;if(e){if(t=t||new Jr,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(B.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)if(Array.isArray(e.data))if(0===e.data.length)t.setData([]);else{for(a=[],i=e.data,l=i[0].hasOwnProperty("$objectType")?i[0].$objectType:typeof i[0],o=0;o<i.length;o++){if("monitoring.v4.serviceability.ConflictingPolicy"!==l)throw"Unknown list of type "+l+" in data";s=Mr.constructFromObject(i[o],void 0),a.push(s)}t.setData(a)}else{if(l=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,"monitoring.v4.error.ErrorResponse"!==l)throw"Unknown datatype "+l+" in data";t.setData(Je.constructFromObject(e.data,void 0))}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMetadata(){return this.metadata}setMetadata(e){this.metadata=e}getData(){return this.data}setData(e){this.data=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson(!1):Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson(!1):e):Vr(Lr,this,_r).call(this,this.getData(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson():Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson():e):Vr(Lr,this,_r).call(this,this.getData())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"metadata"!==t||void 0!==this.metadata&&null!==this.metadata?"data"!==t||void 0!==this.data&&null!==this.data?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("data","undefined or null"):new O("metadata","undefined or null")}}function _r(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}function Wr(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")}Jr.prototype.metadata=void 0,Jr.prototype.data=void 0,Jr.prototype.$reserved=void 0,Jr.prototype.$objectType=void 0,Jr.prototype.$unknownFields=void 0;var Br=new WeakSet;class Gr extends r{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=Br),t.add(e),this.$objectType="monitoring.v4.serviceability.UpdateUdaPolicyApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,o,a,l;if(e){if(t=t||new Gr,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(B.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)if(Array.isArray(e.data))if(0===e.data.length)t.setData([]);else{for(a=[],i=e.data,l=i[0].hasOwnProperty("$objectType")?i[0].$objectType:typeof i[0],o=0;o<i.length;o++){if("monitoring.v4.error.AppMessage"!==l)throw"Unknown list of type "+l+" in data";s=Ie.constructFromObject(i[o],void 0),a.push(s)}t.setData(a)}else{if(l=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,"monitoring.v4.error.ErrorResponse"!==l)throw"Unknown datatype "+l+" in data";t.setData(Je.constructFromObject(e.data,void 0))}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMetadata(){return this.metadata}setMetadata(e){this.metadata=e}getData(){return this.data}setData(e){this.data=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson(!1):Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson(!1):e):Wr(Br,this,zr).call(this,this.getData(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson():Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson():e):Wr(Br,this,zr).call(this,this.getData())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"metadata"!==t||void 0!==this.metadata&&null!==this.metadata?"data"!==t||void 0!==this.data&&null!==this.data?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("data","undefined or null"):new O("metadata","undefined or null")}}function zr(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}function qr(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")}Gr.prototype.metadata=void 0,Gr.prototype.data=void 0,Gr.prototype.$reserved=void 0,Gr.prototype.$objectType=void 0,Gr.prototype.$unknownFields=void 0;var Kr=new WeakSet;class Hr extends r{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=Kr),t.add(e),this.$objectType="monitoring.v4.serviceability.DeleteUdaPolicyApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i;if(e){if(t=t||new Hr,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(B.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(null===e.data&&t.setData(null),i=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,i){case"monitoring.v4.error.ErrorResponse":t.setData(Je.constructFromObject(e.data,void 0));break;case"":t.setData(Void.constructFromObject(e[""],void 0));break;default:throw"Unknown datatype "+i+" in data"}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMetadata(){return this.metadata}setMetadata(e){this.metadata=e}getData(){return this.data}setData(e){this.data=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson(!1):Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson(!1):e):qr(Kr,this,Yr).call(this,this.getData(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson():Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson():e):qr(Kr,this,Yr).call(this,this.getData())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"metadata"!==t||void 0!==this.metadata&&null!==this.metadata?"data"!==t||void 0!==this.data&&null!==this.data?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("data","undefined or null"):new O("metadata","undefined or null")}}function Yr(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}function Xr(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")}Hr.prototype.metadata=void 0,Hr.prototype.data=void 0,Hr.prototype.$reserved=void 0,Hr.prototype.$objectType=void 0,Hr.prototype.$unknownFields=void 0;var Qr=new WeakSet;class Zr extends r{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=Qr),t.add(e),this.$objectType="monitoring.v4.serviceability.ListUdaPoliciesApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,o,a,l;if(e){if(t=t||new Zr,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(B.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)if(Array.isArray(e.data))if(0===e.data.length)t.setData([]);else{for(a=[],i=e.data,l=i[0].hasOwnProperty("$objectType")?i[0].$objectType:typeof i[0],o=0;o<i.length;o++){if("monitoring.v4.serviceability.UserDefinedPolicy"!==l)throw"Unknown list of type "+l+" in data";s=Cr.constructFromObject(i[o],void 0),a.push(s)}t.setData(a)}else{if(l=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,"monitoring.v4.error.ErrorResponse"!==l)throw"Unknown datatype "+l+" in data";t.setData(Je.constructFromObject(e.data,void 0))}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMetadata(){return this.metadata}setMetadata(e){this.metadata=e}getData(){return this.data}setData(e){this.data=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson(!1):Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson(!1):e):Xr(Qr,this,eo).call(this,this.getData(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson():Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson():e):Xr(Qr,this,eo).call(this,this.getData())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"metadata"!==t||void 0!==this.metadata&&null!==this.metadata?"data"!==t||void 0!==this.data&&null!==this.data?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("data","undefined or null"):new O("metadata","undefined or null")}}function eo(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}function to(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")}Zr.prototype.metadata=void 0,Zr.prototype.data=void 0,Zr.prototype.$reserved=void 0,Zr.prototype.$objectType=void 0,Zr.prototype.$unknownFields=void 0;var no=new WeakSet;class io extends r{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=no),t.add(e),this.$objectType="monitoring.v4.serviceability.GetUdaPolicyApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i;if(e){if(t=t||new io,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(B.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(i=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,i){case"monitoring.v4.serviceability.UserDefinedPolicy":t.setData(Cr.constructFromObject(e.data,void 0));break;case"monitoring.v4.error.ErrorResponse":t.setData(Je.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+i+" in data"}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMetadata(){return this.metadata}setMetadata(e){this.metadata=e}getData(){return this.data}setData(e){this.data=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson(!1):Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson(!1):e):to(no,this,so).call(this,this.getData(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson():Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson():e):to(no,this,so).call(this,this.getData())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"metadata"!==t||void 0!==this.metadata&&null!==this.metadata?"data"!==t||void 0!==this.data&&null!==this.data?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("data","undefined or null"):new O("metadata","undefined or null")}}function so(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}io.prototype.metadata=void 0,io.prototype.data=void 0,io.prototype.$reserved=void 0,io.prototype.$objectType=void 0,io.prototype.$unknownFields=void 0;var ro=new WeakSet;class oo{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=ro),t.add(e),this.$objectType="monitoring.v4.common.CauseAndResolution",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new oo,e.hasOwnProperty("cause")&&null!==e.cause&&void 0!==e.cause&&t.setCause(e.cause),e.hasOwnProperty("resolution")&&null!==e.resolution&&void 0!==e.resolution&&t.setResolution(e.resolution),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getCause(){return this.cause}setCause(e){this.cause=e}getResolution(){return this.resolution}setResolution(e){this.resolution=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getCause()&&null!==this.getCause()?{cause:this.getCause()}:{},...void 0!==this.getResolution()&&null!==this.getResolution()?{resolution:this.getResolution()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("cause"===t){if(void 0===this.cause||null===this.cause)return new O("cause","undefined or null");if(!F.validateMaxLength(this.cause,500))return new O("cause","does not satisfy required maxLength constraint: 500")}if("resolution"===t){if(void 0===this.resolution||null===this.resolution)return new O("resolution","undefined or null");if(!F.validateMaxLength(this.resolution,500))return new O("resolution","does not satisfy required maxLength constraint: 500")}return"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null")}}oo.prototype.cause=void 0,oo.prototype.resolution=void 0,oo.prototype.$reserved=void 0,oo.prototype.$objectType=void 0,oo.prototype.$unknownFields=void 0;var ao=new WeakSet;class lo{constructor(e){var t,n;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t=this,n=ao),n.add(t),this.floatValue=e,this.$objectType="monitoring.v4.common.FloatValue",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new lo,e.hasOwnProperty("floatValue")&&null!==e.floatValue&&void 0!==e.floatValue&&t.setFloatValue(e.floatValue),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getFloatValue(){return this.floatValue}setFloatValue(e){this.floatValue=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getFloatValue()&&null!==this.getFloatValue()?{floatValue:this.getFloatValue()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=["floatValue"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"floatValue"!==t||void 0!==this.floatValue&&null!==this.floatValue?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("floatValue","undefined or null")}}lo.prototype.floatValue=void 0,lo.prototype.$reserved=void 0,lo.prototype.$objectType=void 0,lo.prototype.$unknownFields=void 0;class uo extends Ot{constructor(){super(),this.$objectType="monitoring.v4.serviceability.RootCauseAnalysisProjection",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new uo,Ot.constructFromObject(e,t,!0),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return new O(t,"no such property exists")}}const ho={ApiClient:le,AlertsApi:class{#e;static get ApiClient(){return le}constructor(e){this.apiClient=e||le.instance,this.#e=new Set,this.#e.add("authorization"),this.#e.add("cookie"),this.#e.add("host"),this.#e.add("user-agent")}getAlertById(e,...t){let n=t.length>0?t[0]:{};if(null==e)throw new Error("Missing the required parameter 'extId' when calling getAlertById");const i={extId:e};let s={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(s[e]=n[e])});const r={...s},o=Lt;return this.apiClient.callApi("/api/monitoring/v4.2/serviceability/alerts/{extId}","GET",i,{},r,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],o)}listAlerts(e,...t){let n=t.length>0?t[0]:{};const i={...(e=e||{}).hasOwnProperty("$page")?{$page:e.$page}:{},...e.hasOwnProperty("$limit")?{$limit:e.$limit}:{},...e.hasOwnProperty("$filter")?{$filter:e.$filter}:{},...e.hasOwnProperty("$orderby")?{$orderby:e.$orderby}:{},...e.hasOwnProperty("$select")?{$select:e.$select}:{}};let s={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(s[e]=n[e])});const r={...s},o=Nt;return this.apiClient.callApi("/api/monitoring/v4.2/serviceability/alerts","GET",{},i,r,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],o)}},SystemDefinedPoliciesApi:class{#e;static get ApiClient(){return le}constructor(e){this.apiClient=e||le.instance,this.#e=new Set,this.#e.add("authorization"),this.#e.add("cookie"),this.#e.add("host"),this.#e.add("user-agent")}getClusterConfigById(e,t,...n){let i=n.length>0?n[0]:{};if(null==e)throw new Error("Missing the required parameter 'systemDefinedPolicyExtId' when calling getClusterConfigById");if(null==t)throw new Error("Missing the required parameter 'extId' when calling getClusterConfigById");const s={systemDefinedPolicyExtId:e,extId:t};let r={};Object.keys(i).forEach(e=>{this.#e.has(e.toLowerCase())||(r[e]=i[e])});const o={...r},a=Ln;return this.apiClient.callApi("/api/monitoring/v4.2/serviceability/alerts/system-defined-policies/{systemDefinedPolicyExtId}/cluster-configs/{extId}","GET",s,{},o,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],a)}getSdaPolicyById(e,...t){let n=t.length>0?t[0]:{};if(null==e)throw new Error("Missing the required parameter 'extId' when calling getSdaPolicyById");const i={extId:e};let s={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(s[e]=n[e])});const r={...s},o=In;return this.apiClient.callApi("/api/monitoring/v4.2/serviceability/alerts/system-defined-policies/{extId}","GET",i,{},r,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],o)}listClusterConfigsBySdaId(e,t,...n){let i=n.length>0?n[0]:{};if(t=t||{},null==e)throw new Error("Missing the required parameter 'systemDefinedPolicyExtId' when calling listClusterConfigsBySdaId");const s={systemDefinedPolicyExtId:e},r={...t.hasOwnProperty("$page")?{$page:t.$page}:{},...t.hasOwnProperty("$limit")?{$limit:t.$limit}:{},...t.hasOwnProperty("$filter")?{$filter:t.$filter}:{},...t.hasOwnProperty("$orderby")?{$orderby:t.$orderby}:{},...t.hasOwnProperty("$select")?{$select:t.$select}:{}};let o={};Object.keys(i).forEach(e=>{this.#e.has(e.toLowerCase())||(o[e]=i[e])});const a={...o},l=Nn;return this.apiClient.callApi("/api/monitoring/v4.2/serviceability/alerts/system-defined-policies/{systemDefinedPolicyExtId}/cluster-configs","GET",s,r,a,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],l)}listSdaPolicies(e,...t){let n=t.length>0?t[0]:{};const i={...(e=e||{}).hasOwnProperty("$page")?{$page:e.$page}:{},...e.hasOwnProperty("$limit")?{$limit:e.$limit}:{},...e.hasOwnProperty("$filter")?{$filter:e.$filter}:{},...e.hasOwnProperty("$orderby")?{$orderby:e.$orderby}:{},...e.hasOwnProperty("$select")?{$select:e.$select}:{}};let s={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(s[e]=n[e])});const r={...s},o=Yn;return this.apiClient.callApi("/api/monitoring/v4.2/serviceability/alerts/system-defined-policies","GET",{},i,r,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],o)}updateClusterConfigById(e,t,n,...i){let s=i.length>0?i[0]:{},r=null;if(r=n instanceof yn&&"function"==typeof n.toJson?n.toJson():n,null==e)throw new Error("Missing the required parameter 'systemDefinedPolicyExtId' when calling updateClusterConfigById");if(null==t)throw new Error("Missing the required parameter 'extId' when calling updateClusterConfigById");if(null==r)throw new Error("Invalid body when calling updateClusterConfigById");const o={systemDefinedPolicyExtId:e,extId:t};let a={};Object.keys(s).forEach(e=>{this.#e.has(e.toLowerCase())||(a[e]=s[e])});const l={...a};le.addEtagReferenceToHeader(n,l);const d=zn;return this.apiClient.callApi("/api/monitoring/v4.2/serviceability/alerts/system-defined-policies/{systemDefinedPolicyExtId}/cluster-configs/{extId}","PUT",o,{},l,{},r,["apiKeyAuthScheme","basicAuthScheme"],["application/json"],["application/json"],d)}},AlertEmailConfigurationApi:class{#e;static get ApiClient(){return le}constructor(e){this.apiClient=e||le.instance,this.#e=new Set,this.#e.add("authorization"),this.#e.add("cookie"),this.#e.add("host"),this.#e.add("user-agent")}getAlertEmailConfiguration(...e){let t=e.length>0?e[0]:{},n={};Object.keys(t).forEach(e=>{this.#e.has(e.toLowerCase())||(n[e]=t[e])});const i={...n},s=Ui;return this.apiClient.callApi("/api/monitoring/v4.2/serviceability/alerts/email-config","GET",{},{},i,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],s)}updateAlertEmailConfiguration(e,...t){let n=t.length>0?t[0]:{},i=null;if(i=e instanceof Ai&&"function"==typeof e.toJson?e.toJson():e,null==i)throw new Error("Invalid body when calling updateAlertEmailConfiguration");let s={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(s[e]=n[e])});const r={...s};le.addEtagReferenceToHeader(e,r);const o=Ni;return this.apiClient.callApi("/api/monitoring/v4.2/serviceability/alerts/email-config","PUT",{},{},r,{},i,["apiKeyAuthScheme","basicAuthScheme"],["application/json"],["application/json"],o)}},AuditsApi:class{#e;static get ApiClient(){return le}constructor(e){this.apiClient=e||le.instance,this.#e=new Set,this.#e.add("authorization"),this.#e.add("cookie"),this.#e.add("host"),this.#e.add("user-agent")}getAuditById(e,...t){let n=t.length>0?t[0]:{};if(null==e)throw new Error("Missing the required parameter 'extId' when calling getAuditById");const i={extId:e};let s={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(s[e]=n[e])});const r={...s},o=Qi;return this.apiClient.callApi("/api/monitoring/v4.2/serviceability/audits/{extId}","GET",i,{},r,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],o)}listAudits(e,...t){let n=t.length>0?t[0]:{};const i={...(e=e||{}).hasOwnProperty("$page")?{$page:e.$page}:{},...e.hasOwnProperty("$limit")?{$limit:e.$limit}:{},...e.hasOwnProperty("$filter")?{$filter:e.$filter}:{},...e.hasOwnProperty("$orderby")?{$orderby:e.$orderby}:{},...e.hasOwnProperty("$select")?{$select:e.$select}:{}};let s={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(s[e]=n[e])});const r={...s},o=ns;return this.apiClient.callApi("/api/monitoring/v4.2/serviceability/audits","GET",{},i,r,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],o)}},ClusterLogsApi:class{#e;static get ApiClient(){return le}constructor(e){this.apiClient=e||le.instance,this.#e=new Set,this.#e.add("authorization"),this.#e.add("cookie"),this.#e.add("host"),this.#e.add("user-agent")}collectLogs(e,t,...n){let i=n.length>0?n[0]:{},s=null;if(s=t instanceof js&&"function"==typeof t.toJson?t.toJson():t,null==e)throw new Error("Missing the required parameter 'extId' when calling collectLogs");if(null==s)throw new Error("Invalid body when calling collectLogs");const r={extId:e};let o={};Object.keys(i).forEach(e=>{this.#e.has(e.toLowerCase())||(o[e]=i[e])});const a={...o};le.addEtagReferenceToHeader(t,a);const l=Ns;return this.apiClient.callApi("/api/monitoring/v4.2/serviceability/clusters/{extId}/$actions/collect-logs","POST",r,{},a,{},s,["apiKeyAuthScheme","basicAuthScheme"],["application/json"],["application/json"],l)}listTags(e,t,...n){let i=n.length>0?n[0]:{};if(t=t||{},null==e)throw new Error("Missing the required parameter 'clusterExtId' when calling listTags");const s={clusterExtId:e},r={...t.hasOwnProperty("$page")?{$page:t.$page}:{},...t.hasOwnProperty("$limit")?{$limit:t.$limit}:{},...t.hasOwnProperty("$filter")?{$filter:t.$filter}:{},...t.hasOwnProperty("$orderby")?{$orderby:t.$orderby}:{},...t.hasOwnProperty("$select")?{$select:t.$select}:{}};let o={};Object.keys(i).forEach(e=>{this.#e.has(e.toLowerCase())||(o[e]=i[e])});const a={...o},l=Us;return this.apiClient.callApi("/api/monitoring/v4.2/serviceability/clusters/{clusterExtId}/tags","GET",s,r,a,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],l)}},EventsApi:class{#e;static get ApiClient(){return le}constructor(e){this.apiClient=e||le.instance,this.#e=new Set,this.#e.add("authorization"),this.#e.add("cookie"),this.#e.add("host"),this.#e.add("user-agent")}getEventById(e,...t){let n=t.length>0?t[0]:{};if(null==e)throw new Error("Missing the required parameter 'extId' when calling getEventById");const i={extId:e};let s={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(s[e]=n[e])});const r={...s},o=Ys;return this.apiClient.callApi("/api/monitoring/v4.2/serviceability/events/{extId}","GET",i,{},r,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],o)}listEvents(e,...t){let n=t.length>0?t[0]:{};const i={...(e=e||{}).hasOwnProperty("$page")?{$page:e.$page}:{},...e.hasOwnProperty("$limit")?{$limit:e.$limit}:{},...e.hasOwnProperty("$filter")?{$filter:e.$filter}:{},...e.hasOwnProperty("$orderby")?{$orderby:e.$orderby}:{},...e.hasOwnProperty("$select")?{$select:e.$select}:{}};let s={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(s[e]=n[e])});const r={...s},o=zs;return this.apiClient.callApi("/api/monitoring/v4.2/serviceability/events","GET",{},i,r,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],o)}},ManageAlertsApi:class{#e;static get ApiClient(){return le}constructor(e){this.apiClient=e||le.instance,this.#e=new Set,this.#e.add("authorization"),this.#e.add("cookie"),this.#e.add("host"),this.#e.add("user-agent")}manageAlert(e,t,...n){let i=n.length>0?n[0]:{},s=null;if(s=t instanceof rr&&"function"==typeof t.toJson?t.toJson():t,null==e)throw new Error("Missing the required parameter 'extId' when calling manageAlert");if(null==s)throw new Error("Invalid body when calling manageAlert");const r={extId:e};let o={};Object.keys(i).forEach(e=>{this.#e.has(e.toLowerCase())||(o[e]=i[e])});const a={...o};le.addEtagReferenceToHeader(t,a);const l=er;return this.apiClient.callApi("/api/monitoring/v4.2/serviceability/alerts/{extId}/$actions/manage-alert","POST",r,{},a,{},s,["apiKeyAuthScheme","basicAuthScheme"],["application/json"],["application/json"],l)}},SystemDefinedChecksApi:class{#e;static get ApiClient(){return le}constructor(e){this.apiClient=e||le.instance,this.#e=new Set,this.#e.add("authorization"),this.#e.add("cookie"),this.#e.add("host"),this.#e.add("user-agent")}runSystemDefinedChecks(e,t,...n){let i=n.length>0?n[0]:{},s=null;if(s=t instanceof hr&&"function"==typeof t.toJson?t.toJson():t,null==e)throw new Error("Missing the required parameter 'clusterExtId' when calling runSystemDefinedChecks");if(null==s)throw new Error("Invalid body when calling runSystemDefinedChecks");const r={clusterExtId:e};let o={};Object.keys(i).forEach(e=>{this.#e.has(e.toLowerCase())||(o[e]=i[e])});const a={...o};le.addEtagReferenceToHeader(t,a);const l=lr;return this.apiClient.callApi("/api/monitoring/v4.2/serviceability/clusters/{clusterExtId}/$actions/run-system-defined-checks","POST",r,{},a,{},s,["apiKeyAuthScheme","basicAuthScheme"],["application/json"],["application/json"],l)}},UserDefinedPoliciesApi:class{#e;static get ApiClient(){return le}constructor(e){this.apiClient=e||le.instance,this.#e=new Set,this.#e.add("authorization"),this.#e.add("cookie"),this.#e.add("host"),this.#e.add("user-agent")}createUdaPolicy(e,...t){let n=t.length>0?t[0]:{},i=null;if(i=e instanceof Cr&&"function"==typeof e.toJson?e.toJson():e,null==i)throw new Error("Invalid body when calling createUdaPolicy");let s={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(s[e]=n[e])});const r={...s};le.addEtagReferenceToHeader(e,r);const o=Rr;return this.apiClient.callApi("/api/monitoring/v4.2/serviceability/alerts/user-defined-policies","POST",{},{},r,{},i,["apiKeyAuthScheme","basicAuthScheme"],["application/json"],["application/json"],o)}deleteUdaPolicyById(e,...t){let n=t.length>0?t[0]:{};if(null==e)throw new Error("Missing the required parameter 'extId' when calling deleteUdaPolicyById");const i={extId:e};let s={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(s[e]=n[e])});const r={...s},o=Hr;return this.apiClient.callApi("/api/monitoring/v4.2/serviceability/alerts/user-defined-policies/{extId}","DELETE",i,{},r,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],o)}findConflictingUdaPolicies(e,...t){let n=t.length>0?t[0]:{},i=null;if(i=e instanceof Cr&&"function"==typeof e.toJson?e.toJson():e,null==i)throw new Error("Invalid body when calling findConflictingUdaPolicies");let s={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(s[e]=n[e])});const r={...s};le.addEtagReferenceToHeader(e,r);const o=Jr;return this.apiClient.callApi("/api/monitoring/v4.2/serviceability/alerts/user-defined-policies/$actions/find-conflicts","POST",{},{},r,{},i,["apiKeyAuthScheme","basicAuthScheme"],["application/json"],["application/json"],o)}getUdaPolicyById(e,...t){let n=t.length>0?t[0]:{};if(null==e)throw new Error("Missing the required parameter 'extId' when calling getUdaPolicyById");const i={extId:e};let s={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(s[e]=n[e])});const r={...s},o=io;return this.apiClient.callApi("/api/monitoring/v4.2/serviceability/alerts/user-defined-policies/{extId}","GET",i,{},r,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],o)}listUdaPolicies(e,...t){let n=t.length>0?t[0]:{};const i={...(e=e||{}).hasOwnProperty("$page")?{$page:e.$page}:{},...e.hasOwnProperty("$limit")?{$limit:e.$limit}:{},...e.hasOwnProperty("$filter")?{$filter:e.$filter}:{},...e.hasOwnProperty("$orderby")?{$orderby:e.$orderby}:{},...e.hasOwnProperty("$select")?{$select:e.$select}:{}};let s={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(s[e]=n[e])});const r={...s},o=Zr;return this.apiClient.callApi("/api/monitoring/v4.2/serviceability/alerts/user-defined-policies","GET",{},i,r,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],o)}updateUdaPolicyById(e,t,...n){let i=n.length>0?n[0]:{},s=null;if(s=t instanceof Cr&&"function"==typeof t.toJson?t.toJson():t,null==e)throw new Error("Missing the required parameter 'extId' when calling updateUdaPolicyById");if(null==s)throw new Error("Invalid body when calling updateUdaPolicyById");const r={extId:e};let o={};Object.keys(i).forEach(e=>{this.#e.has(e.toLowerCase())||(o[e]=i[e])});const a={...o};le.addEtagReferenceToHeader(t,a);const l=Gr;return this.apiClient.callApi("/api/monitoring/v4.2/serviceability/alerts/user-defined-policies/{extId}","PUT",r,{},a,{},s,["apiKeyAuthScheme","basicAuthScheme"],["application/json"],["application/json"],l)}},FQDN:pi,Flag:E,IPAddressOrFQDN:$i,IPv4Address:yi,IPv6Address:mi,KVPair:S,KVStringPair:ri,MapOfStringWrapper:C,Message:V,MessageSeverity:x,TenantAwareModel:Be,ApiLink:J,ApiResponseMetadata:B,ExternalizableAbstractModel:ze,AlertEntityReference:Ke,BoolValue:et,CauseAndResolution:oo,ComparisonOperator:nt,ConditionType:st,DataType:ot,DoubleValue:lt,EntityReference:Ye,FloatValue:lo,ImpactType:Qe,IntValue:ut,MetricDetail:yt,OperationType:Vi,Parameter:wt,Severity:kt,StringValue:ct,AppMessage:Ie,ErrorResponse:Je,SchemaValidationError:xe,SchemaValidationErrorMessage:Se,ActionType:ir,Alert:Ut,AlertActionSpec:rr,AlertConfig:cn,AlertEmailConfiguration:Ai,AlertPolicyConfigurableParameter:rn,ArchiveOpts:fs,Audit:Ki,AuditEntityReference:Ji,AutoResolveState:Wt,BooleanConfigurableParamValue:Gt,ClusterConfig:yn,ClusterConfigProjection:Dn,ClusterType:fn,CollectLogsApiResponse:Ns,CommunicationStatus:ui,Condition:br,ConfigurableParamValueRange:Kt,ConflictingPolicy:Mr,ConnectionStatus:ii,CreateUdaPolicyApiResponse:Rr,Credential:rs,CustomServerUploadParams:ds,DeleteUdaPolicyApiResponse:Hr,EmailConfigurationRule:Zn,EmailTemplate:ti,EntityFilter:pr,EntityType:wn,Event:_s,EventEntityReference:Vs,FindConflictingUdaPoliciesApiResponse:Jr,FloatConfigurableParamValue:Xt,GetAlertApiResponse:Lt,GetAlertEmailConfigurationApiResponse:Ui,GetAuditApiResponse:Qi,GetClusterConfigApiResponse:Ln,GetEventApiResponse:Ys,GetSdaPolicyApiResponse:In,GetUdaPolicyApiResponse:io,GroupEntityType:yr,GroupFilter:mr,HttpProxy:ki,IntConfigurableParamValue:Zt,ListAlertsApiResponse:Nt,ListAuditsApiResponse:ns,ListClusterConfigsApiResponse:Nn,ListEventsApiResponse:zs,ListSdaPoliciesApiResponse:Yn,ListTagsApiResponse:Us,ListUdaPoliciesApiResponse:Zr,LocalUploadParams:hs,LogCollectionSpec:js,ManageAlertApiResponse:er,MspOpts:Ts,NtnxServerUploadParams:ps,ParameterizedMessage:ai,PolicySeverityLevel:Or,PropertyState:ln,ProxyType:Ti,RelatedPolicy:$r,RemoteTunnelDetails:Ei,RootCauseAnalysis:Ot,RootCauseAnalysisProjection:uo,RunSystemDefinedChecksApiResponse:lr,RunSystemDefinedChecksSpec:hr,Scope:bn,SdaSubType:Fn,SdaType:jn,ServerUploadProtocol:as,ServiceCenter:Oi,SeverityConfig:un,SeverityTrail:Pt,Status:Wi,StorageContainerUploadParams:ys,StringConfigurableParamValue:tn,SystemDefinedPolicy:Pn,Tag:As,TagOpts:ks,TriggerCondition:Er,UpdateAlertEmailConfigurationApiResponse:Ni,UpdateClusterConfigApiResponse:zn,UpdateUdaPolicyApiResponse:Gr,UserDefinedPolicy:Cr,UserReference:Gi,TaskReference:Wn}})(),i.default})());
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Ntnx=t():(e.Ntnx=e.Ntnx||{},e.Ntnx.Monitoring=t())}(Object("undefined"==typeof self?this:self),()=>(()=>{var e={960(e){function t(e){if(e)return function(e){for(var n in t.prototype)e[n]=t.prototype[n];return e}(e)}e.exports=t,t.prototype.on=t.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},t.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,i=this._callbacks["$"+e];if(!i)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var s=0;s<i.length;s++)if((n=i[s])===t||n.fn===t){i.splice(s,1);break}return 0===i.length&&delete this._callbacks["$"+e],this},t.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],i=1;i<arguments.length;i++)t[i-1]=arguments[i];if(n){i=0;for(var s=(n=n.slice(0)).length;i<s;++i)n[i].apply(this,t)}return this},t.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},t.prototype.hasListeners=function(e){return!!this.listeners(e).length}},340(e){e.exports=o,o.default=o,o.stable=u,o.stableStringify=u;var t="[...]",n="[Circular]",i=[],s=[];function r(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function o(e,t,n,o){var a;void 0===o&&(o=r()),l(e,"",0,[],void 0,0,o);try{a=0===s.length?JSON.stringify(e,t,n):JSON.stringify(e,c(t),n)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==i.length;){var d=i.pop();4===d.length?Object.defineProperty(d[0],d[1],d[3]):d[0][d[1]]=d[2]}}return a}function a(e,t,n,r){var o=Object.getOwnPropertyDescriptor(r,n);void 0!==o.get?o.configurable?(Object.defineProperty(r,n,{value:e}),i.push([r,n,t,o])):s.push([t,n,e]):(r[n]=e,i.push([r,n,t]))}function l(e,i,s,r,o,d,u){var h;if(d+=1,"object"==typeof e&&null!==e){for(h=0;h<r.length;h++)if(r[h]===e)return void a(n,e,i,o);if(void 0!==u.depthLimit&&d>u.depthLimit)return void a(t,e,i,o);if(void 0!==u.edgesLimit&&s+1>u.edgesLimit)return void a(t,e,i,o);if(r.push(e),Array.isArray(e))for(h=0;h<e.length;h++)l(e[h],h,h,r,e,d,u);else{var c=Object.keys(e);for(h=0;h<c.length;h++){var p=c[h];l(e[p],p,h,r,e,d,u)}}r.pop()}}function d(e,t){return e<t?-1:e>t?1:0}function u(e,t,n,o){void 0===o&&(o=r());var a,l=h(e,"",0,[],void 0,0,o)||e;try{a=0===s.length?JSON.stringify(l,t,n):JSON.stringify(l,c(t),n)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==i.length;){var d=i.pop();4===d.length?Object.defineProperty(d[0],d[1],d[3]):d[0][d[1]]=d[2]}}return a}function h(e,s,r,o,l,u,c){var p;if(u+=1,"object"==typeof e&&null!==e){for(p=0;p<o.length;p++)if(o[p]===e)return void a(n,e,s,l);try{if("function"==typeof e.toJSON)return}catch(e){return}if(void 0!==c.depthLimit&&u>c.depthLimit)return void a(t,e,s,l);if(void 0!==c.edgesLimit&&r+1>c.edgesLimit)return void a(t,e,s,l);if(o.push(e),Array.isArray(e))for(p=0;p<e.length;p++)h(e[p],p,p,o,e,u,c);else{var v={},y=Object.keys(e).sort(d);for(p=0;p<y.length;p++){var g=y[p];h(e[g],g,p,o,e,u,c),v[g]=e[g]}if(void 0===l)return v;i.push([l,s,e]),l[s]=v}o.pop()}}function c(e){return e=void 0!==e?e:function(e,t){return t},function(t,n){if(s.length>0)for(var i=0;i<s.length;i++){var r=s[i];if(r[1]===t&&r[0]===n){n=r[2],s.splice(i,1);break}}return e.call(this,t,n)}}},784(e,t,n){"use strict";var i="win32"===process.platform,s=n(818);function r(e,t){for(var n=[],i=0;i<e.length;i++){var s=e[i];s&&"."!==s&&(".."===s?n.length&&".."!==n[n.length-1]?n.pop():t&&n.push(".."):n.push(s))}return n}function o(e){for(var t=e.length-1,n=0;n<=t&&!e[n];n++);for(var i=t;i>=0&&!e[i];i--);return 0===n&&i===t?e:n>i?[]:e.slice(n,i+1)}var a=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/,l=/^([\s\S]*?)((?:\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))(?:[\\\/]*)$/,d={};function u(e){var t=a.exec(e),n=(t[1]||"")+(t[2]||""),i=t[3]||"",s=l.exec(i);return[n,s[1],s[2],s[3]]}function h(e){var t=a.exec(e),n=t[1]||"",i=!!n&&":"!==n[1];return{device:n,isUnc:i,isAbsolute:i||!!t[2],tail:t[3]}}function c(e){return"\\\\"+e.replace(/^[\\\/]+/,"").replace(/[\\\/]+/g,"\\")}d.resolve=function(){for(var e="",t="",n=!1,i=arguments.length-1;i>=-1;i--){var o;if(i>=0?o=arguments[i]:e?(o=process.env["="+e])&&o.substr(0,3).toLowerCase()===e.toLowerCase()+"\\"||(o=e+"\\"):o=process.cwd(),!s.isString(o))throw new TypeError("Arguments to path.resolve must be strings");if(o){var a=h(o),l=a.device,d=a.isUnc,u=a.isAbsolute,p=a.tail;if((!l||!e||l.toLowerCase()===e.toLowerCase())&&(e||(e=l),n||(t=p+"\\"+t,n=u),e&&n))break}}return d&&(e=c(e)),e+(n?"\\":"")+(t=r(t.split(/[\\\/]+/),!n).join("\\"))||"."},d.normalize=function(e){var t=h(e),n=t.device,i=t.isUnc,s=t.isAbsolute,o=t.tail,a=/[\\\/]$/.test(o);return(o=r(o.split(/[\\\/]+/),!s).join("\\"))||s||(o="."),o&&a&&(o+="\\"),i&&(n=c(n)),n+(s?"\\":"")+o},d.isAbsolute=function(e){return h(e).isAbsolute},d.join=function(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(!s.isString(n))throw new TypeError("Arguments to path.join must be strings");n&&e.push(n)}var i=e.join("\\");return/^[\\\/]{2}[^\\\/]/.test(e[0])||(i=i.replace(/^[\\\/]{2,}/,"\\")),d.normalize(i)},d.relative=function(e,t){e=d.resolve(e),t=d.resolve(t);for(var n=e.toLowerCase(),i=t.toLowerCase(),s=o(t.split("\\")),r=o(n.split("\\")),a=o(i.split("\\")),l=Math.min(r.length,a.length),u=l,h=0;h<l;h++)if(r[h]!==a[h]){u=h;break}if(0==u)return t;var c=[];for(h=u;h<r.length;h++)c.push("..");return(c=c.concat(s.slice(u))).join("\\")},d._makeLong=function(e){if(!s.isString(e))return e;if(!e)return"";var t=d.resolve(e);return/^[a-zA-Z]\:\\/.test(t)?"\\\\?\\"+t:/^\\\\[^?.]/.test(t)?"\\\\?\\UNC\\"+t.substring(2):e},d.dirname=function(e){var t=u(e),n=t[0],i=t[1];return n||i?(i&&(i=i.substr(0,i.length-1)),n+i):"."},d.basename=function(e,t){var n=u(e)[2];return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},d.extname=function(e){return u(e)[3]},d.format=function(e){if(!s.isObject(e))throw new TypeError("Parameter 'pathObject' must be an object, not "+typeof e);var t=e.root||"";if(!s.isString(t))throw new TypeError("'pathObject.root' must be a string or undefined, not "+typeof e.root);var n=e.dir,i=e.base||"";return n?n[n.length-1]===d.sep?n+i:n+d.sep+i:i},d.parse=function(e){if(!s.isString(e))throw new TypeError("Parameter 'pathString' must be a string, not "+typeof e);var t=u(e);if(!t||4!==t.length)throw new TypeError("Invalid path '"+e+"'");return{root:t[0],dir:t[0]+t[1].slice(0,-1),base:t[2],ext:t[3],name:t[2].slice(0,t[2].length-t[3].length)}},d.sep="\\",d.delimiter=";";var p=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,v={};function y(e){return p.exec(e).slice(1)}v.resolve=function(){for(var e="",t=!1,n=arguments.length-1;n>=-1&&!t;n--){var i=n>=0?arguments[n]:process.cwd();if(!s.isString(i))throw new TypeError("Arguments to path.resolve must be strings");i&&(e=i+"/"+e,t="/"===i[0])}return(t?"/":"")+(e=r(e.split("/"),!t).join("/"))||"."},v.normalize=function(e){var t=v.isAbsolute(e),n=e&&"/"===e[e.length-1];return(e=r(e.split("/"),!t).join("/"))||t||(e="."),e&&n&&(e+="/"),(t?"/":"")+e},v.isAbsolute=function(e){return"/"===e.charAt(0)},v.join=function(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];if(!s.isString(n))throw new TypeError("Arguments to path.join must be strings");n&&(e+=e?"/"+n:n)}return v.normalize(e)},v.relative=function(e,t){e=v.resolve(e).substr(1),t=v.resolve(t).substr(1);for(var n=o(e.split("/")),i=o(t.split("/")),s=Math.min(n.length,i.length),r=s,a=0;a<s;a++)if(n[a]!==i[a]){r=a;break}var l=[];for(a=r;a<n.length;a++)l.push("..");return(l=l.concat(i.slice(r))).join("/")},v._makeLong=function(e){return e},v.dirname=function(e){var t=y(e),n=t[0],i=t[1];return n||i?(i&&(i=i.substr(0,i.length-1)),n+i):"."},v.basename=function(e,t){var n=y(e)[2];return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},v.extname=function(e){return y(e)[3]},v.format=function(e){if(!s.isObject(e))throw new TypeError("Parameter 'pathObject' must be an object, not "+typeof e);var t=e.root||"";if(!s.isString(t))throw new TypeError("'pathObject.root' must be a string or undefined, not "+typeof e.root);return(e.dir?e.dir+v.sep:"")+(e.base||"")},v.parse=function(e){if(!s.isString(e))throw new TypeError("Parameter 'pathString' must be a string, not "+typeof e);var t=y(e);if(!t||4!==t.length)throw new TypeError("Invalid path '"+e+"'");return t[1]=t[1]||"",t[2]=t[2]||"",t[3]=t[3]||"",{root:t[0],dir:t[0]+t[1].slice(0,-1),base:t[2],ext:t[3],name:t[2].slice(0,t[2].length-t[3].length)}},v.sep="/",v.delimiter=":",e.exports=i?d:v,e.exports.posix=v,e.exports.win32=d},540(e){function t(e,t){if(this._maxRetries&&this._retries++<this._maxRetries&&function(e,t,n,i){if(i)return i(e,t);if(e&&e.code&&~["ECONNRESET","ETIMEDOUT","EADDRINFO","ESOCKETTIMEDOUT","ENOTFOUND","ECONNREFUSED"].indexOf(e.code))return!0;if(t&&t.status){const e=t.status;if(e>=500)return!0;if((e>=400||e<200)&&-1===n.indexOf(e))return!0}return!(!e||!("timeout"in e)||"ECONNABORTED"!==e.code)||e&&"crossDomain"in e}(e,t,this._allowedStatuses,this._retryCallback)){let e;e=this._retries?this._retryDelays[this._retries-1]:0;const t=this;return setTimeout(function(){return t._retry()},e)}const n=this._callback;this.clearTimeout(),e&&(this._maxRetries&&(e.retries=this._retries-1),this.emit("error",e)),n(e,t)}function n(e,t,n,i){0!==arguments.length&&!0!==e||(e=1),e<=0&&(e=0),"number"==typeof t&&(t=[t]);const s=t.length,r=e-s;if(0!==r){if(r<0)throw new Error("Cannot have more delays than retries");{const e=t[s-1];for(let n=0;n<r+1;n++)t.push(e)}}return this._maxRetries=e,this._retries=0,this._retryDelays=t||[0],this._allowedStatuses=n||[],this._retryCallback=i,this}e.exports=function(e){const i=e.Request;return i.prototype.oldRetry=i.prototype.retry,i.prototype.retry=n,i.prototype.callback=t,e}},619(e){"use strict";function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function n(){this._defaults=[]}["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert","disableTLSCerts"].forEach(function(e){n.prototype[e]=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return this._defaults.push({fn:e,args:n}),this}}),n.prototype._setDefaults=function(e){this._defaults.forEach(function(n){var i;e[n.fn].apply(e,function(e){if(Array.isArray(e))return t(e)}(i=n.args)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(i)||function(e,n){if(e){if("string"==typeof e)return t(e,n);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?t(e,n):void 0}}(i)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())})},e.exports=n},585(e,t,n){"use strict";function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}var s;"undefined"!=typeof window?s=window:"undefined"==typeof self?(console.warn("Using browser-only version of superagent in non-browser environment"),s=void 0):s=self;var r=n(960),o=n(340),a=n(695),l=n(388),d=n(19),u=n(619);function h(){}e.exports=function(e,n){return"function"==typeof n?new t.Request("GET",e).end(n):1===arguments.length?new t.Request("GET",e):new t.Request(e,n)};var c=t=e.exports;t.Request=$,c.getXHR=function(){if(s.XMLHttpRequest&&(!s.location||"file:"!==s.location.protocol||!s.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}throw new Error("Browser-only version of superagent could not find XHR")};var p="".trim?function(e){return e.trim()}:function(e){return e.replace(/(^\s*|\s*$)/g,"")};function v(e){if(!l(e))return e;var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&y(t,n,e[n]);return t.join("&")}function y(e,t,n){if(void 0!==n)if(null!==n)if(Array.isArray(n))n.forEach(function(n){y(e,t,n)});else if(l(n))for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&y(e,"".concat(t,"[").concat(i,"]"),n[i]);else e.push(encodeURI(t)+"="+encodeURIComponent(n));else e.push(encodeURI(t))}function g(e){for(var t,n,i={},s=e.split("&"),r=0,o=s.length;r<o;++r)-1===(n=(t=s[r]).indexOf("="))?i[decodeURIComponent(t)]="":i[decodeURIComponent(t.slice(0,n))]=decodeURIComponent(t.slice(n+1));return i}function m(e){return/[/+]json($|[^-\w])/.test(e)}function f(e){this.req=e,this.xhr=this.req.xhr,this.text="HEAD"!==this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||void 0===this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText;var t=this.xhr.status;1223===t&&(t=204),this._setStatusProperties(t),this.headers=function(e){for(var t,n,i,s,r=e.split(/\r?\n/),o={},a=0,l=r.length;a<l;++a)-1!==(t=(n=r[a]).indexOf(":"))&&(i=n.slice(0,t).toLowerCase(),s=p(n.slice(t+1)),o[i]=s);return o}(this.xhr.getAllResponseHeaders()),this.header=this.headers,this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),null===this.text&&e._responseType?this.body=this.xhr.response:this.body="HEAD"===this.req.method?null:this._parseBody(this.text?this.text:this.xhr.response)}function $(e,t){var n=this;this._query=this._query||[],this.method=e,this.url=t,this.header={},this._header={},this.on("end",function(){var e,t=null,i=null;try{i=new f(n)}catch(e){return(t=new Error("Parser is unable to parse the response")).parse=!0,t.original=e,n.xhr?(t.rawResponse=void 0===n.xhr.responseType?n.xhr.responseText:n.xhr.response,t.status=n.xhr.status?n.xhr.status:null,t.statusCode=t.status):(t.rawResponse=null,t.status=null),n.callback(t)}n.emit("response",i);try{n._isResponseOK(i)||(e=new Error(i.statusText||i.text||"Unsuccessful HTTP response"))}catch(t){e=t}e?(e.original=t,e.response=i,e.status=i.status,n.callback(e,i)):n.callback(null,i)})}function w(e,t,n){var i=c("DELETE",e);return"function"==typeof t&&(n=t,t=null),t&&i.send(t),n&&i.end(n),i}c.serializeObject=v,c.parseString=g,c.types={html:"text/html",json:"application/json",xml:"text/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},c.serialize={"application/x-www-form-urlencoded":v,"application/json":o},c.parse={"application/x-www-form-urlencoded":g,"application/json":JSON.parse},d(f.prototype),f.prototype._parseBody=function(e){var t=c.parse[this.type];return this.req._parser?this.req._parser(this,e):(!t&&m(this.type)&&(t=c.parse["application/json"]),t&&e&&(e.length>0||e instanceof Object)?t(e):null)},f.prototype.toError=function(){var e=this.req,t=e.method,n=e.url,i="cannot ".concat(t," ").concat(n," (").concat(this.status,")"),s=new Error(i);return s.status=this.status,s.method=t,s.url=n,s},c.Response=f,r($.prototype),a($.prototype),$.prototype.type=function(e){return this.set("Content-Type",c.types[e]||e),this},$.prototype.accept=function(e){return this.set("Accept",c.types[e]||e),this},$.prototype.auth=function(e,t,n){return 1===arguments.length&&(t=""),"object"===i(t)&&null!==t&&(n=t,t=""),n||(n={type:"function"==typeof btoa?"basic":"auto"}),this._auth(e,t,n,function(e){if("function"==typeof btoa)return btoa(e);throw new Error("Cannot use basic auth, btoa is not a function")})},$.prototype.query=function(e){return"string"!=typeof e&&(e=v(e)),e&&this._query.push(e),this},$.prototype.attach=function(e,t,n){if(t){if(this._data)throw new Error("superagent can't mix .send() and .attach()");this._getFormData().append(e,t,n||t.name)}return this},$.prototype._getFormData=function(){return this._formData||(this._formData=new s.FormData),this._formData},$.prototype.callback=function(e,t){if(this._shouldRetry(e,t))return this._retry();var n=this._callback;this.clearTimeout(),e&&(this._maxRetries&&(e.retries=this._retries-1),this.emit("error",e)),n(e,t)},$.prototype.crossDomainError=function(){var e=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");e.crossDomain=!0,e.status=this.status,e.method=this.method,e.url=this.url,this.callback(e)},$.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},$.prototype.ca=$.prototype.agent,$.prototype.buffer=$.prototype.ca,$.prototype.write=function(){throw new Error("Streaming is not supported in browser version of superagent")},$.prototype.pipe=$.prototype.write,$.prototype._isHost=function(e){return e&&"object"===i(e)&&!Array.isArray(e)&&"[object Object]"!==Object.prototype.toString.call(e)},$.prototype.end=function(e){this._endCalled&&console.warn("Warning: .end() was called twice. This is not supported in superagent"),this._endCalled=!0,this._callback=e||h,this._finalizeQueryString(),this._end()},$.prototype._setUploadTimeout=function(){var e=this;this._uploadTimeout&&!this._uploadTimeoutTimer&&(this._uploadTimeoutTimer=setTimeout(function(){e._timeoutError("Upload timeout of ",e._uploadTimeout,"ETIMEDOUT")},this._uploadTimeout))},$.prototype._end=function(){if(this._aborted)return this.callback(new Error("The request has been aborted even before .end() was called"));var e=this;this.xhr=c.getXHR();var t=this.xhr,n=this._formData||this._data;this._setTimeouts(),t.onreadystatechange=function(){var n=t.readyState;if(n>=2&&e._responseTimeoutTimer&&clearTimeout(e._responseTimeoutTimer),4===n){var i;try{i=t.status}catch(e){i=0}if(!i){if(e.timedout||e._aborted)return;return e.crossDomainError()}e.emit("end")}};var i=function(t,n){n.total>0&&(n.percent=n.loaded/n.total*100,100===n.percent&&clearTimeout(e._uploadTimeoutTimer)),n.direction=t,e.emit("progress",n)};if(this.hasListeners("progress"))try{t.addEventListener("progress",i.bind(null,"download")),t.upload&&t.upload.addEventListener("progress",i.bind(null,"upload"))}catch(e){}t.upload&&this._setUploadTimeout();try{this.username&&this.password?t.open(this.method,this.url,!0,this.username,this.password):t.open(this.method,this.url,!0)}catch(e){return this.callback(e)}if(this._withCredentials&&(t.withCredentials=!0),!this._formData&&"GET"!==this.method&&"HEAD"!==this.method&&"string"!=typeof n&&!this._isHost(n)){var s=this._header["content-type"],r=this._serializer||c.serialize[s?s.split(";")[0]:""];!r&&m(s)&&(r=c.serialize["application/json"]),r&&(n=r(n))}for(var o in this.header)null!==this.header[o]&&Object.prototype.hasOwnProperty.call(this.header,o)&&t.setRequestHeader(o,this.header[o]);this._responseType&&(t.responseType=this._responseType),this.emit("request",this),t.send(void 0===n?null:n)},c.agent=function(){return new u},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach(function(e){u.prototype[e.toLowerCase()]=function(t,n){var i=new c.Request(e,t);return this._setDefaults(i),n&&i.end(n),i}}),u.prototype.del=u.prototype.delete,c.get=function(e,t,n){var i=c("GET",e);return"function"==typeof t&&(n=t,t=null),t&&i.query(t),n&&i.end(n),i},c.head=function(e,t,n){var i=c("HEAD",e);return"function"==typeof t&&(n=t,t=null),t&&i.query(t),n&&i.end(n),i},c.options=function(e,t,n){var i=c("OPTIONS",e);return"function"==typeof t&&(n=t,t=null),t&&i.send(t),n&&i.end(n),i},c.del=w,c.delete=w,c.patch=function(e,t,n){var i=c("PATCH",e);return"function"==typeof t&&(n=t,t=null),t&&i.send(t),n&&i.end(n),i},c.post=function(e,t,n){var i=c("POST",e);return"function"==typeof t&&(n=t,t=null),t&&i.send(t),n&&i.end(n),i},c.put=function(e,t,n){var i=c("PUT",e);return"function"==typeof t&&(n=t,t=null),t&&i.send(t),n&&i.end(n),i}},388(e){"use strict";function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}e.exports=function(e){return null!==e&&"object"===t(e)}},695(e,t,n){"use strict";function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}var s=n(388);function r(e){if(e)return function(e){for(var t in r.prototype)Object.prototype.hasOwnProperty.call(r.prototype,t)&&(e[t]=r.prototype[t]);return e}(e)}e.exports=r,r.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),clearTimeout(this._uploadTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,delete this._uploadTimeoutTimer,this},r.prototype.parse=function(e){return this._parser=e,this},r.prototype.responseType=function(e){return this._responseType=e,this},r.prototype.serialize=function(e){return this._serializer=e,this},r.prototype.timeout=function(e){if(!e||"object"!==i(e))return this._timeout=e,this._responseTimeout=0,this._uploadTimeout=0,this;for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))switch(t){case"deadline":this._timeout=e.deadline;break;case"response":this._responseTimeout=e.response;break;case"upload":this._uploadTimeout=e.upload;break;default:console.warn("Unknown timeout option",t)}return this},r.prototype.retry=function(e,t){return 0!==arguments.length&&!0!==e||(e=1),e<=0&&(e=0),this._maxRetries=e,this._retries=0,this._retryCallback=t,this};var o=["ECONNRESET","ETIMEDOUT","EADDRINFO","ESOCKETTIMEDOUT"];r.prototype._shouldRetry=function(e,t){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{var n=this._retryCallback(e,t);if(!0===n)return!0;if(!1===n)return!1}catch(e){console.error(e)}if(t&&t.status&&t.status>=500&&501!==t.status)return!0;if(e){if(e.code&&o.includes(e.code))return!0;if(e.timeout&&"ECONNABORTED"===e.code)return!0;if(e.crossDomain)return!0}return!1},r.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this.timedoutError=null,this._end()},r.prototype.then=function(e,t){var n=this;if(!this._fullfilledPromise){var i=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise(function(e,t){i.on("abort",function(){if(!(n._maxRetries&&n._maxRetries>n._retries))if(n.timedout&&n.timedoutError)t(n.timedoutError);else{var e=new Error("Aborted");e.code="ABORTED",e.status=n.status,e.method=n.method,e.url=n.url,t(e)}}),i.end(function(n,i){n?t(n):e(i)})})}return this._fullfilledPromise.then(e,t)},r.prototype.catch=function(e){return this.then(void 0,e)},r.prototype.use=function(e){return e(this),this},r.prototype.ok=function(e){if("function"!=typeof e)throw new Error("Callback required");return this._okCallback=e,this},r.prototype._isResponseOK=function(e){return!!e&&(this._okCallback?this._okCallback(e):e.status>=200&&e.status<300)},r.prototype.get=function(e){return this._header[e.toLowerCase()]},r.prototype.getHeader=r.prototype.get,r.prototype.set=function(e,t){if(s(e)){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&this.set(n,e[n]);return this}return this._header[e.toLowerCase()]=t,this.header[e]=t,this},r.prototype.unset=function(e){return delete this._header[e.toLowerCase()],delete this.header[e],this},r.prototype.field=function(e,t){if(null==e)throw new Error(".field(name, val) name can not be empty");if(this._data)throw new Error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()");if(s(e)){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&this.field(n,e[n]);return this}if(Array.isArray(t)){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&this.field(e,t[i]);return this}if(null==t)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof t&&(t=String(t)),this._getFormData().append(e,t),this},r.prototype.abort=function(){return this._aborted||(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort")),this},r.prototype._auth=function(e,t,n,i){switch(n.type){case"basic":this.set("Authorization","Basic ".concat(i("".concat(e,":").concat(t))));break;case"auto":this.username=e,this.password=t;break;case"bearer":this.set("Authorization","Bearer ".concat(e))}return this},r.prototype.withCredentials=function(e){return void 0===e&&(e=!0),this._withCredentials=e,this},r.prototype.redirects=function(e){return this._maxRedirects=e,this},r.prototype.maxResponseSize=function(e){if("number"!=typeof e)throw new TypeError("Invalid argument");return this._maxResponseSize=e,this},r.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},r.prototype.send=function(e){var t=s(e),n=this._header["content-type"];if(this._formData)throw new Error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()");if(t&&!this._data)Array.isArray(e)?this._data=[]:this._isHost(e)||(this._data={});else if(e&&this._data&&this._isHost(this._data))throw new Error("Can't merge these send calls");if(t&&s(this._data))for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(this._data[i]=e[i]);else"string"==typeof e?(n||this.type("form"),n=this._header["content-type"],this._data="application/x-www-form-urlencoded"===n?this._data?"".concat(this._data,"&").concat(e):e:(this._data||"")+e):this._data=e;return!t||this._isHost(e)||n||this.type("json"),this},r.prototype.sortQuery=function(e){return this._sort=void 0===e||e,this},r.prototype._finalizeQueryString=function(){var e=this._query.join("&");if(e&&(this.url+=(this.url.includes("?")?"&":"?")+e),this._query.length=0,this._sort){var t=this.url.indexOf("?");if(t>=0){var n=this.url.slice(t+1).split("&");"function"==typeof this._sort?n.sort(this._sort):n.sort(),this.url=this.url.slice(0,t)+"?"+n.join("&")}}},r.prototype._appendQueryString=function(){console.warn("Unsupported")},r.prototype._timeoutError=function(e,t,n){if(!this._aborted){var i=new Error("".concat(e+t,"ms exceeded"));i.timeout=t,i.code="ECONNABORTED",i.errno=n,this.timedout=!0,this.timedoutError=i,this.abort(),this.callback(i)}},r.prototype._setTimeouts=function(){var e=this;this._timeout&&!this._timer&&(this._timer=setTimeout(function(){e._timeoutError("Timeout of ",e._timeout,"ETIME")},this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout(function(){e._timeoutError("Response timeout of ",e._responseTimeout,"ETIMEDOUT")},this._responseTimeout))}},19(e,t,n){"use strict";var i=n(897);function s(e){if(e)return function(e){for(var t in s.prototype)Object.prototype.hasOwnProperty.call(s.prototype,t)&&(e[t]=s.prototype[t]);return e}(e)}e.exports=s,s.prototype.get=function(e){return this.header[e.toLowerCase()]},s.prototype._setHeaderProperties=function(e){var t=e["content-type"]||"";this.type=i.type(t);var n=i.params(t);for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(this[s]=n[s]);this.links={};try{e.link&&(this.links=i.parseLinks(e.link))}catch(e){}},s.prototype._setStatusProperties=function(e){var t=e/100|0;this.statusCode=e,this.status=this.statusCode,this.statusType=t,this.info=1===t,this.ok=2===t,this.redirect=3===t,this.clientError=4===t,this.serverError=5===t,this.error=(4===t||5===t)&&this.toError(),this.created=201===e,this.accepted=202===e,this.noContent=204===e,this.badRequest=400===e,this.unauthorized=401===e,this.notAcceptable=406===e,this.forbidden=403===e,this.notFound=404===e,this.unprocessableEntity=422===e}},897(e,t){"use strict";t.type=function(e){return e.split(/ *; */).shift()},t.params=function(e){return e.split(/ *; */).reduce(function(e,t){var n=t.split(/ *= */),i=n.shift(),s=n.shift();return i&&s&&(e[i]=s),e},{})},t.parseLinks=function(e){return e.split(/ *, */).reduce(function(e,t){var n=t.split(/ *; */),i=n[0].slice(1,-1);return e[n[1].split(/ *= */)[1].slice(1,-1)]=i,e},{})},t.cleanHeader=function(e,t){return delete e["content-type"],delete e["content-length"],delete e["transfer-encoding"],delete e.host,t&&(delete e.authorization,delete e.cookie),e}},597(e){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},98(e){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},818(e,t,n){var i=/%[sdj%]/g;t.format=function(e){if(!g(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(o(arguments[n]));return t.join(" ")}n=1;for(var s=arguments,r=s.length,a=String(e).replace(i,function(e){if("%%"===e)return"%";if(n>=r)return e;switch(e){case"%s":return String(s[n++]);case"%d":return Number(s[n++]);case"%j":try{return JSON.stringify(s[n++])}catch(e){return"[Circular]"}default:return e}}),l=s[n];n<r;l=s[++n])v(l)||!$(l)?a+=" "+l:a+=" "+o(l);return a},t.deprecate=function(e,i){if(m(n.g.process))return function(){return t.deprecate(e,i).apply(this,arguments)};if(!0===process.noDeprecation)return e;var s=!1;return function(){if(!s){if(process.throwDeprecation)throw new Error(i);process.traceDeprecation?console.trace(i):console.error(i),s=!0}return e.apply(this,arguments)}};var s,r={};function o(e,n){var i={seen:[],stylize:l};return arguments.length>=3&&(i.depth=arguments[2]),arguments.length>=4&&(i.colors=arguments[3]),p(n)?i.showHidden=n:n&&t._extend(i,n),m(i.showHidden)&&(i.showHidden=!1),m(i.depth)&&(i.depth=2),m(i.colors)&&(i.colors=!1),m(i.customInspect)&&(i.customInspect=!0),i.colors&&(i.stylize=a),d(i,e,i.depth)}function a(e,t){var n=o.styles[t];return n?"["+o.colors[n][0]+"m"+e+"["+o.colors[n][1]+"m":e}function l(e,t){return e}function d(e,n,i){if(e.customInspect&&n&&b(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var s=n.inspect(i,e);return g(s)||(s=d(e,s,i)),s}var r=function(e,t){if(m(t))return e.stylize("undefined","undefined");if(g(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return y(t)?e.stylize(""+t,"number"):p(t)?e.stylize(""+t,"boolean"):v(t)?e.stylize("null","null"):void 0}(e,n);if(r)return r;var o=Object.keys(n),a=function(e){var t={};return e.forEach(function(e,n){t[e]=!0}),t}(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(n)),T(n)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return u(n);if(0===o.length){if(b(n)){var l=n.name?": "+n.name:"";return e.stylize("[Function"+l+"]","special")}if(f(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(w(n))return e.stylize(Date.prototype.toString.call(n),"date");if(T(n))return u(n)}var $,k="",F=!1,O=["{","}"];return c(n)&&(F=!0,O=["[","]"]),b(n)&&(k=" [Function"+(n.name?": "+n.name:"")+"]"),f(n)&&(k=" "+RegExp.prototype.toString.call(n)),w(n)&&(k=" "+Date.prototype.toUTCString.call(n)),T(n)&&(k=" "+u(n)),0!==o.length||F&&0!=n.length?i<0?f(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),$=F?function(e,t,n,i,s){for(var r=[],o=0,a=t.length;o<a;++o)j(t,String(o))?r.push(h(e,t,n,i,String(o),!0)):r.push("");return s.forEach(function(s){s.match(/^\d+$/)||r.push(h(e,t,n,i,s,!0))}),r}(e,n,i,a,o):o.map(function(t){return h(e,n,i,a,t,F)}),e.seen.pop(),function(e,t,n){return e.reduce(function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}($,k,O)):O[0]+k+O[1]}function u(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,n,i,s,r){var o,a,l;if((l=Object.getOwnPropertyDescriptor(t,s)||{value:t[s]}).get?a=l.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):l.set&&(a=e.stylize("[Setter]","special")),j(i,s)||(o="["+s+"]"),a||(e.seen.indexOf(l.value)<0?(a=v(n)?d(e,l.value,null):d(e,l.value,n-1)).indexOf("\n")>-1&&(a=r?a.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+a.split("\n").map(function(e){return" "+e}).join("\n")):a=e.stylize("[Circular]","special")),m(o)){if(r&&s.match(/^\d+$/))return a;(o=JSON.stringify(""+s)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+a}function c(e){return Array.isArray(e)}function p(e){return"boolean"==typeof e}function v(e){return null===e}function y(e){return"number"==typeof e}function g(e){return"string"==typeof e}function m(e){return void 0===e}function f(e){return $(e)&&"[object RegExp]"===k(e)}function $(e){return"object"==typeof e&&null!==e}function w(e){return $(e)&&"[object Date]"===k(e)}function T(e){return $(e)&&("[object Error]"===k(e)||e instanceof Error)}function b(e){return"function"==typeof e}function k(e){return Object.prototype.toString.call(e)}function F(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(m(s)&&(s=process.env.NODE_DEBUG||""),e=e.toUpperCase(),!r[e])if(new RegExp("\\b"+e+"\\b","i").test(s)){var n=process.pid;r[e]=function(){var i=t.format.apply(t,arguments);console.error("%s %d: %s",e,n,i)}}else r[e]=function(){};return r[e]},t.inspect=o,o.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},o.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=c,t.isBoolean=p,t.isNull=v,t.isNullOrUndefined=function(e){return null==e},t.isNumber=y,t.isString=g,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=m,t.isRegExp=f,t.isObject=$,t.isDate=w,t.isError=T,t.isFunction=b,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(98);var O=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function j(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,n;console.log("%s - %s",(n=[F((e=new Date).getHours()),F(e.getMinutes()),F(e.getSeconds())].join(":"),[e.getDate(),O[e.getMonth()],n].join(" ")),t.format.apply(t,arguments))},t.inherits=n(597),t._extend=function(e,t){if(!t||!$(t))return e;for(var n=Object.keys(t),i=n.length;i--;)e[n[i]]=t[n[i]];return e}},548(){},799(){},545(){},965(){}},t={};function n(i){var s=t[i];if(void 0!==s)return s.exports;var r=t[i]={exports:{}};return e[i](r,r.exports,n),r.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var i={};return(()=>{"use strict";n.d(i,{default:()=>ho});var e,t=n(585),s=n.n(t);class r{constructor(){}static constructFromObject(e,t){if(e){if(t=t||new r,e.hasOwnProperty("links")&&null!==e.links&&void 0!==e.links)for(const n of e.links)if(n.hasOwnProperty("rel")&&n.hasOwnProperty("href"))switch(n.rel){case"first":t.linkFirst=n.href;break;case"prev":t.linkPrev=n.href;break;case"next":t.linkNext=n.href;break;case"last":t.linkLast=n.href}e.hasOwnProperty("totalAvailableResults")&&(t.resultsTotal=e.totalAvailableResults)}return t}getFirstPage(){return this.isFirstPage()?Promise.reject("Cannot navigate to first page : already on first page"):null===this.linkFirst?Promise.reject("No link to first page provided in previous API response"):this._getLink(this.linkFirst)}getPrevPage(){return this.isFirstPage()?Promise.reject("Cannot navigate to previous page : already on first page"):null===this.linkPrev?Promise.reject("No link to previous page provided in previous API response"):this._getLink(this.linkPrev)}getNextPage(){return this.isLastPage()?Promise.reject("Cannot navigate to next page : already on last page"):null===this.linkNext?Promise.reject("No link to next page provided in previous API response"):this._getLink(this.linkNext)}getLastPage(){return this.isLastPage()?Promise.reject("Cannot navigate to last page : already on last page"):null===this.linkLast?Promise.reject("No link to last page provided in previous API response"):this._getLink(this.linkLast)}currentPage(){return null===this.page?0:this.page}countPages(){return null===this.resultsPerPage||null===this.resultsTotal||0===this.resultsPerPage?1:Math.ceil(this.resultsTotal/this.resultsPerPage)}isFirstPage(){return 0===this.currentPage()}isLastPage(){return this.currentPage()===this.countPages()-1}populatePaginationMetadata(e,t,n){this.apiClient=e,this.page=t,this.resultsPerPage=n}_getLink(e){null===this.apiClient&&(this.apiClient=le.instance);const t=this.constructor;return this.apiClient.callApi(e,"GET",{},{},{},{},{},[],[],["application/json"],t)}}r.prototype.linkFirst=null,r.prototype.linkPrev=null,r.prototype.linkNext=null,r.prototype.linkLast=null,r.prototype.apiClient=null,r.prototype.page=null,r.prototype.resultsPerPage=null,r.prototype.resultsTotal=null;var o=new Uint8Array(16);function a(){if(!e&&!(e="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return e(o)}const l=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var d=[],u=0;u<256;++u)d.push((u+256).toString(16).substr(1));const h=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(d[e[t+0]]+d[e[t+1]]+d[e[t+2]]+d[e[t+3]]+"-"+d[e[t+4]]+d[e[t+5]]+"-"+d[e[t+6]]+d[e[t+7]]+"-"+d[e[t+8]]+d[e[t+9]]+"-"+d[e[t+10]]+d[e[t+11]]+d[e[t+12]]+d[e[t+13]]+d[e[t+14]]+d[e[t+15]]).toLowerCase();if(!function(e){return"string"==typeof e&&l.test(e)}(n))throw TypeError("Stringified UUID is invalid");return n},c=function(e,t,n){var i=(e=e||{}).random||(e.rng||a)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){n=n||0;for(var s=0;s<16;++s)t[n+s]=i[s];return t}return h(i)};var p=n(540),v=n.n(p),y=n(545),g=n.n(y),m=n(799),f=n.n(m),$=n(784),w=n.n($),T=n(548);const b={DEFAULT:"DEFAULT",constructFromObject:function(e){if("string"==typeof e||e instanceof String)return b[e];throw new Error("Received object name is not an instance of String")},validate:function(e){if(null!=e){if(e===b.DEFAULT)return;throw new Error("Invalid : must be ValidationScopes.{ }")}}};Object.freeze(b);const k=b;class F{static validateMaximum(e,t){return!(null===t||e>t)}static validateMinimum(e,t){return!(null===t||e<t)}static validateExclusiveMaximum(e,t){return!(null===t||e>t)}static validateExclusiveMinimum(e,t){return!(null===t||e>t)}static validateMultipleOf(e,t){return!(null===t||e%t===0)}static validateMaxLength(e,t){return!(null===t||e.length>t)}static validateMinLength(e,t){return!(null===t||e.length<t)}static validatePattern(e,t){return!(null===t||null===e.match(t))}static validateMaxItems(e,t){return!(null===t||e.length>t)}static validateMinItems(e,t){return!(null===t||e.length<t)}static validateUniqueItems(e,t){return!(null===t||!t||e.length!==new Set(e).size)}}class O{constructor(e,t){this.name=e,this.message=t}getName(){return this.name}setName(e){this.name=e}getMessage(){return this.message}setMessage(e){this.message=e}toJson(){return{name:this.getName(),message:this.getMessage()}}}var j=new WeakSet;class E{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=j),t.add(e),this.$objectType="common.v1.config.Flag",this.$reserved={$fv:"v1.r0"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new E,e.hasOwnProperty("name")&&null!==e.name&&void 0!==e.name&&t.setName(e.name),e.hasOwnProperty("value")&&null!==e.value&&void 0!==e.value&&t.setValue(e.value),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getName(){return this.name}setName(e){this.name=e}getValue(){return this.value}setValue(e){this.value=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getName()&&null!==this.getName()?{name:this.getName()}:{},...void 0!==this.getValue()&&null!==this.getValue()?{value:this.getValue()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("name"===t){if(void 0===this.name||null===this.name)return new O("name","undefined or null");if(!F.validateMaxLength(this.name,128))return new O("name","does not satisfy required maxLength constraint: 128");if(!F.validateMinLength(this.name,3))return new O("name","does not satisfy required minLength constraint: 3")}return"value"!==t||void 0!==this.value&&null!==this.value?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("value","undefined or null")}}function P(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")}E.prototype.name=void 0,E.prototype.value=!1,E.prototype.$reserved=void 0,E.prototype.$objectType=void 0,E.prototype.$unknownFields=void 0;var A=new WeakSet;class C{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=A),t.add(e),this.$objectType="common.v1.config.MapOfStringWrapper",this.$reserved={$fv:"v1.r0"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new C,e.hasOwnProperty("map")&&null!==e.map&&void 0!==e.map&&t.setMap(e.map),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMap(){return this.map}setMap(e){this.map=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getMap()&&null!==this.getMap()?{map:P(A,this,I).call(this,this.getMap(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getMap()&&null!==this.getMap()?{map:P(A,this,I).call(this,this.getMap())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"map"!==t||void 0!==this.map&&null!==this.map?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("map","undefined or null")}}function I(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}function U(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")}C.prototype.map=void 0,C.prototype.$reserved=void 0,C.prototype.$objectType=void 0,C.prototype.$unknownFields=void 0;var D=new WeakSet;class S{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=D),t.add(e),this.$objectType="common.v1.config.KVPair",this.$reserved={$fv:"v1.r0"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,r,o,a;if(e){if(t=t||new S,e.hasOwnProperty("name")&&null!==e.name&&void 0!==e.name&&t.setName(e.name),e.hasOwnProperty("value")&&null!==e.value&&void 0!==e.value)if(Array.isArray(e.value))if(0===e.value.length)t.setValue([]);else{for(o=[],i=e.value,a=i[0].hasOwnProperty("$objectType")?i[0].$objectType:typeof i[0],r=0;r<i.length;r++)switch(a){case"string":case"integer":case"number":o.push(i[r]);break;case"common.v1.config.MapOfStringWrapper":s=C.constructFromObject(i[r],void 0),o.push(s);break;default:throw"Unknown list of type "+a+" in data"}t.setValue(o)}else switch(a=e.value.hasOwnProperty("$objectType")?e.value.$objectType:typeof e.value,a){case"string":case"boolean":case"number":t.setValue(e.value);break;case"object":t.setValue(new Map(Object.entries(e.value)));break;default:throw"Unknown datatype "+a+" in data"}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getName(){return this.name}setName(e){this.name=e}getValue(){return this.value}setValue(e){this.value=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getName()&&null!==this.getName()?{name:this.getName()}:{},...void 0!==this.getValue()&&null!==this.getValue()?{value:void 0!==this.getValue().toJson?this.getValue().toJson(!1):Array.isArray(this.getValue())?this.getValue().map(e=>void 0!==e.toJson?e.toJson(!1):e):U(D,this,R).call(this,this.getValue(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getName()&&null!==this.getName()?{name:this.getName()}:{},...void 0!==this.getValue()&&null!==this.getValue()?{value:void 0!==this.getValue().toJson?this.getValue().toJson():Array.isArray(this.getValue())?this.getValue().map(e=>void 0!==e.toJson?e.toJson():e):U(D,this,R).call(this,this.getValue())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("name"===t){if(void 0===this.name||null===this.name)return new O("name","undefined or null");if(!F.validateMaxLength(this.name,128))return new O("name","does not satisfy required maxLength constraint: 128");if(!F.validateMinLength(this.name,3))return new O("name","does not satisfy required minLength constraint: 3")}return"value"!==t||void 0!==this.value&&null!==this.value?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("value","undefined or null")}}function R(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}S.prototype.name=void 0,S.prototype.value=void 0,S.prototype.$reserved=void 0,S.prototype.$objectType=void 0,S.prototype.$unknownFields=void 0;const N={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",INFO:"INFO",WARNING:"WARNING",ERROR:"ERROR",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(N).find(t=>N[t]===e);return null==t?N.$UNKNOWN:N[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case N.$UNKNOWN:case N.$REDACTED:case N.INFO:case N.WARNING:case N.ERROR:return;default:throw new Error("Invalid : must be MessageSeverity.{ $UNKNOWN|$REDACTED|INFO|WARNING|ERROR }")}}};Object.freeze(N);const x=N;var M=new WeakSet;class V{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=M),t.add(e),this.$objectType="common.v1.config.Message",this.$reserved={$fv:"v1.r0"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new V,e.hasOwnProperty("code")&&null!==e.code&&void 0!==e.code&&t.setCode(e.code),e.hasOwnProperty("message")&&null!==e.message&&void 0!==e.message&&t.setMessage(e.message),e.hasOwnProperty("locale")&&null!==e.locale&&void 0!==e.locale&&t.setLocale(e.locale),e.hasOwnProperty("severity")&&null!==e.severity&&void 0!==e.severity&&t.setSeverity(x.constructFromObject(e.severity)),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getCode(){return this.code}setCode(e){this.code=e}getMessage(){return this.message}setMessage(e){this.message=e}getLocale(){return this.locale}setLocale(e){this.locale=e}getSeverity(){return this.severity}setSeverity(e){this.severity=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getCode()&&null!==this.getCode()?{code:this.getCode()}:{},...void 0!==this.getMessage()&&null!==this.getMessage()?{message:this.getMessage()}:{},...void 0!==this.getLocale()&&null!==this.getLocale()?{locale:this.getLocale()}:{},...void 0!==this.getSeverity()&&null!==this.getSeverity()?{severity:this.getSeverity()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"code"!==t||void 0!==this.code&&null!==this.code?"message"!==t||void 0!==this.message&&null!==this.message?"locale"!==t||void 0!==this.locale&&null!==this.locale?"severity"!==t||void 0!==this.severity&&null!==this.severity?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("severity","undefined or null"):new O("locale","undefined or null"):new O("message","undefined or null"):new O("code","undefined or null")}}V.prototype.code=void 0,V.prototype.message=void 0,V.prototype.locale="en_US",V.prototype.severity=void 0,V.prototype.$reserved=void 0,V.prototype.$objectType=void 0,V.prototype.$unknownFields=void 0;var L=new WeakSet;class J{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=L),t.add(e),this.$objectType="common.v1.response.ApiLink",this.$reserved={$fv:"v1.r0"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new J,e.hasOwnProperty("href")&&null!==e.href&&void 0!==e.href&&t.setHref(e.href),e.hasOwnProperty("rel")&&null!==e.rel&&void 0!==e.rel&&t.setRel(e.rel),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getHref(){return this.href}setHref(e){this.href=e}getRel(){return this.rel}setRel(e){this.rel=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getHref()&&null!==this.getHref()?{href:this.getHref()}:{},...void 0!==this.getRel()&&null!==this.getRel()?{rel:this.getRel()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"href"!==t||void 0!==this.href&&null!==this.href?"rel"!==t||void 0!==this.rel&&null!==this.rel?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("rel","undefined or null"):new O("href","undefined or null")}}J.prototype.href=void 0,J.prototype.rel=void 0,J.prototype.$reserved=void 0,J.prototype.$objectType=void 0,J.prototype.$unknownFields=void 0;var _,W=new WeakSet;class B{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=W),t.add(e),this.$objectType="common.v1.response.ApiResponseMetadata",this.$reserved={$fv:"v1.r0"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,r,o;if(e){if(t=t||new B,e.hasOwnProperty("flags")&&null!==e.flags&&void 0!==e.flags){for(o=[],i=e.flags,r=0;r<i.length;r++)s=E.constructFromObject(i[r],void 0),o.push(s);t.setFlags(o)}if(e.hasOwnProperty("links")&&null!==e.links&&void 0!==e.links){for(o=[],i=e.links,r=0;r<i.length;r++)s=J.constructFromObject(i[r],void 0),o.push(s);t.setLinks(o)}if(e.hasOwnProperty("totalAvailableResults")&&null!==e.totalAvailableResults&&void 0!==e.totalAvailableResults&&t.setTotalAvailableResults(e.totalAvailableResults),e.hasOwnProperty("messages")&&null!==e.messages&&void 0!==e.messages){for(o=[],i=e.messages,r=0;r<i.length;r++)s=V.constructFromObject(i[r],void 0),o.push(s);t.setMessages(o)}if(e.hasOwnProperty("extraInfo")&&null!==e.extraInfo&&void 0!==e.extraInfo){for(o=[],i=e.extraInfo,r=0;r<i.length;r++)s=S.constructFromObject(i[r],void 0),o.push(s);t.setExtraInfo(o)}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getFlags(){return this.flags}setFlags(e){this.flags=e}getLinks(){return this.links}setLinks(e){this.links=e}getTotalAvailableResults(){return this.totalAvailableResults}setTotalAvailableResults(e){this.totalAvailableResults=e}getMessages(){return this.messages}setMessages(e){this.messages=e}getExtraInfo(){return this.extraInfo}setExtraInfo(e){this.extraInfo=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getFlags()&&null!==this.getFlags()?{flags:this.getFlags().map(e=>e.toJson(!1))}:{},...void 0!==this.getLinks()&&null!==this.getLinks()?{links:this.getLinks().map(e=>e.toJson(!1))}:{},...void 0!==this.getTotalAvailableResults()&&null!==this.getTotalAvailableResults()?{totalAvailableResults:this.getTotalAvailableResults()}:{},...void 0!==this.getMessages()&&null!==this.getMessages()?{messages:this.getMessages().map(e=>e.toJson(!1))}:{},...void 0!==this.getExtraInfo()&&null!==this.getExtraInfo()?{extraInfo:this.getExtraInfo().map(e=>e.toJson(!1))}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("flags"===t){if(void 0===this.flags||null===this.flags)return new O("flags","undefined or null");if(!F.validateMaxItems(this.flags,20))return new O("flags","does not satisfy required maxItems constraint: 20")}if("links"===t){if(void 0===this.links||null===this.links)return new O("links","undefined or null");if(!F.validateMaxItems(this.links,20))return new O("links","does not satisfy required maxItems constraint: 20")}if("totalAvailableResults"===t&&(void 0===this.totalAvailableResults||null===this.totalAvailableResults))return new O("totalAvailableResults","undefined or null");if("messages"===t){if(void 0===this.messages||null===this.messages)return new O("messages","undefined or null");if(!F.validateMaxItems(this.messages,20))return new O("messages","does not satisfy required maxItems constraint: 20")}if("extraInfo"===t){if(void 0===this.extraInfo||null===this.extraInfo)return new O("extraInfo","undefined or null");if(!F.validateMaxItems(this.extraInfo,20))return new O("extraInfo","does not satisfy required maxItems constraint: 20")}return"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null")}}function G(e,t,n){z(e,t),t.set(e,n)}function z(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function q(e,t){return e.get(H(e,t))}function K(e,t,n){return e.set(H(e,t),n),n}function H(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")}B.prototype.flags=void 0,B.prototype.links=void 0,B.prototype.totalAvailableResults=void 0,B.prototype.messages=void 0,B.prototype.extraInfo=void 0,B.prototype.$reserved=void 0,B.prototype.$objectType=void 0,B.prototype.$unknownFields=void 0,v()(s());var Y=new WeakMap,X=new WeakMap,Q=new WeakMap,Z=new WeakMap,ee=new WeakMap,te=new WeakMap,ne=new WeakMap,ie=new WeakMap,se=new WeakMap,re=new WeakMap,oe=new WeakMap,ae=new WeakSet;class le{constructor(){var e;z(this,e=ae),e.add(this),G(this,Y,void 0),G(this,X,void 0),G(this,Q,void 0),G(this,Z,void 0),G(this,ee,void 0),G(this,te,void 0),G(this,ne,void 0),G(this,ie,void 0),G(this,se,void 0),G(this,re,void 0),G(this,oe,void 0),K(oe,this,Object.freeze({DEBUG:{key:"DEBUG",value:Symbol(0)},INFO:{key:"INFO",value:Symbol(1)},WARN:{key:"WARN",value:Symbol(2)},ERROR:{key:"ERROR",value:Symbol(3)}})),this.scheme="https",K(ie,this,"undefined"==typeof self?"localhost":self.location.hostname),this.port="undefined"==typeof self?"9440":self.location.port,this.authentications={apiKeyAuthScheme:{type:"apiKey",in:"header",name:"X-ntnx-api-key"},basicAuthScheme:{type:"basic"}},this.defaultHeaders={},K(ee,this,3e4),K(te,this,3e4),K(ne,this,108e5),this.readTimeout=q(te,this),this.connectTimeout=q(ee,this),this.cache=!0,K(X,this,null),this.maxRedirects=1,this.maxRetryAttempts=5,this.retryInterval=3e3,this.withCredentials=!1,"undefined"==typeof self&&(this.agent=new(s().agent)),this.requestAgent=null,K(re,this,null),this.allowVersionNegotiation=!0,K(se,this,!1),this.debug=!1,K(Q,this,null),this.username=null,this.password=null,K(Z,this,!0),this.downloadDestination=null,this.loggerFile=null}set verifySsl(e){this.requestAgent=e?null:new(g().Agent)({rejectUnauthorized:e}),K(Z,this,e)}get verifySsl(){return q(Z,this)}set host(e){K(ie,this,e),K(se,this,!1),K(re,this,null)}get host(){return q(ie,this)}set loggerFile(e){null!=e&&(("string"==typeof e||e instanceof String)&&(e=f().createWriteStream(e,{flags:"a"})),K(Q,this,new console.Console({stdout:e,stderr:e})))}addDefaultHeader(e,t){"Authorization"===e&&K(X,this,null),this.defaultHeaders[e]=t}paramToString(e){return null==e||null==e?"":e instanceof Date?e.toJSON():e.toString()}buildUrl(e,t){if(e.match(/^\//)||(e="/"+e),void 0!==q(re,this)&&null!==q(re,this)&&null!==q(re,this).match(/v\d+\.\d+(\.[a|b]\d+)?/)&&"v4.2"!==q(re,this)){H(ae,this,ke).call(this,q(oe,this).INFO,null,"Changing uri",e,"to negotiated version",q(re,this));var n=new RegExp("(?<=/[-\\w]+/)v\\d+\\.\\d+(\\.[a|b]\\d+)?(?=/.*)","i");e=e.replace(n,q(re,this))}K(Y,this,"undefined"==typeof self?this.scheme+":":self.location.protocol);let i="";""!==q(Y,this)&&""!==this.host&&""!==this.port?i=q(Y,this)+"//"+this.host+":"+this.port:"undefined"!=typeof self&&(i=self.origin);var s=i+e;return s.replace(/\{([\w-]+)\}/g,(e,n)=>{var i;return i=t.hasOwnProperty(n)?this.paramToString(t[n]):e,encodeURIComponent(i)})}buildCollectionParam(e,t){if(null==e)return null;switch(t){case"csv":return e.map(this.paramToString).join(",");case"ssv":return e.map(this.paramToString).join(" ");case"tsv":return e.map(this.paramToString).join("\t");case"pipes":return e.map(this.paramToString).join("|");case"multi":return e.map(this.paramToString);default:throw new Error("Unknown collection format: "+t)}}setApiKey(e){this.authentications.apiKeyAuthScheme.apiKey=null==e||"string"==typeof e||e instanceof String?e:void 0}addEtagToReservedMap(e,t){if(e.hasOwnProperty("headers")&&e.headers.hasOwnProperty("etag")){let i=e.headers.etag;if(void 0!==t.getData())if(Array.isArray(t.getData())&&t.getData().length>0)for(var n of t.getData())n.hasOwnProperty("$reserved")&&void 0!==n.get$Reserved()&&(n.get$Reserved().ETag=i);else t.getData().hasOwnProperty("$reserved")&&void 0!==t.getData().get$Reserved()&&(t.getData().get$Reserved().ETag=i)}return t}static getEtag(e){let t=null;return void 0!==e&&(e.hasOwnProperty("$reserved")&&void 0!==e.get$Reserved()&&(t=this.getValueForCaseInsensitiveKeyMatch(e.get$Reserved(),"ETag")),null==t&&e.hasOwnProperty("data")&&e.getData().hasOwnProperty("$reserved")&&void 0!==e.getData().get$Reserved()&&(t=this.getValueForCaseInsensitiveKeyMatch(e.getData().get$Reserved(),"ETag"))),t}static getValueForCaseInsensitiveKeyMatch(e,t){if(e&&t){const n=t.toLowerCase(),i=Object.keys(e).find(e=>e.toLowerCase()===n);return i?e[i]:null}return null}getNegotiatedVersion(){return q(re,this)}negotiateVersion(e,t){return new Promise(n=>{!0===this.allowVersionNegotiation&&!1===q(se,this)?this.callApiInternal("/api/monitoring/unversioned/info","OPTIONS",{},{},{},{},null,t,[],["application/json"],Object).then(({data:t,response:i})=>{if(200===i.status&&t.hasOwnProperty("data")&&null!==t.data){const i=t.data,s="v4.2";if(H(ae,this,fe).call(this,H(ae,this,$e).call(this,i),H(ae,this,$e).call(this,s)))return H(ae,this,ke).call(this,q(oe,this).WARN,null,"Server version",i,"is below minimum supported version",s,". Version negotiation will not be performed."),K(re,this,null),K(se,this,!1),void n(e);K(re,this,H(ae,this,me).call(this,"v4.2",i)),K(se,this,!0),H(ae,this,ke).call(this,q(oe,this).INFO,null,"Negotiated Version with server :",q(re,this)),n(e)}else H(ae,this,ke).call(this,q(oe,this).ERROR,null,"Could not fetch supported versions from server"),K(re,this,null),K(se,this,!1),n(e)}).catch(t=>{H(ae,this,ke).call(this,q(oe,this).ERROR,null,"Could not fetch supported versions from server"),K(re,this,null),K(se,this,!1),n(e)}):n(e)})}callApi(e,t,n,i,s,r,o,a,l,d,u){return this.negotiateVersion(this,a).then(function(h){return h.callApiInternal(e,t,n,i,s,r,o,a,l,d,u)})}callApiInternal(e,t,i,r,o,a,l,d,u,h,p){var v=this.buildUrl(e,i);const y="undefined"!=typeof window&&void 0!==window.document;let g=["application/octet-stream","application/pdf","application/zip"];if(h&&h.length>0&&h.some(e=>g.includes(e))&&y&&this.downloadDestination)return new Promise((e,n)=>{const i=H(ae,this,Ee).call(this,v,t,r,o,l,d,u,h);fetch(i.url,i.options).then(t=>{if(!t.ok){const e=new Error(`HTTP error ${t.status}`);e.status=t.status,H(ae,this,ke).call(this,q(oe,this).ERROR,null,"Error downloading file:",e),n(e)}if(!(this.downloadDestination instanceof WritableStream)){let e="Incompatible downloadDestination for Browser Environment, must be WritableStream";H(ae,this,ke).call(this,q(oe,this).ERROR,null,e),n(e)}const i=t.body.getReader(),s=this.downloadDestination.getWriter(),r=()=>i.read().then(({done:n,value:i})=>(n&&(s.close(),H(ae,this,ke).call(this,q(oe,this).INFO,null,"Finished streaming response"),e({data:{},response:t})),s.write(i).then(r)));return r()}).catch(e=>{H(ae,this,ke).call(this,q(oe,this).ERROR,null,"Caught the following error :",e),n(e)})});var m=s()(t,v);if(m.oldCallback=m.callback,m.callback=function(e,t){if(t&&t.status){const e=t.status;if(e>=400&&408!==e&&429!==e&&503!==e&&504!==e&&(this._maxRetries=0),401===t.status&&this.header.Cookie&&(this.unset("Cookie"),this._maxRetries=1),429===e){let e=t.headers["retry-after"];if(e){let t=1e3*parseInt(e,10);this._retryDelays[this._retries]=t}}}this.oldCallback(e,t)},H(ae,this,pe).call(this,m,d),"GET"===t.toUpperCase()&&!1===this.cache&&(r._=(new Date).getTime()),m.query(H(ae,this,ce).call(this,r)),m.set(this.defaultHeaders).set(H(ae,this,ce).call(this,o)),!(null!==this.defaultHeaders["NTNX-Request-Id"]&&void 0!==this.defaultHeaders["NTNX-Request-Id"]||null!==o["NTNX-Request-Id"]&&void 0!==o["NTNX-Request-Id"])){let e=c();m.set(H(ae,this,ce).call(this,{"NTNX-Request-Id":e}))}y||(this.downloadDestination=".",m.set(H(ae,this,ce).call(this,{"User-Agent":"Nutanix-monitoring-js-client/4.2.2"}))),this.requestAgent&&m.agent(this.requestAgent);var $={};$.response=H(ae,this,we).call(this,this.connectTimeout,q(ee,this)),$.deadline=H(ae,this,we).call(this,this.readTimeout,q(te,this)),m.timeout($);var w=o.hasOwnProperty("Content-Type")?o["Content-Type"]:H(ae,this,ue).call(this,u);if(w?"multipart/form-data"!=w&&m.type(w):m.header["Content-Type"]||m.type("application/json"),H(ae,this,ke).call(this,q(oe,this).INFO,null,"Request URL :",t,v),H(ae,this,ke).call(this,q(oe,this).DEBUG,H(ae,this,Oe),"Request Headers :",void 0===m.header?"":m.header),"application/x-www-form-urlencoded"===w)m.send(H(ae,this,ce).call(this,a));else if("multipart/form-data"==w){var T=H(ae,this,ce).call(this,a);for(var b in T)T.hasOwnProperty(b)&&(H(ae,this,he).call(this,T[b])?m.attach(b,T[b]):m.field(b,T[b]))}else{if("application/octet-stream"===w&&null!=l&&"function"==typeof l.pipe){if(H(ae,this,ke).call(this,q(oe,this).INFO,null,"Piping octet-stream request"),"function"==typeof l.pipe)l.pipe(m);else{let e;try{e=n(965)}catch(e){H(ae,this,ke).call(this,q(oe,this).ERROR,null,"Error fetching steam/web")}l instanceof e.ReadableStream?l.pipeTo(new e.WritableStream({write(e){m.write(e)},close(){H(ae,this,ke).call(this,q(oe,this).INFO,null,"READABLE STREAM CLOSED")},abort(e){H(ae,this,ke).call(this,q(oe,this).ERROR,null,"READABLE STREAM ABORTED")}})):m.send(l)}return new Promise((t,n)=>{m.on("error",e=>{H(ae,this,ke).call(this,q(oe,this).DEBUG,null,"Caught the following error :",e),n(e)}).on("response",i=>{H(ae,this,je).call(this,i,e,r,p,t,n)})})}["POST","PUT","PATCH"].includes(t.toUpperCase())&&l&&m.send(l)}"Blob"==typeof p?m.responseType("blob"):"String"===p&&m.responseType("string"),H(ae,this,be).call(this,m),H(ae,this,ke).call(this,q(oe,this).DEBUG,null,"Request Body :",void 0===m._data?"":m._data);var k=o.hasOwnProperty("Accept")&&null!=o.Accept?o.Accept:h.join(", ");return k&&m.accept(k),new Promise((n,i)=>{m.buffer(!1).redirects(0).retry(this.maxRetryAttempts,this.retryInterval,[]).withCredentials(this.withCredentials).on("error",e=>{H(ae,this,ke).call(this,q(oe,this).DEBUG,null,"Caught the following error :",e)}).end((o,a)=>{if(o)H(ae,this,ke).call(this,q(oe,this).DEBUG,null,"Caught error during the request!"),H(ae,this,ke).call(this,q(oe,this).ERROR,null,o),404===o.status&&(K(se,this,!1),K(re,this,null)),null!==o.response&&void 0!==o.response?o.data=H(ae,this,ye).call(this,o.response,p):o.data=H(ae,this,ve).call(this,o),i(o);else{H(ae,this,ke).call(this,q(oe,this).INFO,null,"Response Status :",a.status),H(ae,this,ke).call(this,q(oe,this).DEBUG,H(ae,this,Oe),"Response Headers :",a.headers);let o="";if(a.headers.hasOwnProperty("content-type")&&(o=a.headers["content-type"]),g.includes(o)){if(!y){let e=this.downloadDestination+"/downloaded_file_"+Date.now()+".txt",t=f().createWriteStream(e);H(ae,this,Pe).call(this,a,t,e,n,i,p)}}else if(302==a.status){let e=this.downloadDestination+"/downloaded_file_"+Date.now()+".txt",r=this;H(ae,this,ke).call(this,q(oe,this).INFO,null,"Redirecting to :",a.headers.location);var l=s()(t,a.headers.location);l.set(m.header),a.headers.hasOwnProperty("x-redirect-token")&&(H(ae,this,ke).call(this,q(oe,this).INFO,null,"Writing X-Redirect-Token into Cookie"),l.set("Cookie",a.headers["x-redirect-token"])),this.requestAgent&&l.agent(this.requestAgent),l.redirects(0),l.withCredentials(this.withCredentials),l.buffer(!1);let o=f().createWriteStream(e);l.pipe(o),l.on("response",function(t){H(ae,r,ke).call(r,q(oe,r).INFO,null,"Received response after redirection :",t.status),H(ae,r,Pe).call(r,t,o,e,n,i,p)})}else H(ae,this,je).call(this,a,e,r,p,n,i)}})})}static addEtagReferenceToHeader(e,t){if(null!=e&&e.hasOwnProperty("$reserved")&&e.$reserved.hasOwnProperty("ETag")){let n=e.$reserved.ETag;null!=n&&""!==n&&(t["If-Match"]=n)}}static parseDate(e){return new Date(e)}static parseQueryParam(e,t,n,i){let s=null;if(void 0!==t&&t.hasOwnProperty(n)&&(s=t[n]),null===s&&("string"==typeof e||e instanceof String)){const t=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=e.match(new RegExp(`${t}=([0-9]+)`));i&&(s=i[1])}return null===s&&(s=i),s}static convertToType(e,t){if(null==e)return e;switch(t){case"Boolean":return Boolean(e);case"Integer":return parseInt(e,10);case"Number":return parseFloat(e);case"String":return String(e);case"Date":return le.parseDate(String(e));case"Blob":return e;default:if(t===Object)return e;if("function"==typeof t)return t.constructFromObject(e);if(Array.isArray(t)){var n=t[0];return e.map(e=>le.convertToType(e,n))}if("object"==typeof t){var i,s;for(var r in t)if(t.hasOwnProperty(r)){i=r,s=t[r];break}var o={};for(var r in e)if(e.hasOwnProperty(r)){var a=le.convertToType(r,i),l=le.convertToType(e[r],s);o[a]=l}return o}return e}}static constructFromObject(e,t,n){if(Array.isArray(e))for(var i=0;i<e.length;i++)e.hasOwnProperty(i)&&(t[i]=le.convertToType(e[i],n));else for(var s in e)e.hasOwnProperty(s)&&(t[s]=le.convertToType(e[s],n))}}function de(e){return Boolean(null!=e&&e.match(/^application\/json(;.*)?$/i))}function ue(e){for(var t=0;t<e.length;t++)if(H(ae,this,de).call(this,e[t]))return e[t];return e[0]}function he(e){{let t;try{t=n(799)}catch(e){}if(t&&t.ReadStream&&e instanceof t.ReadStream)return!0}return"function"==typeof Buffer&&e instanceof Buffer||"function"==typeof T.Blob&&e instanceof T.Blob||"function"==typeof File&&e instanceof File}function ce(e){var t={};for(var n in e)if(e.hasOwnProperty(n)&&null!=e[n]&&null!=e[n]){var i=e[n];H(ae,this,he).call(this,i)||Array.isArray(i)?t[n]=i:t[n]=this.paramToString(i)}return t}function pe(e,t){t.forEach(t=>{var n=this.authentications[t];switch(n.type){case"basic":n.username||n.password?e.auth(n.username||"",n.password||""):(this.username||this.password)&&e.auth(this.username||"",this.password||""),H(ae,this,ke).call(this,q(oe,this).DEBUG,null,"Basic Auth applied to request");break;case"apiKey":if(n.apiKey){var i={};n.apiKeyPrefix?i[n.name]=n.apiKeyPrefix+" "+n.apiKey:i[n.name]=n.apiKey,"header"===n.in?e.set(i):e.query(i)}H(ae,this,ke).call(this,q(oe,this).DEBUG,null,"apiKey applied to request");break;case"oauth2":n.accessToken&&e.set({Authorization:"Bearer "+n.accessToken}),H(ae,this,ke).call(this,q(oe,this).DEBUG,null,"oauth2 applied to request");break;default:throw H(ae,this,ke).call(this,q(oe,this).ERROR,null,"Unknown authentication type:",n.type),new Error("Unknown authentication type: "+n.type)}})}function ve(e){var t={data:{},metadata:{}};t.data.status=e.status,t.data.message=e.message}function ye(e,t){if(null==e||null==t||204==e.status)return null;if(e.headers&&["text/event-stream","text/html","text/xml","text/csv","text/javascript","text/markdown","text/vcard"].includes(e.headers["content-type"])){(n=new t).data=new T.Blob([e.text],{type:e.headers["content-type"]});let i=new E;i.name="hasError",i.value=!1;let s=[i],r=new B;return r.flags=s,n.metadata=r,n}var n;return(null==(n=e.body)||"object"==typeof n&&void 0===n.length&&!Object.keys(n).length)&&(n=e.text),_.convertToType(n,t)}function ge(e,t,n){if(!(e instanceof r))return;const i=parseInt(this.constructor.parseQueryParam(t,n,"$page","0"),10),s=parseInt(this.constructor.parseQueryParam(t,n,"$limit","50"),10);e.populatePaginationMetadata(this,i,s)}function me(e,t){if(!e||!t)return e;let n=H(ae,this,$e).call(this,e),i=H(ae,this,$e).call(this,t);return!n.family===i.family||H(ae,this,fe).call(this,n,i)?e:t}function fe(e,t){if(parseInt(e.revision)!=parseInt(t.revision))return parseInt(e.revision)<parseInt(t.revision);if("released"===e.versionType)return!1;let n=e.versionType.substring(0,1),i=t.versionType.substring(0,1),s=parseInt(e.versionType.substring(1)),r="released"===t.versionType?0:parseInt(t.versionType.substring(1));return n===i?s<r:"a"===n||"released"===t.versionType}function $e(e){let t={};if("unversioned"===e)t.family="unversioned",t.versionType="released";else{let n=e.toString().split(".");"unversioned"===n[0]?(t.family="unversioned",t.versionType=n[1]):(t.family=n[0].substring(1),t.revision=n[1],2==n.length?t.versionType="released":t.versionType=n[2])}return t}function we(e,t){return e<=0?e=t:e>q(ne,this)&&(e=q(ne,this)),e}function Te(e){if(e.hasOwnProperty("headers")&&e.headers.hasOwnProperty("set-cookie")){let t="",n=e.headers["set-cookie"];if(n.length>0){for(let e of n)e=e.split(";")[0],e.includes("=")&&(e.trim(),t=t.concat(e).concat(";"));""!==t&&(t=t.substr(0,t.length-1))}K(X,this,t),H(ae,this,ke).call(this,q(oe,this).DEBUG,null,"Retained cookie :",t)}else K(X,this,null)}function be(e){null!=q(X,this)&&e.set(H(ae,this,ce).call(this,{Cookie:q(X,this)}))}function ke(e,t,...n){if("object"==typeof e&&"key"in e&&"value"in e&&"symbol"==typeof e.value||(e=q(oe,this).INFO),!H(ae,this,Fe).call(this,e)){n=n.map(e=>"string"==typeof e?e:t?t(e):JSON.stringify(e));let i=n.join(" ");i=(new Date).toISOString()+" "+e.key+" - "+i,void 0!==q(Q,this)&&null!==q(Q,this)&&"function"==typeof q(Q,this).log?q(Q,this).log(i):console.log(i)}}function Fe(e){return!this.debug&&e===q(oe,this).DEBUG}function Oe(e){if("object"!=typeof e)return e;let t="\n";return e&&Object.keys(e).forEach(n=>{t+=n+"=["+e[n]+"]\n"}),"\n"===t?e:t}function je(e,t,n,i,s,r){try{var o=H(ae,this,ye).call(this,e,i);H(ae,this,ke).call(this,q(oe,this).INFO,null,"Response Status :",e.status),H(ae,this,ke).call(this,q(oe,this).DEBUG,H(ae,this,Oe),"Response Headers :",e.headers),H(ae,this,Te).call(this,e||{}),H(ae,this,ke).call(this,q(oe,this).DEBUG,null,"Response Body :",o),204==e.status&&null==o?s({data:o,response:e}):e.ok&&null!=o?(this.addEtagToReservedMap(e,o),H(ae,this,ge).call(this,o,t,n),s({data:o,response:e})):(H(ae,this,ke).call(this,q(oe,this).ERROR,null,o),r({...e.error,data:o}))}catch(e){H(ae,this,ke).call(this,q(oe,this).DEBUG,null,"Caught error while processing response!"),H(ae,this,ke).call(this,q(oe,this).ERROR,null,e),e.data=H(ae,this,ve).call(this,e),r(e)}}function Ee(e,t,n,i,s,r,o,a){let l={};r.forEach(e=>{const t=this.authentications[e];switch(t.type){case"basic":let e="",i="";if(t.username||t.password?(e=t.username||"",i=t.password||""):(this.username||this.password)&&(e=this.username||"",i=this.password||""),e||i){const t=btoa(`${e}:${i}`);l.Authorization=`Basic ${t}`}H(ae,this,ke).call(this,q(oe,this).DEBUG,null,"Basic Auth applied to request");break;case"apiKey":if(t.apiKey){let e="";e=t.apiKeyPrefix?t.apiKeyPrefix+" "+t.apiKey:t.apiKey,"header"===t.in?l[t.name]="Bearer "+e:"query"===t.in&&(n[t.name]=e)}H(ae,this,ke).call(this,q(oe,this).DEBUG,null,"apiKey applied to request");break;case"oauth2":t.accessToken&&(l.Authorization="Bearer "+t.accessToken),H(ae,this,ke).call(this,q(oe,this).DEBUG,null,"oauth2 applied to request");break;default:throw H(ae,this,ke).call(this,q(oe,this).ERROR,null,"Unknown authentication type:",t.type),new Error("Unknown authentication type: "+t.type)}}),"GET"===t.toUpperCase()&&!1===this.cache&&(n.cache="false");const d=H(ae,this,ce).call(this,n),u=Object.keys(d).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(d[e])}`).join("&");let h=e;u&&(h+=(h.includes("?")?"&":"?")+u);const p={...this.defaultHeaders,...H(ae,this,ce).call(this,i),...l};if(!(null!==this.defaultHeaders["NTNX-Request-Id"]&&void 0!==this.defaultHeaders["NTNX-Request-Id"]||null!==i["NTNX-Request-Id"]&&void 0!==i["NTNX-Request-Id"])){let e=c();p["NTNX-Request-Id"]=e}null!=q(X,this)&&(p.Cookie=H(ae,this,ce).call(this,{Cookie:q(X,this)}));var v=i.hasOwnProperty("Content-Type")?i["Content-Type"]:H(ae,this,ue).call(this,o);p["Content-Type"]=v;var y=i.hasOwnProperty("Accept")&&null!=i.Accept?i.Accept:a.join(", ");return y&&(p.Accept=y),H(ae,this,ke).call(this,q(oe,this).INFO,null,"Request URL :",t,e),H(ae,this,ke).call(this,q(oe,this).DEBUG,H(ae,this,Oe),"Request Headers :",p),H(ae,this,ke).call(this,q(oe,this).DEBUG,null,"Request Body :",s||""),{url:h,options:{method:t,headers:p,body:s,credentials:this.withCredentials?"include":"same-origin"}}}function Pe(e,t,n,i,s,r){H(ae,this,ke).call(this,q(oe,this).INFO,null,"Streaming response to : ",n);try{e.on("data",e=>{t.write(e)})}catch(e){H(ae,this,ke).call(this,q(oe,this).ERROR,null,"Issue while downloading file",e)}let o=new r,a="";if(void 0!==e.headers["content-disposition"]&&null!==e.headers["content-disposition"]){let t=e.headers["content-disposition"].match(/.*filename=\"(?<filename>.*)\".*/),n=w().parse(t.groups.filename);a=this.downloadDestination+"/"+n.name+"_"+Date.now()+n.ext,o.data={path:w().parse(a),$objectType:"Path"};let i=new E;i.name="hasError",i.value=!1;let s=[i],r=new B;r.flags=s,o.metadata=r}e.on("end",()=>{H(ae,this,ke).call(this,q(oe,this).INFO,null,"Finished streaming response"),0!==a.length?(H(ae,this,ke).call(this,q(oe,this).INFO,null,"Content-Disposition header found [",a,"] is final filename"),t.close(),f().renameSync(n,a),i({data:o,response:e})):(H(ae,this,ke).call(this,q(oe,this).ERROR,null,"Content-Disposition header not found [",n,"] is final filename"),i({data:o,response:e}))}),e.on("error",e=>{H(ae,this,ke).call(this,q(oe,this).ERROR,null,"Caught the following error :",e),error.data=H(ae,this,ve).call(this,error),s(e)})}function Ae(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")}_=le,le.instance=new le;var Ce=new WeakSet;class Ie{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=Ce),t.add(e),this.$objectType="monitoring.v4.error.AppMessage",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new Ie,e.hasOwnProperty("message")&&null!==e.message&&void 0!==e.message&&t.setMessage(e.message),e.hasOwnProperty("severity")&&null!==e.severity&&void 0!==e.severity&&t.setSeverity(x.constructFromObject(e.severity)),e.hasOwnProperty("code")&&null!==e.code&&void 0!==e.code&&t.setCode(e.code),e.hasOwnProperty("locale")&&null!==e.locale&&void 0!==e.locale&&t.setLocale(e.locale),e.hasOwnProperty("errorGroup")&&null!==e.errorGroup&&void 0!==e.errorGroup&&t.setErrorGroup(e.errorGroup),e.hasOwnProperty("argumentsMap")&&null!==e.argumentsMap&&void 0!==e.argumentsMap&&t.setArgumentsMap(e.argumentsMap),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMessage(){return this.message}setMessage(e){this.message=e}getSeverity(){return this.severity}setSeverity(e){this.severity=e}getCode(){return this.code}setCode(e){this.code=e}getLocale(){return this.locale}setLocale(e){this.locale=e}getErrorGroup(){return this.errorGroup}setErrorGroup(e){this.errorGroup=e}getArgumentsMap(){return this.argumentsMap}setArgumentsMap(e){this.argumentsMap=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getMessage()&&null!==this.getMessage()?{message:this.getMessage()}:{},...void 0!==this.getSeverity()&&null!==this.getSeverity()?{severity:this.getSeverity()}:{},...void 0!==this.getCode()&&null!==this.getCode()?{code:this.getCode()}:{},...void 0!==this.getLocale()&&null!==this.getLocale()?{locale:this.getLocale()}:{},...void 0!==this.getErrorGroup()&&null!==this.getErrorGroup()?{errorGroup:this.getErrorGroup()}:{},...void 0!==this.getArgumentsMap()&&null!==this.getArgumentsMap()?{argumentsMap:Ae(Ce,this,Ue).call(this,this.getArgumentsMap(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getMessage()&&null!==this.getMessage()?{message:this.getMessage()}:{},...void 0!==this.getSeverity()&&null!==this.getSeverity()?{severity:this.getSeverity()}:{},...void 0!==this.getCode()&&null!==this.getCode()?{code:this.getCode()}:{},...void 0!==this.getLocale()&&null!==this.getLocale()?{locale:this.getLocale()}:{},...void 0!==this.getErrorGroup()&&null!==this.getErrorGroup()?{errorGroup:this.getErrorGroup()}:{},...void 0!==this.getArgumentsMap()&&null!==this.getArgumentsMap()?{argumentsMap:Ae(Ce,this,Ue).call(this,this.getArgumentsMap())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"message"!==t||void 0!==this.message&&null!==this.message?"severity"!==t||void 0!==this.severity&&null!==this.severity?"code"!==t||void 0!==this.code&&null!==this.code?"locale"!==t||void 0!==this.locale&&null!==this.locale?"errorGroup"!==t||void 0!==this.errorGroup&&null!==this.errorGroup?"argumentsMap"!==t||void 0!==this.argumentsMap&&null!==this.argumentsMap?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("argumentsMap","undefined or null"):new O("errorGroup","undefined or null"):new O("locale","undefined or null"):new O("code","undefined or null"):new O("severity","undefined or null"):new O("message","undefined or null")}}function Ue(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}Ie.prototype.message=void 0,Ie.prototype.severity=void 0,Ie.prototype.code=void 0,Ie.prototype.locale="en_US",Ie.prototype.errorGroup=void 0,Ie.prototype.argumentsMap=void 0,Ie.prototype.$reserved=void 0,Ie.prototype.$objectType=void 0,Ie.prototype.$unknownFields=void 0;var De=new WeakSet;class Se{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=De),t.add(e),this.$objectType="monitoring.v4.error.SchemaValidationErrorMessage",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new Se,e.hasOwnProperty("location")&&null!==e.location&&void 0!==e.location&&t.setLocation(e.location),e.hasOwnProperty("message")&&null!==e.message&&void 0!==e.message&&t.setMessage(e.message),e.hasOwnProperty("attributePath")&&null!==e.attributePath&&void 0!==e.attributePath&&t.setAttributePath(e.attributePath),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getLocation(){return this.location}setLocation(e){this.location=e}getMessage(){return this.message}setMessage(e){this.message=e}getAttributePath(){return this.attributePath}setAttributePath(e){this.attributePath=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getLocation()&&null!==this.getLocation()?{location:this.getLocation()}:{},...void 0!==this.getMessage()&&null!==this.getMessage()?{message:this.getMessage()}:{},...void 0!==this.getAttributePath()&&null!==this.getAttributePath()?{attributePath:this.getAttributePath()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"location"!==t||void 0!==this.location&&null!==this.location?"message"!==t||void 0!==this.message&&null!==this.message?"attributePath"!==t||void 0!==this.attributePath&&null!==this.attributePath?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("attributePath","undefined or null"):new O("message","undefined or null"):new O("location","undefined or null")}}function Re(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")}Se.prototype.location=void 0,Se.prototype.message=void 0,Se.prototype.attributePath=void 0,Se.prototype.$reserved=void 0,Se.prototype.$objectType=void 0,Se.prototype.$unknownFields=void 0;var Ne=new WeakSet;class xe{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=Ne),t.add(e),this.$objectType="monitoring.v4.error.SchemaValidationError",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,r,o;if(e){if(t=t||new xe,e.hasOwnProperty("timestamp")&&null!==e.timestamp&&void 0!==e.timestamp&&t.setTimestamp(e.timestamp),e.hasOwnProperty("statusCode")&&null!==e.statusCode&&void 0!==e.statusCode&&t.setStatusCode(e.statusCode),e.hasOwnProperty("error")&&null!==e.error&&void 0!==e.error&&t.setError(e.error),e.hasOwnProperty("path")&&null!==e.path&&void 0!==e.path&&t.setPath(e.path),e.hasOwnProperty("validationErrorMessages")&&null!==e.validationErrorMessages&&void 0!==e.validationErrorMessages){for(o=[],i=e.validationErrorMessages,r=0;r<i.length;r++)s=Se.constructFromObject(i[r],void 0),o.push(s);t.setValidationErrorMessages(o)}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getTimestamp(){return this.timestamp}setTimestamp(e){this.timestamp=e}getStatusCode(){return this.statusCode}setStatusCode(e){this.statusCode=e}getError(){return this.error}setError(e){this.error=e}getPath(){return this.path}setPath(e){this.path=e}getValidationErrorMessages(){return this.validationErrorMessages}setValidationErrorMessages(e){this.validationErrorMessages=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getTimestamp()&&null!==this.getTimestamp()?{timestamp:Re(Ne,this,Me).call(this,this.getTimestamp(),!1)}:{},...void 0!==this.getStatusCode()&&null!==this.getStatusCode()?{statusCode:this.getStatusCode()}:{},...void 0!==this.getError()&&null!==this.getError()?{error:this.getError()}:{},...void 0!==this.getPath()&&null!==this.getPath()?{path:this.getPath()}:{},...void 0!==this.getValidationErrorMessages()&&null!==this.getValidationErrorMessages()?{validationErrorMessages:this.getValidationErrorMessages().map(e=>e.toJson(!1))}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"timestamp"!==t||void 0!==this.timestamp&&null!==this.timestamp?"statusCode"!==t||void 0!==this.statusCode&&null!==this.statusCode?"error"!==t||void 0!==this.error&&null!==this.error?"path"!==t||void 0!==this.path&&null!==this.path?"validationErrorMessages"!==t||void 0!==this.validationErrorMessages&&null!==this.validationErrorMessages?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("validationErrorMessages","undefined or null"):new O("path","undefined or null"):new O("error","undefined or null"):new O("statusCode","undefined or null"):new O("timestamp","undefined or null")}}function Me(e,t){return e instanceof Date&&void 0!==t?t?e.toISOString().slice(0,10):e.toISOString():e}function Ve(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")}xe.prototype.timestamp=void 0,xe.prototype.statusCode=void 0,xe.prototype.error=void 0,xe.prototype.path=void 0,xe.prototype.validationErrorMessages=void 0,xe.prototype.$reserved=void 0,xe.prototype.$objectType=void 0,xe.prototype.$unknownFields=void 0;var Le=new WeakSet;class Je{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=Le),t.add(e),this.$objectType="monitoring.v4.error.ErrorResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,r,o,a;if(e){if(t=t||new Je,e.hasOwnProperty("error")&&null!==e.error&&void 0!==e.error)if(Array.isArray(e.error))if(0===e.error.length)t.setError([]);else{for(o=[],i=e.error,a=i[0].hasOwnProperty("$objectType")?i[0].$objectType:typeof i[0],r=0;r<i.length;r++){if("monitoring.v4.error.AppMessage"!==a)throw"Unknown list of type "+a+" in data";s=Ie.constructFromObject(i[r],void 0),o.push(s)}t.setError(o)}else{if(a=e.error.hasOwnProperty("$objectType")?e.error.$objectType:typeof e.error,"monitoring.v4.error.SchemaValidationError"!==a)throw"Unknown datatype "+a+" in data";t.setError(xe.constructFromObject(e.error,void 0))}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getError(){return this.error}setError(e){this.error=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getError()&&null!==this.getError()?{error:void 0!==this.getError().toJson?this.getError().toJson(!1):Array.isArray(this.getError())?this.getError().map(e=>void 0!==e.toJson?e.toJson(!1):e):Ve(Le,this,_e).call(this,this.getError(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getError()&&null!==this.getError()?{error:void 0!==this.getError().toJson?this.getError().toJson():Array.isArray(this.getError())?this.getError().map(e=>void 0!==e.toJson?e.toJson():e):Ve(Le,this,_e).call(this,this.getError())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"error"!==t||void 0!==this.error&&null!==this.error?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("error","undefined or null")}}function _e(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}Je.prototype.error=void 0,Je.prototype.$reserved=void 0,Je.prototype.$objectType=void 0,Je.prototype.$unknownFields=void 0;var We=new WeakSet;class Be{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=We),t.add(e),this.$objectType="common.v1.config.TenantAwareModel",this.$reserved={$fv:"v1.r0"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new Be,e.hasOwnProperty("tenantId")&&null!==e.tenantId&&void 0!==e.tenantId&&t.setTenantId(e.tenantId),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getTenantId(){return this.tenantId}setTenantId(e){this.tenantId=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getTenantId()&&null!==this.getTenantId()?{tenantId:this.getTenantId()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("tenantId"===t){if(void 0===this.tenantId||null===this.tenantId)return new O("tenantId","undefined or null");if(!F.validatePattern(this.tenantId,/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/))return new O("tenantId","does not satisfy required pattern: /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/")}return"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null")}}Be.prototype.tenantId=void 0,Be.prototype.$reserved=void 0,Be.prototype.$objectType=void 0,Be.prototype.$unknownFields=void 0;var Ge=new WeakSet;class ze extends Be{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=Ge),t.add(e),this.$objectType="common.v1.response.ExternalizableAbstractModel",this.$reserved={$fv:"v1.r0"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,r,o;if(e){if(t=t||new ze,Be.constructFromObject(e,t,!0),e.hasOwnProperty("extId")&&null!==e.extId&&void 0!==e.extId&&t.setExtId(e.extId),e.hasOwnProperty("links")&&null!==e.links&&void 0!==e.links){for(o=[],i=e.links,r=0;r<i.length;r++)s=J.constructFromObject(i[r],void 0),o.push(s);t.setLinks(o)}if(!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getExtId(){return this.extId}setExtId(e){this.extId=e}getLinks(){return this.links}setLinks(e){this.links=e}toJson(e){return!1===e?{...void 0!==this.getExtId()&&null!==this.getExtId()?{extId:this.getExtId()}:{},...void 0!==this.getLinks()&&null!==this.getLinks()?{links:this.getLinks().map(e=>e.toJson(!1))}:{},...void 0!==this.getTenantId()&&null!==this.getTenantId()?{tenantId:this.getTenantId()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("extId"===t){if(void 0===this.extId||null===this.extId)return new O("extId","undefined or null");if(null==e){if(!F.validatePattern(this.extId,/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/))return new O("extId","does not satisfy required pattern: /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/")}else if(e===k.update&&!F.validatePattern(this.extId,/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/))return new O("extId","does not satisfy pattern: /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/")}if("links"===t){if(void 0===this.links||null===this.links)return new O("links","undefined or null");if(!F.validateMaxItems(this.links,20))return new O("links","does not satisfy required maxItems constraint: 20")}return new O(t,"no such property exists")}}ze.prototype.extId=void 0,ze.prototype.links=void 0,Be.prototype.tenantId=void 0;var qe=new WeakSet;class Ke{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=qe),t.add(e),this.$objectType="monitoring.v4.common.AlertEntityReference",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new Ke,e.hasOwnProperty("type")&&null!==e.type&&void 0!==e.type&&t.setType(e.type),e.hasOwnProperty("name")&&null!==e.name&&void 0!==e.name&&t.setName(e.name),e.hasOwnProperty("extId")&&null!==e.extId&&void 0!==e.extId&&t.setExtId(e.extId),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getType(){return this.type}setType(e){this.type=e}getName(){return this.name}setName(e){this.name=e}getExtId(){return this.extId}setExtId(e){this.extId=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getType()&&null!==this.getType()?{type:this.getType()}:{},...void 0!==this.getName()&&null!==this.getName()?{name:this.getName()}:{},...void 0!==this.getExtId()&&null!==this.getExtId()?{extId:this.getExtId()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("type"===t&&(void 0===this.type||null===this.type))return new O("type","undefined or null");if("name"===t){if(void 0===this.name||null===this.name)return new O("name","undefined or null");if(!F.validateMaxLength(this.name,1e3))return new O("name","does not satisfy required maxLength constraint: 1000")}if("extId"===t){if(void 0===this.extId||null===this.extId)return new O("extId","undefined or null");if(!F.validatePattern(this.extId,/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/))return new O("extId","does not satisfy required pattern: /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/")}return"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null")}}Ke.prototype.type=void 0,Ke.prototype.name=void 0,Ke.prototype.extId=void 0,Ke.prototype.$reserved=void 0,Ke.prototype.$objectType=void 0,Ke.prototype.$unknownFields=void 0;var He=new WeakSet;class Ye{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=He),t.add(e),this.$objectType="monitoring.v4.common.EntityReference",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new Ye,e.hasOwnProperty("type")&&null!==e.type&&void 0!==e.type&&t.setType(e.type),e.hasOwnProperty("name")&&null!==e.name&&void 0!==e.name&&t.setName(e.name),e.hasOwnProperty("extId")&&null!==e.extId&&void 0!==e.extId&&t.setExtId(e.extId),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getType(){return this.type}setType(e){this.type=e}getName(){return this.name}setName(e){this.name=e}getExtId(){return this.extId}setExtId(e){this.extId=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getType()&&null!==this.getType()?{type:this.getType()}:{},...void 0!==this.getName()&&null!==this.getName()?{name:this.getName()}:{},...void 0!==this.getExtId()&&null!==this.getExtId()?{extId:this.getExtId()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("type"===t&&(void 0===this.type||null===this.type))return new O("type","undefined or null");if("name"===t){if(void 0===this.name||null===this.name)return new O("name","undefined or null");if(!F.validateMaxLength(this.name,1e3))return new O("name","does not satisfy required maxLength constraint: 1000")}if("extId"===t){if(void 0===this.extId||null===this.extId)return new O("extId","undefined or null");if(!F.validatePattern(this.extId,/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/))return new O("extId","does not satisfy required pattern: /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/")}return"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null")}}Ye.prototype.type=void 0,Ye.prototype.name=void 0,Ye.prototype.extId=void 0,Ye.prototype.$reserved=void 0,Ye.prototype.$objectType=void 0,Ye.prototype.$unknownFields=void 0;const Xe={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",AVAILABILITY:"AVAILABILITY",CAPACITY:"CAPACITY",CONFIGURATION:"CONFIGURATION",PERFORMANCE:"PERFORMANCE",SYSTEM_INDICATOR:"SYSTEM_INDICATOR",CPU_CAPACITY:"CPU_CAPACITY",MEMORY_CAPACITY:"MEMORY_CAPACITY",STORAGE_CAPACITY:"STORAGE_CAPACITY",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(Xe).find(t=>Xe[t]===e);return null==t?Xe.$UNKNOWN:Xe[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case Xe.$UNKNOWN:case Xe.$REDACTED:case Xe.AVAILABILITY:case Xe.CAPACITY:case Xe.CONFIGURATION:case Xe.PERFORMANCE:case Xe.SYSTEM_INDICATOR:case Xe.CPU_CAPACITY:case Xe.MEMORY_CAPACITY:case Xe.STORAGE_CAPACITY:return;default:throw new Error("Invalid : must be ImpactType.{ $UNKNOWN|$REDACTED|AVAILABILITY|CAPACITY|CONFIGURATION|PERFORMANCE|SYSTEM_INDICATOR|CPU_CAPACITY|MEMORY_CAPACITY|STORAGE_CAPACITY }")}}};Object.freeze(Xe);const Qe=Xe;var Ze=new WeakSet;class et{constructor(e){var t,n;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t=this,n=Ze),n.add(t),this.boolValue=e,this.$objectType="monitoring.v4.common.BoolValue",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new et,e.hasOwnProperty("boolValue")&&null!==e.boolValue&&void 0!==e.boolValue&&t.setBoolValue(e.boolValue),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getBoolValue(){return this.boolValue}setBoolValue(e){this.boolValue=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getBoolValue()&&null!==this.getBoolValue()?{boolValue:this.getBoolValue()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=["boolValue"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"boolValue"!==t||void 0!==this.boolValue&&null!==this.boolValue?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("boolValue","undefined or null")}}et.prototype.boolValue=void 0,et.prototype.$reserved=void 0,et.prototype.$objectType=void 0,et.prototype.$unknownFields=void 0;const tt={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",EQUAL_TO:"EQUAL_TO",GREATER_THAN:"GREATER_THAN",GREATER_THAN_OR_EQUAL_TO:"GREATER_THAN_OR_EQUAL_TO",LESS_THAN:"LESS_THAN",LESS_THAN_OR_EQUAL_TO:"LESS_THAN_OR_EQUAL_TO",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(tt).find(t=>tt[t]===e);return null==t?tt.$UNKNOWN:tt[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case tt.$UNKNOWN:case tt.$REDACTED:case tt.EQUAL_TO:case tt.GREATER_THAN:case tt.GREATER_THAN_OR_EQUAL_TO:case tt.LESS_THAN:case tt.LESS_THAN_OR_EQUAL_TO:return;default:throw new Error("Invalid : must be ComparisonOperator.{ $UNKNOWN|$REDACTED|EQUAL_TO|GREATER_THAN|GREATER_THAN_OR_EQUAL_TO|LESS_THAN|LESS_THAN_OR_EQUAL_TO }")}}};Object.freeze(tt);const nt=tt,it={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",STATIC_THRESHOLD:"STATIC_THRESHOLD",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(it).find(t=>it[t]===e);return null==t?it.$UNKNOWN:it[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case it.$UNKNOWN:case it.$REDACTED:case it.STATIC_THRESHOLD:return;default:throw new Error("Invalid : must be ConditionType.{ $UNKNOWN|$REDACTED|STATIC_THRESHOLD }")}}};Object.freeze(it);const st=it,rt={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",STRING:"STRING",BOOLEAN:"BOOLEAN",DOUBLE:"DOUBLE",LONG:"LONG",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(rt).find(t=>rt[t]===e);return null==t?rt.$UNKNOWN:rt[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case rt.$UNKNOWN:case rt.$REDACTED:case rt.STRING:case rt.BOOLEAN:case rt.DOUBLE:case rt.LONG:return;default:throw new Error("Invalid : must be DataType.{ $UNKNOWN|$REDACTED|STRING|BOOLEAN|DOUBLE|LONG }")}}};Object.freeze(rt);const ot=rt;var at=new WeakSet;class lt{constructor(e){var t,n;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t=this,n=at),n.add(t),this.doubleValue=e,this.$objectType="monitoring.v4.common.DoubleValue",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new lt,e.hasOwnProperty("doubleValue")&&null!==e.doubleValue&&void 0!==e.doubleValue&&t.setDoubleValue(e.doubleValue),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getDoubleValue(){return this.doubleValue}setDoubleValue(e){this.doubleValue=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getDoubleValue()&&null!==this.getDoubleValue()?{doubleValue:this.getDoubleValue()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=["doubleValue"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"doubleValue"!==t||void 0!==this.doubleValue&&null!==this.doubleValue?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("doubleValue","undefined or null")}}lt.prototype.doubleValue=void 0,lt.prototype.$reserved=void 0,lt.prototype.$objectType=void 0,lt.prototype.$unknownFields=void 0;var dt=new WeakSet;class ut{constructor(e){var t,n;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t=this,n=dt),n.add(t),this.intValue=e,this.$objectType="monitoring.v4.common.IntValue",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new ut,e.hasOwnProperty("intValue")&&null!==e.intValue&&void 0!==e.intValue&&t.setIntValue(e.intValue),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getIntValue(){return this.intValue}setIntValue(e){this.intValue=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getIntValue()&&null!==this.getIntValue()?{intValue:this.getIntValue()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=["intValue"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"intValue"!==t||void 0!==this.intValue&&null!==this.intValue?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("intValue","undefined or null")}}ut.prototype.intValue=void 0,ut.prototype.$reserved=void 0,ut.prototype.$objectType=void 0,ut.prototype.$unknownFields=void 0;var ht=new WeakSet;class ct{constructor(e){var t,n;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t=this,n=ht),n.add(t),this.stringValue=e,this.$objectType="monitoring.v4.common.StringValue",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new ct,e.hasOwnProperty("stringValue")&&null!==e.stringValue&&void 0!==e.stringValue&&t.setStringValue(e.stringValue),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getStringValue(){return this.stringValue}setStringValue(e){this.stringValue=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getStringValue()&&null!==this.getStringValue()?{stringValue:this.getStringValue()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=["stringValue"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"stringValue"!==t||void 0!==this.stringValue&&null!==this.stringValue?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("stringValue","undefined or null")}}function pt(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")}ct.prototype.stringValue=void 0,ct.prototype.$reserved=void 0,ct.prototype.$objectType=void 0,ct.prototype.$unknownFields=void 0;var vt=new WeakSet;class yt{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=vt),t.add(e),this.$objectType="monitoring.v4.common.MetricDetail",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i;if(e){if(t=t||new yt,e.hasOwnProperty("metricName")&&null!==e.metricName&&void 0!==e.metricName&&t.setMetricName(e.metricName),e.hasOwnProperty("metricDisplayName")&&null!==e.metricDisplayName&&void 0!==e.metricDisplayName&&t.setMetricDisplayName(e.metricDisplayName),e.hasOwnProperty("unit")&&null!==e.unit&&void 0!==e.unit&&t.setUnit(e.unit),e.hasOwnProperty("triggerWaitTimeSeconds")&&null!==e.triggerWaitTimeSeconds&&void 0!==e.triggerWaitTimeSeconds&&t.setTriggerWaitTimeSeconds(e.triggerWaitTimeSeconds),e.hasOwnProperty("triggerTime")&&null!==e.triggerTime&&void 0!==e.triggerTime&&t.setTriggerTime(e.triggerTime),e.hasOwnProperty("comparisonOperator")&&null!==e.comparisonOperator&&void 0!==e.comparisonOperator&&t.setComparisonOperator(nt.constructFromObject(e.comparisonOperator)),e.hasOwnProperty("conditionType")&&null!==e.conditionType&&void 0!==e.conditionType&&t.setConditionType(st.constructFromObject(e.conditionType)),e.hasOwnProperty("metricCategory")&&null!==e.metricCategory&&void 0!==e.metricCategory&&t.setMetricCategory(e.metricCategory),e.hasOwnProperty("dataType")&&null!==e.dataType&&void 0!==e.dataType&&t.setDataType(ot.constructFromObject(e.dataType)),e.hasOwnProperty("thresholdValue")&&null!==e.thresholdValue&&void 0!==e.thresholdValue)switch(i=e.thresholdValue.hasOwnProperty("$objectType")?e.thresholdValue.$objectType:typeof e.thresholdValue,i){case"monitoring.v4.common.StringValue":t.setThresholdValue(ct.constructFromObject(e.thresholdValue,void 0));break;case"monitoring.v4.common.BoolValue":t.setThresholdValue(et.constructFromObject(e.thresholdValue,void 0));break;case"monitoring.v4.common.DoubleValue":t.setThresholdValue(lt.constructFromObject(e.thresholdValue,void 0));break;case"monitoring.v4.common.IntValue":t.setThresholdValue(ut.constructFromObject(e.thresholdValue,void 0));break;default:throw"Unknown datatype "+i+" in data"}if(e.hasOwnProperty("metricValue")&&null!==e.metricValue&&void 0!==e.metricValue)switch(i=e.metricValue.hasOwnProperty("$objectType")?e.metricValue.$objectType:typeof e.metricValue,i){case"monitoring.v4.common.StringValue":t.setMetricValue(ct.constructFromObject(e.metricValue,void 0));break;case"monitoring.v4.common.BoolValue":t.setMetricValue(et.constructFromObject(e.metricValue,void 0));break;case"monitoring.v4.common.DoubleValue":t.setMetricValue(lt.constructFromObject(e.metricValue,void 0));break;case"monitoring.v4.common.IntValue":t.setMetricValue(ut.constructFromObject(e.metricValue,void 0));break;default:throw"Unknown datatype "+i+" in data"}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMetricName(){return this.metricName}setMetricName(e){this.metricName=e}getMetricDisplayName(){return this.metricDisplayName}setMetricDisplayName(e){this.metricDisplayName=e}getUnit(){return this.unit}setUnit(e){this.unit=e}getTriggerWaitTimeSeconds(){return this.triggerWaitTimeSeconds}setTriggerWaitTimeSeconds(e){this.triggerWaitTimeSeconds=e}getTriggerTime(){return this.triggerTime}setTriggerTime(e){this.triggerTime=e}getComparisonOperator(){return this.comparisonOperator}setComparisonOperator(e){this.comparisonOperator=e}getConditionType(){return this.conditionType}setConditionType(e){this.conditionType=e}getMetricCategory(){return this.metricCategory}setMetricCategory(e){this.metricCategory=e}getDataType(){return this.dataType}setDataType(e){this.dataType=e}getThresholdValue(){return this.thresholdValue}setThresholdValue(e){this.thresholdValue=e}getMetricValue(){return this.metricValue}setMetricValue(e){this.metricValue=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getMetricName()&&null!==this.getMetricName()?{metricName:this.getMetricName()}:{},...void 0!==this.getMetricDisplayName()&&null!==this.getMetricDisplayName()?{metricDisplayName:this.getMetricDisplayName()}:{},...void 0!==this.getUnit()&&null!==this.getUnit()?{unit:this.getUnit()}:{},...void 0!==this.getTriggerWaitTimeSeconds()&&null!==this.getTriggerWaitTimeSeconds()?{triggerWaitTimeSeconds:this.getTriggerWaitTimeSeconds()}:{},...void 0!==this.getTriggerTime()&&null!==this.getTriggerTime()?{triggerTime:pt(vt,this,mt).call(this,this.getTriggerTime(),!1)}:{},...void 0!==this.getComparisonOperator()&&null!==this.getComparisonOperator()?{comparisonOperator:this.getComparisonOperator()}:{},...void 0!==this.getConditionType()&&null!==this.getConditionType()?{conditionType:this.getConditionType()}:{},...void 0!==this.getMetricCategory()&&null!==this.getMetricCategory()?{metricCategory:this.getMetricCategory()}:{},...void 0!==this.getDataType()&&null!==this.getDataType()?{dataType:this.getDataType()}:{},...void 0!==this.getThresholdValue()&&null!==this.getThresholdValue()?{thresholdValue:void 0!==this.getThresholdValue().toJson?this.getThresholdValue().toJson(!1):Array.isArray(this.getThresholdValue())?this.getThresholdValue().map(e=>void 0!==e.toJson?e.toJson(!1):e):pt(vt,this,gt).call(this,this.getThresholdValue(),!1)}:{},...void 0!==this.getMetricValue()&&null!==this.getMetricValue()?{metricValue:void 0!==this.getMetricValue().toJson?this.getMetricValue().toJson(!1):Array.isArray(this.getMetricValue())?this.getMetricValue().map(e=>void 0!==e.toJson?e.toJson(!1):e):pt(vt,this,gt).call(this,this.getMetricValue(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getMetricName()&&null!==this.getMetricName()?{metricName:this.getMetricName()}:{},...void 0!==this.getMetricDisplayName()&&null!==this.getMetricDisplayName()?{metricDisplayName:this.getMetricDisplayName()}:{},...void 0!==this.getUnit()&&null!==this.getUnit()?{unit:this.getUnit()}:{},...void 0!==this.getTriggerWaitTimeSeconds()&&null!==this.getTriggerWaitTimeSeconds()?{triggerWaitTimeSeconds:this.getTriggerWaitTimeSeconds()}:{},...void 0!==this.getTriggerTime()&&null!==this.getTriggerTime()?{triggerTime:pt(vt,this,mt).call(this,this.getTriggerTime(),!1)}:{},...void 0!==this.getComparisonOperator()&&null!==this.getComparisonOperator()?{comparisonOperator:this.getComparisonOperator()}:{},...void 0!==this.getConditionType()&&null!==this.getConditionType()?{conditionType:this.getConditionType()}:{},...void 0!==this.getMetricCategory()&&null!==this.getMetricCategory()?{metricCategory:this.getMetricCategory()}:{},...void 0!==this.getDataType()&&null!==this.getDataType()?{dataType:this.getDataType()}:{},...void 0!==this.getThresholdValue()&&null!==this.getThresholdValue()?{thresholdValue:void 0!==this.getThresholdValue().toJson?this.getThresholdValue().toJson():Array.isArray(this.getThresholdValue())?this.getThresholdValue().map(e=>void 0!==e.toJson?e.toJson():e):pt(vt,this,gt).call(this,this.getThresholdValue())}:{},...void 0!==this.getMetricValue()&&null!==this.getMetricValue()?{metricValue:void 0!==this.getMetricValue().toJson?this.getMetricValue().toJson():Array.isArray(this.getMetricValue())?this.getMetricValue().map(e=>void 0!==e.toJson?e.toJson():e):pt(vt,this,gt).call(this,this.getMetricValue())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("metricName"===t){if(void 0===this.metricName||null===this.metricName)return new O("metricName","undefined or null");if(!F.validateMaxLength(this.metricName,1e3))return new O("metricName","does not satisfy required maxLength constraint: 1000")}if("metricDisplayName"===t){if(void 0===this.metricDisplayName||null===this.metricDisplayName)return new O("metricDisplayName","undefined or null");if(!F.validateMaxLength(this.metricDisplayName,1e3))return new O("metricDisplayName","does not satisfy required maxLength constraint: 1000")}return"unit"!==t||void 0!==this.unit&&null!==this.unit?"triggerWaitTimeSeconds"!==t||void 0!==this.triggerWaitTimeSeconds&&null!==this.triggerWaitTimeSeconds?"triggerTime"!==t||void 0!==this.triggerTime&&null!==this.triggerTime?"comparisonOperator"!==t||void 0!==this.comparisonOperator&&null!==this.comparisonOperator?"conditionType"!==t||void 0!==this.conditionType&&null!==this.conditionType?"metricCategory"!==t||void 0!==this.metricCategory&&null!==this.metricCategory?"dataType"!==t||void 0!==this.dataType&&null!==this.dataType?"thresholdValue"!==t||void 0!==this.thresholdValue&&null!==this.thresholdValue?"metricValue"!==t||void 0!==this.metricValue&&null!==this.metricValue?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("metricValue","undefined or null"):new O("thresholdValue","undefined or null"):new O("dataType","undefined or null"):new O("metricCategory","undefined or null"):new O("conditionType","undefined or null"):new O("comparisonOperator","undefined or null"):new O("triggerTime","undefined or null"):new O("triggerWaitTimeSeconds","undefined or null"):new O("unit","undefined or null")}}function gt(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}function mt(e,t){return e instanceof Date&&void 0!==t?t?e.toISOString().slice(0,10):e.toISOString():e}function ft(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")}yt.prototype.metricName=void 0,yt.prototype.metricDisplayName=void 0,yt.prototype.unit=void 0,yt.prototype.triggerWaitTimeSeconds=void 0,yt.prototype.triggerTime=void 0,yt.prototype.comparisonOperator=void 0,yt.prototype.conditionType=void 0,yt.prototype.metricCategory=void 0,yt.prototype.dataType=void 0,yt.prototype.thresholdValue=void 0,yt.prototype.metricValue=void 0,yt.prototype.$reserved=void 0,yt.prototype.$objectType=void 0,yt.prototype.$unknownFields=void 0;var $t=new WeakSet;class wt{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=$t),t.add(e),this.$objectType="monitoring.v4.common.Parameter",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i;if(e){if(t=t||new wt,e.hasOwnProperty("paramName")&&null!==e.paramName&&void 0!==e.paramName&&t.setParamName(e.paramName),e.hasOwnProperty("paramValue")&&null!==e.paramValue&&void 0!==e.paramValue)switch(i=e.paramValue.hasOwnProperty("$objectType")?e.paramValue.$objectType:typeof e.paramValue,i){case"monitoring.v4.common.StringValue":t.setParamValue(ct.constructFromObject(e.paramValue,void 0));break;case"monitoring.v4.common.BoolValue":t.setParamValue(et.constructFromObject(e.paramValue,void 0));break;case"monitoring.v4.common.IntValue":t.setParamValue(ut.constructFromObject(e.paramValue,void 0));break;default:throw"Unknown datatype "+i+" in data"}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getParamName(){return this.paramName}setParamName(e){this.paramName=e}getParamValue(){return this.paramValue}setParamValue(e){this.paramValue=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getParamName()&&null!==this.getParamName()?{paramName:this.getParamName()}:{},...void 0!==this.getParamValue()&&null!==this.getParamValue()?{paramValue:void 0!==this.getParamValue().toJson?this.getParamValue().toJson(!1):Array.isArray(this.getParamValue())?this.getParamValue().map(e=>void 0!==e.toJson?e.toJson(!1):e):ft($t,this,Tt).call(this,this.getParamValue(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getParamName()&&null!==this.getParamName()?{paramName:this.getParamName()}:{},...void 0!==this.getParamValue()&&null!==this.getParamValue()?{paramValue:void 0!==this.getParamValue().toJson?this.getParamValue().toJson():Array.isArray(this.getParamValue())?this.getParamValue().map(e=>void 0!==e.toJson?e.toJson():e):ft($t,this,Tt).call(this,this.getParamValue())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("paramName"===t){if(void 0===this.paramName||null===this.paramName)return new O("paramName","undefined or null");if(!F.validateMaxLength(this.paramName,100))return new O("paramName","does not satisfy required maxLength constraint: 100")}return"paramValue"!==t||void 0!==this.paramValue&&null!==this.paramValue?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("paramValue","undefined or null")}}function Tt(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}wt.prototype.paramName=void 0,wt.prototype.paramValue=void 0,wt.prototype.$reserved=void 0,wt.prototype.$objectType=void 0,wt.prototype.$unknownFields=void 0;const bt={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",INFO:"INFO",WARNING:"WARNING",CRITICAL:"CRITICAL",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(bt).find(t=>bt[t]===e);return null==t?bt.$UNKNOWN:bt[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case bt.$UNKNOWN:case bt.$REDACTED:case bt.INFO:case bt.WARNING:case bt.CRITICAL:return;default:throw new Error("Invalid : must be Severity.{ $UNKNOWN|$REDACTED|INFO|WARNING|CRITICAL }")}}};Object.freeze(bt);const kt=bt;var Ft=new WeakSet;class Ot{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=Ft),t.add(e),this.$objectType="monitoring.v4.serviceability.RootCauseAnalysis",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new Ot,e.hasOwnProperty("cause")&&null!==e.cause&&void 0!==e.cause&&t.setCause(e.cause),e.hasOwnProperty("resolution")&&null!==e.resolution&&void 0!==e.resolution&&t.setResolution(e.resolution),e.hasOwnProperty("detail")&&null!==e.detail&&void 0!==e.detail&&t.setDetail(e.detail),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getCause(){return this.cause}setCause(e){this.cause=e}getResolution(){return this.resolution}setResolution(e){this.resolution=e}getDetail(){return this.detail}setDetail(e){this.detail=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getCause()&&null!==this.getCause()?{cause:this.getCause()}:{},...void 0!==this.getResolution()&&null!==this.getResolution()?{resolution:this.getResolution()}:{},...void 0!==this.getDetail()&&null!==this.getDetail()?{detail:this.getDetail()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"cause"!==t||void 0!==this.cause&&null!==this.cause?"resolution"!==t||void 0!==this.resolution&&null!==this.resolution?"detail"!==t||void 0!==this.detail&&null!==this.detail?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("detail","undefined or null"):new O("resolution","undefined or null"):new O("cause","undefined or null")}}function jt(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")}Ot.prototype.cause=void 0,Ot.prototype.resolution=void 0,Ot.prototype.detail=void 0,Ot.prototype.$reserved=void 0,Ot.prototype.$objectType=void 0,Ot.prototype.$unknownFields=void 0;var Et=new WeakSet;class Pt{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=Et),t.add(e),this.$objectType="monitoring.v4.serviceability.SeverityTrail",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new Pt,e.hasOwnProperty("severity")&&null!==e.severity&&void 0!==e.severity&&t.setSeverity(kt.constructFromObject(e.severity)),e.hasOwnProperty("severityChangeTime")&&null!==e.severityChangeTime&&void 0!==e.severityChangeTime&&t.setSeverityChangeTime(e.severityChangeTime),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getSeverity(){return this.severity}setSeverity(e){this.severity=e}getSeverityChangeTime(){return this.severityChangeTime}setSeverityChangeTime(e){this.severityChangeTime=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getSeverity()&&null!==this.getSeverity()?{severity:this.getSeverity()}:{},...void 0!==this.getSeverityChangeTime()&&null!==this.getSeverityChangeTime()?{severityChangeTime:jt(Et,this,At).call(this,this.getSeverityChangeTime(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"severity"!==t||void 0!==this.severity&&null!==this.severity?"severityChangeTime"!==t||void 0!==this.severityChangeTime&&null!==this.severityChangeTime?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("severityChangeTime","undefined or null"):new O("severity","undefined or null")}}function At(e,t){return e instanceof Date&&void 0!==t?t?e.toISOString().slice(0,10):e.toISOString():e}function Ct(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")}Pt.prototype.severity=void 0,Pt.prototype.severityChangeTime=void 0,Pt.prototype.$reserved=void 0,Pt.prototype.$objectType=void 0,Pt.prototype.$unknownFields=void 0;var It=new WeakSet;class Ut extends ze{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=It),t.add(e),this.$objectType="monitoring.v4.serviceability.Alert",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,r,o;if(e){if(t=t||new Ut,ze.constructFromObject(e,t,!0),e.hasOwnProperty("isAcknowledged")&&null!==e.isAcknowledged&&void 0!==e.isAcknowledged&&t.setIsAcknowledged(e.isAcknowledged),e.hasOwnProperty("acknowledgedByUsername")&&null!==e.acknowledgedByUsername&&void 0!==e.acknowledgedByUsername&&t.setAcknowledgedByUsername(e.acknowledgedByUsername),e.hasOwnProperty("acknowledgedTime")&&null!==e.acknowledgedTime&&void 0!==e.acknowledgedTime&&t.setAcknowledgedTime(e.acknowledgedTime),e.hasOwnProperty("isAutoResolved")&&null!==e.isAutoResolved&&void 0!==e.isAutoResolved&&t.setIsAutoResolved(e.isAutoResolved),e.hasOwnProperty("isResolved")&&null!==e.isResolved&&void 0!==e.isResolved&&t.setIsResolved(e.isResolved),e.hasOwnProperty("resolvedByUsername")&&null!==e.resolvedByUsername&&void 0!==e.resolvedByUsername&&t.setResolvedByUsername(e.resolvedByUsername),e.hasOwnProperty("resolvedTime")&&null!==e.resolvedTime&&void 0!==e.resolvedTime&&t.setResolvedTime(e.resolvedTime),e.hasOwnProperty("sourceEntity")&&null!==e.sourceEntity&&void 0!==e.sourceEntity&&t.setSourceEntity(Ke.constructFromObject(e.sourceEntity)),e.hasOwnProperty("affectedEntities")&&null!==e.affectedEntities&&void 0!==e.affectedEntities){for(o=[],i=e.affectedEntities,r=0;r<i.length;r++)s=Ye.constructFromObject(i[r],void 0),o.push(s);t.setAffectedEntities(o)}if(e.hasOwnProperty("severityTrails")&&null!==e.severityTrails&&void 0!==e.severityTrails){for(o=[],i=e.severityTrails,r=0;r<i.length;r++)s=Pt.constructFromObject(i[r],void 0),o.push(s);t.setSeverityTrails(o)}if(e.hasOwnProperty("metricDetails")&&null!==e.metricDetails&&void 0!==e.metricDetails){for(o=[],i=e.metricDetails,r=0;r<i.length;r++)s=yt.constructFromObject(i[r],void 0),o.push(s);t.setMetricDetails(o)}if(e.hasOwnProperty("title")&&null!==e.title&&void 0!==e.title&&t.setTitle(e.title),e.hasOwnProperty("alertType")&&null!==e.alertType&&void 0!==e.alertType&&t.setAlertType(e.alertType),e.hasOwnProperty("classifications")&&null!==e.classifications&&void 0!==e.classifications){for(o=[],i=e.classifications,r=0;r<i.length;r++)o.push(i[r]);t.setClassifications(o)}if(e.hasOwnProperty("clusterUUID")&&null!==e.clusterUUID&&void 0!==e.clusterUUID&&t.setClusterUUID(e.clusterUUID),e.hasOwnProperty("creationTime")&&null!==e.creationTime&&void 0!==e.creationTime&&t.setCreationTime(e.creationTime),e.hasOwnProperty("impactTypes")&&null!==e.impactTypes&&void 0!==e.impactTypes){for(o=[],i=e.impactTypes,r=0;r<i.length;r++)s=Qe.constructFromObject(i[r],void 0),o.push(s);t.setImpactTypes(o)}if(e.hasOwnProperty("lastUpdatedTime")&&null!==e.lastUpdatedTime&&void 0!==e.lastUpdatedTime&&t.setLastUpdatedTime(e.lastUpdatedTime),e.hasOwnProperty("message")&&null!==e.message&&void 0!==e.message&&t.setMessage(e.message),e.hasOwnProperty("originatingClusterUUID")&&null!==e.originatingClusterUUID&&void 0!==e.originatingClusterUUID&&t.setOriginatingClusterUUID(e.originatingClusterUUID),e.hasOwnProperty("severity")&&null!==e.severity&&void 0!==e.severity&&t.setSeverity(kt.constructFromObject(e.severity)),e.hasOwnProperty("isUserDefined")&&null!==e.isUserDefined&&void 0!==e.isUserDefined&&t.setIsUserDefined(e.isUserDefined),e.hasOwnProperty("parameters")&&null!==e.parameters&&void 0!==e.parameters){for(o=[],i=e.parameters,r=0;r<i.length;r++)s=wt.constructFromObject(i[r],void 0),o.push(s);t.setParameters(o)}if(e.hasOwnProperty("serviceName")&&null!==e.serviceName&&void 0!==e.serviceName&&t.setServiceName(e.serviceName),e.hasOwnProperty("rootCauseAnalysis")&&null!==e.rootCauseAnalysis&&void 0!==e.rootCauseAnalysis){for(o=[],i=e.rootCauseAnalysis,r=0;r<i.length;r++)s=Ot.constructFromObject(i[r],void 0),o.push(s);t.setRootCauseAnalysis(o)}if(e.hasOwnProperty("kbArticles")&&null!==e.kbArticles&&void 0!==e.kbArticles){for(o=[],i=e.kbArticles,r=0;r<i.length;r++)o.push(i[r]);t.setKbArticles(o)}if(e.hasOwnProperty("clusterName")&&null!==e.clusterName&&void 0!==e.clusterName&&t.setClusterName(e.clusterName),e.hasOwnProperty("isRunnable")&&null!==e.isRunnable&&void 0!==e.isRunnable&&t.setIsRunnable(e.isRunnable),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getIsAcknowledged(){return this.isAcknowledged}setIsAcknowledged(e){this.isAcknowledged=e}getAcknowledgedByUsername(){return this.acknowledgedByUsername}setAcknowledgedByUsername(e){this.acknowledgedByUsername=e}getAcknowledgedTime(){return this.acknowledgedTime}setAcknowledgedTime(e){this.acknowledgedTime=e}getIsAutoResolved(){return this.isAutoResolved}setIsAutoResolved(e){this.isAutoResolved=e}getIsResolved(){return this.isResolved}setIsResolved(e){this.isResolved=e}getResolvedByUsername(){return this.resolvedByUsername}setResolvedByUsername(e){this.resolvedByUsername=e}getResolvedTime(){return this.resolvedTime}setResolvedTime(e){this.resolvedTime=e}getSourceEntity(){return this.sourceEntity}setSourceEntity(e){this.sourceEntity=e}getAffectedEntities(){return this.affectedEntities}setAffectedEntities(e){this.affectedEntities=e}getSeverityTrails(){return this.severityTrails}setSeverityTrails(e){this.severityTrails=e}getMetricDetails(){return this.metricDetails}setMetricDetails(e){this.metricDetails=e}getTitle(){return this.title}setTitle(e){this.title=e}getAlertType(){return this.alertType}setAlertType(e){this.alertType=e}getClassifications(){return this.classifications}setClassifications(e){this.classifications=e}getClusterUUID(){return this.clusterUUID}setClusterUUID(e){this.clusterUUID=e}getCreationTime(){return this.creationTime}setCreationTime(e){this.creationTime=e}getImpactTypes(){return this.impactTypes}setImpactTypes(e){this.impactTypes=e}getLastUpdatedTime(){return this.lastUpdatedTime}setLastUpdatedTime(e){this.lastUpdatedTime=e}getMessage(){return this.message}setMessage(e){this.message=e}getOriginatingClusterUUID(){return this.originatingClusterUUID}setOriginatingClusterUUID(e){this.originatingClusterUUID=e}getSeverity(){return this.severity}setSeverity(e){this.severity=e}getIsUserDefined(){return this.isUserDefined}setIsUserDefined(e){this.isUserDefined=e}getParameters(){return this.parameters}setParameters(e){this.parameters=e}getServiceName(){return this.serviceName}setServiceName(e){this.serviceName=e}getRootCauseAnalysis(){return this.rootCauseAnalysis}setRootCauseAnalysis(e){this.rootCauseAnalysis=e}getKbArticles(){return this.kbArticles}setKbArticles(e){this.kbArticles=e}getClusterName(){return this.clusterName}setClusterName(e){this.clusterName=e}getIsRunnable(){return this.isRunnable}setIsRunnable(e){this.isRunnable=e}toJson(e){return!1===e?{...void 0!==this.getIsAcknowledged()&&null!==this.getIsAcknowledged()?{isAcknowledged:this.getIsAcknowledged()}:{},...void 0!==this.getAcknowledgedByUsername()&&null!==this.getAcknowledgedByUsername()?{acknowledgedByUsername:this.getAcknowledgedByUsername()}:{},...void 0!==this.getAcknowledgedTime()&&null!==this.getAcknowledgedTime()?{acknowledgedTime:Ct(It,this,Dt).call(this,this.getAcknowledgedTime(),!1)}:{},...void 0!==this.getIsAutoResolved()&&null!==this.getIsAutoResolved()?{isAutoResolved:this.getIsAutoResolved()}:{},...void 0!==this.getIsResolved()&&null!==this.getIsResolved()?{isResolved:this.getIsResolved()}:{},...void 0!==this.getResolvedByUsername()&&null!==this.getResolvedByUsername()?{resolvedByUsername:this.getResolvedByUsername()}:{},...void 0!==this.getResolvedTime()&&null!==this.getResolvedTime()?{resolvedTime:Ct(It,this,Dt).call(this,this.getResolvedTime(),!1)}:{},...void 0!==this.getSourceEntity()&&null!==this.getSourceEntity()?{sourceEntity:this.getSourceEntity().toJson(!1)}:{},...void 0!==this.getAffectedEntities()&&null!==this.getAffectedEntities()?{affectedEntities:this.getAffectedEntities().map(e=>e.toJson(!1))}:{},...void 0!==this.getSeverityTrails()&&null!==this.getSeverityTrails()?{severityTrails:this.getSeverityTrails().map(e=>e.toJson(!1))}:{},...void 0!==this.getMetricDetails()&&null!==this.getMetricDetails()?{metricDetails:this.getMetricDetails().map(e=>e.toJson(!1))}:{},...void 0!==this.getTitle()&&null!==this.getTitle()?{title:this.getTitle()}:{},...void 0!==this.getAlertType()&&null!==this.getAlertType()?{alertType:this.getAlertType()}:{},...void 0!==this.getClassifications()&&null!==this.getClassifications()?{classifications:this.getClassifications()}:{},...void 0!==this.getClusterUUID()&&null!==this.getClusterUUID()?{clusterUUID:this.getClusterUUID()}:{},...void 0!==this.getCreationTime()&&null!==this.getCreationTime()?{creationTime:Ct(It,this,Dt).call(this,this.getCreationTime(),!1)}:{},...void 0!==this.getImpactTypes()&&null!==this.getImpactTypes()?{impactTypes:this.getImpactTypes()}:{},...void 0!==this.getLastUpdatedTime()&&null!==this.getLastUpdatedTime()?{lastUpdatedTime:Ct(It,this,Dt).call(this,this.getLastUpdatedTime(),!1)}:{},...void 0!==this.getMessage()&&null!==this.getMessage()?{message:this.getMessage()}:{},...void 0!==this.getOriginatingClusterUUID()&&null!==this.getOriginatingClusterUUID()?{originatingClusterUUID:this.getOriginatingClusterUUID()}:{},...void 0!==this.getSeverity()&&null!==this.getSeverity()?{severity:this.getSeverity()}:{},...void 0!==this.getIsUserDefined()&&null!==this.getIsUserDefined()?{isUserDefined:this.getIsUserDefined()}:{},...void 0!==this.getParameters()&&null!==this.getParameters()?{parameters:this.getParameters().map(e=>e.toJson(!1))}:{},...void 0!==this.getServiceName()&&null!==this.getServiceName()?{serviceName:this.getServiceName()}:{},...void 0!==this.getRootCauseAnalysis()&&null!==this.getRootCauseAnalysis()?{rootCauseAnalysis:this.getRootCauseAnalysis().map(e=>e.toJson(!1))}:{},...void 0!==this.getKbArticles()&&null!==this.getKbArticles()?{kbArticles:this.getKbArticles()}:{},...void 0!==this.getClusterName()&&null!==this.getClusterName()?{clusterName:this.getClusterName()}:{},...void 0!==this.getIsRunnable()&&null!==this.getIsRunnable()?{isRunnable:this.getIsRunnable()}:{},...void 0!==this.getExtId()&&null!==this.getExtId()?{extId:this.getExtId()}:{},...void 0!==this.getLinks()&&null!==this.getLinks()?{links:this.getLinks().map(e=>e.toJson(!1))}:{},...void 0!==this.getTenantId()&&null!==this.getTenantId()?{tenantId:this.getTenantId()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getIsAcknowledged()&&null!==this.getIsAcknowledged()?{isAcknowledged:this.getIsAcknowledged()}:{},...void 0!==this.getAcknowledgedByUsername()&&null!==this.getAcknowledgedByUsername()?{acknowledgedByUsername:this.getAcknowledgedByUsername()}:{},...void 0!==this.getAcknowledgedTime()&&null!==this.getAcknowledgedTime()?{acknowledgedTime:Ct(It,this,Dt).call(this,this.getAcknowledgedTime(),!1)}:{},...void 0!==this.getIsAutoResolved()&&null!==this.getIsAutoResolved()?{isAutoResolved:this.getIsAutoResolved()}:{},...void 0!==this.getIsResolved()&&null!==this.getIsResolved()?{isResolved:this.getIsResolved()}:{},...void 0!==this.getResolvedByUsername()&&null!==this.getResolvedByUsername()?{resolvedByUsername:this.getResolvedByUsername()}:{},...void 0!==this.getResolvedTime()&&null!==this.getResolvedTime()?{resolvedTime:Ct(It,this,Dt).call(this,this.getResolvedTime(),!1)}:{},...void 0!==this.getSourceEntity()&&null!==this.getSourceEntity()?{sourceEntity:this.getSourceEntity().toJson(!1)}:{},...void 0!==this.getAffectedEntities()&&null!==this.getAffectedEntities()?{affectedEntities:this.getAffectedEntities().map(e=>e.toJson(!1))}:{},...void 0!==this.getSeverityTrails()&&null!==this.getSeverityTrails()?{severityTrails:this.getSeverityTrails().map(e=>e.toJson(!1))}:{},...void 0!==this.getMetricDetails()&&null!==this.getMetricDetails()?{metricDetails:this.getMetricDetails().map(e=>e.toJson(!1))}:{},...void 0!==this.getTitle()&&null!==this.getTitle()?{title:this.getTitle()}:{},...void 0!==this.getAlertType()&&null!==this.getAlertType()?{alertType:this.getAlertType()}:{},...void 0!==this.getClassifications()&&null!==this.getClassifications()?{classifications:this.getClassifications()}:{},...void 0!==this.getClusterUUID()&&null!==this.getClusterUUID()?{clusterUUID:this.getClusterUUID()}:{},...void 0!==this.getCreationTime()&&null!==this.getCreationTime()?{creationTime:Ct(It,this,Dt).call(this,this.getCreationTime(),!1)}:{},...void 0!==this.getImpactTypes()&&null!==this.getImpactTypes()?{impactTypes:this.getImpactTypes()}:{},...void 0!==this.getLastUpdatedTime()&&null!==this.getLastUpdatedTime()?{lastUpdatedTime:Ct(It,this,Dt).call(this,this.getLastUpdatedTime(),!1)}:{},...void 0!==this.getMessage()&&null!==this.getMessage()?{message:this.getMessage()}:{},...void 0!==this.getOriginatingClusterUUID()&&null!==this.getOriginatingClusterUUID()?{originatingClusterUUID:this.getOriginatingClusterUUID()}:{},...void 0!==this.getSeverity()&&null!==this.getSeverity()?{severity:this.getSeverity()}:{},...void 0!==this.getIsUserDefined()&&null!==this.getIsUserDefined()?{isUserDefined:this.getIsUserDefined()}:{},...void 0!==this.getParameters()&&null!==this.getParameters()?{parameters:this.getParameters().map(e=>e.toJson(!1))}:{},...void 0!==this.getServiceName()&&null!==this.getServiceName()?{serviceName:this.getServiceName()}:{},...void 0!==this.getRootCauseAnalysis()&&null!==this.getRootCauseAnalysis()?{rootCauseAnalysis:this.getRootCauseAnalysis().map(e=>e.toJson(!1))}:{},...void 0!==this.getKbArticles()&&null!==this.getKbArticles()?{kbArticles:this.getKbArticles()}:{},...void 0!==this.getClusterName()&&null!==this.getClusterName()?{clusterName:this.getClusterName()}:{},...void 0!==this.getIsRunnable()&&null!==this.getIsRunnable()?{isRunnable:this.getIsRunnable()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("isAcknowledged"===t&&(void 0===this.isAcknowledged||null===this.isAcknowledged))return new O("isAcknowledged","undefined or null");if("acknowledgedByUsername"===t){if(void 0===this.acknowledgedByUsername||null===this.acknowledgedByUsername)return new O("acknowledgedByUsername","undefined or null");if(!F.validateMaxLength(this.acknowledgedByUsername,255))return new O("acknowledgedByUsername","does not satisfy required maxLength constraint: 255")}if("acknowledgedTime"===t&&(void 0===this.acknowledgedTime||null===this.acknowledgedTime))return new O("acknowledgedTime","undefined or null");if("isAutoResolved"===t&&(void 0===this.isAutoResolved||null===this.isAutoResolved))return new O("isAutoResolved","undefined or null");if("isResolved"===t&&(void 0===this.isResolved||null===this.isResolved))return new O("isResolved","undefined or null");if("resolvedByUsername"===t){if(void 0===this.resolvedByUsername||null===this.resolvedByUsername)return new O("resolvedByUsername","undefined or null");if(!F.validateMaxLength(this.resolvedByUsername,255))return new O("resolvedByUsername","does not satisfy required maxLength constraint: 255")}if("resolvedTime"===t&&(void 0===this.resolvedTime||null===this.resolvedTime))return new O("resolvedTime","undefined or null");if("sourceEntity"===t&&(void 0===this.sourceEntity||null===this.sourceEntity))return new O("sourceEntity","undefined or null");if("affectedEntities"===t){if(void 0===this.affectedEntities||null===this.affectedEntities)return new O("affectedEntities","undefined or null");if(!F.validateMaxItems(this.affectedEntities,50))return new O("affectedEntities","does not satisfy required maxItems constraint: 50")}if("severityTrails"===t){if(void 0===this.severityTrails||null===this.severityTrails)return new O("severityTrails","undefined or null");if(!F.validateMaxItems(this.severityTrails,3))return new O("severityTrails","does not satisfy required maxItems constraint: 3")}if("metricDetails"===t){if(void 0===this.metricDetails||null===this.metricDetails)return new O("metricDetails","undefined or null");if(!F.validateMaxItems(this.metricDetails,50))return new O("metricDetails","does not satisfy required maxItems constraint: 50")}if("title"===t&&(void 0===this.title||null===this.title))return new O("title","undefined or null");if("alertType"===t&&(void 0===this.alertType||null===this.alertType))return new O("alertType","undefined or null");if("classifications"===t){if(void 0===this.classifications||null===this.classifications)return new O("classifications","undefined or null");if(!F.validateMaxItems(this.classifications,15))return new O("classifications","does not satisfy required maxItems constraint: 15")}if("clusterUUID"===t){if(void 0===this.clusterUUID||null===this.clusterUUID)return new O("clusterUUID","undefined or null");if(!F.validatePattern(this.clusterUUID,/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/))return new O("clusterUUID","does not satisfy required pattern: /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/")}if("creationTime"===t&&(void 0===this.creationTime||null===this.creationTime))return new O("creationTime","undefined or null");if("impactTypes"===t){if(void 0===this.impactTypes||null===this.impactTypes)return new O("impactTypes","undefined or null");if(!F.validateMaxItems(this.impactTypes,8))return new O("impactTypes","does not satisfy required maxItems constraint: 8")}if("lastUpdatedTime"===t&&(void 0===this.lastUpdatedTime||null===this.lastUpdatedTime))return new O("lastUpdatedTime","undefined or null");if("message"===t&&(void 0===this.message||null===this.message))return new O("message","undefined or null");if("originatingClusterUUID"===t){if(void 0===this.originatingClusterUUID||null===this.originatingClusterUUID)return new O("originatingClusterUUID","undefined or null");if(!F.validatePattern(this.originatingClusterUUID,/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/))return new O("originatingClusterUUID","does not satisfy required pattern: /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/")}if("severity"===t&&(void 0===this.severity||null===this.severity))return new O("severity","undefined or null");if("isUserDefined"===t&&(void 0===this.isUserDefined||null===this.isUserDefined))return new O("isUserDefined","undefined or null");if("parameters"===t){if(void 0===this.parameters||null===this.parameters)return new O("parameters","undefined or null");if(!F.validateMaxItems(this.parameters,50))return new O("parameters","does not satisfy required maxItems constraint: 50")}if("serviceName"===t){if(void 0===this.serviceName||null===this.serviceName)return new O("serviceName","undefined or null");if(!F.validateMaxLength(this.serviceName,50))return new O("serviceName","does not satisfy required maxLength constraint: 50")}if("rootCauseAnalysis"===t){if(void 0===this.rootCauseAnalysis||null===this.rootCauseAnalysis)return new O("rootCauseAnalysis","undefined or null");if(!F.validateMaxItems(this.rootCauseAnalysis,15))return new O("rootCauseAnalysis","does not satisfy required maxItems constraint: 15")}if("kbArticles"===t){if(void 0===this.kbArticles||null===this.kbArticles)return new O("kbArticles","undefined or null");if(!F.validateMaxItems(this.kbArticles,10))return new O("kbArticles","does not satisfy required maxItems constraint: 10")}if("clusterName"===t){if(void 0===this.clusterName||null===this.clusterName)return new O("clusterName","undefined or null");if(!F.validateMaxLength(this.clusterName,1e3))return new O("clusterName","does not satisfy required maxLength constraint: 1000")}return"isRunnable"!==t||void 0!==this.isRunnable&&null!==this.isRunnable?new O(t,"no such property exists"):new O("isRunnable","undefined or null")}}function Dt(e,t){return e instanceof Date&&void 0!==t?t?e.toISOString().slice(0,10):e.toISOString():e}function St(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")}Ut.prototype.isAcknowledged=!1,Ut.prototype.acknowledgedByUsername=void 0,Ut.prototype.acknowledgedTime=void 0,Ut.prototype.isAutoResolved=!1,Ut.prototype.isResolved=!1,Ut.prototype.resolvedByUsername=void 0,Ut.prototype.resolvedTime=void 0,Ut.prototype.sourceEntity=void 0,Ut.prototype.affectedEntities=void 0,Ut.prototype.severityTrails=void 0,Ut.prototype.metricDetails=void 0,Ut.prototype.title=void 0,Ut.prototype.alertType=void 0,Ut.prototype.classifications=void 0,Ut.prototype.clusterUUID=void 0,Ut.prototype.creationTime=void 0,Ut.prototype.impactTypes=void 0,Ut.prototype.lastUpdatedTime=void 0,Ut.prototype.message=void 0,Ut.prototype.originatingClusterUUID=void 0,Ut.prototype.severity=void 0,Ut.prototype.isUserDefined=!1,Ut.prototype.parameters=void 0,Ut.prototype.serviceName=void 0,Ut.prototype.rootCauseAnalysis=void 0,Ut.prototype.kbArticles=void 0,Ut.prototype.clusterName=void 0,Ut.prototype.isRunnable=!1,ze.prototype.extId=void 0,ze.prototype.links=void 0,Be.prototype.tenantId=void 0;var Rt=new WeakSet;class Nt extends r{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=Rt),t.add(e),this.$objectType="monitoring.v4.serviceability.ListAlertsApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,o,a,l;if(e){if(t=t||new Nt,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(B.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)if(Array.isArray(e.data))if(0===e.data.length)t.setData([]);else{for(a=[],i=e.data,l=i[0].hasOwnProperty("$objectType")?i[0].$objectType:typeof i[0],o=0;o<i.length;o++){if("monitoring.v4.serviceability.Alert"!==l)throw"Unknown list of type "+l+" in data";s=Ut.constructFromObject(i[o],void 0),a.push(s)}t.setData(a)}else{if(l=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,"monitoring.v4.error.ErrorResponse"!==l)throw"Unknown datatype "+l+" in data";t.setData(Je.constructFromObject(e.data,void 0))}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMetadata(){return this.metadata}setMetadata(e){this.metadata=e}getData(){return this.data}setData(e){this.data=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson(!1):Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson(!1):e):St(Rt,this,xt).call(this,this.getData(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson():Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson():e):St(Rt,this,xt).call(this,this.getData())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"metadata"!==t||void 0!==this.metadata&&null!==this.metadata?"data"!==t||void 0!==this.data&&null!==this.data?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("data","undefined or null"):new O("metadata","undefined or null")}}function xt(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}function Mt(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")}Nt.prototype.metadata=void 0,Nt.prototype.data=void 0,Nt.prototype.$reserved=void 0,Nt.prototype.$objectType=void 0,Nt.prototype.$unknownFields=void 0;var Vt=new WeakSet;class Lt extends r{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=Vt),t.add(e),this.$objectType="monitoring.v4.serviceability.GetAlertApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i;if(e){if(t=t||new Lt,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(B.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(i=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,i){case"monitoring.v4.serviceability.Alert":t.setData(Ut.constructFromObject(e.data,void 0));break;case"monitoring.v4.error.ErrorResponse":t.setData(Je.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+i+" in data"}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMetadata(){return this.metadata}setMetadata(e){this.metadata=e}getData(){return this.data}setData(e){this.data=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson(!1):Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson(!1):e):Mt(Vt,this,Jt).call(this,this.getData(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson():Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson():e):Mt(Vt,this,Jt).call(this,this.getData())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"metadata"!==t||void 0!==this.metadata&&null!==this.metadata?"data"!==t||void 0!==this.data&&null!==this.data?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("data","undefined or null"):new O("metadata","undefined or null")}}function Jt(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}Lt.prototype.metadata=void 0,Lt.prototype.data=void 0,Lt.prototype.$reserved=void 0,Lt.prototype.$objectType=void 0,Lt.prototype.$unknownFields=void 0;const _t={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",ENABLED:"ENABLED",DISABLED:"DISABLED",NOT_SUPPORTED:"NOT_SUPPORTED",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(_t).find(t=>_t[t]===e);return null==t?_t.$UNKNOWN:_t[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case _t.$UNKNOWN:case _t.$REDACTED:case _t.ENABLED:case _t.DISABLED:case _t.NOT_SUPPORTED:return;default:throw new Error("Invalid : must be AutoResolveState.{ $UNKNOWN|$REDACTED|ENABLED|DISABLED|NOT_SUPPORTED }")}}};Object.freeze(_t);const Wt=_t;var Bt=new WeakSet;class Gt{constructor(e){var t,n;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t=this,n=Bt),n.add(t),this.currentBoolValue=e,this.$objectType="monitoring.v4.serviceability.BooleanConfigurableParamValue",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new Gt,e.hasOwnProperty("defaultBoolValue")&&null!==e.defaultBoolValue&&void 0!==e.defaultBoolValue&&t.setDefaultBoolValue(e.defaultBoolValue),e.hasOwnProperty("currentBoolValue")&&null!==e.currentBoolValue&&void 0!==e.currentBoolValue&&t.setCurrentBoolValue(e.currentBoolValue),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getDefaultBoolValue(){return this.defaultBoolValue}setDefaultBoolValue(e){this.defaultBoolValue=e}getCurrentBoolValue(){return this.currentBoolValue}setCurrentBoolValue(e){this.currentBoolValue=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getDefaultBoolValue()&&null!==this.getDefaultBoolValue()?{defaultBoolValue:this.getDefaultBoolValue()}:{},...void 0!==this.getCurrentBoolValue()&&null!==this.getCurrentBoolValue()?{currentBoolValue:this.getCurrentBoolValue()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getCurrentBoolValue()&&null!==this.getCurrentBoolValue()?{currentBoolValue:this.getCurrentBoolValue()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=["currentBoolValue"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"defaultBoolValue"!==t||void 0!==this.defaultBoolValue&&null!==this.defaultBoolValue?"currentBoolValue"!==t||void 0!==this.currentBoolValue&&null!==this.currentBoolValue?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("currentBoolValue","undefined or null"):new O("defaultBoolValue","undefined or null")}}function zt(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")}Gt.prototype.defaultBoolValue=void 0,Gt.prototype.currentBoolValue=void 0,Gt.prototype.$reserved=void 0,Gt.prototype.$objectType=void 0,Gt.prototype.$unknownFields=void 0;var qt=new WeakSet;class Kt{constructor(e,t){var n,i;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(n=this,i=qt),i.add(n),this.minimumValue=e,this.maximumValue=t,this.$objectType="monitoring.v4.serviceability.ConfigurableParamValueRange",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i;if(e){if(t=t||new Kt,e.hasOwnProperty("minimumValue")&&null!==e.minimumValue&&void 0!==e.minimumValue){if(i=e.minimumValue.hasOwnProperty("$objectType")?e.minimumValue.$objectType:typeof e.minimumValue,"number"!==i)throw"Unknown datatype "+i+" in data";t.setMinimumValue(e.minimumValue)}if(e.hasOwnProperty("maximumValue")&&null!==e.maximumValue&&void 0!==e.maximumValue){if(i=e.maximumValue.hasOwnProperty("$objectType")?e.maximumValue.$objectType:typeof e.maximumValue,"number"!==i)throw"Unknown datatype "+i+" in data";t.setMaximumValue(e.maximumValue)}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMinimumValue(){return this.minimumValue}setMinimumValue(e){this.minimumValue=e}getMaximumValue(){return this.maximumValue}setMaximumValue(e){this.maximumValue=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getMinimumValue()&&null!==this.getMinimumValue()?{minimumValue:void 0!==this.getMinimumValue().toJson?this.getMinimumValue().toJson(!1):Array.isArray(this.getMinimumValue())?this.getMinimumValue().map(e=>void 0!==e.toJson?e.toJson(!1):e):zt(qt,this,Ht).call(this,this.getMinimumValue(),!1)}:{},...void 0!==this.getMaximumValue()&&null!==this.getMaximumValue()?{maximumValue:void 0!==this.getMaximumValue().toJson?this.getMaximumValue().toJson(!1):Array.isArray(this.getMaximumValue())?this.getMaximumValue().map(e=>void 0!==e.toJson?e.toJson(!1):e):zt(qt,this,Ht).call(this,this.getMaximumValue(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getMinimumValue()&&null!==this.getMinimumValue()?{minimumValue:void 0!==this.getMinimumValue().toJson?this.getMinimumValue().toJson():Array.isArray(this.getMinimumValue())?this.getMinimumValue().map(e=>void 0!==e.toJson?e.toJson():e):zt(qt,this,Ht).call(this,this.getMinimumValue())}:{},...void 0!==this.getMaximumValue()&&null!==this.getMaximumValue()?{maximumValue:void 0!==this.getMaximumValue().toJson?this.getMaximumValue().toJson():Array.isArray(this.getMaximumValue())?this.getMaximumValue().map(e=>void 0!==e.toJson?e.toJson():e):zt(qt,this,Ht).call(this,this.getMaximumValue())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=["minimumValue","maximumValue"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"minimumValue"!==t||void 0!==this.minimumValue&&null!==this.minimumValue?"maximumValue"!==t||void 0!==this.maximumValue&&null!==this.maximumValue?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("maximumValue","undefined or null"):new O("minimumValue","undefined or null")}}function Ht(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}Kt.prototype.minimumValue=void 0,Kt.prototype.maximumValue=void 0,Kt.prototype.$reserved=void 0,Kt.prototype.$objectType=void 0,Kt.prototype.$unknownFields=void 0;var Yt=new WeakSet;class Xt{constructor(e){var t,n;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t=this,n=Yt),n.add(t),this.currentFloatValue=e,this.$objectType="monitoring.v4.serviceability.FloatConfigurableParamValue",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,r,o;if(e){if(t=t||new Xt,e.hasOwnProperty("defaultFloatValue")&&null!==e.defaultFloatValue&&void 0!==e.defaultFloatValue&&t.setDefaultFloatValue(e.defaultFloatValue),e.hasOwnProperty("currentFloatValue")&&null!==e.currentFloatValue&&void 0!==e.currentFloatValue&&t.setCurrentFloatValue(e.currentFloatValue),e.hasOwnProperty("validValueRanges")&&null!==e.validValueRanges&&void 0!==e.validValueRanges){for(o=[],i=e.validValueRanges,r=0;r<i.length;r++)s=Kt.constructFromObject(i[r],void 0),o.push(s);t.setValidValueRanges(o)}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getDefaultFloatValue(){return this.defaultFloatValue}setDefaultFloatValue(e){this.defaultFloatValue=e}getCurrentFloatValue(){return this.currentFloatValue}setCurrentFloatValue(e){this.currentFloatValue=e}getValidValueRanges(){return this.validValueRanges}setValidValueRanges(e){this.validValueRanges=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getDefaultFloatValue()&&null!==this.getDefaultFloatValue()?{defaultFloatValue:this.getDefaultFloatValue()}:{},...void 0!==this.getCurrentFloatValue()&&null!==this.getCurrentFloatValue()?{currentFloatValue:this.getCurrentFloatValue()}:{},...void 0!==this.getValidValueRanges()&&null!==this.getValidValueRanges()?{validValueRanges:this.getValidValueRanges().map(e=>e.toJson(!1))}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getCurrentFloatValue()&&null!==this.getCurrentFloatValue()?{currentFloatValue:this.getCurrentFloatValue()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=["currentFloatValue"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("defaultFloatValue"===t&&(void 0===this.defaultFloatValue||null===this.defaultFloatValue))return new O("defaultFloatValue","undefined or null");if("currentFloatValue"===t&&(void 0===this.currentFloatValue||null===this.currentFloatValue))return new O("currentFloatValue","undefined or null");if("validValueRanges"===t){if(void 0===this.validValueRanges||null===this.validValueRanges)return new O("validValueRanges","undefined or null");if(!F.validateMaxItems(this.validValueRanges,5))return new O("validValueRanges","does not satisfy required maxItems constraint: 5")}return"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null")}}Xt.prototype.defaultFloatValue=void 0,Xt.prototype.currentFloatValue=void 0,Xt.prototype.validValueRanges=void 0,Xt.prototype.$reserved=void 0,Xt.prototype.$objectType=void 0,Xt.prototype.$unknownFields=void 0;var Qt=new WeakSet;class Zt{constructor(e){var t,n;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t=this,n=Qt),n.add(t),this.currentIntValue=e,this.$objectType="monitoring.v4.serviceability.IntConfigurableParamValue",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,r,o;if(e){if(t=t||new Zt,e.hasOwnProperty("defaultIntValue")&&null!==e.defaultIntValue&&void 0!==e.defaultIntValue&&t.setDefaultIntValue(e.defaultIntValue),e.hasOwnProperty("currentIntValue")&&null!==e.currentIntValue&&void 0!==e.currentIntValue&&t.setCurrentIntValue(e.currentIntValue),e.hasOwnProperty("validValueRanges")&&null!==e.validValueRanges&&void 0!==e.validValueRanges){for(o=[],i=e.validValueRanges,r=0;r<i.length;r++)s=Kt.constructFromObject(i[r],void 0),o.push(s);t.setValidValueRanges(o)}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getDefaultIntValue(){return this.defaultIntValue}setDefaultIntValue(e){this.defaultIntValue=e}getCurrentIntValue(){return this.currentIntValue}setCurrentIntValue(e){this.currentIntValue=e}getValidValueRanges(){return this.validValueRanges}setValidValueRanges(e){this.validValueRanges=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getDefaultIntValue()&&null!==this.getDefaultIntValue()?{defaultIntValue:this.getDefaultIntValue()}:{},...void 0!==this.getCurrentIntValue()&&null!==this.getCurrentIntValue()?{currentIntValue:this.getCurrentIntValue()}:{},...void 0!==this.getValidValueRanges()&&null!==this.getValidValueRanges()?{validValueRanges:this.getValidValueRanges().map(e=>e.toJson(!1))}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getCurrentIntValue()&&null!==this.getCurrentIntValue()?{currentIntValue:this.getCurrentIntValue()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=["currentIntValue"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("defaultIntValue"===t&&(void 0===this.defaultIntValue||null===this.defaultIntValue))return new O("defaultIntValue","undefined or null");if("currentIntValue"===t&&(void 0===this.currentIntValue||null===this.currentIntValue))return new O("currentIntValue","undefined or null");if("validValueRanges"===t){if(void 0===this.validValueRanges||null===this.validValueRanges)return new O("validValueRanges","undefined or null");if(!F.validateMaxItems(this.validValueRanges,5))return new O("validValueRanges","does not satisfy required maxItems constraint: 5")}return"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null")}}Zt.prototype.defaultIntValue=void 0,Zt.prototype.currentIntValue=void 0,Zt.prototype.validValueRanges=void 0,Zt.prototype.$reserved=void 0,Zt.prototype.$objectType=void 0,Zt.prototype.$unknownFields=void 0;var en=new WeakSet;class tn{constructor(e){var t,n;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t=this,n=en),n.add(t),this.currentStrValue=e,this.$objectType="monitoring.v4.serviceability.StringConfigurableParamValue",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new tn,e.hasOwnProperty("defaultStrValue")&&null!==e.defaultStrValue&&void 0!==e.defaultStrValue&&t.setDefaultStrValue(e.defaultStrValue),e.hasOwnProperty("currentStrValue")&&null!==e.currentStrValue&&void 0!==e.currentStrValue&&t.setCurrentStrValue(e.currentStrValue),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getDefaultStrValue(){return this.defaultStrValue}setDefaultStrValue(e){this.defaultStrValue=e}getCurrentStrValue(){return this.currentStrValue}setCurrentStrValue(e){this.currentStrValue=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getDefaultStrValue()&&null!==this.getDefaultStrValue()?{defaultStrValue:this.getDefaultStrValue()}:{},...void 0!==this.getCurrentStrValue()&&null!==this.getCurrentStrValue()?{currentStrValue:this.getCurrentStrValue()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getCurrentStrValue()&&null!==this.getCurrentStrValue()?{currentStrValue:this.getCurrentStrValue()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=["currentStrValue"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"defaultStrValue"!==t||void 0!==this.defaultStrValue&&null!==this.defaultStrValue?"currentStrValue"!==t||void 0!==this.currentStrValue&&null!==this.currentStrValue?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("currentStrValue","undefined or null"):new O("defaultStrValue","undefined or null")}}function nn(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")}tn.prototype.defaultStrValue=void 0,tn.prototype.currentStrValue=void 0,tn.prototype.$reserved=void 0,tn.prototype.$objectType=void 0,tn.prototype.$unknownFields=void 0;var sn=new WeakSet;class rn{constructor(e,t){var n,i;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(n=this,i=sn),i.add(n),this.name=e,this.paramValue=t,this.$objectType="monitoring.v4.serviceability.AlertPolicyConfigurableParameter",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i;if(e){if(t=t||new rn,e.hasOwnProperty("name")&&null!==e.name&&void 0!==e.name&&t.setName(e.name),e.hasOwnProperty("displayName")&&null!==e.displayName&&void 0!==e.displayName&&t.setDisplayName(e.displayName),e.hasOwnProperty("unit")&&null!==e.unit&&void 0!==e.unit&&t.setUnit(e.unit),e.hasOwnProperty("paramValue")&&null!==e.paramValue&&void 0!==e.paramValue)switch(i=e.paramValue.hasOwnProperty("$objectType")?e.paramValue.$objectType:typeof e.paramValue,i){case"monitoring.v4.serviceability.IntConfigurableParamValue":t.setParamValue(Zt.constructFromObject(e.paramValue,void 0));break;case"monitoring.v4.serviceability.FloatConfigurableParamValue":t.setParamValue(Xt.constructFromObject(e.paramValue,void 0));break;case"monitoring.v4.serviceability.BooleanConfigurableParamValue":t.setParamValue(Gt.constructFromObject(e.paramValue,void 0));break;case"monitoring.v4.serviceability.StringConfigurableParamValue":t.setParamValue(tn.constructFromObject(e.paramValue,void 0));break;default:throw"Unknown datatype "+i+" in data"}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getName(){return this.name}setName(e){this.name=e}getDisplayName(){return this.displayName}setDisplayName(e){this.displayName=e}getUnit(){return this.unit}setUnit(e){this.unit=e}getParamValue(){return this.paramValue}setParamValue(e){this.paramValue=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getName()&&null!==this.getName()?{name:this.getName()}:{},...void 0!==this.getDisplayName()&&null!==this.getDisplayName()?{displayName:this.getDisplayName()}:{},...void 0!==this.getUnit()&&null!==this.getUnit()?{unit:this.getUnit()}:{},...void 0!==this.getParamValue()&&null!==this.getParamValue()?{paramValue:void 0!==this.getParamValue().toJson?this.getParamValue().toJson(!1):Array.isArray(this.getParamValue())?this.getParamValue().map(e=>void 0!==e.toJson?e.toJson(!1):e):nn(sn,this,on).call(this,this.getParamValue(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getName()&&null!==this.getName()?{name:this.getName()}:{},...void 0!==this.getParamValue()&&null!==this.getParamValue()?{paramValue:void 0!==this.getParamValue().toJson?this.getParamValue().toJson():Array.isArray(this.getParamValue())?this.getParamValue().map(e=>void 0!==e.toJson?e.toJson():e):nn(sn,this,on).call(this,this.getParamValue())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=["name","paramValue"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("name"===t){if(void 0===this.name||null===this.name)return new O("name","undefined or null");if(null==e&&!F.validateMaxLength(this.name,100))return new O("name","does not satisfy required maxLength constraint: 100")}if("displayName"===t){if(void 0===this.displayName||null===this.displayName)return new O("displayName","undefined or null");if(!F.validateMaxLength(this.displayName,200))return new O("displayName","does not satisfy required maxLength constraint: 200")}if("unit"===t){if(void 0===this.unit||null===this.unit)return new O("unit","undefined or null");if(!F.validateMaxLength(this.unit,100))return new O("unit","does not satisfy required maxLength constraint: 100")}return"paramValue"!==t||void 0!==this.paramValue&&null!==this.paramValue?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("paramValue","undefined or null")}}function on(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}rn.prototype.name=void 0,rn.prototype.displayName=void 0,rn.prototype.unit=void 0,rn.prototype.paramValue=void 0,rn.prototype.$reserved=void 0,rn.prototype.$objectType=void 0,rn.prototype.$unknownFields=void 0;const an={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",ENABLED:"ENABLED",DISABLED:"DISABLED",NOT_SUPPORTED:"NOT_SUPPORTED",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(an).find(t=>an[t]===e);return null==t?an.$UNKNOWN:an[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case an.$UNKNOWN:case an.$REDACTED:case an.ENABLED:case an.DISABLED:case an.NOT_SUPPORTED:return;default:throw new Error("Invalid : must be PropertyState.{ $UNKNOWN|$REDACTED|ENABLED|DISABLED|NOT_SUPPORTED }")}}};Object.freeze(an);const ln=an;var dn=new WeakSet;class un{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=dn),t.add(e),this.$objectType="monitoring.v4.serviceability.SeverityConfig",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,r,o;if(e){if(t=t||new un,e.hasOwnProperty("state")&&null!==e.state&&void 0!==e.state&&t.setState(ln.constructFromObject(e.state)),e.hasOwnProperty("thresholdParameters")&&null!==e.thresholdParameters&&void 0!==e.thresholdParameters){for(o=[],i=e.thresholdParameters,r=0;r<i.length;r++)s=rn.constructFromObject(i[r],void 0),o.push(s);t.setThresholdParameters(o)}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getState(){return this.state}setState(e){this.state=e}getThresholdParameters(){return this.thresholdParameters}setThresholdParameters(e){this.thresholdParameters=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getState()&&null!==this.getState()?{state:this.getState()}:{},...void 0!==this.getThresholdParameters()&&null!==this.getThresholdParameters()?{thresholdParameters:this.getThresholdParameters().map(e=>e.toJson(!1))}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("state"===t&&(void 0===this.state||null===this.state))return new O("state","undefined or null");if("thresholdParameters"===t){if(void 0===this.thresholdParameters||null===this.thresholdParameters)return new O("thresholdParameters","undefined or null");if(!F.validateMaxItems(this.thresholdParameters,5))return new O("thresholdParameters","does not satisfy required maxItems constraint: 5")}return"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null")}}un.prototype.state=void 0,un.prototype.thresholdParameters=void 0,un.prototype.$reserved=void 0,un.prototype.$objectType=void 0,un.prototype.$unknownFields=void 0;var hn=new WeakSet;class cn{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=hn),t.add(e),this.$objectType="monitoring.v4.serviceability.AlertConfig",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new cn,e.hasOwnProperty("autoResolve")&&null!==e.autoResolve&&void 0!==e.autoResolve&&t.setAutoResolve(Wt.constructFromObject(e.autoResolve)),e.hasOwnProperty("criticalSeverity")&&null!==e.criticalSeverity&&void 0!==e.criticalSeverity&&t.setCriticalSeverity(un.constructFromObject(e.criticalSeverity)),e.hasOwnProperty("warningSeverity")&&null!==e.warningSeverity&&void 0!==e.warningSeverity&&t.setWarningSeverity(un.constructFromObject(e.warningSeverity)),e.hasOwnProperty("infoSeverity")&&null!==e.infoSeverity&&void 0!==e.infoSeverity&&t.setInfoSeverity(un.constructFromObject(e.infoSeverity)),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getAutoResolve(){return this.autoResolve}setAutoResolve(e){this.autoResolve=e}getCriticalSeverity(){return this.criticalSeverity}setCriticalSeverity(e){this.criticalSeverity=e}getWarningSeverity(){return this.warningSeverity}setWarningSeverity(e){this.warningSeverity=e}getInfoSeverity(){return this.infoSeverity}setInfoSeverity(e){this.infoSeverity=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getAutoResolve()&&null!==this.getAutoResolve()?{autoResolve:this.getAutoResolve()}:{},...void 0!==this.getCriticalSeverity()&&null!==this.getCriticalSeverity()?{criticalSeverity:this.getCriticalSeverity().toJson(!1)}:{},...void 0!==this.getWarningSeverity()&&null!==this.getWarningSeverity()?{warningSeverity:this.getWarningSeverity().toJson(!1)}:{},...void 0!==this.getInfoSeverity()&&null!==this.getInfoSeverity()?{infoSeverity:this.getInfoSeverity().toJson(!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"autoResolve"!==t||void 0!==this.autoResolve&&null!==this.autoResolve?"criticalSeverity"!==t||void 0!==this.criticalSeverity&&null!==this.criticalSeverity?"warningSeverity"!==t||void 0!==this.warningSeverity&&null!==this.warningSeverity?"infoSeverity"!==t||void 0!==this.infoSeverity&&null!==this.infoSeverity?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("infoSeverity","undefined or null"):new O("warningSeverity","undefined or null"):new O("criticalSeverity","undefined or null"):new O("autoResolve","undefined or null")}}function pn(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")}cn.prototype.autoResolve=void 0,cn.prototype.criticalSeverity=void 0,cn.prototype.warningSeverity=void 0,cn.prototype.infoSeverity=void 0,cn.prototype.$reserved=void 0,cn.prototype.$objectType=void 0,cn.prototype.$unknownFields=void 0;var vn=new WeakSet;class yn extends ze{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=vn),t.add(e),this.$objectType="monitoring.v4.serviceability.ClusterConfig",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,r,o;if(e){if(t=t||new yn,ze.constructFromObject(e,t,!0),e.hasOwnProperty("isEnabled")&&null!==e.isEnabled&&void 0!==e.isEnabled&&t.setIsEnabled(e.isEnabled),e.hasOwnProperty("lastModifiedByUser")&&null!==e.lastModifiedByUser&&void 0!==e.lastModifiedByUser&&t.setLastModifiedByUser(e.lastModifiedByUser),e.hasOwnProperty("lastModifiedTime")&&null!==e.lastModifiedTime&&void 0!==e.lastModifiedTime&&t.setLastModifiedTime(e.lastModifiedTime),e.hasOwnProperty("scheduleIntervalSeconds")&&null!==e.scheduleIntervalSeconds&&void 0!==e.scheduleIntervalSeconds&&t.setScheduleIntervalSeconds(e.scheduleIntervalSeconds),e.hasOwnProperty("configurableParameters")&&null!==e.configurableParameters&&void 0!==e.configurableParameters){for(o=[],i=e.configurableParameters,r=0;r<i.length;r++)s=rn.constructFromObject(i[r],void 0),o.push(s);t.setConfigurableParameters(o)}if(e.hasOwnProperty("alertConfig")&&null!==e.alertConfig&&void 0!==e.alertConfig&&t.setAlertConfig(cn.constructFromObject(e.alertConfig)),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getIsEnabled(){return this.isEnabled}setIsEnabled(e){this.isEnabled=e}getLastModifiedByUser(){return this.lastModifiedByUser}setLastModifiedByUser(e){this.lastModifiedByUser=e}getLastModifiedTime(){return this.lastModifiedTime}setLastModifiedTime(e){this.lastModifiedTime=e}getScheduleIntervalSeconds(){return this.scheduleIntervalSeconds}setScheduleIntervalSeconds(e){this.scheduleIntervalSeconds=e}getConfigurableParameters(){return this.configurableParameters}setConfigurableParameters(e){this.configurableParameters=e}getAlertConfig(){return this.alertConfig}setAlertConfig(e){this.alertConfig=e}toJson(e){return!1===e?{...void 0!==this.getIsEnabled()&&null!==this.getIsEnabled()?{isEnabled:this.getIsEnabled()}:{},...void 0!==this.getLastModifiedByUser()&&null!==this.getLastModifiedByUser()?{lastModifiedByUser:this.getLastModifiedByUser()}:{},...void 0!==this.getLastModifiedTime()&&null!==this.getLastModifiedTime()?{lastModifiedTime:pn(vn,this,gn).call(this,this.getLastModifiedTime(),!1)}:{},...void 0!==this.getScheduleIntervalSeconds()&&null!==this.getScheduleIntervalSeconds()?{scheduleIntervalSeconds:this.getScheduleIntervalSeconds()}:{},...void 0!==this.getConfigurableParameters()&&null!==this.getConfigurableParameters()?{configurableParameters:this.getConfigurableParameters().map(e=>e.toJson(!1))}:{},...void 0!==this.getAlertConfig()&&null!==this.getAlertConfig()?{alertConfig:this.getAlertConfig().toJson(!1)}:{},...void 0!==this.getExtId()&&null!==this.getExtId()?{extId:this.getExtId()}:{},...void 0!==this.getLinks()&&null!==this.getLinks()?{links:this.getLinks().map(e=>e.toJson(!1))}:{},...void 0!==this.getTenantId()&&null!==this.getTenantId()?{tenantId:this.getTenantId()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getIsEnabled()&&null!==this.getIsEnabled()?{isEnabled:this.getIsEnabled()}:{},...void 0!==this.getScheduleIntervalSeconds()&&null!==this.getScheduleIntervalSeconds()?{scheduleIntervalSeconds:this.getScheduleIntervalSeconds()}:{},...void 0!==this.getConfigurableParameters()&&null!==this.getConfigurableParameters()?{configurableParameters:this.getConfigurableParameters().map(e=>e.toJson(!1))}:{},...void 0!==this.getAlertConfig()&&null!==this.getAlertConfig()?{alertConfig:this.getAlertConfig().toJson(!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("isEnabled"===t&&(void 0===this.isEnabled||null===this.isEnabled))return new O("isEnabled","undefined or null");if("lastModifiedByUser"===t&&(void 0===this.lastModifiedByUser||null===this.lastModifiedByUser))return new O("lastModifiedByUser","undefined or null");if("lastModifiedTime"===t&&(void 0===this.lastModifiedTime||null===this.lastModifiedTime))return new O("lastModifiedTime","undefined or null");if("scheduleIntervalSeconds"===t&&(void 0===this.scheduleIntervalSeconds||null===this.scheduleIntervalSeconds))return new O("scheduleIntervalSeconds","undefined or null");if("configurableParameters"===t){if(void 0===this.configurableParameters||null===this.configurableParameters)return new O("configurableParameters","undefined or null");if(!F.validateMaxItems(this.configurableParameters,5))return new O("configurableParameters","does not satisfy required maxItems constraint: 5")}return"alertConfig"!==t||void 0!==this.alertConfig&&null!==this.alertConfig?new O(t,"no such property exists"):new O("alertConfig","undefined or null")}}function gn(e,t){return e instanceof Date&&void 0!==t?t?e.toISOString().slice(0,10):e.toISOString():e}yn.prototype.isEnabled=void 0,yn.prototype.lastModifiedByUser=void 0,yn.prototype.lastModifiedTime=void 0,yn.prototype.scheduleIntervalSeconds=void 0,yn.prototype.configurableParameters=void 0,yn.prototype.alertConfig=void 0,ze.prototype.extId=void 0,ze.prototype.links=void 0,Be.prototype.tenantId=void 0;const mn={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",PC:"PC",PE:"PE",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(mn).find(t=>mn[t]===e);return null==t?mn.$UNKNOWN:mn[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case mn.$UNKNOWN:case mn.$REDACTED:case mn.PC:case mn.PE:return;default:throw new Error("Invalid : must be ClusterType.{ $UNKNOWN|$REDACTED|PC|PE }")}}};Object.freeze(mn);const fn=mn,$n={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",DISK:"DISK",VIRTUAL_DISK:"VIRTUAL_DISK",VM:"VM",CONTAINER:"CONTAINER",HOST:"HOST",CLUSTER:"CLUSTER",VOLUME_GROUP:"VOLUME_GROUP",FILE_SERVER:"FILE_SERVER",HOST_NIC:"HOST_NIC",RECOVERY_PLAN:"RECOVERY_PLAN",PROTECTION_DOMAIN:"PROTECTION_DOMAIN",PROTECTION_RULE:"PROTECTION_RULE",ACTION_RULE_RESULT:"ACTION_RULE_RESULT",AVAILABILITY_ZONE_PHYSICAL:"AVAILABILITY_ZONE_PHYSICAL",CONSISTENCY_GROUP_CONFIG:"CONSISTENCY_GROUP_CONFIG",OVA:"OVA",VOLUME_GROUP_CONFIG:"VOLUME_GROUP_CONFIG",VPN_CONNECTION:"VPN_CONNECTION",REMOTE_SITE:"REMOTE_SITE",STORAGE_POOL:"STORAGE_POOL",LAYER2_STRETCH:"LAYER2_STRETCH",ATLAS_VIRTUAL_NETWORK:"ATLAS_VIRTUAL_NETWORK",IPFIX_EXPORTER:"IPFIX_EXPORTER",ATLAS_ROUTING_POLICY:"ATLAS_ROUTING_POLICY",BGP_SESSION:"BGP_SESSION",MSP:"MSP",VPN_GATEWAY:"VPN_GATEWAY",ATLAS_LOAD_BALANCER_SESSION:"ATLAS_LOAD_BALANCER_SESSION",ATLAS_FLOW_GATEWAY:"ATLAS_FLOW_GATEWAY",PRISM_CENTRAL:"PRISM_CENTRAL",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys($n).find(t=>$n[t]===e);return null==t?$n.$UNKNOWN:$n[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case $n.$UNKNOWN:case $n.$REDACTED:case $n.DISK:case $n.VIRTUAL_DISK:case $n.VM:case $n.CONTAINER:case $n.HOST:case $n.CLUSTER:case $n.VOLUME_GROUP:case $n.FILE_SERVER:case $n.HOST_NIC:case $n.RECOVERY_PLAN:case $n.PROTECTION_DOMAIN:case $n.PROTECTION_RULE:case $n.ACTION_RULE_RESULT:case $n.AVAILABILITY_ZONE_PHYSICAL:case $n.CONSISTENCY_GROUP_CONFIG:case $n.OVA:case $n.VOLUME_GROUP_CONFIG:case $n.VPN_CONNECTION:case $n.REMOTE_SITE:case $n.STORAGE_POOL:case $n.LAYER2_STRETCH:case $n.ATLAS_VIRTUAL_NETWORK:case $n.IPFIX_EXPORTER:case $n.ATLAS_ROUTING_POLICY:case $n.BGP_SESSION:case $n.MSP:case $n.VPN_GATEWAY:case $n.ATLAS_LOAD_BALANCER_SESSION:case $n.ATLAS_FLOW_GATEWAY:case $n.PRISM_CENTRAL:return;default:throw new Error("Invalid : must be EntityType.{ $UNKNOWN|$REDACTED|DISK|VIRTUAL_DISK|VM|CONTAINER|HOST|CLUSTER|VOLUME_GROUP|FILE_SERVER|HOST_NIC|RECOVERY_PLAN|PROTECTION_DOMAIN|PROTECTION_RULE|ACTION_RULE_RESULT|AVAILABILITY_ZONE_PHYSICAL|CONSISTENCY_GROUP_CONFIG|OVA|VOLUME_GROUP_CONFIG|VPN_CONNECTION|REMOTE_SITE|STORAGE_POOL|LAYER2_STRETCH|ATLAS_VIRTUAL_NETWORK|IPFIX_EXPORTER|ATLAS_ROUTING_POLICY|BGP_SESSION|MSP|VPN_GATEWAY|ATLAS_LOAD_BALANCER_SESSION|ATLAS_FLOW_GATEWAY|PRISM_CENTRAL }")}}};Object.freeze($n);const wn=$n,Tn={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",CLUSTER:"CLUSTER",NODE:"NODE",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(Tn).find(t=>Tn[t]===e);return null==t?Tn.$UNKNOWN:Tn[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case Tn.$UNKNOWN:case Tn.$REDACTED:case Tn.CLUSTER:case Tn.NODE:return;default:throw new Error("Invalid : must be Scope.{ $UNKNOWN|$REDACTED|CLUSTER|NODE }")}}};Object.freeze(Tn);const bn=Tn,kn={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",SCHEDULED:"SCHEDULED",NOT_SCHEDULED:"NOT_SCHEDULED",EVENT_DRIVEN:"EVENT_DRIVEN",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(kn).find(t=>kn[t]===e);return null==t?kn.$UNKNOWN:kn[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case kn.$UNKNOWN:case kn.$REDACTED:case kn.SCHEDULED:case kn.NOT_SCHEDULED:case kn.EVENT_DRIVEN:return;default:throw new Error("Invalid : must be SdaSubType.{ $UNKNOWN|$REDACTED|SCHEDULED|NOT_SCHEDULED|EVENT_DRIVEN }")}}};Object.freeze(kn);const Fn=kn,On={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",HEALTH_CHECK:"HEALTH_CHECK",SERVICE_DEFINED:"SERVICE_DEFINED",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(On).find(t=>On[t]===e);return null==t?On.$UNKNOWN:On[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case On.$UNKNOWN:case On.$REDACTED:case On.HEALTH_CHECK:case On.SERVICE_DEFINED:return;default:throw new Error("Invalid : must be SdaType.{ $UNKNOWN|$REDACTED|HEALTH_CHECK|SERVICE_DEFINED }")}}};Object.freeze(On);const jn=On;var En=new WeakSet;class Pn extends Be{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=En),t.add(e),this.$objectType="monitoring.v4.serviceability.SystemDefinedPolicy",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,r,o;if(e){if(t=t||new Pn,Be.constructFromObject(e,t,!0),e.hasOwnProperty("extId")&&null!==e.extId&&void 0!==e.extId&&t.setExtId(e.extId),e.hasOwnProperty("links")&&null!==e.links&&void 0!==e.links){for(o=[],i=e.links,r=0;r<i.length;r++)s=J.constructFromObject(i[r],void 0),o.push(s);t.setLinks(o)}if(e.hasOwnProperty("name")&&null!==e.name&&void 0!==e.name&&t.setName(e.name),e.hasOwnProperty("description")&&null!==e.description&&void 0!==e.description&&t.setDescription(e.description),e.hasOwnProperty("policyId")&&null!==e.policyId&&void 0!==e.policyId&&t.setPolicyId(e.policyId),e.hasOwnProperty("title")&&null!==e.title&&void 0!==e.title&&t.setTitle(e.title),e.hasOwnProperty("type")&&null!==e.type&&void 0!==e.type&&t.setType(jn.constructFromObject(e.type)),e.hasOwnProperty("subType")&&null!==e.subType&&void 0!==e.subType&&t.setSubType(Fn.constructFromObject(e.subType)),e.hasOwnProperty("scope")&&null!==e.scope&&void 0!==e.scope&&t.setScope(bn.constructFromObject(e.scope)),e.hasOwnProperty("entityType")&&null!==e.entityType&&void 0!==e.entityType&&t.setEntityType(wn.constructFromObject(e.entityType)),e.hasOwnProperty("classifications")&&null!==e.classifications&&void 0!==e.classifications){for(o=[],i=e.classifications,r=0;r<i.length;r++)o.push(i[r]);t.setClassifications(o)}if(e.hasOwnProperty("impactTypes")&&null!==e.impactTypes&&void 0!==e.impactTypes){for(o=[],i=e.impactTypes,r=0;r<i.length;r++)s=Qe.constructFromObject(i[r],void 0),o.push(s);t.setImpactTypes(o)}if(e.hasOwnProperty("kbArticles")&&null!==e.kbArticles&&void 0!==e.kbArticles){for(o=[],i=e.kbArticles,r=0;r<i.length;r++)o.push(i[r]);t.setKbArticles(o)}if(e.hasOwnProperty("targetClusters")&&null!==e.targetClusters&&void 0!==e.targetClusters){for(o=[],i=e.targetClusters,r=0;r<i.length;r++)s=fn.constructFromObject(i[r],void 0),o.push(s);t.setTargetClusters(o)}if(e.hasOwnProperty("publisher")&&null!==e.publisher&&void 0!==e.publisher&&t.setPublisher(e.publisher),e.hasOwnProperty("clusterConfigs")&&null!==e.clusterConfigs&&void 0!==e.clusterConfigs){for(o=[],i=e.clusterConfigs,r=0;r<i.length;r++)s=yn.constructFromObject(i[r],void 0),o.push(s);t.setClusterConfigs(o)}if(!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getExtId(){return this.extId}setExtId(e){this.extId=e}getLinks(){return this.links}setLinks(e){this.links=e}getName(){return this.name}setName(e){this.name=e}getDescription(){return this.description}setDescription(e){this.description=e}getPolicyId(){return this.policyId}setPolicyId(e){this.policyId=e}getTitle(){return this.title}setTitle(e){this.title=e}getType(){return this.type}setType(e){this.type=e}getSubType(){return this.subType}setSubType(e){this.subType=e}getScope(){return this.scope}setScope(e){this.scope=e}getEntityType(){return this.entityType}setEntityType(e){this.entityType=e}getClassifications(){return this.classifications}setClassifications(e){this.classifications=e}getImpactTypes(){return this.impactTypes}setImpactTypes(e){this.impactTypes=e}getKbArticles(){return this.kbArticles}setKbArticles(e){this.kbArticles=e}getTargetClusters(){return this.targetClusters}setTargetClusters(e){this.targetClusters=e}getPublisher(){return this.publisher}setPublisher(e){this.publisher=e}getClusterConfigs(){return this.clusterConfigs}setClusterConfigs(e){this.clusterConfigs=e}toJson(e){return!1===e?{...void 0!==this.getExtId()&&null!==this.getExtId()?{extId:this.getExtId()}:{},...void 0!==this.getLinks()&&null!==this.getLinks()?{links:this.getLinks().map(e=>e.toJson(!1))}:{},...void 0!==this.getName()&&null!==this.getName()?{name:this.getName()}:{},...void 0!==this.getDescription()&&null!==this.getDescription()?{description:this.getDescription()}:{},...void 0!==this.getPolicyId()&&null!==this.getPolicyId()?{policyId:this.getPolicyId()}:{},...void 0!==this.getTitle()&&null!==this.getTitle()?{title:this.getTitle()}:{},...void 0!==this.getType()&&null!==this.getType()?{type:this.getType()}:{},...void 0!==this.getSubType()&&null!==this.getSubType()?{subType:this.getSubType()}:{},...void 0!==this.getScope()&&null!==this.getScope()?{scope:this.getScope()}:{},...void 0!==this.getEntityType()&&null!==this.getEntityType()?{entityType:this.getEntityType()}:{},...void 0!==this.getClassifications()&&null!==this.getClassifications()?{classifications:this.getClassifications()}:{},...void 0!==this.getImpactTypes()&&null!==this.getImpactTypes()?{impactTypes:this.getImpactTypes()}:{},...void 0!==this.getKbArticles()&&null!==this.getKbArticles()?{kbArticles:this.getKbArticles()}:{},...void 0!==this.getTargetClusters()&&null!==this.getTargetClusters()?{targetClusters:this.getTargetClusters()}:{},...void 0!==this.getPublisher()&&null!==this.getPublisher()?{publisher:this.getPublisher()}:{},...void 0!==this.getClusterConfigs()&&null!==this.getClusterConfigs()?{clusterConfigs:this.getClusterConfigs().map(e=>e.toJson(!1))}:{},...void 0!==this.getTenantId()&&null!==this.getTenantId()?{tenantId:this.getTenantId()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getExtId()&&null!==this.getExtId()?{extId:this.getExtId()}:{},...void 0!==this.getName()&&null!==this.getName()?{name:this.getName()}:{},...void 0!==this.getDescription()&&null!==this.getDescription()?{description:this.getDescription()}:{},...void 0!==this.getPolicyId()&&null!==this.getPolicyId()?{policyId:this.getPolicyId()}:{},...void 0!==this.getTitle()&&null!==this.getTitle()?{title:this.getTitle()}:{},...void 0!==this.getType()&&null!==this.getType()?{type:this.getType()}:{},...void 0!==this.getSubType()&&null!==this.getSubType()?{subType:this.getSubType()}:{},...void 0!==this.getScope()&&null!==this.getScope()?{scope:this.getScope()}:{},...void 0!==this.getEntityType()&&null!==this.getEntityType()?{entityType:this.getEntityType()}:{},...void 0!==this.getClassifications()&&null!==this.getClassifications()?{classifications:this.getClassifications()}:{},...void 0!==this.getImpactTypes()&&null!==this.getImpactTypes()?{impactTypes:this.getImpactTypes()}:{},...void 0!==this.getKbArticles()&&null!==this.getKbArticles()?{kbArticles:this.getKbArticles()}:{},...void 0!==this.getTargetClusters()&&null!==this.getTargetClusters()?{targetClusters:this.getTargetClusters()}:{},...void 0!==this.getPublisher()&&null!==this.getPublisher()?{publisher:this.getPublisher()}:{},...void 0!==this.getClusterConfigs()&&null!==this.getClusterConfigs()?{clusterConfigs:this.getClusterConfigs().map(e=>e.toJson(!1))}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("extId"===t){if(void 0===this.extId||null===this.extId)return new O("extId","undefined or null");if(!F.validateMaxLength(this.extId,100))return new O("extId","does not satisfy required maxLength constraint: 100");if(!F.validatePattern(this.extId,/^\\d+$/))return new O("extId","does not satisfy required pattern: /^\\d+$/")}if("links"===t){if(void 0===this.links||null===this.links)return new O("links","undefined or null");if(!F.validateMaxItems(this.links,20))return new O("links","does not satisfy required maxItems constraint: 20")}if("name"===t){if(void 0===this.name||null===this.name)return new O("name","undefined or null");if(!F.validateMaxLength(this.name,1e3))return new O("name","does not satisfy required maxLength constraint: 1000")}if("description"===t){if(void 0===this.description||null===this.description)return new O("description","undefined or null");if(!F.validateMaxLength(this.description,400))return new O("description","does not satisfy required maxLength constraint: 400")}if("policyId"===t){if(void 0===this.policyId||null===this.policyId)return new O("policyId","undefined or null");if(!F.validatePattern(this.policyId,/^{A}\\d+$/))return new O("policyId","does not satisfy required pattern: /^{A}\\d+$/")}if("title"===t){if(void 0===this.title||null===this.title)return new O("title","undefined or null");if(!F.validateMaxLength(this.title,250))return new O("title","does not satisfy required maxLength constraint: 250")}if("type"===t&&(void 0===this.type||null===this.type))return new O("type","undefined or null");if("subType"===t&&(void 0===this.subType||null===this.subType))return new O("subType","undefined or null");if("scope"===t&&(void 0===this.scope||null===this.scope))return new O("scope","undefined or null");if("entityType"===t&&(void 0===this.entityType||null===this.entityType))return new O("entityType","undefined or null");if("classifications"===t){if(void 0===this.classifications||null===this.classifications)return new O("classifications","undefined or null");if(!F.validateMaxItems(this.classifications,15))return new O("classifications","does not satisfy required maxItems constraint: 15")}if("impactTypes"===t){if(void 0===this.impactTypes||null===this.impactTypes)return new O("impactTypes","undefined or null");if(!F.validateMaxItems(this.impactTypes,8))return new O("impactTypes","does not satisfy required maxItems constraint: 8")}if("kbArticles"===t){if(void 0===this.kbArticles||null===this.kbArticles)return new O("kbArticles","undefined or null");if(!F.validateMaxItems(this.kbArticles,10))return new O("kbArticles","does not satisfy required maxItems constraint: 10")}if("targetClusters"===t){if(void 0===this.targetClusters||null===this.targetClusters)return new O("targetClusters","undefined or null");if(!F.validateMaxItems(this.targetClusters,2))return new O("targetClusters","does not satisfy required maxItems constraint: 2");if(!F.validateMinItems(this.targetClusters,1))return new O("targetClusters","does not satisfy required minItems constraint: 1")}if("publisher"===t){if(void 0===this.publisher||null===this.publisher)return new O("publisher","undefined or null");if(!F.validateMinLength(this.publisher,1))return new O("publisher","does not satisfy required minLength constraint: 1")}if("clusterConfigs"===t){if(void 0===this.clusterConfigs||null===this.clusterConfigs)return new O("clusterConfigs","undefined or null");if(!F.validateMaxItems(this.clusterConfigs,350))return new O("clusterConfigs","does not satisfy required maxItems constraint: 350");if(!F.validateMinItems(this.clusterConfigs,1))return new O("clusterConfigs","does not satisfy required minItems constraint: 1")}return new O(t,"no such property exists")}}function An(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")}Pn.prototype.extId=void 0,Pn.prototype.links=void 0,Pn.prototype.name=void 0,Pn.prototype.description=void 0,Pn.prototype.policyId=void 0,Pn.prototype.title=void 0,Pn.prototype.type=void 0,Pn.prototype.subType=void 0,Pn.prototype.scope=void 0,Pn.prototype.entityType=void 0,Pn.prototype.classifications=void 0,Pn.prototype.impactTypes=void 0,Pn.prototype.kbArticles=void 0,Pn.prototype.targetClusters=["PE"],Pn.prototype.publisher="NCC",Pn.prototype.clusterConfigs=void 0,Be.prototype.tenantId=void 0;var Cn=new WeakSet;class In extends r{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=Cn),t.add(e),this.$objectType="monitoring.v4.serviceability.GetSdaPolicyApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i;if(e){if(t=t||new In,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(B.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(i=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,i){case"monitoring.v4.serviceability.SystemDefinedPolicy":t.setData(Pn.constructFromObject(e.data,void 0));break;case"monitoring.v4.error.ErrorResponse":t.setData(Je.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+i+" in data"}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMetadata(){return this.metadata}setMetadata(e){this.metadata=e}getData(){return this.data}setData(e){this.data=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson(!1):Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson(!1):e):An(Cn,this,Un).call(this,this.getData(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson():Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson():e):An(Cn,this,Un).call(this,this.getData())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"metadata"!==t||void 0!==this.metadata&&null!==this.metadata?"data"!==t||void 0!==this.data&&null!==this.data?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("data","undefined or null"):new O("metadata","undefined or null")}}function Un(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}In.prototype.metadata=void 0,In.prototype.data=void 0,In.prototype.$reserved=void 0,In.prototype.$objectType=void 0,In.prototype.$unknownFields=void 0;class Dn extends yn{constructor(){super(),this.$objectType="monitoring.v4.serviceability.ClusterConfigProjection",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new Dn,yn.constructFromObject(e,t,!0),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return new O(t,"no such property exists")}}function Sn(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")}var Rn=new WeakSet;class Nn extends r{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=Rn),t.add(e),this.$objectType="monitoring.v4.serviceability.ListClusterConfigsApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,o,a,l;if(e){if(t=t||new Nn,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(B.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)if(Array.isArray(e.data))if(0===e.data.length)t.setData([]);else{for(a=[],i=e.data,l=i[0].hasOwnProperty("$objectType")?i[0].$objectType:typeof i[0],o=0;o<i.length;o++)switch(l){case"monitoring.v4.serviceability.ClusterConfig":s=yn.constructFromObject(i[o],void 0),a.push(s);break;case"monitoring.v4.serviceability.ClusterConfigProjection":s=Dn.constructFromObject(i[o],void 0),a.push(s);break;default:throw"Unknown list of type "+l+" in data"}t.setData(a)}else{if(l=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,"monitoring.v4.error.ErrorResponse"!==l)throw"Unknown datatype "+l+" in data";t.setData(Je.constructFromObject(e.data,void 0))}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMetadata(){return this.metadata}setMetadata(e){this.metadata=e}getData(){return this.data}setData(e){this.data=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson(!1):Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson(!1):e):Sn(Rn,this,xn).call(this,this.getData(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson():Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson():e):Sn(Rn,this,xn).call(this,this.getData())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"metadata"!==t||void 0!==this.metadata&&null!==this.metadata?"data"!==t||void 0!==this.data&&null!==this.data?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("data","undefined or null"):new O("metadata","undefined or null")}}function xn(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}function Mn(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")}Nn.prototype.metadata=void 0,Nn.prototype.data=void 0,Nn.prototype.$reserved=void 0,Nn.prototype.$objectType=void 0,Nn.prototype.$unknownFields=void 0;var Vn=new WeakSet;class Ln extends r{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=Vn),t.add(e),this.$objectType="monitoring.v4.serviceability.GetClusterConfigApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i;if(e){if(t=t||new Ln,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(B.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(i=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,i){case"monitoring.v4.serviceability.ClusterConfig":t.setData(yn.constructFromObject(e.data,void 0));break;case"monitoring.v4.error.ErrorResponse":t.setData(Je.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+i+" in data"}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMetadata(){return this.metadata}setMetadata(e){this.metadata=e}getData(){return this.data}setData(e){this.data=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson(!1):Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson(!1):e):Mn(Vn,this,Jn).call(this,this.getData(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson():Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson():e):Mn(Vn,this,Jn).call(this,this.getData())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"metadata"!==t||void 0!==this.metadata&&null!==this.metadata?"data"!==t||void 0!==this.data&&null!==this.data?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("data","undefined or null"):new O("metadata","undefined or null")}}function Jn(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}Ln.prototype.metadata=void 0,Ln.prototype.data=void 0,Ln.prototype.$reserved=void 0,Ln.prototype.$objectType=void 0,Ln.prototype.$unknownFields=void 0;var _n=new WeakSet;class Wn{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=_n),t.add(e),this.$objectType="prism.v4.config.TaskReference",this.$reserved={$fv:"v4.r3"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new Wn,e.hasOwnProperty("extId")&&null!==e.extId&&void 0!==e.extId&&t.setExtId(e.extId),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getExtId(){return this.extId}setExtId(e){this.extId=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getExtId()&&null!==this.getExtId()?{extId:this.getExtId()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("extId"===t){if(void 0===this.extId||null===this.extId)return new O("extId","undefined or null");if(!F.validatePattern(this.extId,/^[a-zA-Z0-9\/+]*={0,2}:[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/))return new O("extId","does not satisfy required pattern: /^[a-zA-Z0-9/+]*={0,2}:[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/")}return"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null")}}function Bn(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")}Wn.prototype.extId=void 0,Wn.prototype.$reserved=void 0,Wn.prototype.$objectType=void 0,Wn.prototype.$unknownFields=void 0;var Gn=new WeakSet;class zn extends r{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=Gn),t.add(e),this.$objectType="monitoring.v4.serviceability.UpdateClusterConfigApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i;if(e){if(t=t||new zn,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(B.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(i=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,i){case"prism.v4.config.TaskReference":t.setData(Wn.constructFromObject(e.data,void 0));break;case"monitoring.v4.error.ErrorResponse":t.setData(Je.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+i+" in data"}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMetadata(){return this.metadata}setMetadata(e){this.metadata=e}getData(){return this.data}setData(e){this.data=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson(!1):Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson(!1):e):Bn(Gn,this,qn).call(this,this.getData(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson():Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson():e):Bn(Gn,this,qn).call(this,this.getData())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"metadata"!==t||void 0!==this.metadata&&null!==this.metadata?"data"!==t||void 0!==this.data&&null!==this.data?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("data","undefined or null"):new O("metadata","undefined or null")}}function qn(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}function Kn(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")}zn.prototype.metadata=void 0,zn.prototype.data=void 0,zn.prototype.$reserved=void 0,zn.prototype.$objectType=void 0,zn.prototype.$unknownFields=void 0;var Hn=new WeakSet;class Yn extends r{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=Hn),t.add(e),this.$objectType="monitoring.v4.serviceability.ListSdaPoliciesApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,o,a,l;if(e){if(t=t||new Yn,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(B.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)if(Array.isArray(e.data))if(0===e.data.length)t.setData([]);else{for(a=[],i=e.data,l=i[0].hasOwnProperty("$objectType")?i[0].$objectType:typeof i[0],o=0;o<i.length;o++){if("monitoring.v4.serviceability.SystemDefinedPolicy"!==l)throw"Unknown list of type "+l+" in data";s=Pn.constructFromObject(i[o],void 0),a.push(s)}t.setData(a)}else{if(l=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,"monitoring.v4.error.ErrorResponse"!==l)throw"Unknown datatype "+l+" in data";t.setData(Je.constructFromObject(e.data,void 0))}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMetadata(){return this.metadata}setMetadata(e){this.metadata=e}getData(){return this.data}setData(e){this.data=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson(!1):Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson(!1):e):Kn(Hn,this,Xn).call(this,this.getData(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson():Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson():e):Kn(Hn,this,Xn).call(this,this.getData())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"metadata"!==t||void 0!==this.metadata&&null!==this.metadata?"data"!==t||void 0!==this.data&&null!==this.data?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("data","undefined or null"):new O("metadata","undefined or null")}}function Xn(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}Yn.prototype.metadata=void 0,Yn.prototype.data=void 0,Yn.prototype.$reserved=void 0,Yn.prototype.$objectType=void 0,Yn.prototype.$unknownFields=void 0;var Qn=new WeakSet;class Zn{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=Qn),t.add(e),this.$objectType="monitoring.v4.serviceability.EmailConfigurationRule",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,r,o;if(e){if(t=t||new Zn,e.hasOwnProperty("clusterUuids")&&null!==e.clusterUuids&&void 0!==e.clusterUuids){for(o=[],i=e.clusterUuids,r=0;r<i.length;r++)o.push(i[r]);t.setClusterUuids(o)}if(e.hasOwnProperty("impactTypes")&&null!==e.impactTypes&&void 0!==e.impactTypes){for(o=[],i=e.impactTypes,r=0;r<i.length;r++)s=Qe.constructFromObject(i[r],void 0),o.push(s);t.setImpactTypes(o)}if(e.hasOwnProperty("hasGlobalEmailContactList")&&null!==e.hasGlobalEmailContactList&&void 0!==e.hasGlobalEmailContactList&&t.setHasGlobalEmailContactList(e.hasGlobalEmailContactList),e.hasOwnProperty("matchPhrases")&&null!==e.matchPhrases&&void 0!==e.matchPhrases){for(o=[],i=e.matchPhrases,r=0;r<i.length;r++)o.push(i[r]);t.setMatchPhrases(o)}if(e.hasOwnProperty("recipients")&&null!==e.recipients&&void 0!==e.recipients){for(o=[],i=e.recipients,r=0;r<i.length;r++)o.push(i[r]);t.setRecipients(o)}if(e.hasOwnProperty("severities")&&null!==e.severities&&void 0!==e.severities){for(o=[],i=e.severities,r=0;r<i.length;r++)s=kt.constructFromObject(i[r],void 0),o.push(s);t.setSeverities(o)}if(e.hasOwnProperty("isEnabled")&&null!==e.isEnabled&&void 0!==e.isEnabled&&t.setIsEnabled(e.isEnabled),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getClusterUuids(){return this.clusterUuids}setClusterUuids(e){this.clusterUuids=e}getImpactTypes(){return this.impactTypes}setImpactTypes(e){this.impactTypes=e}getHasGlobalEmailContactList(){return this.hasGlobalEmailContactList}setHasGlobalEmailContactList(e){this.hasGlobalEmailContactList=e}getMatchPhrases(){return this.matchPhrases}setMatchPhrases(e){this.matchPhrases=e}getRecipients(){return this.recipients}setRecipients(e){this.recipients=e}getSeverities(){return this.severities}setSeverities(e){this.severities=e}getIsEnabled(){return this.isEnabled}setIsEnabled(e){this.isEnabled=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getClusterUuids()&&null!==this.getClusterUuids()?{clusterUuids:this.getClusterUuids()}:{},...void 0!==this.getImpactTypes()&&null!==this.getImpactTypes()?{impactTypes:this.getImpactTypes()}:{},...void 0!==this.getHasGlobalEmailContactList()&&null!==this.getHasGlobalEmailContactList()?{hasGlobalEmailContactList:this.getHasGlobalEmailContactList()}:{},...void 0!==this.getMatchPhrases()&&null!==this.getMatchPhrases()?{matchPhrases:this.getMatchPhrases()}:{},...void 0!==this.getRecipients()&&null!==this.getRecipients()?{recipients:this.getRecipients()}:{},...void 0!==this.getSeverities()&&null!==this.getSeverities()?{severities:this.getSeverities()}:{},...void 0!==this.getIsEnabled()&&null!==this.getIsEnabled()?{isEnabled:this.getIsEnabled()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("clusterUuids"===t){if(void 0===this.clusterUuids||null===this.clusterUuids)return new O("clusterUuids","undefined or null");if(!F.validateMaxItems(this.clusterUuids,50))return new O("clusterUuids","does not satisfy required maxItems constraint: 50")}if("impactTypes"===t){if(void 0===this.impactTypes||null===this.impactTypes)return new O("impactTypes","undefined or null");if(!F.validateMaxItems(this.impactTypes,8))return new O("impactTypes","does not satisfy required maxItems constraint: 8")}if("hasGlobalEmailContactList"===t&&(void 0===this.hasGlobalEmailContactList||null===this.hasGlobalEmailContactList))return new O("hasGlobalEmailContactList","undefined or null");if("matchPhrases"===t){if(void 0===this.matchPhrases||null===this.matchPhrases)return new O("matchPhrases","undefined or null");if(!F.validateMaxItems(this.matchPhrases,100))return new O("matchPhrases","does not satisfy required maxItems constraint: 100")}if("recipients"===t){if(void 0===this.recipients||null===this.recipients)return new O("recipients","undefined or null");if(!F.validateMaxItems(this.recipients,100))return new O("recipients","does not satisfy required maxItems constraint: 100")}if("severities"===t){if(void 0===this.severities||null===this.severities)return new O("severities","undefined or null");if(!F.validateMaxItems(this.severities,3))return new O("severities","does not satisfy required maxItems constraint: 3")}return"isEnabled"!==t||void 0!==this.isEnabled&&null!==this.isEnabled?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("isEnabled","undefined or null")}}Zn.prototype.clusterUuids=void 0,Zn.prototype.impactTypes=void 0,Zn.prototype.hasGlobalEmailContactList=!1,Zn.prototype.matchPhrases=void 0,Zn.prototype.recipients=void 0,Zn.prototype.severities=void 0,Zn.prototype.isEnabled=!0,Zn.prototype.$reserved=void 0,Zn.prototype.$objectType=void 0,Zn.prototype.$unknownFields=void 0;var ei=new WeakSet;class ti{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=ei),t.add(e),this.$objectType="monitoring.v4.serviceability.EmailTemplate",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new ti,e.hasOwnProperty("bodySuffix")&&null!==e.bodySuffix&&void 0!==e.bodySuffix&&t.setBodySuffix(e.bodySuffix),e.hasOwnProperty("subjectPrefix")&&null!==e.subjectPrefix&&void 0!==e.subjectPrefix&&t.setSubjectPrefix(e.subjectPrefix),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getBodySuffix(){return this.bodySuffix}setBodySuffix(e){this.bodySuffix=e}getSubjectPrefix(){return this.subjectPrefix}setSubjectPrefix(e){this.subjectPrefix=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getBodySuffix()&&null!==this.getBodySuffix()?{bodySuffix:this.getBodySuffix()}:{},...void 0!==this.getSubjectPrefix()&&null!==this.getSubjectPrefix()?{subjectPrefix:this.getSubjectPrefix()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("bodySuffix"===t&&(void 0===this.bodySuffix||null===this.bodySuffix))return new O("bodySuffix","undefined or null");if("subjectPrefix"===t){if(void 0===this.subjectPrefix||null===this.subjectPrefix)return new O("subjectPrefix","undefined or null");if(!F.validateMaxLength(this.subjectPrefix,256))return new O("subjectPrefix","does not satisfy required maxLength constraint: 256")}return"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null")}}ti.prototype.bodySuffix=void 0,ti.prototype.subjectPrefix=void 0,ti.prototype.$reserved=void 0,ti.prototype.$objectType=void 0,ti.prototype.$unknownFields=void 0;const ni={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",SUCCESS:"SUCCESS",FAILED:"FAILED",RETRYING:"RETRYING",DISABLED:"DISABLED",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(ni).find(t=>ni[t]===e);return null==t?ni.$UNKNOWN:ni[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case ni.$UNKNOWN:case ni.$REDACTED:case ni.SUCCESS:case ni.FAILED:case ni.RETRYING:case ni.DISABLED:return;default:throw new Error("Invalid : must be ConnectionStatus.{ $UNKNOWN|$REDACTED|SUCCESS|FAILED|RETRYING|DISABLED }")}}};Object.freeze(ni);const ii=ni;var si=new WeakSet;class ri{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=si),t.add(e),this.$objectType="common.v1.config.KVStringPair",this.$reserved={$fv:"v1.r0"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new ri,e.hasOwnProperty("name")&&null!==e.name&&void 0!==e.name&&t.setName(e.name),e.hasOwnProperty("value")&&null!==e.value&&void 0!==e.value&&t.setValue(e.value),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getName(){return this.name}setName(e){this.name=e}getValue(){return this.value}setValue(e){this.value=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getName()&&null!==this.getName()?{name:this.getName()}:{},...void 0!==this.getValue()&&null!==this.getValue()?{value:this.getValue()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("name"===t){if(void 0===this.name||null===this.name)return new O("name","undefined or null");if(!F.validateMaxLength(this.name,128))return new O("name","does not satisfy required maxLength constraint: 128");if(!F.validateMinLength(this.name,3))return new O("name","does not satisfy required minLength constraint: 3")}return"value"!==t||void 0!==this.value&&null!==this.value?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("value","undefined or null")}}ri.prototype.name=void 0,ri.prototype.value="",ri.prototype.$reserved=void 0,ri.prototype.$objectType=void 0,ri.prototype.$unknownFields=void 0;var oi=new WeakSet;class ai{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=oi),t.add(e),this.$objectType="monitoring.v4.serviceability.ParameterizedMessage",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,r,o;if(e){if(t=t||new ai,e.hasOwnProperty("message")&&null!==e.message&&void 0!==e.message&&t.setMessage(e.message),e.hasOwnProperty("attributes")&&null!==e.attributes&&void 0!==e.attributes){for(o=[],i=e.attributes,r=0;r<i.length;r++)s=ri.constructFromObject(i[r],void 0),o.push(s);t.setAttributes(o)}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMessage(){return this.message}setMessage(e){this.message=e}getAttributes(){return this.attributes}setAttributes(e){this.attributes=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getMessage()&&null!==this.getMessage()?{message:this.getMessage()}:{},...void 0!==this.getAttributes()&&null!==this.getAttributes()?{attributes:this.getAttributes().map(e=>e.toJson(!1))}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("message"===t&&(void 0===this.message||null===this.message))return new O("message","undefined or null");if("attributes"===t){if(void 0===this.attributes||null===this.attributes)return new O("attributes","undefined or null");if(!F.validateMaxItems(this.attributes,100))return new O("attributes","does not satisfy required maxItems constraint: 100")}return"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null")}}function li(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")}ai.prototype.message=void 0,ai.prototype.attributes=void 0,ai.prototype.$reserved=void 0,ai.prototype.$objectType=void 0,ai.prototype.$unknownFields=void 0;var di=new WeakSet;class ui{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=di),t.add(e),this.$objectType="monitoring.v4.serviceability.CommunicationStatus",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new ui,e.hasOwnProperty("lastCheckedTime")&&null!==e.lastCheckedTime&&void 0!==e.lastCheckedTime&&t.setLastCheckedTime(e.lastCheckedTime),e.hasOwnProperty("lastChangedTime")&&null!==e.lastChangedTime&&void 0!==e.lastChangedTime&&t.setLastChangedTime(e.lastChangedTime),e.hasOwnProperty("lastSuccessfulTransmissionTime")&&null!==e.lastSuccessfulTransmissionTime&&void 0!==e.lastSuccessfulTransmissionTime&&t.setLastSuccessfulTransmissionTime(e.lastSuccessfulTransmissionTime),e.hasOwnProperty("status")&&null!==e.status&&void 0!==e.status&&t.setStatus(ii.constructFromObject(e.status)),e.hasOwnProperty("message")&&null!==e.message&&void 0!==e.message&&t.setMessage(ai.constructFromObject(e.message)),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getLastCheckedTime(){return this.lastCheckedTime}setLastCheckedTime(e){this.lastCheckedTime=e}getLastChangedTime(){return this.lastChangedTime}setLastChangedTime(e){this.lastChangedTime=e}getLastSuccessfulTransmissionTime(){return this.lastSuccessfulTransmissionTime}setLastSuccessfulTransmissionTime(e){this.lastSuccessfulTransmissionTime=e}getStatus(){return this.status}setStatus(e){this.status=e}getMessage(){return this.message}setMessage(e){this.message=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getLastCheckedTime()&&null!==this.getLastCheckedTime()?{lastCheckedTime:li(di,this,hi).call(this,this.getLastCheckedTime(),!1)}:{},...void 0!==this.getLastChangedTime()&&null!==this.getLastChangedTime()?{lastChangedTime:li(di,this,hi).call(this,this.getLastChangedTime(),!1)}:{},...void 0!==this.getLastSuccessfulTransmissionTime()&&null!==this.getLastSuccessfulTransmissionTime()?{lastSuccessfulTransmissionTime:li(di,this,hi).call(this,this.getLastSuccessfulTransmissionTime(),!1)}:{},...void 0!==this.getStatus()&&null!==this.getStatus()?{status:this.getStatus()}:{},...void 0!==this.getMessage()&&null!==this.getMessage()?{message:this.getMessage().toJson(!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"lastCheckedTime"!==t||void 0!==this.lastCheckedTime&&null!==this.lastCheckedTime?"lastChangedTime"!==t||void 0!==this.lastChangedTime&&null!==this.lastChangedTime?"lastSuccessfulTransmissionTime"!==t||void 0!==this.lastSuccessfulTransmissionTime&&null!==this.lastSuccessfulTransmissionTime?"status"!==t||void 0!==this.status&&null!==this.status?"message"!==t||void 0!==this.message&&null!==this.message?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("message","undefined or null"):new O("status","undefined or null"):new O("lastSuccessfulTransmissionTime","undefined or null"):new O("lastChangedTime","undefined or null"):new O("lastCheckedTime","undefined or null")}}function hi(e,t){return e instanceof Date&&void 0!==t?t?e.toISOString().slice(0,10):e.toISOString():e}ui.prototype.lastCheckedTime=void 0,ui.prototype.lastChangedTime=void 0,ui.prototype.lastSuccessfulTransmissionTime=void 0,ui.prototype.status=void 0,ui.prototype.message=void 0,ui.prototype.$reserved=void 0,ui.prototype.$objectType=void 0,ui.prototype.$unknownFields=void 0;var ci=new WeakSet;class pi{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=ci),t.add(e),this.$objectType="common.v1.config.FQDN",this.$reserved={$fv:"v1.r0"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new pi,e.hasOwnProperty("value")&&null!==e.value&&void 0!==e.value&&t.setValue(e.value),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getValue(){return this.value}setValue(e){this.value=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getValue()&&null!==this.getValue()?{value:this.getValue()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("value"===t){if(void 0===this.value||null===this.value)return new O("value","undefined or null");if(!F.validatePattern(this.value,/^([a-zA-Z0-9À-ÿ]+(?:-[a-zA-Z0-9À-ÿ]+)*\\.)+[a-zA-ZÀ-ÿ]{2,63}$/))return new O("value","does not satisfy required pattern: /^([a-zA-Z0-9À-ÿ]+(?:-[a-zA-Z0-9À-ÿ]+)*\\.)+[a-zA-ZÀ-ÿ]{2,63}$/")}return"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null")}}pi.prototype.value=void 0,pi.prototype.$reserved=void 0,pi.prototype.$objectType=void 0,pi.prototype.$unknownFields=void 0;var vi=new WeakSet;class yi{constructor(e){var t,n;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t=this,n=vi),n.add(t),this.value=e,this.$objectType="common.v1.config.IPv4Address",this.$reserved={$fv:"v1.r0"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new yi,e.hasOwnProperty("value")&&null!==e.value&&void 0!==e.value&&t.setValue(e.value),e.hasOwnProperty("prefixLength")&&null!==e.prefixLength&&void 0!==e.prefixLength&&t.setPrefixLength(e.prefixLength),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getValue(){return this.value}setValue(e){this.value=e}getPrefixLength(){return this.prefixLength}setPrefixLength(e){this.prefixLength=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getValue()&&null!==this.getValue()?{value:this.getValue()}:{},...void 0!==this.getPrefixLength()&&null!==this.getPrefixLength()?{prefixLength:this.getPrefixLength()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=["value"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("value"===t){if(void 0===this.value||null===this.value)return new O("value","undefined or null");if(!F.validatePattern(this.value,/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/))return new O("value","does not satisfy required pattern: /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/")}if("prefixLength"===t){if(void 0===this.prefixLength||null===this.prefixLength)return new O("prefixLength","undefined or null");if(!F.validateMaximum(this.prefixLength,32))return new O("prefixLength","does not satisfy required maximum constraint: 32");if(!F.validateMinimum(this.prefixLength,0))return new O("prefixLength","does not satisfy required minimum constraint: 0")}return"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null")}}yi.prototype.value=void 0,yi.prototype.prefixLength=32,yi.prototype.$reserved=void 0,yi.prototype.$objectType=void 0,yi.prototype.$unknownFields=void 0;var gi=new WeakSet;class mi{constructor(e){var t,n;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t=this,n=gi),n.add(t),this.value=e,this.$objectType="common.v1.config.IPv6Address",this.$reserved={$fv:"v1.r0"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new mi,e.hasOwnProperty("value")&&null!==e.value&&void 0!==e.value&&t.setValue(e.value),e.hasOwnProperty("prefixLength")&&null!==e.prefixLength&&void 0!==e.prefixLength&&t.setPrefixLength(e.prefixLength),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getValue(){return this.value}setValue(e){this.value=e}getPrefixLength(){return this.prefixLength}setPrefixLength(e){this.prefixLength=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getValue()&&null!==this.getValue()?{value:this.getValue()}:{},...void 0!==this.getPrefixLength()&&null!==this.getPrefixLength()?{prefixLength:this.getPrefixLength()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=["value"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("value"===t){if(void 0===this.value||null===this.value)return new O("value","undefined or null");if(!F.validatePattern(this.value,/^(?:(?:(?:[A-Fa-f0-9]{1,4}:){6}|(?=(?:[A-Fa-f0-9]{0,4}:){0,6}(?:[0-9]{1,3}\\.){3}[0-9]{1,3}$)(([0-9a-fA-F]{1,4}:){0,5}|:)((:[0-9a-fA-F]{1,4}){1,5}:|:)|::(?:[A-Fa-f0-9]{1,4}:){5})(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])|(?:[A-Fa-f0-9]{1,4}:){7}[A-Fa-f0-9]{1,4}|(?=(?:[A-Fa-f0-9]{0,4}:){0,7}[A-Fa-f0-9]{0,4}$)(([0-9a-fA-F]{1,4}:){1,7}|:)((:[0-9a-fA-F]{1,4}){1,7}|:)|(?:[A-Fa-f0-9]{1,4}:){7}:|:(:[A-Fa-f0-9]{1,4}){7})$/))return new O("value","does not satisfy required pattern: /^(?:(?:(?:[A-Fa-f0-9]{1,4}:){6}|(?=(?:[A-Fa-f0-9]{0,4}:){0,6}(?:[0-9]{1,3}\\.){3}[0-9]{1,3}$)(([0-9a-fA-F]{1,4}:){0,5}|:)((:[0-9a-fA-F]{1,4}){1,5}:|:)|::(?:[A-Fa-f0-9]{1,4}:){5})(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])|(?:[A-Fa-f0-9]{1,4}:){7}[A-Fa-f0-9]{1,4}|(?=(?:[A-Fa-f0-9]{0,4}:){0,7}[A-Fa-f0-9]{0,4}$)(([0-9a-fA-F]{1,4}:){1,7}|:)((:[0-9a-fA-F]{1,4}){1,7}|:)|(?:[A-Fa-f0-9]{1,4}:){7}:|:(:[A-Fa-f0-9]{1,4}){7})$/")}if("prefixLength"===t){if(void 0===this.prefixLength||null===this.prefixLength)return new O("prefixLength","undefined or null");if(!F.validateMaximum(this.prefixLength,128))return new O("prefixLength","does not satisfy required maximum constraint: 128");if(!F.validateMinimum(this.prefixLength,0))return new O("prefixLength","does not satisfy required minimum constraint: 0")}return"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null")}}mi.prototype.value=void 0,mi.prototype.prefixLength=128,mi.prototype.$reserved=void 0,mi.prototype.$objectType=void 0,mi.prototype.$unknownFields=void 0;var fi=new WeakSet;class $i{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=fi),t.add(e),this.$objectType="common.v1.config.IPAddressOrFQDN",this.$reserved={$fv:"v1.r0"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new $i,e.hasOwnProperty("ipv4")&&null!==e.ipv4&&void 0!==e.ipv4&&t.setIpv4(yi.constructFromObject(e.ipv4)),e.hasOwnProperty("ipv6")&&null!==e.ipv6&&void 0!==e.ipv6&&t.setIpv6(mi.constructFromObject(e.ipv6)),e.hasOwnProperty("fqdn")&&null!==e.fqdn&&void 0!==e.fqdn&&t.setFqdn(pi.constructFromObject(e.fqdn)),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getIpv4(){return this.ipv4}setIpv4(e){this.ipv4=e}getIpv6(){return this.ipv6}setIpv6(e){this.ipv6=e}getFqdn(){return this.fqdn}setFqdn(e){this.fqdn=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}hasIpv4(){return!(void 0===this.ipv4||null===this.ipv4)}hasIpv6(){return!(void 0===this.ipv6||null===this.ipv6)}hasFqdn(){return!(void 0===this.fqdn||null===this.fqdn)}isValid(){return this.hasIpv4()||this.hasIpv6()||this.hasFqdn()}toJson(e){return{...void 0!==this.getIpv4()&&null!==this.getIpv4()?{ipv4:this.getIpv4().toJson(!1)}:{},...void 0!==this.getIpv6()&&null!==this.getIpv6()?{ipv6:this.getIpv6().toJson(!1)}:{},...void 0!==this.getFqdn()&&null!==this.getFqdn()?{fqdn:this.getFqdn().toJson(!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"ipv4"!==t||void 0!==this.ipv4&&null!==this.ipv4?"ipv6"!==t||void 0!==this.ipv6&&null!==this.ipv6?"fqdn"!==t||void 0!==this.fqdn&&null!==this.fqdn?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("fqdn","undefined or null"):new O("ipv6","undefined or null"):new O("ipv4","undefined or null")}}$i.prototype.ipv4=void 0,$i.prototype.ipv6=void 0,$i.prototype.fqdn=void 0,$i.prototype.$reserved=void 0,$i.prototype.$objectType=void 0,$i.prototype.$unknownFields=void 0;const wi={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",HTTP:"HTTP",HTTPS:"HTTPS",SOCKS:"SOCKS",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(wi).find(t=>wi[t]===e);return null==t?wi.$UNKNOWN:wi[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case wi.$UNKNOWN:case wi.$REDACTED:case wi.HTTP:case wi.HTTPS:case wi.SOCKS:return;default:throw new Error("Invalid : must be ProxyType.{ $UNKNOWN|$REDACTED|HTTP|HTTPS|SOCKS }")}}};Object.freeze(wi);const Ti=wi;var bi=new WeakSet;class ki{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=bi),t.add(e),this.$objectType="monitoring.v4.serviceability.HttpProxy",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,r,o;if(e){if(t=t||new ki,e.hasOwnProperty("name")&&null!==e.name&&void 0!==e.name&&t.setName(e.name),e.hasOwnProperty("addressValue")&&null!==e.addressValue&&void 0!==e.addressValue&&t.setAddressValue($i.constructFromObject(e.addressValue)),e.hasOwnProperty("port")&&null!==e.port&&void 0!==e.port&&t.setPort(e.port),e.hasOwnProperty("username")&&null!==e.username&&void 0!==e.username&&t.setUsername(e.username),e.hasOwnProperty("password")&&null!==e.password&&void 0!==e.password&&t.setPassword(e.password),e.hasOwnProperty("proxyTypes")&&null!==e.proxyTypes&&void 0!==e.proxyTypes){for(o=[],i=e.proxyTypes,r=0;r<i.length;r++)s=Ti.constructFromObject(i[r],void 0),o.push(s);t.setProxyTypes(o)}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getName(){return this.name}setName(e){this.name=e}getAddressValue(){return this.addressValue}setAddressValue(e){this.addressValue=e}getPort(){return this.port}setPort(e){this.port=e}getUsername(){return this.username}setUsername(e){this.username=e}getPassword(){return this.password}setPassword(e){this.password=e}getProxyTypes(){return this.proxyTypes}setProxyTypes(e){this.proxyTypes=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getName()&&null!==this.getName()?{name:this.getName()}:{},...void 0!==this.getAddressValue()&&null!==this.getAddressValue()?{addressValue:this.getAddressValue().toJson(!1)}:{},...void 0!==this.getPort()&&null!==this.getPort()?{port:this.getPort()}:{},...void 0!==this.getUsername()&&null!==this.getUsername()?{username:this.getUsername()}:{},...void 0!==this.getPassword()&&null!==this.getPassword()?{password:this.getPassword()}:{},...void 0!==this.getProxyTypes()&&null!==this.getProxyTypes()?{proxyTypes:this.getProxyTypes()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("name"===t){if(void 0===this.name||null===this.name)return new O("name","undefined or null");if(!F.validateMaxLength(this.name,1e3))return new O("name","does not satisfy required maxLength constraint: 1000")}if("addressValue"===t&&(void 0===this.addressValue||null===this.addressValue))return new O("addressValue","undefined or null");if("port"===t){if(void 0===this.port||null===this.port)return new O("port","undefined or null");if(!F.validateMaximum(this.port,65536))return new O("port","does not satisfy required maximum constraint: 65536");if(!F.validateMinimum(this.port,0))return new O("port","does not satisfy required minimum constraint: 0")}if("username"===t){if(void 0===this.username||null===this.username)return new O("username","undefined or null");if(!F.validateMaxLength(this.username,255))return new O("username","does not satisfy required maxLength constraint: 255")}if("password"===t&&(void 0===this.password||null===this.password))return new O("password","undefined or null");if("proxyTypes"===t){if(void 0===this.proxyTypes||null===this.proxyTypes)return new O("proxyTypes","undefined or null");if(!F.validateMaxItems(this.proxyTypes,100))return new O("proxyTypes","does not satisfy required maxItems constraint: 100")}return"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null")}}ki.prototype.name=void 0,ki.prototype.addressValue=void 0,ki.prototype.port=void 0,ki.prototype.username=void 0,ki.prototype.password=void 0,ki.prototype.proxyTypes=void 0,ki.prototype.$reserved=void 0,ki.prototype.$objectType=void 0,ki.prototype.$unknownFields=void 0;var Fi=new WeakSet;class Oi{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=Fi),t.add(e),this.$objectType="monitoring.v4.serviceability.ServiceCenter",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new Oi,e.hasOwnProperty("name")&&null!==e.name&&void 0!==e.name&&t.setName(e.name),e.hasOwnProperty("ipAddress")&&null!==e.ipAddress&&void 0!==e.ipAddress&&t.setIpAddress(e.ipAddress),e.hasOwnProperty("username")&&null!==e.username&&void 0!==e.username&&t.setUsername(e.username),e.hasOwnProperty("port")&&null!==e.port&&void 0!==e.port&&t.setPort(e.port),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getName(){return this.name}setName(e){this.name=e}getIpAddress(){return this.ipAddress}setIpAddress(e){this.ipAddress=e}getUsername(){return this.username}setUsername(e){this.username=e}getPort(){return this.port}setPort(e){this.port=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getName()&&null!==this.getName()?{name:this.getName()}:{},...void 0!==this.getIpAddress()&&null!==this.getIpAddress()?{ipAddress:this.getIpAddress()}:{},...void 0!==this.getUsername()&&null!==this.getUsername()?{username:this.getUsername()}:{},...void 0!==this.getPort()&&null!==this.getPort()?{port:this.getPort()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("name"===t){if(void 0===this.name||null===this.name)return new O("name","undefined or null");if(!F.validateMaxLength(this.name,1e3))return new O("name","does not satisfy required maxLength constraint: 1000")}if("ipAddress"===t){if(void 0===this.ipAddress||null===this.ipAddress)return new O("ipAddress","undefined or null");if(!F.validatePattern(this.ipAddress,/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/))return new O("ipAddress","does not satisfy required pattern: /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/")}if("username"===t){if(void 0===this.username||null===this.username)return new O("username","undefined or null");if(!F.validateMaxLength(this.username,255))return new O("username","does not satisfy required maxLength constraint: 255")}if("port"===t){if(void 0===this.port||null===this.port)return new O("port","undefined or null");if(!F.validateMaximum(this.port,65536))return new O("port","does not satisfy required maximum constraint: 65536");if(!F.validateMinimum(this.port,0))return new O("port","does not satisfy required minimum constraint: 0")}return"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null")}}Oi.prototype.name=void 0,Oi.prototype.ipAddress=void 0,Oi.prototype.username=void 0,Oi.prototype.port=void 0,Oi.prototype.$reserved=void 0,Oi.prototype.$objectType=void 0,Oi.prototype.$unknownFields=void 0;var ji=new WeakSet;class Ei{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=ji),t.add(e),this.$objectType="monitoring.v4.serviceability.RemoteTunnelDetails",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new Ei,e.hasOwnProperty("httpProxy")&&null!==e.httpProxy&&void 0!==e.httpProxy&&t.setHttpProxy(ki.constructFromObject(e.httpProxy)),e.hasOwnProperty("serviceCenter")&&null!==e.serviceCenter&&void 0!==e.serviceCenter&&t.setServiceCenter(Oi.constructFromObject(e.serviceCenter)),e.hasOwnProperty("connectionStatus")&&null!==e.connectionStatus&&void 0!==e.connectionStatus&&t.setConnectionStatus(ui.constructFromObject(e.connectionStatus)),e.hasOwnProperty("transportStatus")&&null!==e.transportStatus&&void 0!==e.transportStatus&&t.setTransportStatus(ui.constructFromObject(e.transportStatus)),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getHttpProxy(){return this.httpProxy}setHttpProxy(e){this.httpProxy=e}getServiceCenter(){return this.serviceCenter}setServiceCenter(e){this.serviceCenter=e}getConnectionStatus(){return this.connectionStatus}setConnectionStatus(e){this.connectionStatus=e}getTransportStatus(){return this.transportStatus}setTransportStatus(e){this.transportStatus=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getHttpProxy()&&null!==this.getHttpProxy()?{httpProxy:this.getHttpProxy().toJson(!1)}:{},...void 0!==this.getServiceCenter()&&null!==this.getServiceCenter()?{serviceCenter:this.getServiceCenter().toJson(!1)}:{},...void 0!==this.getConnectionStatus()&&null!==this.getConnectionStatus()?{connectionStatus:this.getConnectionStatus().toJson(!1)}:{},...void 0!==this.getTransportStatus()&&null!==this.getTransportStatus()?{transportStatus:this.getTransportStatus().toJson(!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"httpProxy"!==t||void 0!==this.httpProxy&&null!==this.httpProxy?"serviceCenter"!==t||void 0!==this.serviceCenter&&null!==this.serviceCenter?"connectionStatus"!==t||void 0!==this.connectionStatus&&null!==this.connectionStatus?"transportStatus"!==t||void 0!==this.transportStatus&&null!==this.transportStatus?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("transportStatus","undefined or null"):new O("connectionStatus","undefined or null"):new O("serviceCenter","undefined or null"):new O("httpProxy","undefined or null")}}Ei.prototype.httpProxy=void 0,Ei.prototype.serviceCenter=void 0,Ei.prototype.connectionStatus=void 0,Ei.prototype.transportStatus=void 0,Ei.prototype.$reserved=void 0,Ei.prototype.$objectType=void 0,Ei.prototype.$unknownFields=void 0;var Pi=new WeakSet;class Ai extends ze{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=Pi),t.add(e),this.$objectType="monitoring.v4.serviceability.AlertEmailConfiguration",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,r,o;if(e){if(t=t||new Ai,ze.constructFromObject(e,t,!0),e.hasOwnProperty("defaultNutanixEmail")&&null!==e.defaultNutanixEmail&&void 0!==e.defaultNutanixEmail&&t.setDefaultNutanixEmail(e.defaultNutanixEmail),e.hasOwnProperty("isEnabled")&&null!==e.isEnabled&&void 0!==e.isEnabled&&t.setIsEnabled(e.isEnabled),e.hasOwnProperty("hasDefaultNutanixEmail")&&null!==e.hasDefaultNutanixEmail&&void 0!==e.hasDefaultNutanixEmail&&t.setHasDefaultNutanixEmail(e.hasDefaultNutanixEmail),e.hasOwnProperty("isEmailDigestEnabled")&&null!==e.isEmailDigestEnabled&&void 0!==e.isEmailDigestEnabled&&t.setIsEmailDigestEnabled(e.isEmailDigestEnabled),e.hasOwnProperty("isEmptyAlertEmailDigestSkipped")&&null!==e.isEmptyAlertEmailDigestSkipped&&void 0!==e.isEmptyAlertEmailDigestSkipped&&t.setIsEmptyAlertEmailDigestSkipped(e.isEmptyAlertEmailDigestSkipped),e.hasOwnProperty("emailConfigRules")&&null!==e.emailConfigRules&&void 0!==e.emailConfigRules){for(o=[],i=e.emailConfigRules,r=0;r<i.length;r++)s=Zn.constructFromObject(i[r],void 0),o.push(s);t.setEmailConfigRules(o)}if(e.hasOwnProperty("emailContactList")&&null!==e.emailContactList&&void 0!==e.emailContactList){for(o=[],i=e.emailContactList,r=0;r<i.length;r++)o.push(i[r]);t.setEmailContactList(o)}if(e.hasOwnProperty("emailTemplate")&&null!==e.emailTemplate&&void 0!==e.emailTemplate&&t.setEmailTemplate(ti.constructFromObject(e.emailTemplate)),e.hasOwnProperty("tunnelDetails")&&null!==e.tunnelDetails&&void 0!==e.tunnelDetails&&t.setTunnelDetails(Ei.constructFromObject(e.tunnelDetails)),e.hasOwnProperty("alertEmailDigestSendTime")&&null!==e.alertEmailDigestSendTime&&void 0!==e.alertEmailDigestSendTime&&t.setAlertEmailDigestSendTime(e.alertEmailDigestSendTime),e.hasOwnProperty("alertEmailDigestSendTimezone")&&null!==e.alertEmailDigestSendTimezone&&void 0!==e.alertEmailDigestSendTimezone&&t.setAlertEmailDigestSendTimezone(e.alertEmailDigestSendTimezone),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getDefaultNutanixEmail(){return this.defaultNutanixEmail}setDefaultNutanixEmail(e){this.defaultNutanixEmail=e}getIsEnabled(){return this.isEnabled}setIsEnabled(e){this.isEnabled=e}getHasDefaultNutanixEmail(){return this.hasDefaultNutanixEmail}setHasDefaultNutanixEmail(e){this.hasDefaultNutanixEmail=e}getIsEmailDigestEnabled(){return this.isEmailDigestEnabled}setIsEmailDigestEnabled(e){this.isEmailDigestEnabled=e}getIsEmptyAlertEmailDigestSkipped(){return this.isEmptyAlertEmailDigestSkipped}setIsEmptyAlertEmailDigestSkipped(e){this.isEmptyAlertEmailDigestSkipped=e}getEmailConfigRules(){return this.emailConfigRules}setEmailConfigRules(e){this.emailConfigRules=e}getEmailContactList(){return this.emailContactList}setEmailContactList(e){this.emailContactList=e}getEmailTemplate(){return this.emailTemplate}setEmailTemplate(e){this.emailTemplate=e}getTunnelDetails(){return this.tunnelDetails}setTunnelDetails(e){this.tunnelDetails=e}getAlertEmailDigestSendTime(){return this.alertEmailDigestSendTime}setAlertEmailDigestSendTime(e){this.alertEmailDigestSendTime=e}getAlertEmailDigestSendTimezone(){return this.alertEmailDigestSendTimezone}setAlertEmailDigestSendTimezone(e){this.alertEmailDigestSendTimezone=e}toJson(e){return!1===e?{...void 0!==this.getDefaultNutanixEmail()&&null!==this.getDefaultNutanixEmail()?{defaultNutanixEmail:this.getDefaultNutanixEmail()}:{},...void 0!==this.getIsEnabled()&&null!==this.getIsEnabled()?{isEnabled:this.getIsEnabled()}:{},...void 0!==this.getHasDefaultNutanixEmail()&&null!==this.getHasDefaultNutanixEmail()?{hasDefaultNutanixEmail:this.getHasDefaultNutanixEmail()}:{},...void 0!==this.getIsEmailDigestEnabled()&&null!==this.getIsEmailDigestEnabled()?{isEmailDigestEnabled:this.getIsEmailDigestEnabled()}:{},...void 0!==this.getIsEmptyAlertEmailDigestSkipped()&&null!==this.getIsEmptyAlertEmailDigestSkipped()?{isEmptyAlertEmailDigestSkipped:this.getIsEmptyAlertEmailDigestSkipped()}:{},...void 0!==this.getEmailConfigRules()&&null!==this.getEmailConfigRules()?{emailConfigRules:this.getEmailConfigRules().map(e=>e.toJson(!1))}:{},...void 0!==this.getEmailContactList()&&null!==this.getEmailContactList()?{emailContactList:this.getEmailContactList()}:{},...void 0!==this.getEmailTemplate()&&null!==this.getEmailTemplate()?{emailTemplate:this.getEmailTemplate().toJson(!1)}:{},...void 0!==this.getTunnelDetails()&&null!==this.getTunnelDetails()?{tunnelDetails:this.getTunnelDetails().toJson(!1)}:{},...void 0!==this.getAlertEmailDigestSendTime()&&null!==this.getAlertEmailDigestSendTime()?{alertEmailDigestSendTime:this.getAlertEmailDigestSendTime()}:{},...void 0!==this.getAlertEmailDigestSendTimezone()&&null!==this.getAlertEmailDigestSendTimezone()?{alertEmailDigestSendTimezone:this.getAlertEmailDigestSendTimezone()}:{},...void 0!==this.getExtId()&&null!==this.getExtId()?{extId:this.getExtId()}:{},...void 0!==this.getLinks()&&null!==this.getLinks()?{links:this.getLinks().map(e=>e.toJson(!1))}:{},...void 0!==this.getTenantId()&&null!==this.getTenantId()?{tenantId:this.getTenantId()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getDefaultNutanixEmail()&&null!==this.getDefaultNutanixEmail()?{defaultNutanixEmail:this.getDefaultNutanixEmail()}:{},...void 0!==this.getIsEnabled()&&null!==this.getIsEnabled()?{isEnabled:this.getIsEnabled()}:{},...void 0!==this.getHasDefaultNutanixEmail()&&null!==this.getHasDefaultNutanixEmail()?{hasDefaultNutanixEmail:this.getHasDefaultNutanixEmail()}:{},...void 0!==this.getIsEmailDigestEnabled()&&null!==this.getIsEmailDigestEnabled()?{isEmailDigestEnabled:this.getIsEmailDigestEnabled()}:{},...void 0!==this.getIsEmptyAlertEmailDigestSkipped()&&null!==this.getIsEmptyAlertEmailDigestSkipped()?{isEmptyAlertEmailDigestSkipped:this.getIsEmptyAlertEmailDigestSkipped()}:{},...void 0!==this.getEmailConfigRules()&&null!==this.getEmailConfigRules()?{emailConfigRules:this.getEmailConfigRules().map(e=>e.toJson(!1))}:{},...void 0!==this.getEmailContactList()&&null!==this.getEmailContactList()?{emailContactList:this.getEmailContactList()}:{},...void 0!==this.getEmailTemplate()&&null!==this.getEmailTemplate()?{emailTemplate:this.getEmailTemplate().toJson(!1)}:{},...void 0!==this.getTunnelDetails()&&null!==this.getTunnelDetails()?{tunnelDetails:this.getTunnelDetails().toJson(!1)}:{},...void 0!==this.getAlertEmailDigestSendTime()&&null!==this.getAlertEmailDigestSendTime()?{alertEmailDigestSendTime:this.getAlertEmailDigestSendTime()}:{},...void 0!==this.getAlertEmailDigestSendTimezone()&&null!==this.getAlertEmailDigestSendTimezone()?{alertEmailDigestSendTimezone:this.getAlertEmailDigestSendTimezone()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("defaultNutanixEmail"===t){if(void 0===this.defaultNutanixEmail||null===this.defaultNutanixEmail)return new O("defaultNutanixEmail","undefined or null");if(!F.validatePattern(this.defaultNutanixEmail,/^([a-zA-Z0-9_\\-\\.]+)@([a-zA-Z0-9_\\-\\.]+)\\.([a-zA-Z]{2,5})$/))return new O("defaultNutanixEmail","does not satisfy required pattern: /^([a-zA-Z0-9_\\-\\.]+)@([a-zA-Z0-9_\\-\\.]+)\\.([a-zA-Z]{2,5})$/")}if("isEnabled"===t&&(void 0===this.isEnabled||null===this.isEnabled))return new O("isEnabled","undefined or null");if("hasDefaultNutanixEmail"===t&&(void 0===this.hasDefaultNutanixEmail||null===this.hasDefaultNutanixEmail))return new O("hasDefaultNutanixEmail","undefined or null");if("isEmailDigestEnabled"===t&&(void 0===this.isEmailDigestEnabled||null===this.isEmailDigestEnabled))return new O("isEmailDigestEnabled","undefined or null");if("isEmptyAlertEmailDigestSkipped"===t&&(void 0===this.isEmptyAlertEmailDigestSkipped||null===this.isEmptyAlertEmailDigestSkipped))return new O("isEmptyAlertEmailDigestSkipped","undefined or null");if("emailConfigRules"===t){if(void 0===this.emailConfigRules||null===this.emailConfigRules)return new O("emailConfigRules","undefined or null");if(!F.validateMaxItems(this.emailConfigRules,100))return new O("emailConfigRules","does not satisfy required maxItems constraint: 100")}if("emailContactList"===t){if(void 0===this.emailContactList||null===this.emailContactList)return new O("emailContactList","undefined or null");if(!F.validateMaxItems(this.emailContactList,100))return new O("emailContactList","does not satisfy required maxItems constraint: 100")}return"emailTemplate"!==t||void 0!==this.emailTemplate&&null!==this.emailTemplate?"tunnelDetails"!==t||void 0!==this.tunnelDetails&&null!==this.tunnelDetails?"alertEmailDigestSendTime"!==t||void 0!==this.alertEmailDigestSendTime&&null!==this.alertEmailDigestSendTime?"alertEmailDigestSendTimezone"!==t||void 0!==this.alertEmailDigestSendTimezone&&null!==this.alertEmailDigestSendTimezone?new O(t,"no such property exists"):new O("alertEmailDigestSendTimezone","undefined or null"):new O("alertEmailDigestSendTime","undefined or null"):new O("tunnelDetails","undefined or null"):new O("emailTemplate","undefined or null")}}function Ci(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")}Ai.prototype.defaultNutanixEmail=void 0,Ai.prototype.isEnabled=!1,Ai.prototype.hasDefaultNutanixEmail=!1,Ai.prototype.isEmailDigestEnabled=!1,Ai.prototype.isEmptyAlertEmailDigestSkipped=!1,Ai.prototype.emailConfigRules=void 0,Ai.prototype.emailContactList=void 0,Ai.prototype.emailTemplate=void 0,Ai.prototype.tunnelDetails=void 0,Ai.prototype.alertEmailDigestSendTime=void 0,Ai.prototype.alertEmailDigestSendTimezone=void 0,ze.prototype.extId=void 0,ze.prototype.links=void 0,Be.prototype.tenantId=void 0;var Ii=new WeakSet;class Ui extends r{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=Ii),t.add(e),this.$objectType="monitoring.v4.serviceability.GetAlertEmailConfigurationApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i;if(e){if(t=t||new Ui,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(B.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(i=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,i){case"monitoring.v4.serviceability.AlertEmailConfiguration":t.setData(Ai.constructFromObject(e.data,void 0));break;case"monitoring.v4.error.ErrorResponse":t.setData(Je.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+i+" in data"}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMetadata(){return this.metadata}setMetadata(e){this.metadata=e}getData(){return this.data}setData(e){this.data=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson(!1):Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson(!1):e):Ci(Ii,this,Di).call(this,this.getData(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson():Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson():e):Ci(Ii,this,Di).call(this,this.getData())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"metadata"!==t||void 0!==this.metadata&&null!==this.metadata?"data"!==t||void 0!==this.data&&null!==this.data?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("data","undefined or null"):new O("metadata","undefined or null")}}function Di(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}function Si(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")}Ui.prototype.metadata=void 0,Ui.prototype.data=void 0,Ui.prototype.$reserved=void 0,Ui.prototype.$objectType=void 0,Ui.prototype.$unknownFields=void 0;var Ri=new WeakSet;class Ni extends r{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=Ri),t.add(e),this.$objectType="monitoring.v4.serviceability.UpdateAlertEmailConfigurationApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,o,a,l;if(e){if(t=t||new Ni,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(B.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)if(Array.isArray(e.data))if(0===e.data.length)t.setData([]);else{for(a=[],i=e.data,l=i[0].hasOwnProperty("$objectType")?i[0].$objectType:typeof i[0],o=0;o<i.length;o++){if("monitoring.v4.error.AppMessage"!==l)throw"Unknown list of type "+l+" in data";s=Ie.constructFromObject(i[o],void 0),a.push(s)}t.setData(a)}else{if(l=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,"monitoring.v4.error.ErrorResponse"!==l)throw"Unknown datatype "+l+" in data";t.setData(Je.constructFromObject(e.data,void 0))}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMetadata(){return this.metadata}setMetadata(e){this.metadata=e}getData(){return this.data}setData(e){this.data=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson(!1):Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson(!1):e):Si(Ri,this,xi).call(this,this.getData(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson():Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson():e):Si(Ri,this,xi).call(this,this.getData())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"metadata"!==t||void 0!==this.metadata&&null!==this.metadata?"data"!==t||void 0!==this.data&&null!==this.data?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("data","undefined or null"):new O("metadata","undefined or null")}}function xi(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}Ni.prototype.metadata=void 0,Ni.prototype.data=void 0,Ni.prototype.$reserved=void 0,Ni.prototype.$objectType=void 0,Ni.prototype.$unknownFields=void 0;const Mi={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",CREATE:"CREATE",UPDATE:"UPDATE",DELETE:"DELETE",POWERSTATECHANGE:"POWERSTATECHANGE",HA:"HA",RESTORE:"RESTORE",MIGRATE:"MIGRATE",ENABLE:"ENABLE",DISABLE:"DISABLE",RESET:"RESET",LOGIN:"LOGIN",LOGOUT:"LOGOUT",VALIDATE:"VALIDATE",FAILOVER:"FAILOVER",INPROGRESS:"INPROGRESS",ON:"ON",OFF:"OFF",JOINED:"JOINED",UNJOINED:"UNJOINED",PROTECTED:"PROTECTED",UNPROTECTED:"UNPROTECTED",QUARENTINED:"QUARENTINED",UNQUARENTINED:"UNQUARENTINED",START:"START",END:"END",TESTFAILOVER:"TESTFAILOVER",IMPORT:"IMPORT",EXPORT:"EXPORT",IMAGEIMPORT:"IMAGEIMPORT",IMAGETRANSFER:"IMAGETRANSFER",IMAGEREMOVE:"IMAGEREMOVE",IMAGEUPLOAD:"IMAGEUPLOAD",TEMPLATEGUESTUPDATEINITIATE:"TEMPLATEGUESTUPDATEINITIATE",TEMPLATEGUESTUPDATECANCEL:"TEMPLATEGUESTUPDATECANCEL",TEMPLATEGUESTUPDATECOMPLETE:"TEMPLATEGUESTUPDATECOMPLETE",TEMPLATEDEPLOY:"TEMPLATEDEPLOY",TEMPLATEVERSIONPUBLISH:"TEMPLATEVERSIONPUBLISH",CROSSCLUSTERMIGRATE:"CROSSCLUSTERMIGRATE",FLOWCONFIGMIGRATE:"FLOWCONFIGMIGRATE",SUSPEND:"SUSPEND",RESUME:"RESUME",GENERATEURL:"GENERATEURL",DOWNLOAD:"DOWNLOAD",IMAGEMIGRATETOCR:"IMAGEMIGRATETOCR",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(Mi).find(t=>Mi[t]===e);return null==t?Mi.$UNKNOWN:Mi[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case Mi.$UNKNOWN:case Mi.$REDACTED:case Mi.CREATE:case Mi.UPDATE:case Mi.DELETE:case Mi.POWERSTATECHANGE:case Mi.HA:case Mi.RESTORE:case Mi.MIGRATE:case Mi.ENABLE:case Mi.DISABLE:case Mi.RESET:case Mi.LOGIN:case Mi.LOGOUT:case Mi.VALIDATE:case Mi.FAILOVER:case Mi.INPROGRESS:case Mi.ON:case Mi.OFF:case Mi.JOINED:case Mi.UNJOINED:case Mi.PROTECTED:case Mi.UNPROTECTED:case Mi.QUARENTINED:case Mi.UNQUARENTINED:case Mi.START:case Mi.END:case Mi.TESTFAILOVER:case Mi.IMPORT:case Mi.EXPORT:case Mi.IMAGEIMPORT:case Mi.IMAGETRANSFER:case Mi.IMAGEREMOVE:case Mi.IMAGEUPLOAD:case Mi.TEMPLATEGUESTUPDATEINITIATE:case Mi.TEMPLATEGUESTUPDATECANCEL:case Mi.TEMPLATEGUESTUPDATECOMPLETE:case Mi.TEMPLATEDEPLOY:case Mi.TEMPLATEVERSIONPUBLISH:case Mi.CROSSCLUSTERMIGRATE:case Mi.FLOWCONFIGMIGRATE:case Mi.SUSPEND:case Mi.RESUME:case Mi.GENERATEURL:case Mi.DOWNLOAD:case Mi.IMAGEMIGRATETOCR:return;default:throw new Error("Invalid : must be OperationType.{ $UNKNOWN|$REDACTED|CREATE|UPDATE|DELETE|POWERSTATECHANGE|HA|RESTORE|MIGRATE|ENABLE|DISABLE|RESET|LOGIN|LOGOUT|VALIDATE|FAILOVER|INPROGRESS|ON|OFF|JOINED|UNJOINED|PROTECTED|UNPROTECTED|QUARENTINED|UNQUARENTINED|START|END|TESTFAILOVER|IMPORT|EXPORT|IMAGEIMPORT|IMAGETRANSFER|IMAGEREMOVE|IMAGEUPLOAD|TEMPLATEGUESTUPDATEINITIATE|TEMPLATEGUESTUPDATECANCEL|TEMPLATEGUESTUPDATECOMPLETE|TEMPLATEDEPLOY|TEMPLATEVERSIONPUBLISH|CROSSCLUSTERMIGRATE|FLOWCONFIGMIGRATE|SUSPEND|RESUME|GENERATEURL|DOWNLOAD|IMAGEMIGRATETOCR }")}}};Object.freeze(Mi);const Vi=Mi;var Li=new WeakSet;class Ji{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=Li),t.add(e),this.$objectType="monitoring.v4.serviceability.AuditEntityReference",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new Ji,e.hasOwnProperty("type")&&null!==e.type&&void 0!==e.type&&t.setType(e.type),e.hasOwnProperty("name")&&null!==e.name&&void 0!==e.name&&t.setName(e.name),e.hasOwnProperty("extId")&&null!==e.extId&&void 0!==e.extId&&t.setExtId(e.extId),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getType(){return this.type}setType(e){this.type=e}getName(){return this.name}setName(e){this.name=e}getExtId(){return this.extId}setExtId(e){this.extId=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getType()&&null!==this.getType()?{type:this.getType()}:{},...void 0!==this.getName()&&null!==this.getName()?{name:this.getName()}:{},...void 0!==this.getExtId()&&null!==this.getExtId()?{extId:this.getExtId()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("type"===t&&(void 0===this.type||null===this.type))return new O("type","undefined or null");if("name"===t){if(void 0===this.name||null===this.name)return new O("name","undefined or null");if(!F.validateMaxLength(this.name,1e3))return new O("name","does not satisfy required maxLength constraint: 1000")}if("extId"===t){if(void 0===this.extId||null===this.extId)return new O("extId","undefined or null");if(!F.validatePattern(this.extId,/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/))return new O("extId","does not satisfy required pattern: /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/")}return"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null")}}Ji.prototype.type=void 0,Ji.prototype.name=void 0,Ji.prototype.extId=void 0,Ji.prototype.$reserved=void 0,Ji.prototype.$objectType=void 0,Ji.prototype.$unknownFields=void 0;const _i={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",SUCCEEDED:"SUCCEEDED",FAILED:"FAILED",ABORTED:"ABORTED",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(_i).find(t=>_i[t]===e);return null==t?_i.$UNKNOWN:_i[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case _i.$UNKNOWN:case _i.$REDACTED:case _i.SUCCEEDED:case _i.FAILED:case _i.ABORTED:return;default:throw new Error("Invalid : must be Status.{ $UNKNOWN|$REDACTED|SUCCEEDED|FAILED|ABORTED }")}}};Object.freeze(_i);const Wi=_i;var Bi=new WeakSet;class Gi{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=Bi),t.add(e),this.$objectType="monitoring.v4.serviceability.UserReference",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new Gi,e.hasOwnProperty("extId")&&null!==e.extId&&void 0!==e.extId&&t.setExtId(e.extId),e.hasOwnProperty("name")&&null!==e.name&&void 0!==e.name&&t.setName(e.name),e.hasOwnProperty("ipAddress")&&null!==e.ipAddress&&void 0!==e.ipAddress&&t.setIpAddress(e.ipAddress),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getExtId(){return this.extId}setExtId(e){this.extId=e}getName(){return this.name}setName(e){this.name=e}getIpAddress(){return this.ipAddress}setIpAddress(e){this.ipAddress=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getExtId()&&null!==this.getExtId()?{extId:this.getExtId()}:{},...void 0!==this.getName()&&null!==this.getName()?{name:this.getName()}:{},...void 0!==this.getIpAddress()&&null!==this.getIpAddress()?{ipAddress:this.getIpAddress()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("extId"===t){if(void 0===this.extId||null===this.extId)return new O("extId","undefined or null");if(!F.validatePattern(this.extId,/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/))return new O("extId","does not satisfy required pattern: /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/")}if("name"===t){if(void 0===this.name||null===this.name)return new O("name","undefined or null");if(!F.validateMaxLength(this.name,1e3))return new O("name","does not satisfy required maxLength constraint: 1000")}if("ipAddress"===t){if(void 0===this.ipAddress||null===this.ipAddress)return new O("ipAddress","undefined or null");if(!F.validatePattern(this.ipAddress,/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/))return new O("ipAddress","does not satisfy required pattern: /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/")}return"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null")}}function zi(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")}Gi.prototype.extId=void 0,Gi.prototype.name=void 0,Gi.prototype.ipAddress=void 0,Gi.prototype.$reserved=void 0,Gi.prototype.$objectType=void 0,Gi.prototype.$unknownFields=void 0;var qi=new WeakSet;class Ki extends ze{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=qi),t.add(e),this.$objectType="monitoring.v4.serviceability.Audit",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,r,o;if(e){if(t=t||new Ki,ze.constructFromObject(e,t,!0),e.hasOwnProperty("sourceEntity")&&null!==e.sourceEntity&&void 0!==e.sourceEntity&&t.setSourceEntity(Ji.constructFromObject(e.sourceEntity)),e.hasOwnProperty("clusterReference")&&null!==e.clusterReference&&void 0!==e.clusterReference&&t.setClusterReference(Ye.constructFromObject(e.clusterReference)),e.hasOwnProperty("affectedEntities")&&null!==e.affectedEntities&&void 0!==e.affectedEntities){for(o=[],i=e.affectedEntities,r=0;r<i.length;r++)s=Ye.constructFromObject(i[r],void 0),o.push(s);t.setAffectedEntities(o)}if(e.hasOwnProperty("operationType")&&null!==e.operationType&&void 0!==e.operationType&&t.setOperationType(Vi.constructFromObject(e.operationType)),e.hasOwnProperty("message")&&null!==e.message&&void 0!==e.message&&t.setMessage(e.message),e.hasOwnProperty("parameters")&&null!==e.parameters&&void 0!==e.parameters){for(o=[],i=e.parameters,r=0;r<i.length;r++)s=wt.constructFromObject(i[r],void 0),o.push(s);t.setParameters(o)}if(e.hasOwnProperty("operationStartTime")&&null!==e.operationStartTime&&void 0!==e.operationStartTime&&t.setOperationStartTime(e.operationStartTime),e.hasOwnProperty("operationEndTime")&&null!==e.operationEndTime&&void 0!==e.operationEndTime&&t.setOperationEndTime(e.operationEndTime),e.hasOwnProperty("userReference")&&null!==e.userReference&&void 0!==e.userReference&&t.setUserReference(Gi.constructFromObject(e.userReference)),e.hasOwnProperty("serviceName")&&null!==e.serviceName&&void 0!==e.serviceName&&t.setServiceName(e.serviceName),e.hasOwnProperty("auditType")&&null!==e.auditType&&void 0!==e.auditType&&t.setAuditType(e.auditType),e.hasOwnProperty("status")&&null!==e.status&&void 0!==e.status&&t.setStatus(Wi.constructFromObject(e.status)),e.hasOwnProperty("creationTime")&&null!==e.creationTime&&void 0!==e.creationTime&&t.setCreationTime(e.creationTime),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getSourceEntity(){return this.sourceEntity}setSourceEntity(e){this.sourceEntity=e}getClusterReference(){return this.clusterReference}setClusterReference(e){this.clusterReference=e}getAffectedEntities(){return this.affectedEntities}setAffectedEntities(e){this.affectedEntities=e}getOperationType(){return this.operationType}setOperationType(e){this.operationType=e}getMessage(){return this.message}setMessage(e){this.message=e}getParameters(){return this.parameters}setParameters(e){this.parameters=e}getOperationStartTime(){return this.operationStartTime}setOperationStartTime(e){this.operationStartTime=e}getOperationEndTime(){return this.operationEndTime}setOperationEndTime(e){this.operationEndTime=e}getUserReference(){return this.userReference}setUserReference(e){this.userReference=e}getServiceName(){return this.serviceName}setServiceName(e){this.serviceName=e}getAuditType(){return this.auditType}setAuditType(e){this.auditType=e}getStatus(){return this.status}setStatus(e){this.status=e}getCreationTime(){return this.creationTime}setCreationTime(e){this.creationTime=e}toJson(e){return!1===e?{...void 0!==this.getSourceEntity()&&null!==this.getSourceEntity()?{sourceEntity:this.getSourceEntity().toJson(!1)}:{},...void 0!==this.getClusterReference()&&null!==this.getClusterReference()?{clusterReference:this.getClusterReference().toJson(!1)}:{},...void 0!==this.getAffectedEntities()&&null!==this.getAffectedEntities()?{affectedEntities:this.getAffectedEntities().map(e=>e.toJson(!1))}:{},...void 0!==this.getOperationType()&&null!==this.getOperationType()?{operationType:this.getOperationType()}:{},...void 0!==this.getMessage()&&null!==this.getMessage()?{message:this.getMessage()}:{},...void 0!==this.getParameters()&&null!==this.getParameters()?{parameters:this.getParameters().map(e=>e.toJson(!1))}:{},...void 0!==this.getOperationStartTime()&&null!==this.getOperationStartTime()?{operationStartTime:zi(qi,this,Hi).call(this,this.getOperationStartTime(),!1)}:{},...void 0!==this.getOperationEndTime()&&null!==this.getOperationEndTime()?{operationEndTime:zi(qi,this,Hi).call(this,this.getOperationEndTime(),!1)}:{},...void 0!==this.getUserReference()&&null!==this.getUserReference()?{userReference:this.getUserReference().toJson(!1)}:{},...void 0!==this.getServiceName()&&null!==this.getServiceName()?{serviceName:this.getServiceName()}:{},...void 0!==this.getAuditType()&&null!==this.getAuditType()?{auditType:this.getAuditType()}:{},...void 0!==this.getStatus()&&null!==this.getStatus()?{status:this.getStatus()}:{},...void 0!==this.getCreationTime()&&null!==this.getCreationTime()?{creationTime:zi(qi,this,Hi).call(this,this.getCreationTime(),!1)}:{},...void 0!==this.getExtId()&&null!==this.getExtId()?{extId:this.getExtId()}:{},...void 0!==this.getLinks()&&null!==this.getLinks()?{links:this.getLinks().map(e=>e.toJson(!1))}:{},...void 0!==this.getTenantId()&&null!==this.getTenantId()?{tenantId:this.getTenantId()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getSourceEntity()&&null!==this.getSourceEntity()?{sourceEntity:this.getSourceEntity().toJson(!1)}:{},...void 0!==this.getClusterReference()&&null!==this.getClusterReference()?{clusterReference:this.getClusterReference().toJson(!1)}:{},...void 0!==this.getAffectedEntities()&&null!==this.getAffectedEntities()?{affectedEntities:this.getAffectedEntities().map(e=>e.toJson(!1))}:{},...void 0!==this.getOperationType()&&null!==this.getOperationType()?{operationType:this.getOperationType()}:{},...void 0!==this.getMessage()&&null!==this.getMessage()?{message:this.getMessage()}:{},...void 0!==this.getParameters()&&null!==this.getParameters()?{parameters:this.getParameters().map(e=>e.toJson(!1))}:{},...void 0!==this.getOperationStartTime()&&null!==this.getOperationStartTime()?{operationStartTime:zi(qi,this,Hi).call(this,this.getOperationStartTime(),!1)}:{},...void 0!==this.getOperationEndTime()&&null!==this.getOperationEndTime()?{operationEndTime:zi(qi,this,Hi).call(this,this.getOperationEndTime(),!1)}:{},...void 0!==this.getUserReference()&&null!==this.getUserReference()?{userReference:this.getUserReference().toJson(!1)}:{},...void 0!==this.getServiceName()&&null!==this.getServiceName()?{serviceName:this.getServiceName()}:{},...void 0!==this.getAuditType()&&null!==this.getAuditType()?{auditType:this.getAuditType()}:{},...void 0!==this.getStatus()&&null!==this.getStatus()?{status:this.getStatus()}:{},...void 0!==this.getCreationTime()&&null!==this.getCreationTime()?{creationTime:zi(qi,this,Hi).call(this,this.getCreationTime(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("sourceEntity"===t&&(void 0===this.sourceEntity||null===this.sourceEntity))return new O("sourceEntity","undefined or null");if("clusterReference"===t&&(void 0===this.clusterReference||null===this.clusterReference))return new O("clusterReference","undefined or null");if("affectedEntities"===t){if(void 0===this.affectedEntities||null===this.affectedEntities)return new O("affectedEntities","undefined or null");if(!F.validateMaxItems(this.affectedEntities,50))return new O("affectedEntities","does not satisfy required maxItems constraint: 50")}if("operationType"===t&&(void 0===this.operationType||null===this.operationType))return new O("operationType","undefined or null");if("message"===t){if(void 0===this.message||null===this.message)return new O("message","undefined or null");if(!F.validateMaxLength(this.message,1024))return new O("message","does not satisfy required maxLength constraint: 1024")}if("parameters"===t){if(void 0===this.parameters||null===this.parameters)return new O("parameters","undefined or null");if(!F.validateMaxItems(this.parameters,100))return new O("parameters","does not satisfy required maxItems constraint: 100")}if("operationStartTime"===t&&(void 0===this.operationStartTime||null===this.operationStartTime))return new O("operationStartTime","undefined or null");if("operationEndTime"===t&&(void 0===this.operationEndTime||null===this.operationEndTime))return new O("operationEndTime","undefined or null");if("userReference"===t&&(void 0===this.userReference||null===this.userReference))return new O("userReference","undefined or null");if("serviceName"===t){if(void 0===this.serviceName||null===this.serviceName)return new O("serviceName","undefined or null");if(!F.validateMaxLength(this.serviceName,50))return new O("serviceName","does not satisfy required maxLength constraint: 50")}return"auditType"!==t||void 0!==this.auditType&&null!==this.auditType?"status"!==t||void 0!==this.status&&null!==this.status?"creationTime"!==t||void 0!==this.creationTime&&null!==this.creationTime?new O(t,"no such property exists"):new O("creationTime","undefined or null"):new O("status","undefined or null"):new O("auditType","undefined or null")}}function Hi(e,t){return e instanceof Date&&void 0!==t?t?e.toISOString().slice(0,10):e.toISOString():e}function Yi(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")}Ki.prototype.sourceEntity=void 0,Ki.prototype.clusterReference=void 0,Ki.prototype.affectedEntities=void 0,Ki.prototype.operationType=void 0,Ki.prototype.message=void 0,Ki.prototype.parameters=void 0,Ki.prototype.operationStartTime=void 0,Ki.prototype.operationEndTime=void 0,Ki.prototype.userReference=void 0,Ki.prototype.serviceName=void 0,Ki.prototype.auditType=void 0,Ki.prototype.status=void 0,Ki.prototype.creationTime=void 0,ze.prototype.extId=void 0,ze.prototype.links=void 0,Be.prototype.tenantId=void 0;var Xi=new WeakSet;class Qi extends r{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=Xi),t.add(e),this.$objectType="monitoring.v4.serviceability.GetAuditApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i;if(e){if(t=t||new Qi,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(B.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(i=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,i){case"monitoring.v4.serviceability.Audit":t.setData(Ki.constructFromObject(e.data,void 0));break;case"monitoring.v4.error.ErrorResponse":t.setData(Je.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+i+" in data"}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMetadata(){return this.metadata}setMetadata(e){this.metadata=e}getData(){return this.data}setData(e){this.data=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson(!1):Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson(!1):e):Yi(Xi,this,Zi).call(this,this.getData(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson():Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson():e):Yi(Xi,this,Zi).call(this,this.getData())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"metadata"!==t||void 0!==this.metadata&&null!==this.metadata?"data"!==t||void 0!==this.data&&null!==this.data?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("data","undefined or null"):new O("metadata","undefined or null")}}function Zi(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}function es(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")}Qi.prototype.metadata=void 0,Qi.prototype.data=void 0,Qi.prototype.$reserved=void 0,Qi.prototype.$objectType=void 0,Qi.prototype.$unknownFields=void 0;var ts=new WeakSet;class ns extends r{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=ts),t.add(e),this.$objectType="monitoring.v4.serviceability.ListAuditsApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,o,a,l;if(e){if(t=t||new ns,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(B.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)if(Array.isArray(e.data))if(0===e.data.length)t.setData([]);else{for(a=[],i=e.data,l=i[0].hasOwnProperty("$objectType")?i[0].$objectType:typeof i[0],o=0;o<i.length;o++){if("monitoring.v4.serviceability.Audit"!==l)throw"Unknown list of type "+l+" in data";s=Ki.constructFromObject(i[o],void 0),a.push(s)}t.setData(a)}else{if(l=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,"monitoring.v4.error.ErrorResponse"!==l)throw"Unknown datatype "+l+" in data";t.setData(Je.constructFromObject(e.data,void 0))}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMetadata(){return this.metadata}setMetadata(e){this.metadata=e}getData(){return this.data}setData(e){this.data=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson(!1):Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson(!1):e):es(ts,this,is).call(this,this.getData(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson():Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson():e):es(ts,this,is).call(this,this.getData())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"metadata"!==t||void 0!==this.metadata&&null!==this.metadata?"data"!==t||void 0!==this.data&&null!==this.data?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("data","undefined or null"):new O("metadata","undefined or null")}}function is(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}ns.prototype.metadata=void 0,ns.prototype.data=void 0,ns.prototype.$reserved=void 0,ns.prototype.$objectType=void 0,ns.prototype.$unknownFields=void 0;var ss=new WeakSet;class rs{constructor(e){var t,n;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t=this,n=ss),n.add(t),this.userName=e,this.$objectType="monitoring.v4.serviceability.Credential",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new rs,e.hasOwnProperty("userName")&&null!==e.userName&&void 0!==e.userName&&t.setUserName(e.userName),e.hasOwnProperty("password")&&null!==e.password&&void 0!==e.password&&t.setPassword(e.password),e.hasOwnProperty("keyFilePath")&&null!==e.keyFilePath&&void 0!==e.keyFilePath&&t.setKeyFilePath(e.keyFilePath),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getUserName(){return this.userName}setUserName(e){this.userName=e}getPassword(){return this.password}setPassword(e){this.password=e}getKeyFilePath(){return this.keyFilePath}setKeyFilePath(e){this.keyFilePath=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getUserName()&&null!==this.getUserName()?{userName:this.getUserName()}:{},...void 0!==this.getPassword()&&null!==this.getPassword()?{password:this.getPassword()}:{},...void 0!==this.getKeyFilePath()&&null!==this.getKeyFilePath()?{keyFilePath:this.getKeyFilePath()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=["userName"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("userName"===t){if(void 0===this.userName||null===this.userName)return new O("userName","undefined or null");if(!F.validateMaxLength(this.userName,100))return new O("userName","does not satisfy required maxLength constraint: 100")}if("password"===t){if(void 0===this.password||null===this.password)return new O("password","undefined or null");if(!F.validateMaxLength(this.password,100))return new O("password","does not satisfy required maxLength constraint: 100")}if("keyFilePath"===t){if(void 0===this.keyFilePath||null===this.keyFilePath)return new O("keyFilePath","undefined or null");if(!F.validateMaxLength(this.keyFilePath,100))return new O("keyFilePath","does not satisfy required maxLength constraint: 100")}return"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null")}}rs.prototype.userName=void 0,rs.prototype.password=void 0,rs.prototype.keyFilePath=void 0,rs.prototype.$reserved=void 0,rs.prototype.$objectType=void 0,rs.prototype.$unknownFields=void 0;const os={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",SFTP:"SFTP",FTP:"FTP",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(os).find(t=>os[t]===e);return null==t?os.$UNKNOWN:os[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case os.$UNKNOWN:case os.$REDACTED:case os.SFTP:case os.FTP:return;default:throw new Error("Invalid : must be ServerUploadProtocol.{ $UNKNOWN|$REDACTED|SFTP|FTP }")}}};Object.freeze(os);const as=os;var ls=new WeakSet;class ds{constructor(e,t,n){var i,s;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(i=this,s=ls),s.add(i),this.protocol=e,this.serverAddress=t,this.credential=n,this.$objectType="monitoring.v4.serviceability.CustomServerUploadParams",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new ds,e.hasOwnProperty("protocol")&&null!==e.protocol&&void 0!==e.protocol&&t.setProtocol(as.constructFromObject(e.protocol)),e.hasOwnProperty("serverAddress")&&null!==e.serverAddress&&void 0!==e.serverAddress&&t.setServerAddress($i.constructFromObject(e.serverAddress)),e.hasOwnProperty("port")&&null!==e.port&&void 0!==e.port&&t.setPort(e.port),e.hasOwnProperty("credential")&&null!==e.credential&&void 0!==e.credential&&t.setCredential(rs.constructFromObject(e.credential)),e.hasOwnProperty("path")&&null!==e.path&&void 0!==e.path&&t.setPath(e.path),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getProtocol(){return this.protocol}setProtocol(e){this.protocol=e}getServerAddress(){return this.serverAddress}setServerAddress(e){this.serverAddress=e}getPort(){return this.port}setPort(e){this.port=e}getCredential(){return this.credential}setCredential(e){this.credential=e}getPath(){return this.path}setPath(e){this.path=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getProtocol()&&null!==this.getProtocol()?{protocol:this.getProtocol()}:{},...void 0!==this.getServerAddress()&&null!==this.getServerAddress()?{serverAddress:this.getServerAddress().toJson(!1)}:{},...void 0!==this.getPort()&&null!==this.getPort()?{port:this.getPort()}:{},...void 0!==this.getCredential()&&null!==this.getCredential()?{credential:this.getCredential().toJson(!1)}:{},...void 0!==this.getPath()&&null!==this.getPath()?{path:this.getPath()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=["protocol","serverAddress","credential"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("protocol"===t&&(void 0===this.protocol||null===this.protocol))return new O("protocol","undefined or null");if("serverAddress"===t&&(void 0===this.serverAddress||null===this.serverAddress))return new O("serverAddress","undefined or null");if("port"===t&&(void 0===this.port||null===this.port))return new O("port","undefined or null");if("credential"===t&&(void 0===this.credential||null===this.credential))return new O("credential","undefined or null");if("path"===t){if(void 0===this.path||null===this.path)return new O("path","undefined or null");if(!F.validateMaxLength(this.path,100))return new O("path","does not satisfy required maxLength constraint: 100")}return"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null")}}ds.prototype.protocol=void 0,ds.prototype.serverAddress=void 0,ds.prototype.port=void 0,ds.prototype.credential=void 0,ds.prototype.path=void 0,ds.prototype.$reserved=void 0,ds.prototype.$objectType=void 0,ds.prototype.$unknownFields=void 0;var us=new WeakSet;class hs{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=us),t.add(e),this.$objectType="monitoring.v4.serviceability.LocalUploadParams",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new hs,e.hasOwnProperty("path")&&null!==e.path&&void 0!==e.path&&t.setPath(e.path),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getPath(){return this.path}setPath(e){this.path=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getPath()&&null!==this.getPath()?{path:this.getPath()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("path"===t){if(void 0===this.path||null===this.path)return new O("path","undefined or null");if(!F.validateMaxLength(this.path,100))return new O("path","does not satisfy required maxLength constraint: 100")}return"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null")}}hs.prototype.path="/home/nutanix/data/logbay/bundles",hs.prototype.$reserved=void 0,hs.prototype.$objectType=void 0,hs.prototype.$unknownFields=void 0;var cs=new WeakSet;class ps{constructor(e){var t,n;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t=this,n=cs),n.add(t),this.caseNumber=e,this.$objectType="monitoring.v4.serviceability.NtnxServerUploadParams",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new ps,e.hasOwnProperty("caseNumber")&&null!==e.caseNumber&&void 0!==e.caseNumber&&t.setCaseNumber(e.caseNumber),e.hasOwnProperty("protocol")&&null!==e.protocol&&void 0!==e.protocol&&t.setProtocol(as.constructFromObject(e.protocol)),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getCaseNumber(){return this.caseNumber}setCaseNumber(e){this.caseNumber=e}getProtocol(){return this.protocol}setProtocol(e){this.protocol=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getCaseNumber()&&null!==this.getCaseNumber()?{caseNumber:this.getCaseNumber()}:{},...void 0!==this.getProtocol()&&null!==this.getProtocol()?{protocol:this.getProtocol()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=["caseNumber"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("caseNumber"===t){if(void 0===this.caseNumber||null===this.caseNumber)return new O("caseNumber","undefined or null");if(!F.validateMinimum(this.caseNumber,1e6))return new O("caseNumber","does not satisfy required minimum constraint: 1000000")}return"protocol"!==t||void 0!==this.protocol&&null!==this.protocol?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("protocol","undefined or null")}}ps.prototype.caseNumber=void 0,ps.prototype.protocol=void 0,ps.prototype.$reserved=void 0,ps.prototype.$objectType=void 0,ps.prototype.$unknownFields=void 0;var vs=new WeakSet;class ys{constructor(e,t){var n,i;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(n=this,i=vs),i.add(n),this.credential=e,this.path=t,this.$objectType="monitoring.v4.serviceability.StorageContainerUploadParams",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new ys,e.hasOwnProperty("ipAddress")&&null!==e.ipAddress&&void 0!==e.ipAddress&&t.setIpAddress(yi.constructFromObject(e.ipAddress)),e.hasOwnProperty("port")&&null!==e.port&&void 0!==e.port&&t.setPort(e.port),e.hasOwnProperty("credential")&&null!==e.credential&&void 0!==e.credential&&t.setCredential(rs.constructFromObject(e.credential)),e.hasOwnProperty("path")&&null!==e.path&&void 0!==e.path&&t.setPath(e.path),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getIpAddress(){return this.ipAddress}setIpAddress(e){this.ipAddress=e}getPort(){return this.port}setPort(e){this.port=e}getCredential(){return this.credential}setCredential(e){this.credential=e}getPath(){return this.path}setPath(e){this.path=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getIpAddress()&&null!==this.getIpAddress()?{ipAddress:this.getIpAddress().toJson(!1)}:{},...void 0!==this.getPort()&&null!==this.getPort()?{port:this.getPort()}:{},...void 0!==this.getCredential()&&null!==this.getCredential()?{credential:this.getCredential().toJson(!1)}:{},...void 0!==this.getPath()&&null!==this.getPath()?{path:this.getPath()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=["credential","path"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("ipAddress"===t&&(void 0===this.ipAddress||null===this.ipAddress))return new O("ipAddress","undefined or null");if("port"===t&&(void 0===this.port||null===this.port))return new O("port","undefined or null");if("credential"===t&&(void 0===this.credential||null===this.credential))return new O("credential","undefined or null");if("path"===t){if(void 0===this.path||null===this.path)return new O("path","undefined or null");if(!F.validateMaxLength(this.path,100))return new O("path","does not satisfy required maxLength constraint: 100")}return"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null")}}function gs(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")}ys.prototype.ipAddress=void 0,ys.prototype.port=2222,ys.prototype.credential=void 0,ys.prototype.path=void 0,ys.prototype.$reserved=void 0,ys.prototype.$objectType=void 0,ys.prototype.$unknownFields=void 0;var ms=new WeakSet;class fs{constructor(e){var t,n;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t=this,n=ms),n.add(t),this.uploadParams=e,this.$objectType="monitoring.v4.serviceability.ArchiveOpts",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i;if(e){if(t=t||new fs,e.hasOwnProperty("archiveName")&&null!==e.archiveName&&void 0!==e.archiveName&&t.setArchiveName(e.archiveName),e.hasOwnProperty("uploadParams")&&null!==e.uploadParams&&void 0!==e.uploadParams)switch(i=e.uploadParams.hasOwnProperty("$objectType")?e.uploadParams.$objectType:typeof e.uploadParams,i){case"monitoring.v4.serviceability.LocalUploadParams":t.setUploadParams(hs.constructFromObject(e.uploadParams,void 0));break;case"monitoring.v4.serviceability.NtnxServerUploadParams":t.setUploadParams(ps.constructFromObject(e.uploadParams,void 0));break;case"monitoring.v4.serviceability.CustomServerUploadParams":t.setUploadParams(ds.constructFromObject(e.uploadParams,void 0));break;case"monitoring.v4.serviceability.StorageContainerUploadParams":t.setUploadParams(ys.constructFromObject(e.uploadParams,void 0));break;default:throw"Unknown datatype "+i+" in data"}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getArchiveName(){return this.archiveName}setArchiveName(e){this.archiveName=e}getUploadParams(){return this.uploadParams}setUploadParams(e){this.uploadParams=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getArchiveName()&&null!==this.getArchiveName()?{archiveName:this.getArchiveName()}:{},...void 0!==this.getUploadParams()&&null!==this.getUploadParams()?{uploadParams:void 0!==this.getUploadParams().toJson?this.getUploadParams().toJson(!1):Array.isArray(this.getUploadParams())?this.getUploadParams().map(e=>void 0!==e.toJson?e.toJson(!1):e):gs(ms,this,$s).call(this,this.getUploadParams(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getArchiveName()&&null!==this.getArchiveName()?{archiveName:this.getArchiveName()}:{},...void 0!==this.getUploadParams()&&null!==this.getUploadParams()?{uploadParams:void 0!==this.getUploadParams().toJson?this.getUploadParams().toJson():Array.isArray(this.getUploadParams())?this.getUploadParams().map(e=>void 0!==e.toJson?e.toJson():e):gs(ms,this,$s).call(this,this.getUploadParams())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=["uploadParams"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("archiveName"===t){if(void 0===this.archiveName||null===this.archiveName)return new O("archiveName","undefined or null");if(!F.validateMaxLength(this.archiveName,100))return new O("archiveName","does not satisfy required maxLength constraint: 100")}return"uploadParams"!==t||void 0!==this.uploadParams&&null!==this.uploadParams?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("uploadParams","undefined or null")}}function $s(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}fs.prototype.archiveName="NTNX-Log",fs.prototype.uploadParams=void 0,fs.prototype.$reserved=void 0,fs.prototype.$objectType=void 0,fs.prototype.$unknownFields=void 0;var ws=new WeakSet;class Ts{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=ws),t.add(e),this.$objectType="monitoring.v4.serviceability.MspOpts",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,r;if(e){if(t=t||new Ts,e.hasOwnProperty("clusterExtIds")&&null!==e.clusterExtIds&&void 0!==e.clusterExtIds){for(r=[],i=e.clusterExtIds,s=0;s<i.length;s++)r.push(i[s]);t.setClusterExtIds(r)}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getClusterExtIds(){return this.clusterExtIds}setClusterExtIds(e){this.clusterExtIds=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getClusterExtIds()&&null!==this.getClusterExtIds()?{clusterExtIds:this.getClusterExtIds()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("clusterExtIds"===t){if(void 0===this.clusterExtIds||null===this.clusterExtIds)return new O("clusterExtIds","undefined or null");if(!F.validateMaxItems(this.clusterExtIds,3))return new O("clusterExtIds","does not satisfy required maxItems constraint: 3");if(!F.validateMinItems(this.clusterExtIds,1))return new O("clusterExtIds","does not satisfy required minItems constraint: 1")}return"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null")}}Ts.prototype.clusterExtIds=void 0,Ts.prototype.$reserved=void 0,Ts.prototype.$objectType=void 0,Ts.prototype.$unknownFields=void 0;var bs=new WeakSet;class ks{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=bs),t.add(e),this.$objectType="monitoring.v4.serviceability.TagOpts",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new ks,e.hasOwnProperty("mspOpts")&&null!==e.mspOpts&&void 0!==e.mspOpts&&t.setMspOpts(Ts.constructFromObject(e.mspOpts)),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMspOpts(){return this.mspOpts}setMspOpts(e){this.mspOpts=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getMspOpts()&&null!==this.getMspOpts()?{mspOpts:this.getMspOpts().toJson(!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"mspOpts"!==t||void 0!==this.mspOpts&&null!==this.mspOpts?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("mspOpts","undefined or null")}}function Fs(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")}ks.prototype.mspOpts=void 0,ks.prototype.$reserved=void 0,ks.prototype.$objectType=void 0,ks.prototype.$unknownFields=void 0;var Os=new WeakSet;class js{constructor(e,t,n){var i,s;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(i=this,s=Os),s.add(i),this.startTime=e,this.endTime=t,this.archiveOpts=n,this.$objectType="monitoring.v4.serviceability.LogCollectionSpec",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,r,o;if(e){if(t=t||new js,e.hasOwnProperty("startTime")&&null!==e.startTime&&void 0!==e.startTime&&t.setStartTime(e.startTime),e.hasOwnProperty("endTime")&&null!==e.endTime&&void 0!==e.endTime&&t.setEndTime(e.endTime),e.hasOwnProperty("includeTags")&&null!==e.includeTags&&void 0!==e.includeTags){for(o=[],i=e.includeTags,r=0;r<i.length;r++)o.push(i[r]);t.setIncludeTags(o)}if(e.hasOwnProperty("shouldAnonymize")&&null!==e.shouldAnonymize&&void 0!==e.shouldAnonymize&&t.setShouldAnonymize(e.shouldAnonymize),e.hasOwnProperty("nodeIpList")&&null!==e.nodeIpList&&void 0!==e.nodeIpList){for(o=[],i=e.nodeIpList,r=0;r<i.length;r++)s=yi.constructFromObject(i[r],void 0),o.push(s);t.setNodeIpList(o)}if(e.hasOwnProperty("shouldCollectFromDisabledNode")&&null!==e.shouldCollectFromDisabledNode&&void 0!==e.shouldCollectFromDisabledNode&&t.setShouldCollectFromDisabledNode(e.shouldCollectFromDisabledNode),e.hasOwnProperty("excludeTags")&&null!==e.excludeTags&&void 0!==e.excludeTags){for(o=[],i=e.excludeTags,r=0;r<i.length;r++)o.push(i[r]);t.setExcludeTags(o)}if(e.hasOwnProperty("archiveOpts")&&null!==e.archiveOpts&&void 0!==e.archiveOpts&&t.setArchiveOpts(fs.constructFromObject(e.archiveOpts)),e.hasOwnProperty("description")&&null!==e.description&&void 0!==e.description&&t.setDescription(e.description),e.hasOwnProperty("tagOpts")&&null!==e.tagOpts&&void 0!==e.tagOpts&&t.setTagOpts(ks.constructFromObject(e.tagOpts)),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getStartTime(){return this.startTime}setStartTime(e){this.startTime=e}getEndTime(){return this.endTime}setEndTime(e){this.endTime=e}getIncludeTags(){return this.includeTags}setIncludeTags(e){this.includeTags=e}getShouldAnonymize(){return this.shouldAnonymize}setShouldAnonymize(e){this.shouldAnonymize=e}getNodeIpList(){return this.nodeIpList}setNodeIpList(e){this.nodeIpList=e}getShouldCollectFromDisabledNode(){return this.shouldCollectFromDisabledNode}setShouldCollectFromDisabledNode(e){this.shouldCollectFromDisabledNode=e}getExcludeTags(){return this.excludeTags}setExcludeTags(e){this.excludeTags=e}getArchiveOpts(){return this.archiveOpts}setArchiveOpts(e){this.archiveOpts=e}getDescription(){return this.description}setDescription(e){this.description=e}getTagOpts(){return this.tagOpts}setTagOpts(e){this.tagOpts=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getStartTime()&&null!==this.getStartTime()?{startTime:Fs(Os,this,Es).call(this,this.getStartTime(),!1)}:{},...void 0!==this.getEndTime()&&null!==this.getEndTime()?{endTime:Fs(Os,this,Es).call(this,this.getEndTime(),!1)}:{},...void 0!==this.getIncludeTags()&&null!==this.getIncludeTags()?{includeTags:this.getIncludeTags()}:{},...void 0!==this.getShouldAnonymize()&&null!==this.getShouldAnonymize()?{shouldAnonymize:this.getShouldAnonymize()}:{},...void 0!==this.getNodeIpList()&&null!==this.getNodeIpList()?{nodeIpList:this.getNodeIpList().map(e=>e.toJson(!1))}:{},...void 0!==this.getShouldCollectFromDisabledNode()&&null!==this.getShouldCollectFromDisabledNode()?{shouldCollectFromDisabledNode:this.getShouldCollectFromDisabledNode()}:{},...void 0!==this.getExcludeTags()&&null!==this.getExcludeTags()?{excludeTags:this.getExcludeTags()}:{},...void 0!==this.getArchiveOpts()&&null!==this.getArchiveOpts()?{archiveOpts:this.getArchiveOpts().toJson(!1)}:{},...void 0!==this.getDescription()&&null!==this.getDescription()?{description:this.getDescription()}:{},...void 0!==this.getTagOpts()&&null!==this.getTagOpts()?{tagOpts:this.getTagOpts().toJson(!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=["startTime","endTime","archiveOpts"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("startTime"===t&&(void 0===this.startTime||null===this.startTime))return new O("startTime","undefined or null");if("endTime"===t&&(void 0===this.endTime||null===this.endTime))return new O("endTime","undefined or null");if("includeTags"===t){if(void 0===this.includeTags||null===this.includeTags)return new O("includeTags","undefined or null");if(!F.validateMaxItems(this.includeTags,300))return new O("includeTags","does not satisfy required maxItems constraint: 300")}if("shouldAnonymize"===t&&(void 0===this.shouldAnonymize||null===this.shouldAnonymize))return new O("shouldAnonymize","undefined or null");if("nodeIpList"===t){if(void 0===this.nodeIpList||null===this.nodeIpList)return new O("nodeIpList","undefined or null");if(!F.validateMaxItems(this.nodeIpList,48))return new O("nodeIpList","does not satisfy required maxItems constraint: 48")}if("shouldCollectFromDisabledNode"===t&&(void 0===this.shouldCollectFromDisabledNode||null===this.shouldCollectFromDisabledNode))return new O("shouldCollectFromDisabledNode","undefined or null");if("excludeTags"===t){if(void 0===this.excludeTags||null===this.excludeTags)return new O("excludeTags","undefined or null");if(!F.validateMaxItems(this.excludeTags,50))return new O("excludeTags","does not satisfy required maxItems constraint: 50")}return"archiveOpts"!==t||void 0!==this.archiveOpts&&null!==this.archiveOpts?"description"!==t||void 0!==this.description&&null!==this.description?"tagOpts"!==t||void 0!==this.tagOpts&&null!==this.tagOpts?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("tagOpts","undefined or null"):new O("description","undefined or null"):new O("archiveOpts","undefined or null")}}function Es(e,t){return e instanceof Date&&void 0!==t?t?e.toISOString().slice(0,10):e.toISOString():e}js.prototype.startTime=void 0,js.prototype.endTime=void 0,js.prototype.includeTags=void 0,js.prototype.shouldAnonymize=!1,js.prototype.nodeIpList=void 0,js.prototype.shouldCollectFromDisabledNode=!1,js.prototype.excludeTags=void 0,js.prototype.archiveOpts=void 0,js.prototype.description="Log collection via V4 API",js.prototype.tagOpts=void 0,js.prototype.$reserved=void 0,js.prototype.$objectType=void 0,js.prototype.$unknownFields=void 0;var Ps=new WeakSet;class As extends ze{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=Ps),t.add(e),this.$objectType="monitoring.v4.serviceability.Tag",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new As,ze.constructFromObject(e,t,!0),e.hasOwnProperty("description")&&null!==e.description&&void 0!==e.description&&t.setDescription(e.description),e.hasOwnProperty("name")&&null!==e.name&&void 0!==e.name&&t.setName(e.name),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getDescription(){return this.description}setDescription(e){this.description=e}getName(){return this.name}setName(e){this.name=e}toJson(e){return!1===e?{...void 0!==this.getDescription()&&null!==this.getDescription()?{description:this.getDescription()}:{},...void 0!==this.getName()&&null!==this.getName()?{name:this.getName()}:{},...void 0!==this.getExtId()&&null!==this.getExtId()?{extId:this.getExtId()}:{},...void 0!==this.getLinks()&&null!==this.getLinks()?{links:this.getLinks().map(e=>e.toJson(!1))}:{},...void 0!==this.getTenantId()&&null!==this.getTenantId()?{tenantId:this.getTenantId()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getDescription()&&null!==this.getDescription()?{description:this.getDescription()}:{},...void 0!==this.getName()&&null!==this.getName()?{name:this.getName()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("description"===t){if(void 0===this.description||null===this.description)return new O("description","undefined or null");if(!F.validateMaxLength(this.description,100))return new O("description","does not satisfy required maxLength constraint: 100")}if("name"===t){if(void 0===this.name||null===this.name)return new O("name","undefined or null");if(!F.validateMaxLength(this.name,100))return new O("name","does not satisfy required maxLength constraint: 100")}return new O(t,"no such property exists")}}function Cs(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")}As.prototype.description=void 0,As.prototype.name=void 0,ze.prototype.extId=void 0,ze.prototype.links=void 0,Be.prototype.tenantId=void 0;var Is=new WeakSet;class Us extends r{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=Is),t.add(e),this.$objectType="monitoring.v4.serviceability.ListTagsApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,o,a,l;if(e){if(t=t||new Us,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(B.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)if(Array.isArray(e.data))if(0===e.data.length)t.setData([]);else{for(a=[],i=e.data,l=i[0].hasOwnProperty("$objectType")?i[0].$objectType:typeof i[0],o=0;o<i.length;o++){if("monitoring.v4.serviceability.Tag"!==l)throw"Unknown list of type "+l+" in data";s=As.constructFromObject(i[o],void 0),a.push(s)}t.setData(a)}else{if(l=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,"monitoring.v4.error.ErrorResponse"!==l)throw"Unknown datatype "+l+" in data";t.setData(Je.constructFromObject(e.data,void 0))}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMetadata(){return this.metadata}setMetadata(e){this.metadata=e}getData(){return this.data}setData(e){this.data=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson(!1):Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson(!1):e):Cs(Is,this,Ds).call(this,this.getData(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson():Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson():e):Cs(Is,this,Ds).call(this,this.getData())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"metadata"!==t||void 0!==this.metadata&&null!==this.metadata?"data"!==t||void 0!==this.data&&null!==this.data?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("data","undefined or null"):new O("metadata","undefined or null")}}function Ds(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}function Ss(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")}Us.prototype.metadata=void 0,Us.prototype.data=void 0,Us.prototype.$reserved=void 0,Us.prototype.$objectType=void 0,Us.prototype.$unknownFields=void 0;var Rs=new WeakSet;class Ns extends r{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=Rs),t.add(e),this.$objectType="monitoring.v4.serviceability.CollectLogsApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i;if(e){if(t=t||new Ns,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(B.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(i=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,i){case"prism.v4.config.TaskReference":t.setData(Wn.constructFromObject(e.data,void 0));break;case"monitoring.v4.error.ErrorResponse":t.setData(Je.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+i+" in data"}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMetadata(){return this.metadata}setMetadata(e){this.metadata=e}getData(){return this.data}setData(e){this.data=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson(!1):Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson(!1):e):Ss(Rs,this,xs).call(this,this.getData(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson():Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson():e):Ss(Rs,this,xs).call(this,this.getData())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"metadata"!==t||void 0!==this.metadata&&null!==this.metadata?"data"!==t||void 0!==this.data&&null!==this.data?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("data","undefined or null"):new O("metadata","undefined or null")}}function xs(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}Ns.prototype.metadata=void 0,Ns.prototype.data=void 0,Ns.prototype.$reserved=void 0,Ns.prototype.$objectType=void 0,Ns.prototype.$unknownFields=void 0;var Ms=new WeakSet;class Vs{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=Ms),t.add(e),this.$objectType="monitoring.v4.serviceability.EventEntityReference",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new Vs,e.hasOwnProperty("type")&&null!==e.type&&void 0!==e.type&&t.setType(e.type),e.hasOwnProperty("name")&&null!==e.name&&void 0!==e.name&&t.setName(e.name),e.hasOwnProperty("extId")&&null!==e.extId&&void 0!==e.extId&&t.setExtId(e.extId),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getType(){return this.type}setType(e){this.type=e}getName(){return this.name}setName(e){this.name=e}getExtId(){return this.extId}setExtId(e){this.extId=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getType()&&null!==this.getType()?{type:this.getType()}:{},...void 0!==this.getName()&&null!==this.getName()?{name:this.getName()}:{},...void 0!==this.getExtId()&&null!==this.getExtId()?{extId:this.getExtId()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("type"===t&&(void 0===this.type||null===this.type))return new O("type","undefined or null");if("name"===t){if(void 0===this.name||null===this.name)return new O("name","undefined or null");if(!F.validateMaxLength(this.name,1e3))return new O("name","does not satisfy required maxLength constraint: 1000")}if("extId"===t){if(void 0===this.extId||null===this.extId)return new O("extId","undefined or null");if(!F.validatePattern(this.extId,/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/))return new O("extId","does not satisfy required pattern: /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/")}return"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null")}}function Ls(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")}Vs.prototype.type=void 0,Vs.prototype.name=void 0,Vs.prototype.extId=void 0,Vs.prototype.$reserved=void 0,Vs.prototype.$objectType=void 0,Vs.prototype.$unknownFields=void 0;var Js=new WeakSet;class _s extends ze{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=Js),t.add(e),this.$objectType="monitoring.v4.serviceability.Event",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,r,o;if(e){if(t=t||new _s,ze.constructFromObject(e,t,!0),e.hasOwnProperty("sourceEntity")&&null!==e.sourceEntity&&void 0!==e.sourceEntity&&t.setSourceEntity(Vs.constructFromObject(e.sourceEntity)),e.hasOwnProperty("affectedEntities")&&null!==e.affectedEntities&&void 0!==e.affectedEntities){for(o=[],i=e.affectedEntities,r=0;r<i.length;r++)s=Ye.constructFromObject(i[r],void 0),o.push(s);t.setAffectedEntities(o)}if(e.hasOwnProperty("metricDetails")&&null!==e.metricDetails&&void 0!==e.metricDetails){for(o=[],i=e.metricDetails,r=0;r<i.length;r++)s=yt.constructFromObject(i[r],void 0),o.push(s);t.setMetricDetails(o)}if(e.hasOwnProperty("eventType")&&null!==e.eventType&&void 0!==e.eventType&&t.setEventType(e.eventType),e.hasOwnProperty("classifications")&&null!==e.classifications&&void 0!==e.classifications){for(o=[],i=e.classifications,r=0;r<i.length;r++)o.push(i[r]);t.setClassifications(o)}if(e.hasOwnProperty("sourceClusterUUID")&&null!==e.sourceClusterUUID&&void 0!==e.sourceClusterUUID&&t.setSourceClusterUUID(e.sourceClusterUUID),e.hasOwnProperty("creationTime")&&null!==e.creationTime&&void 0!==e.creationTime&&t.setCreationTime(e.creationTime),e.hasOwnProperty("message")&&null!==e.message&&void 0!==e.message&&t.setMessage(e.message),e.hasOwnProperty("clusterUUID")&&null!==e.clusterUUID&&void 0!==e.clusterUUID&&t.setClusterUUID(e.clusterUUID),e.hasOwnProperty("parameters")&&null!==e.parameters&&void 0!==e.parameters){for(o=[],i=e.parameters,r=0;r<i.length;r++)s=wt.constructFromObject(i[r],void 0),o.push(s);t.setParameters(o)}if(e.hasOwnProperty("serviceName")&&null!==e.serviceName&&void 0!==e.serviceName&&t.setServiceName(e.serviceName),e.hasOwnProperty("operationType")&&null!==e.operationType&&void 0!==e.operationType&&t.setOperationType(Vi.constructFromObject(e.operationType)),e.hasOwnProperty("clusterName")&&null!==e.clusterName&&void 0!==e.clusterName&&t.setClusterName(e.clusterName),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getSourceEntity(){return this.sourceEntity}setSourceEntity(e){this.sourceEntity=e}getAffectedEntities(){return this.affectedEntities}setAffectedEntities(e){this.affectedEntities=e}getMetricDetails(){return this.metricDetails}setMetricDetails(e){this.metricDetails=e}getEventType(){return this.eventType}setEventType(e){this.eventType=e}getClassifications(){return this.classifications}setClassifications(e){this.classifications=e}getSourceClusterUUID(){return this.sourceClusterUUID}setSourceClusterUUID(e){this.sourceClusterUUID=e}getCreationTime(){return this.creationTime}setCreationTime(e){this.creationTime=e}getMessage(){return this.message}setMessage(e){this.message=e}getClusterUUID(){return this.clusterUUID}setClusterUUID(e){this.clusterUUID=e}getParameters(){return this.parameters}setParameters(e){this.parameters=e}getServiceName(){return this.serviceName}setServiceName(e){this.serviceName=e}getOperationType(){return this.operationType}setOperationType(e){this.operationType=e}getClusterName(){return this.clusterName}setClusterName(e){this.clusterName=e}toJson(e){return!1===e?{...void 0!==this.getSourceEntity()&&null!==this.getSourceEntity()?{sourceEntity:this.getSourceEntity().toJson(!1)}:{},...void 0!==this.getAffectedEntities()&&null!==this.getAffectedEntities()?{affectedEntities:this.getAffectedEntities().map(e=>e.toJson(!1))}:{},...void 0!==this.getMetricDetails()&&null!==this.getMetricDetails()?{metricDetails:this.getMetricDetails().map(e=>e.toJson(!1))}:{},...void 0!==this.getEventType()&&null!==this.getEventType()?{eventType:this.getEventType()}:{},...void 0!==this.getClassifications()&&null!==this.getClassifications()?{classifications:this.getClassifications()}:{},...void 0!==this.getSourceClusterUUID()&&null!==this.getSourceClusterUUID()?{sourceClusterUUID:this.getSourceClusterUUID()}:{},...void 0!==this.getCreationTime()&&null!==this.getCreationTime()?{creationTime:Ls(Js,this,Ws).call(this,this.getCreationTime(),!1)}:{},...void 0!==this.getMessage()&&null!==this.getMessage()?{message:this.getMessage()}:{},...void 0!==this.getClusterUUID()&&null!==this.getClusterUUID()?{clusterUUID:this.getClusterUUID()}:{},...void 0!==this.getParameters()&&null!==this.getParameters()?{parameters:this.getParameters().map(e=>e.toJson(!1))}:{},...void 0!==this.getServiceName()&&null!==this.getServiceName()?{serviceName:this.getServiceName()}:{},...void 0!==this.getOperationType()&&null!==this.getOperationType()?{operationType:this.getOperationType()}:{},...void 0!==this.getClusterName()&&null!==this.getClusterName()?{clusterName:this.getClusterName()}:{},...void 0!==this.getExtId()&&null!==this.getExtId()?{extId:this.getExtId()}:{},...void 0!==this.getLinks()&&null!==this.getLinks()?{links:this.getLinks().map(e=>e.toJson(!1))}:{},...void 0!==this.getTenantId()&&null!==this.getTenantId()?{tenantId:this.getTenantId()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getSourceEntity()&&null!==this.getSourceEntity()?{sourceEntity:this.getSourceEntity().toJson(!1)}:{},...void 0!==this.getAffectedEntities()&&null!==this.getAffectedEntities()?{affectedEntities:this.getAffectedEntities().map(e=>e.toJson(!1))}:{},...void 0!==this.getMetricDetails()&&null!==this.getMetricDetails()?{metricDetails:this.getMetricDetails().map(e=>e.toJson(!1))}:{},...void 0!==this.getEventType()&&null!==this.getEventType()?{eventType:this.getEventType()}:{},...void 0!==this.getClassifications()&&null!==this.getClassifications()?{classifications:this.getClassifications()}:{},...void 0!==this.getSourceClusterUUID()&&null!==this.getSourceClusterUUID()?{sourceClusterUUID:this.getSourceClusterUUID()}:{},...void 0!==this.getCreationTime()&&null!==this.getCreationTime()?{creationTime:Ls(Js,this,Ws).call(this,this.getCreationTime(),!1)}:{},...void 0!==this.getMessage()&&null!==this.getMessage()?{message:this.getMessage()}:{},...void 0!==this.getClusterUUID()&&null!==this.getClusterUUID()?{clusterUUID:this.getClusterUUID()}:{},...void 0!==this.getParameters()&&null!==this.getParameters()?{parameters:this.getParameters().map(e=>e.toJson(!1))}:{},...void 0!==this.getServiceName()&&null!==this.getServiceName()?{serviceName:this.getServiceName()}:{},...void 0!==this.getOperationType()&&null!==this.getOperationType()?{operationType:this.getOperationType()}:{},...void 0!==this.getClusterName()&&null!==this.getClusterName()?{clusterName:this.getClusterName()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("sourceEntity"===t&&(void 0===this.sourceEntity||null===this.sourceEntity))return new O("sourceEntity","undefined or null");if("affectedEntities"===t){if(void 0===this.affectedEntities||null===this.affectedEntities)return new O("affectedEntities","undefined or null");if(!F.validateMaxItems(this.affectedEntities,50))return new O("affectedEntities","does not satisfy required maxItems constraint: 50")}if("metricDetails"===t){if(void 0===this.metricDetails||null===this.metricDetails)return new O("metricDetails","undefined or null");if(!F.validateMaxItems(this.metricDetails,100))return new O("metricDetails","does not satisfy required maxItems constraint: 100")}if("eventType"===t&&(void 0===this.eventType||null===this.eventType))return new O("eventType","undefined or null");if("classifications"===t){if(void 0===this.classifications||null===this.classifications)return new O("classifications","undefined or null");if(!F.validateMaxItems(this.classifications,15))return new O("classifications","does not satisfy required maxItems constraint: 15")}if("sourceClusterUUID"===t){if(void 0===this.sourceClusterUUID||null===this.sourceClusterUUID)return new O("sourceClusterUUID","undefined or null");if(!F.validatePattern(this.sourceClusterUUID,/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/))return new O("sourceClusterUUID","does not satisfy required pattern: /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/")}if("creationTime"===t&&(void 0===this.creationTime||null===this.creationTime))return new O("creationTime","undefined or null");if("message"===t){if(void 0===this.message||null===this.message)return new O("message","undefined or null");if(!F.validateMaxLength(this.message,1024))return new O("message","does not satisfy required maxLength constraint: 1024")}if("clusterUUID"===t){if(void 0===this.clusterUUID||null===this.clusterUUID)return new O("clusterUUID","undefined or null");if(!F.validatePattern(this.clusterUUID,/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/))return new O("clusterUUID","does not satisfy required pattern: /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/")}if("parameters"===t){if(void 0===this.parameters||null===this.parameters)return new O("parameters","undefined or null");if(!F.validateMaxItems(this.parameters,100))return new O("parameters","does not satisfy required maxItems constraint: 100")}if("serviceName"===t){if(void 0===this.serviceName||null===this.serviceName)return new O("serviceName","undefined or null");if(!F.validateMaxLength(this.serviceName,50))return new O("serviceName","does not satisfy required maxLength constraint: 50")}if("operationType"===t&&(void 0===this.operationType||null===this.operationType))return new O("operationType","undefined or null");if("clusterName"===t){if(void 0===this.clusterName||null===this.clusterName)return new O("clusterName","undefined or null");if(!F.validateMaxLength(this.clusterName,1e3))return new O("clusterName","does not satisfy required maxLength constraint: 1000")}return new O(t,"no such property exists")}}function Ws(e,t){return e instanceof Date&&void 0!==t?t?e.toISOString().slice(0,10):e.toISOString():e}function Bs(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")}_s.prototype.sourceEntity=void 0,_s.prototype.affectedEntities=void 0,_s.prototype.metricDetails=void 0,_s.prototype.eventType=void 0,_s.prototype.classifications=void 0,_s.prototype.sourceClusterUUID=void 0,_s.prototype.creationTime=void 0,_s.prototype.message=void 0,_s.prototype.clusterUUID=void 0,_s.prototype.parameters=void 0,_s.prototype.serviceName=void 0,_s.prototype.operationType=void 0,_s.prototype.clusterName=void 0,ze.prototype.extId=void 0,ze.prototype.links=void 0,Be.prototype.tenantId=void 0;var Gs=new WeakSet;class zs extends r{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=Gs),t.add(e),this.$objectType="monitoring.v4.serviceability.ListEventsApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,o,a,l;if(e){if(t=t||new zs,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(B.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)if(Array.isArray(e.data))if(0===e.data.length)t.setData([]);else{for(a=[],i=e.data,l=i[0].hasOwnProperty("$objectType")?i[0].$objectType:typeof i[0],o=0;o<i.length;o++){if("monitoring.v4.serviceability.Event"!==l)throw"Unknown list of type "+l+" in data";s=_s.constructFromObject(i[o],void 0),a.push(s)}t.setData(a)}else{if(l=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,"monitoring.v4.error.ErrorResponse"!==l)throw"Unknown datatype "+l+" in data";t.setData(Je.constructFromObject(e.data,void 0))}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMetadata(){return this.metadata}setMetadata(e){this.metadata=e}getData(){return this.data}setData(e){this.data=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson(!1):Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson(!1):e):Bs(Gs,this,qs).call(this,this.getData(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson():Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson():e):Bs(Gs,this,qs).call(this,this.getData())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"metadata"!==t||void 0!==this.metadata&&null!==this.metadata?"data"!==t||void 0!==this.data&&null!==this.data?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("data","undefined or null"):new O("metadata","undefined or null")}}function qs(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}function Ks(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")}zs.prototype.metadata=void 0,zs.prototype.data=void 0,zs.prototype.$reserved=void 0,zs.prototype.$objectType=void 0,zs.prototype.$unknownFields=void 0;var Hs=new WeakSet;class Ys extends r{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=Hs),t.add(e),this.$objectType="monitoring.v4.serviceability.GetEventApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i;if(e){if(t=t||new Ys,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(B.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(i=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,i){case"monitoring.v4.serviceability.Event":t.setData(_s.constructFromObject(e.data,void 0));break;case"monitoring.v4.error.ErrorResponse":t.setData(Je.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+i+" in data"}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMetadata(){return this.metadata}setMetadata(e){this.metadata=e}getData(){return this.data}setData(e){this.data=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson(!1):Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson(!1):e):Ks(Hs,this,Xs).call(this,this.getData(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson():Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson():e):Ks(Hs,this,Xs).call(this,this.getData())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"metadata"!==t||void 0!==this.metadata&&null!==this.metadata?"data"!==t||void 0!==this.data&&null!==this.data?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("data","undefined or null"):new O("metadata","undefined or null")}}function Xs(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}function Qs(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")}Ys.prototype.metadata=void 0,Ys.prototype.data=void 0,Ys.prototype.$reserved=void 0,Ys.prototype.$objectType=void 0,Ys.prototype.$unknownFields=void 0;var Zs=new WeakSet;class er extends r{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=Zs),t.add(e),this.$objectType="monitoring.v4.serviceability.ManageAlertApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i;if(e){if(t=t||new er,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(B.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(i=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,i){case"prism.v4.config.TaskReference":t.setData(Wn.constructFromObject(e.data,void 0));break;case"monitoring.v4.error.ErrorResponse":t.setData(Je.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+i+" in data"}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMetadata(){return this.metadata}setMetadata(e){this.metadata=e}getData(){return this.data}setData(e){this.data=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson(!1):Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson(!1):e):Qs(Zs,this,tr).call(this,this.getData(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson():Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson():e):Qs(Zs,this,tr).call(this,this.getData())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"metadata"!==t||void 0!==this.metadata&&null!==this.metadata?"data"!==t||void 0!==this.data&&null!==this.data?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("data","undefined or null"):new O("metadata","undefined or null")}}function tr(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}er.prototype.metadata=void 0,er.prototype.data=void 0,er.prototype.$reserved=void 0,er.prototype.$objectType=void 0,er.prototype.$unknownFields=void 0;const nr={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",RESOLVE:"RESOLVE",ACKNOWLEDGE:"ACKNOWLEDGE",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(nr).find(t=>nr[t]===e);return null==t?nr.$UNKNOWN:nr[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case nr.$UNKNOWN:case nr.$REDACTED:case nr.RESOLVE:case nr.ACKNOWLEDGE:return;default:throw new Error("Invalid : must be ActionType.{ $UNKNOWN|$REDACTED|RESOLVE|ACKNOWLEDGE }")}}};Object.freeze(nr);const ir=nr;var sr=new WeakSet;class rr{constructor(e){var t,n;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t=this,n=sr),n.add(t),this.actionType=e,this.$objectType="monitoring.v4.serviceability.AlertActionSpec",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new rr,e.hasOwnProperty("actionType")&&null!==e.actionType&&void 0!==e.actionType&&t.setActionType(ir.constructFromObject(e.actionType)),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getActionType(){return this.actionType}setActionType(e){this.actionType=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getActionType()&&null!==this.getActionType()?{actionType:this.getActionType()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=["actionType"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"actionType"!==t||void 0!==this.actionType&&null!==this.actionType?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("actionType","undefined or null")}}function or(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")}rr.prototype.actionType=void 0,rr.prototype.$reserved=void 0,rr.prototype.$objectType=void 0,rr.prototype.$unknownFields=void 0;var ar=new WeakSet;class lr extends r{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=ar),t.add(e),this.$objectType="monitoring.v4.serviceability.RunSystemDefinedChecksApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i;if(e){if(t=t||new lr,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(B.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(i=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,i){case"prism.v4.config.TaskReference":t.setData(Wn.constructFromObject(e.data,void 0));break;case"monitoring.v4.error.ErrorResponse":t.setData(Je.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+i+" in data"}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMetadata(){return this.metadata}setMetadata(e){this.metadata=e}getData(){return this.data}setData(e){this.data=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson(!1):Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson(!1):e):or(ar,this,dr).call(this,this.getData(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson():Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson():e):or(ar,this,dr).call(this,this.getData())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"metadata"!==t||void 0!==this.metadata&&null!==this.metadata?"data"!==t||void 0!==this.data&&null!==this.data?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("data","undefined or null"):new O("metadata","undefined or null")}}function dr(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}lr.prototype.metadata=void 0,lr.prototype.data=void 0,lr.prototype.$reserved=void 0,lr.prototype.$objectType=void 0,lr.prototype.$unknownFields=void 0;var ur=new WeakSet;class hr{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=ur),t.add(e),this.$objectType="monitoring.v4.serviceability.RunSystemDefinedChecksSpec",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,r,o;if(e){if(t=t||new hr,e.hasOwnProperty("sdaExtIds")&&null!==e.sdaExtIds&&void 0!==e.sdaExtIds){for(o=[],i=e.sdaExtIds,r=0;r<i.length;r++)o.push(i[r]);t.setSdaExtIds(o)}if(e.hasOwnProperty("shouldAnonymize")&&null!==e.shouldAnonymize&&void 0!==e.shouldAnonymize&&t.setShouldAnonymize(e.shouldAnonymize),e.hasOwnProperty("shouldSendReportToConfiguredRecipients")&&null!==e.shouldSendReportToConfiguredRecipients&&void 0!==e.shouldSendReportToConfiguredRecipients&&t.setShouldSendReportToConfiguredRecipients(e.shouldSendReportToConfiguredRecipients),e.hasOwnProperty("additionalRecipients")&&null!==e.additionalRecipients&&void 0!==e.additionalRecipients){for(o=[],i=e.additionalRecipients,r=0;r<i.length;r++)o.push(i[r]);t.setAdditionalRecipients(o)}if(e.hasOwnProperty("nodeIps")&&null!==e.nodeIps&&void 0!==e.nodeIps){for(o=[],i=e.nodeIps,r=0;r<i.length;r++)s=yi.constructFromObject(i[r],void 0),o.push(s);t.setNodeIps(o)}if(e.hasOwnProperty("shouldRunAllChecks")&&null!==e.shouldRunAllChecks&&void 0!==e.shouldRunAllChecks&&t.setShouldRunAllChecks(e.shouldRunAllChecks),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getSdaExtIds(){return this.sdaExtIds}setSdaExtIds(e){this.sdaExtIds=e}getShouldAnonymize(){return this.shouldAnonymize}setShouldAnonymize(e){this.shouldAnonymize=e}getShouldSendReportToConfiguredRecipients(){return this.shouldSendReportToConfiguredRecipients}setShouldSendReportToConfiguredRecipients(e){this.shouldSendReportToConfiguredRecipients=e}getAdditionalRecipients(){return this.additionalRecipients}setAdditionalRecipients(e){this.additionalRecipients=e}getNodeIps(){return this.nodeIps}setNodeIps(e){this.nodeIps=e}getShouldRunAllChecks(){return this.shouldRunAllChecks}setShouldRunAllChecks(e){this.shouldRunAllChecks=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getSdaExtIds()&&null!==this.getSdaExtIds()?{sdaExtIds:this.getSdaExtIds()}:{},...void 0!==this.getShouldAnonymize()&&null!==this.getShouldAnonymize()?{shouldAnonymize:this.getShouldAnonymize()}:{},...void 0!==this.getShouldSendReportToConfiguredRecipients()&&null!==this.getShouldSendReportToConfiguredRecipients()?{shouldSendReportToConfiguredRecipients:this.getShouldSendReportToConfiguredRecipients()}:{},...void 0!==this.getAdditionalRecipients()&&null!==this.getAdditionalRecipients()?{additionalRecipients:this.getAdditionalRecipients()}:{},...void 0!==this.getNodeIps()&&null!==this.getNodeIps()?{nodeIps:this.getNodeIps().map(e=>e.toJson(!1))}:{},...void 0!==this.getShouldRunAllChecks()&&null!==this.getShouldRunAllChecks()?{shouldRunAllChecks:this.getShouldRunAllChecks()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("sdaExtIds"===t){if(void 0===this.sdaExtIds||null===this.sdaExtIds)return new O("sdaExtIds","undefined or null");if(!F.validateMaxItems(this.sdaExtIds,50))return new O("sdaExtIds","does not satisfy required maxItems constraint: 50");if(!F.validateMinItems(this.sdaExtIds,1))return new O("sdaExtIds","does not satisfy required minItems constraint: 1")}if("shouldAnonymize"===t&&(void 0===this.shouldAnonymize||null===this.shouldAnonymize))return new O("shouldAnonymize","undefined or null");if("shouldSendReportToConfiguredRecipients"===t&&(void 0===this.shouldSendReportToConfiguredRecipients||null===this.shouldSendReportToConfiguredRecipients))return new O("shouldSendReportToConfiguredRecipients","undefined or null");if("additionalRecipients"===t){if(void 0===this.additionalRecipients||null===this.additionalRecipients)return new O("additionalRecipients","undefined or null");if(!F.validateMaxItems(this.additionalRecipients,5))return new O("additionalRecipients","does not satisfy required maxItems constraint: 5");if(!F.validateMinItems(this.additionalRecipients,1))return new O("additionalRecipients","does not satisfy required minItems constraint: 1")}if("nodeIps"===t){if(void 0===this.nodeIps||null===this.nodeIps)return new O("nodeIps","undefined or null");if(!F.validateMaxItems(this.nodeIps,48))return new O("nodeIps","does not satisfy required maxItems constraint: 48");if(!F.validateMinItems(this.nodeIps,1))return new O("nodeIps","does not satisfy required minItems constraint: 1")}return"shouldRunAllChecks"!==t||void 0!==this.shouldRunAllChecks&&null!==this.shouldRunAllChecks?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("shouldRunAllChecks","undefined or null")}}hr.prototype.sdaExtIds=void 0,hr.prototype.shouldAnonymize=!0,hr.prototype.shouldSendReportToConfiguredRecipients=!0,hr.prototype.additionalRecipients=void 0,hr.prototype.nodeIps=void 0,hr.prototype.shouldRunAllChecks=!1,hr.prototype.$reserved=void 0,hr.prototype.$objectType=void 0,hr.prototype.$unknownFields=void 0;var cr=new WeakSet;class pr{constructor(e){var t,n;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t=this,n=cr),n.add(t),this.extId=e,this.$objectType="monitoring.v4.serviceability.EntityFilter",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new pr,e.hasOwnProperty("extId")&&null!==e.extId&&void 0!==e.extId&&t.setExtId(e.extId),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getExtId(){return this.extId}setExtId(e){this.extId=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getExtId()&&null!==this.getExtId()?{extId:this.getExtId()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=["extId"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("extId"===t){if(void 0===this.extId||null===this.extId)return new O("extId","undefined or null");if(!F.validatePattern(this.extId,/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/))return new O("extId","does not satisfy required pattern: /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/")}return"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null")}}pr.prototype.extId=void 0,pr.prototype.$reserved=void 0,pr.prototype.$objectType=void 0,pr.prototype.$unknownFields=void 0;const vr={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",CATEGORY:"CATEGORY",CLUSTER:"CLUSTER",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(vr).find(t=>vr[t]===e);return null==t?vr.$UNKNOWN:vr[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case vr.$UNKNOWN:case vr.$REDACTED:case vr.CATEGORY:case vr.CLUSTER:return;default:throw new Error("Invalid : must be GroupEntityType.{ $UNKNOWN|$REDACTED|CATEGORY|CLUSTER }")}}};Object.freeze(vr);const yr=vr;var gr=new WeakSet;class mr{constructor(e,t){var n,i;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(n=this,i=gr),i.add(n),this.extId=e,this.type=t,this.$objectType="monitoring.v4.serviceability.GroupFilter",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new mr,e.hasOwnProperty("extId")&&null!==e.extId&&void 0!==e.extId&&t.setExtId(e.extId),e.hasOwnProperty("type")&&null!==e.type&&void 0!==e.type&&t.setType(yr.constructFromObject(e.type)),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getExtId(){return this.extId}setExtId(e){this.extId=e}getType(){return this.type}setType(e){this.type=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getExtId()&&null!==this.getExtId()?{extId:this.getExtId()}:{},...void 0!==this.getType()&&null!==this.getType()?{type:this.getType()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=["extId","type"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("extId"===t){if(void 0===this.extId||null===this.extId)return new O("extId","undefined or null");if(!F.validatePattern(this.extId,/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/))return new O("extId","does not satisfy required pattern: /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/")}return"type"!==t||void 0!==this.type&&null!==this.type?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("type","undefined or null")}}mr.prototype.extId=void 0,mr.prototype.type=void 0,mr.prototype.$reserved=void 0,mr.prototype.$objectType=void 0,mr.prototype.$unknownFields=void 0;var fr=new WeakSet;class $r{constructor(e,t){var n,i;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(n=this,i=fr),i.add(n),this.entityUuid=e,this.policyIds=t,this.$objectType="monitoring.v4.serviceability.RelatedPolicy",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,r;if(e){if(t=t||new $r,e.hasOwnProperty("entityUuid")&&null!==e.entityUuid&&void 0!==e.entityUuid&&t.setEntityUuid(e.entityUuid),e.hasOwnProperty("policyIds")&&null!==e.policyIds&&void 0!==e.policyIds){for(r=[],i=e.policyIds,s=0;s<i.length;s++)r.push(i[s]);t.setPolicyIds(r)}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getEntityUuid(){return this.entityUuid}setEntityUuid(e){this.entityUuid=e}getPolicyIds(){return this.policyIds}setPolicyIds(e){this.policyIds=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getEntityUuid()&&null!==this.getEntityUuid()?{entityUuid:this.getEntityUuid()}:{},...void 0!==this.getPolicyIds()&&null!==this.getPolicyIds()?{policyIds:this.getPolicyIds()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=["entityUuid","policyIds"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("entityUuid"===t){if(void 0===this.entityUuid||null===this.entityUuid)return new O("entityUuid","undefined or null");if(!F.validatePattern(this.entityUuid,/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/))return new O("entityUuid","does not satisfy required pattern: /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/")}if("policyIds"===t){if(void 0===this.policyIds||null===this.policyIds)return new O("policyIds","undefined or null");if(!F.validateMaxItems(this.policyIds,100))return new O("policyIds","does not satisfy required maxItems constraint: 100")}return"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null")}}function wr(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")}$r.prototype.entityUuid=void 0,$r.prototype.policyIds=void 0,$r.prototype.$reserved=void 0,$r.prototype.$objectType=void 0,$r.prototype.$unknownFields=void 0;var Tr=new WeakSet;class br{constructor(e,t,n){var i,s;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(i=this,s=Tr),s.add(i),this.metricName=e,this.operator=t,this.thresholdValue=n,this.$objectType="monitoring.v4.serviceability.Condition",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i;if(e){if(t=t||new br,e.hasOwnProperty("metricName")&&null!==e.metricName&&void 0!==e.metricName&&t.setMetricName(e.metricName),e.hasOwnProperty("operator")&&null!==e.operator&&void 0!==e.operator&&t.setOperator(nt.constructFromObject(e.operator)),e.hasOwnProperty("thresholdValue")&&null!==e.thresholdValue&&void 0!==e.thresholdValue)switch(i=e.thresholdValue.hasOwnProperty("$objectType")?e.thresholdValue.$objectType:typeof e.thresholdValue,i){case"monitoring.v4.common.DoubleValue":t.setThresholdValue(lt.constructFromObject(e.thresholdValue,void 0));break;case"monitoring.v4.common.IntValue":t.setThresholdValue(ut.constructFromObject(e.thresholdValue,void 0));break;default:throw"Unknown datatype "+i+" in data"}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMetricName(){return this.metricName}setMetricName(e){this.metricName=e}getOperator(){return this.operator}setOperator(e){this.operator=e}getThresholdValue(){return this.thresholdValue}setThresholdValue(e){this.thresholdValue=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getMetricName()&&null!==this.getMetricName()?{metricName:this.getMetricName()}:{},...void 0!==this.getOperator()&&null!==this.getOperator()?{operator:this.getOperator()}:{},...void 0!==this.getThresholdValue()&&null!==this.getThresholdValue()?{thresholdValue:void 0!==this.getThresholdValue().toJson?this.getThresholdValue().toJson(!1):Array.isArray(this.getThresholdValue())?this.getThresholdValue().map(e=>void 0!==e.toJson?e.toJson(!1):e):wr(Tr,this,kr).call(this,this.getThresholdValue(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getMetricName()&&null!==this.getMetricName()?{metricName:this.getMetricName()}:{},...void 0!==this.getOperator()&&null!==this.getOperator()?{operator:this.getOperator()}:{},...void 0!==this.getThresholdValue()&&null!==this.getThresholdValue()?{thresholdValue:void 0!==this.getThresholdValue().toJson?this.getThresholdValue().toJson():Array.isArray(this.getThresholdValue())?this.getThresholdValue().map(e=>void 0!==e.toJson?e.toJson():e):wr(Tr,this,kr).call(this,this.getThresholdValue())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=["metricName","operator","thresholdValue"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("metricName"===t){if(void 0===this.metricName||null===this.metricName)return new O("metricName","undefined or null");if(!F.validateMaxLength(this.metricName,150))return new O("metricName","does not satisfy required maxLength constraint: 150");if(!F.validateMinLength(this.metricName,1))return new O("metricName","does not satisfy required minLength constraint: 1")}return"operator"!==t||void 0!==this.operator&&null!==this.operator?"thresholdValue"!==t||void 0!==this.thresholdValue&&null!==this.thresholdValue?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("thresholdValue","undefined or null"):new O("operator","undefined or null")}}function kr(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}br.prototype.metricName=void 0,br.prototype.operator=void 0,br.prototype.thresholdValue=void 0,br.prototype.$reserved=void 0,br.prototype.$objectType=void 0,br.prototype.$unknownFields=void 0;const Fr={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",WARNING:"WARNING",CRITICAL:"CRITICAL",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(Fr).find(t=>Fr[t]===e);return null==t?Fr.$UNKNOWN:Fr[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case Fr.$UNKNOWN:case Fr.$REDACTED:case Fr.WARNING:case Fr.CRITICAL:return;default:throw new Error("Invalid : must be PolicySeverityLevel.{ $UNKNOWN|$REDACTED|WARNING|CRITICAL }")}}};Object.freeze(Fr);const Or=Fr;var jr=new WeakSet;class Er{constructor(e,t,n){var i,s;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(i=this,s=jr),s.add(i),this.conditionType=e,this.condition=t,this.severityLevel=n,this.$objectType="monitoring.v4.serviceability.TriggerCondition",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new Er,e.hasOwnProperty("conditionType")&&null!==e.conditionType&&void 0!==e.conditionType&&t.setConditionType(st.constructFromObject(e.conditionType)),e.hasOwnProperty("condition")&&null!==e.condition&&void 0!==e.condition&&t.setCondition(br.constructFromObject(e.condition)),e.hasOwnProperty("severityLevel")&&null!==e.severityLevel&&void 0!==e.severityLevel&&t.setSeverityLevel(Or.constructFromObject(e.severityLevel)),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getConditionType(){return this.conditionType}setConditionType(e){this.conditionType=e}getCondition(){return this.condition}setCondition(e){this.condition=e}getSeverityLevel(){return this.severityLevel}setSeverityLevel(e){this.severityLevel=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getConditionType()&&null!==this.getConditionType()?{conditionType:this.getConditionType()}:{},...void 0!==this.getCondition()&&null!==this.getCondition()?{condition:this.getCondition().toJson(!1)}:{},...void 0!==this.getSeverityLevel()&&null!==this.getSeverityLevel()?{severityLevel:this.getSeverityLevel()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=["conditionType","condition","severityLevel"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"conditionType"!==t||void 0!==this.conditionType&&null!==this.conditionType?"condition"!==t||void 0!==this.condition&&null!==this.condition?"severityLevel"!==t||void 0!==this.severityLevel&&null!==this.severityLevel?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("severityLevel","undefined or null"):new O("condition","undefined or null"):new O("conditionType","undefined or null")}}function Pr(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")}Er.prototype.conditionType=void 0,Er.prototype.condition=void 0,Er.prototype.severityLevel=void 0,Er.prototype.$reserved=void 0,Er.prototype.$objectType=void 0,Er.prototype.$unknownFields=void 0;var Ar=new WeakSet;class Cr extends ze{constructor(e,t,n){var i,s;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(i=this,s=Ar),s.add(i),this.title=e,this.triggerConditions=t,this.entityType=n,this.$objectType="monitoring.v4.serviceability.UserDefinedPolicy",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,r,o,a;if(e){if(t=t||new Cr,ze.constructFromObject(e,t,!0),e.hasOwnProperty("title")&&null!==e.title&&void 0!==e.title&&t.setTitle(e.title),e.hasOwnProperty("description")&&null!==e.description&&void 0!==e.description&&t.setDescription(e.description),e.hasOwnProperty("isEnabled")&&null!==e.isEnabled&&void 0!==e.isEnabled&&t.setIsEnabled(e.isEnabled),e.hasOwnProperty("isAutoResolved")&&null!==e.isAutoResolved&&void 0!==e.isAutoResolved&&t.setIsAutoResolved(e.isAutoResolved),e.hasOwnProperty("filters")&&null!==e.filters&&void 0!==e.filters){if(!Array.isArray(e.filters))throw a=e.filters.hasOwnProperty("$objectType")?e.filters.$objectType:typeof e.filters,"Unknown datatype "+a+" in data";if(0===e.filters.length)t.setFilters([]);else{for(o=[],i=e.filters,a=i[0].hasOwnProperty("$objectType")?i[0].$objectType:typeof i[0],r=0;r<i.length;r++)switch(a){case"monitoring.v4.serviceability.EntityFilter":s=pr.constructFromObject(i[r],void 0),o.push(s);break;case"monitoring.v4.serviceability.GroupFilter":s=mr.constructFromObject(i[r],void 0),o.push(s);break;default:throw"Unknown list of type "+a+" in data"}t.setFilters(o)}}if(e.hasOwnProperty("triggerConditions")&&null!==e.triggerConditions&&void 0!==e.triggerConditions){for(o=[],i=e.triggerConditions,r=0;r<i.length;r++)s=Er.constructFromObject(i[r],void 0),o.push(s);t.setTriggerConditions(o)}if(e.hasOwnProperty("impactTypes")&&null!==e.impactTypes&&void 0!==e.impactTypes){for(o=[],i=e.impactTypes,r=0;r<i.length;r++)s=Qe.constructFromObject(i[r],void 0),o.push(s);t.setImpactTypes(o)}if(e.hasOwnProperty("createdBy")&&null!==e.createdBy&&void 0!==e.createdBy&&t.setCreatedBy(e.createdBy),e.hasOwnProperty("lastUpdatedTime")&&null!==e.lastUpdatedTime&&void 0!==e.lastUpdatedTime&&t.setLastUpdatedTime(e.lastUpdatedTime),e.hasOwnProperty("isExpectedToErrorOnConflict")&&null!==e.isExpectedToErrorOnConflict&&void 0!==e.isExpectedToErrorOnConflict&&t.setIsExpectedToErrorOnConflict(e.isExpectedToErrorOnConflict),e.hasOwnProperty("policiesToOverride")&&null!==e.policiesToOverride&&void 0!==e.policiesToOverride){for(o=[],i=e.policiesToOverride,r=0;r<i.length;r++)o.push(i[r]);t.setPoliciesToOverride(o)}if(e.hasOwnProperty("triggerWaitPeriod")&&null!==e.triggerWaitPeriod&&void 0!==e.triggerWaitPeriod&&t.setTriggerWaitPeriod(e.triggerWaitPeriod),e.hasOwnProperty("relatedPolicies")&&null!==e.relatedPolicies&&void 0!==e.relatedPolicies){for(o=[],i=e.relatedPolicies,r=0;r<i.length;r++)s=$r.constructFromObject(i[r],void 0),o.push(s);t.setRelatedPolicies(o)}if(e.hasOwnProperty("entityType")&&null!==e.entityType&&void 0!==e.entityType&&t.setEntityType(e.entityType),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getTitle(){return this.title}setTitle(e){this.title=e}getDescription(){return this.description}setDescription(e){this.description=e}getIsEnabled(){return this.isEnabled}setIsEnabled(e){this.isEnabled=e}getIsAutoResolved(){return this.isAutoResolved}setIsAutoResolved(e){this.isAutoResolved=e}getFilters(){return this.filters}setFilters(e){this.filters=e}getTriggerConditions(){return this.triggerConditions}setTriggerConditions(e){this.triggerConditions=e}getImpactTypes(){return this.impactTypes}setImpactTypes(e){this.impactTypes=e}getCreatedBy(){return this.createdBy}setCreatedBy(e){this.createdBy=e}getLastUpdatedTime(){return this.lastUpdatedTime}setLastUpdatedTime(e){this.lastUpdatedTime=e}getIsExpectedToErrorOnConflict(){return this.isExpectedToErrorOnConflict}setIsExpectedToErrorOnConflict(e){this.isExpectedToErrorOnConflict=e}getPoliciesToOverride(){return this.policiesToOverride}setPoliciesToOverride(e){this.policiesToOverride=e}getTriggerWaitPeriod(){return this.triggerWaitPeriod}setTriggerWaitPeriod(e){this.triggerWaitPeriod=e}getRelatedPolicies(){return this.relatedPolicies}setRelatedPolicies(e){this.relatedPolicies=e}getEntityType(){return this.entityType}setEntityType(e){this.entityType=e}toJson(e){return!1===e?{...void 0!==this.getTitle()&&null!==this.getTitle()?{title:this.getTitle()}:{},...void 0!==this.getDescription()&&null!==this.getDescription()?{description:this.getDescription()}:{},...void 0!==this.getIsEnabled()&&null!==this.getIsEnabled()?{isEnabled:this.getIsEnabled()}:{},...void 0!==this.getIsAutoResolved()&&null!==this.getIsAutoResolved()?{isAutoResolved:this.getIsAutoResolved()}:{},...void 0!==this.getFilters()&&null!==this.getFilters()?{filters:void 0!==this.getFilters().toJson?this.getFilters().toJson(!1):Array.isArray(this.getFilters())?this.getFilters().map(e=>void 0!==e.toJson?e.toJson(!1):e):Pr(Ar,this,Ir).call(this,this.getFilters(),!1)}:{},...void 0!==this.getTriggerConditions()&&null!==this.getTriggerConditions()?{triggerConditions:this.getTriggerConditions().map(e=>e.toJson(!1))}:{},...void 0!==this.getImpactTypes()&&null!==this.getImpactTypes()?{impactTypes:this.getImpactTypes()}:{},...void 0!==this.getCreatedBy()&&null!==this.getCreatedBy()?{createdBy:this.getCreatedBy()}:{},...void 0!==this.getLastUpdatedTime()&&null!==this.getLastUpdatedTime()?{lastUpdatedTime:Pr(Ar,this,Ur).call(this,this.getLastUpdatedTime(),!1)}:{},...void 0!==this.getIsExpectedToErrorOnConflict()&&null!==this.getIsExpectedToErrorOnConflict()?{isExpectedToErrorOnConflict:this.getIsExpectedToErrorOnConflict()}:{},...void 0!==this.getPoliciesToOverride()&&null!==this.getPoliciesToOverride()?{policiesToOverride:this.getPoliciesToOverride()}:{},...void 0!==this.getTriggerWaitPeriod()&&null!==this.getTriggerWaitPeriod()?{triggerWaitPeriod:this.getTriggerWaitPeriod()}:{},...void 0!==this.getRelatedPolicies()&&null!==this.getRelatedPolicies()?{relatedPolicies:this.getRelatedPolicies().map(e=>e.toJson(!1))}:{},...void 0!==this.getEntityType()&&null!==this.getEntityType()?{entityType:this.getEntityType()}:{},...void 0!==this.getExtId()&&null!==this.getExtId()?{extId:this.getExtId()}:{},...void 0!==this.getLinks()&&null!==this.getLinks()?{links:this.getLinks().map(e=>e.toJson(!1))}:{},...void 0!==this.getTenantId()&&null!==this.getTenantId()?{tenantId:this.getTenantId()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getTitle()&&null!==this.getTitle()?{title:this.getTitle()}:{},...void 0!==this.getDescription()&&null!==this.getDescription()?{description:this.getDescription()}:{},...void 0!==this.getIsEnabled()&&null!==this.getIsEnabled()?{isEnabled:this.getIsEnabled()}:{},...void 0!==this.getIsAutoResolved()&&null!==this.getIsAutoResolved()?{isAutoResolved:this.getIsAutoResolved()}:{},...void 0!==this.getFilters()&&null!==this.getFilters()?{filters:void 0!==this.getFilters().toJson?this.getFilters().toJson():Array.isArray(this.getFilters())?this.getFilters().map(e=>void 0!==e.toJson?e.toJson():e):Pr(Ar,this,Ir).call(this,this.getFilters())}:{},...void 0!==this.getTriggerConditions()&&null!==this.getTriggerConditions()?{triggerConditions:this.getTriggerConditions().map(e=>e.toJson(!1))}:{},...void 0!==this.getImpactTypes()&&null!==this.getImpactTypes()?{impactTypes:this.getImpactTypes()}:{},...void 0!==this.getIsExpectedToErrorOnConflict()&&null!==this.getIsExpectedToErrorOnConflict()?{isExpectedToErrorOnConflict:this.getIsExpectedToErrorOnConflict()}:{},...void 0!==this.getPoliciesToOverride()&&null!==this.getPoliciesToOverride()?{policiesToOverride:this.getPoliciesToOverride()}:{},...void 0!==this.getTriggerWaitPeriod()&&null!==this.getTriggerWaitPeriod()?{triggerWaitPeriod:this.getTriggerWaitPeriod()}:{},...void 0!==this.getRelatedPolicies()&&null!==this.getRelatedPolicies()?{relatedPolicies:this.getRelatedPolicies().map(e=>e.toJson(!1))}:{},...void 0!==this.getEntityType()&&null!==this.getEntityType()?{entityType:this.getEntityType()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=["title","triggerConditions","entityType"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("title"===t){if(void 0===this.title||null===this.title)return new O("title","undefined or null");if(!F.validateMaxLength(this.title,150))return new O("title","does not satisfy required maxLength constraint: 150");if(!F.validateMinLength(this.title,1))return new O("title","does not satisfy required minLength constraint: 1")}if("description"===t){if(void 0===this.description||null===this.description)return new O("description","undefined or null");if(!F.validateMaxLength(this.description,500))return new O("description","does not satisfy required maxLength constraint: 500")}if("isEnabled"===t&&(void 0===this.isEnabled||null===this.isEnabled))return new O("isEnabled","undefined or null");if("isAutoResolved"===t&&(void 0===this.isAutoResolved||null===this.isAutoResolved))return new O("isAutoResolved","undefined or null");if("filters"===t&&(void 0===this.filters||null===this.filters))return new O("filters","undefined or null");if("triggerConditions"===t){if(void 0===this.triggerConditions||null===this.triggerConditions)return new O("triggerConditions","undefined or null");if(!F.validateMaxItems(this.triggerConditions,4))return new O("triggerConditions","does not satisfy required maxItems constraint: 4");if(!F.validateMinItems(this.triggerConditions,1))return new O("triggerConditions","does not satisfy required minItems constraint: 1")}if("impactTypes"===t){if(void 0===this.impactTypes||null===this.impactTypes)return new O("impactTypes","undefined or null");if(!F.validateMaxItems(this.impactTypes,8))return new O("impactTypes","does not satisfy required maxItems constraint: 8")}if("createdBy"===t&&(void 0===this.createdBy||null===this.createdBy))return new O("createdBy","undefined or null");if("lastUpdatedTime"===t&&(void 0===this.lastUpdatedTime||null===this.lastUpdatedTime))return new O("lastUpdatedTime","undefined or null");if("isExpectedToErrorOnConflict"===t&&(void 0===this.isExpectedToErrorOnConflict||null===this.isExpectedToErrorOnConflict))return new O("isExpectedToErrorOnConflict","undefined or null");if("policiesToOverride"===t){if(void 0===this.policiesToOverride||null===this.policiesToOverride)return new O("policiesToOverride","undefined or null");if(!F.validateMaxItems(this.policiesToOverride,100))return new O("policiesToOverride","does not satisfy required maxItems constraint: 100")}if("triggerWaitPeriod"===t&&(void 0===this.triggerWaitPeriod||null===this.triggerWaitPeriod))return new O("triggerWaitPeriod","undefined or null");if("relatedPolicies"===t){if(void 0===this.relatedPolicies||null===this.relatedPolicies)return new O("relatedPolicies","undefined or null");if(!F.validateMaxItems(this.relatedPolicies,100))return new O("relatedPolicies","does not satisfy required maxItems constraint: 100")}if("entityType"===t){if(void 0===this.entityType||null===this.entityType)return new O("entityType","undefined or null");if(!F.validateMaxLength(this.entityType,10))return new O("entityType","does not satisfy required maxLength constraint: 10");if(!F.validateMinLength(this.entityType,1))return new O("entityType","does not satisfy required minLength constraint: 1")}return new O(t,"no such property exists")}}function Ir(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}function Ur(e,t){return e instanceof Date&&void 0!==t?t?e.toISOString().slice(0,10):e.toISOString():e}function Dr(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")}Cr.prototype.title=void 0,Cr.prototype.description=void 0,Cr.prototype.isEnabled=!1,Cr.prototype.isAutoResolved=!0,Cr.prototype.filters=void 0,Cr.prototype.triggerConditions=void 0,Cr.prototype.impactTypes=void 0,Cr.prototype.createdBy=void 0,Cr.prototype.lastUpdatedTime=void 0,Cr.prototype.isExpectedToErrorOnConflict=!0,Cr.prototype.policiesToOverride=void 0,Cr.prototype.triggerWaitPeriod=void 0,Cr.prototype.relatedPolicies=void 0,Cr.prototype.entityType=void 0,ze.prototype.extId=void 0,ze.prototype.links=void 0,Be.prototype.tenantId=void 0;var Sr=new WeakSet;class Rr extends r{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=Sr),t.add(e),this.$objectType="monitoring.v4.serviceability.CreateUdaPolicyApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i;if(e){if(t=t||new Rr,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(B.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(i=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,i){case"monitoring.v4.serviceability.UserDefinedPolicy":t.setData(Cr.constructFromObject(e.data,void 0));break;case"monitoring.v4.error.ErrorResponse":t.setData(Je.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+i+" in data"}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMetadata(){return this.metadata}setMetadata(e){this.metadata=e}getData(){return this.data}setData(e){this.data=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson(!1):Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson(!1):e):Dr(Sr,this,Nr).call(this,this.getData(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson():Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson():e):Dr(Sr,this,Nr).call(this,this.getData())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"metadata"!==t||void 0!==this.metadata&&null!==this.metadata?"data"!==t||void 0!==this.data&&null!==this.data?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("data","undefined or null"):new O("metadata","undefined or null")}}function Nr(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}Rr.prototype.metadata=void 0,Rr.prototype.data=void 0,Rr.prototype.$reserved=void 0,Rr.prototype.$objectType=void 0,Rr.prototype.$unknownFields=void 0;var xr=new WeakSet;class Mr{constructor(e){var t,n;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t=this,n=xr),n.add(t),this.extId=e,this.$objectType="monitoring.v4.serviceability.ConflictingPolicy",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new Mr,e.hasOwnProperty("extId")&&null!==e.extId&&void 0!==e.extId&&t.setExtId(e.extId),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getExtId(){return this.extId}setExtId(e){this.extId=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getExtId()&&null!==this.getExtId()?{extId:this.getExtId()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=["extId"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("extId"===t){if(void 0===this.extId||null===this.extId)return new O("extId","undefined or null");if(!F.validatePattern(this.extId,/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/))return new O("extId","does not satisfy required pattern: /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/")}return"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null")}}function Vr(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")}Mr.prototype.extId=void 0,Mr.prototype.$reserved=void 0,Mr.prototype.$objectType=void 0,Mr.prototype.$unknownFields=void 0;var Lr=new WeakSet;class Jr extends r{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=Lr),t.add(e),this.$objectType="monitoring.v4.serviceability.FindConflictingUdaPoliciesApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,o,a,l;if(e){if(t=t||new Jr,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(B.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)if(Array.isArray(e.data))if(0===e.data.length)t.setData([]);else{for(a=[],i=e.data,l=i[0].hasOwnProperty("$objectType")?i[0].$objectType:typeof i[0],o=0;o<i.length;o++){if("monitoring.v4.serviceability.ConflictingPolicy"!==l)throw"Unknown list of type "+l+" in data";s=Mr.constructFromObject(i[o],void 0),a.push(s)}t.setData(a)}else{if(l=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,"monitoring.v4.error.ErrorResponse"!==l)throw"Unknown datatype "+l+" in data";t.setData(Je.constructFromObject(e.data,void 0))}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMetadata(){return this.metadata}setMetadata(e){this.metadata=e}getData(){return this.data}setData(e){this.data=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson(!1):Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson(!1):e):Vr(Lr,this,_r).call(this,this.getData(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson():Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson():e):Vr(Lr,this,_r).call(this,this.getData())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"metadata"!==t||void 0!==this.metadata&&null!==this.metadata?"data"!==t||void 0!==this.data&&null!==this.data?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("data","undefined or null"):new O("metadata","undefined or null")}}function _r(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}function Wr(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")}Jr.prototype.metadata=void 0,Jr.prototype.data=void 0,Jr.prototype.$reserved=void 0,Jr.prototype.$objectType=void 0,Jr.prototype.$unknownFields=void 0;var Br=new WeakSet;class Gr extends r{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=Br),t.add(e),this.$objectType="monitoring.v4.serviceability.UpdateUdaPolicyApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,o,a,l;if(e){if(t=t||new Gr,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(B.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)if(Array.isArray(e.data))if(0===e.data.length)t.setData([]);else{for(a=[],i=e.data,l=i[0].hasOwnProperty("$objectType")?i[0].$objectType:typeof i[0],o=0;o<i.length;o++){if("monitoring.v4.error.AppMessage"!==l)throw"Unknown list of type "+l+" in data";s=Ie.constructFromObject(i[o],void 0),a.push(s)}t.setData(a)}else{if(l=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,"monitoring.v4.error.ErrorResponse"!==l)throw"Unknown datatype "+l+" in data";t.setData(Je.constructFromObject(e.data,void 0))}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMetadata(){return this.metadata}setMetadata(e){this.metadata=e}getData(){return this.data}setData(e){this.data=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson(!1):Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson(!1):e):Wr(Br,this,zr).call(this,this.getData(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson():Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson():e):Wr(Br,this,zr).call(this,this.getData())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"metadata"!==t||void 0!==this.metadata&&null!==this.metadata?"data"!==t||void 0!==this.data&&null!==this.data?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("data","undefined or null"):new O("metadata","undefined or null")}}function zr(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}function qr(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")}Gr.prototype.metadata=void 0,Gr.prototype.data=void 0,Gr.prototype.$reserved=void 0,Gr.prototype.$objectType=void 0,Gr.prototype.$unknownFields=void 0;var Kr=new WeakSet;class Hr extends r{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=Kr),t.add(e),this.$objectType="monitoring.v4.serviceability.DeleteUdaPolicyApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i;if(e){if(t=t||new Hr,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(B.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(null===e.data&&t.setData(null),i=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,i){case"monitoring.v4.error.ErrorResponse":t.setData(Je.constructFromObject(e.data,void 0));break;case"":t.setData(Void.constructFromObject(e[""],void 0));break;default:throw"Unknown datatype "+i+" in data"}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMetadata(){return this.metadata}setMetadata(e){this.metadata=e}getData(){return this.data}setData(e){this.data=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson(!1):Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson(!1):e):qr(Kr,this,Yr).call(this,this.getData(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson():Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson():e):qr(Kr,this,Yr).call(this,this.getData())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"metadata"!==t||void 0!==this.metadata&&null!==this.metadata?"data"!==t||void 0!==this.data&&null!==this.data?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("data","undefined or null"):new O("metadata","undefined or null")}}function Yr(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}function Xr(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")}Hr.prototype.metadata=void 0,Hr.prototype.data=void 0,Hr.prototype.$reserved=void 0,Hr.prototype.$objectType=void 0,Hr.prototype.$unknownFields=void 0;var Qr=new WeakSet;class Zr extends r{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=Qr),t.add(e),this.$objectType="monitoring.v4.serviceability.ListUdaPoliciesApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i,s,o,a,l;if(e){if(t=t||new Zr,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(B.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)if(Array.isArray(e.data))if(0===e.data.length)t.setData([]);else{for(a=[],i=e.data,l=i[0].hasOwnProperty("$objectType")?i[0].$objectType:typeof i[0],o=0;o<i.length;o++){if("monitoring.v4.serviceability.UserDefinedPolicy"!==l)throw"Unknown list of type "+l+" in data";s=Cr.constructFromObject(i[o],void 0),a.push(s)}t.setData(a)}else{if(l=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,"monitoring.v4.error.ErrorResponse"!==l)throw"Unknown datatype "+l+" in data";t.setData(Je.constructFromObject(e.data,void 0))}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMetadata(){return this.metadata}setMetadata(e){this.metadata=e}getData(){return this.data}setData(e){this.data=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson(!1):Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson(!1):e):Xr(Qr,this,eo).call(this,this.getData(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson():Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson():e):Xr(Qr,this,eo).call(this,this.getData())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"metadata"!==t||void 0!==this.metadata&&null!==this.metadata?"data"!==t||void 0!==this.data&&null!==this.data?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("data","undefined or null"):new O("metadata","undefined or null")}}function eo(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}function to(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")}Zr.prototype.metadata=void 0,Zr.prototype.data=void 0,Zr.prototype.$reserved=void 0,Zr.prototype.$objectType=void 0,Zr.prototype.$unknownFields=void 0;var no=new WeakSet;class io extends r{constructor(){var e,t;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=no),t.add(e),this.$objectType="monitoring.v4.serviceability.GetUdaPolicyApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let i;if(e){if(t=t||new io,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(B.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(i=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,i){case"monitoring.v4.serviceability.UserDefinedPolicy":t.setData(Cr.constructFromObject(e.data,void 0));break;case"monitoring.v4.error.ErrorResponse":t.setData(Je.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+i+" in data"}if(e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getMetadata(){return this.metadata}setMetadata(e){this.metadata=e}getData(){return this.data}setData(e){this.data=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson(!1):Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson(!1):e):to(no,this,so).call(this,this.getData(),!1)}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getMetadata()&&null!==this.getMetadata()?{metadata:this.getMetadata().toJson(!1)}:{},...void 0!==this.getData()&&null!==this.getData()?{data:void 0!==this.getData().toJson?this.getData().toJson():Array.isArray(this.getData())?this.getData().map(e=>void 0!==e.toJson?e.toJson():e):to(no,this,so).call(this,this.getData())}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"metadata"!==t||void 0!==this.metadata&&null!==this.metadata?"data"!==t||void 0!==this.data&&null!==this.data?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("data","undefined or null"):new O("metadata","undefined or null")}}function so(e,t){return e instanceof Map?Object.fromEntries(Array.from(e,([e,n])=>[e,void 0!==n.toJson?n.toJson(t):n])):"object"==typeof e&&null!=e&&e.constructor===Object?Object.fromEntries(Array.from(Object.entries(e),e=>[e[0],void 0!==e[1].toJson?e[1].toJson(t):e[1]])):e}io.prototype.metadata=void 0,io.prototype.data=void 0,io.prototype.$reserved=void 0,io.prototype.$objectType=void 0,io.prototype.$unknownFields=void 0;var ro=new WeakSet;class oo{constructor(){var e,t;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e=this,t=ro),t.add(e),this.$objectType="monitoring.v4.common.CauseAndResolution",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new oo,e.hasOwnProperty("cause")&&null!==e.cause&&void 0!==e.cause&&t.setCause(e.cause),e.hasOwnProperty("resolution")&&null!==e.resolution&&void 0!==e.resolution&&t.setResolution(e.resolution),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getCause(){return this.cause}setCause(e){this.cause=e}getResolution(){return this.resolution}setResolution(e){this.resolution=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getCause()&&null!==this.getCause()?{cause:this.getCause()}:{},...void 0!==this.getResolution()&&null!==this.getResolution()?{resolution:this.getResolution()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){if("cause"===t){if(void 0===this.cause||null===this.cause)return new O("cause","undefined or null");if(!F.validateMaxLength(this.cause,500))return new O("cause","does not satisfy required maxLength constraint: 500")}if("resolution"===t){if(void 0===this.resolution||null===this.resolution)return new O("resolution","undefined or null");if(!F.validateMaxLength(this.resolution,500))return new O("resolution","does not satisfy required maxLength constraint: 500")}return"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null")}}oo.prototype.cause=void 0,oo.prototype.resolution=void 0,oo.prototype.$reserved=void 0,oo.prototype.$objectType=void 0,oo.prototype.$unknownFields=void 0;var ao=new WeakSet;class lo{constructor(e){var t,n;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t=this,n=ao),n.add(t),this.floatValue=e,this.$objectType="monitoring.v4.common.FloatValue",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new lo,e.hasOwnProperty("floatValue")&&null!==e.floatValue&&void 0!==e.floatValue&&t.setFloatValue(e.floatValue),e.hasOwnProperty("$reserved")&&(t.$reserved=e.$reserved),e.hasOwnProperty("$objectType")&&(t.$objectType=e.$objectType),e.hasOwnProperty("$unknownFields")&&(t.$unknownFields=e.$unknownFields),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}getFloatValue(){return this.floatValue}setFloatValue(e){this.floatValue=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getFloatValue()&&null!==this.getFloatValue()?{floatValue:this.getFloatValue()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=["floatValue"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return"floatValue"!==t||void 0!==this.floatValue&&null!==this.floatValue?"$reserved"!==t||void 0!==this.$reserved&&null!==this.$reserved?"$objectType"!==t||void 0!==this.$objectType&&null!==this.$objectType?"$unknownFields"!==t||void 0!==this.$unknownFields&&null!==this.$unknownFields?new O(t,"no such property exists"):new O("$unknownFields","undefined or null"):new O("$objectType","undefined or null"):new O("$reserved","undefined or null"):new O("floatValue","undefined or null")}}lo.prototype.floatValue=void 0,lo.prototype.$reserved=void 0,lo.prototype.$objectType=void 0,lo.prototype.$unknownFields=void 0;class uo extends Ot{constructor(){super(),this.$objectType="monitoring.v4.serviceability.RootCauseAnalysisProjection",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new uo,Ot.constructFromObject(e,t,!0),!n)){t.$unknownFields={...e.$unknownFields};for(const n in e)Object.keys(t).includes(n)||Object.keys(t).includes(this.snakeToCamel(n))||"$"===n[0]&&n.endsWith("ItemDiscriminator")||(t.$unknownFields[n]=e[n])}return t}static snakeToCamel(e){return e.replace(/(_\w)/g,e=>e[1].toUpperCase())}validate(e,t){let n=[];0===arguments.length||1===arguments.length&&arguments[0]instanceof k?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let i=[],s=null;return n.forEach(t=>{s=this.validateProperty(t,e),s&&i.push(s)}),new Promise(function(e,t){0!==i.length?t(s):e()})}validateProperty(e,t){return new O(t,"no such property exists")}}const ho={ApiClient:le,AlertsApi:class{#e;static get ApiClient(){return le}constructor(e){this.apiClient=e||le.instance,this.#e=new Set,this.#e.add("authorization"),this.#e.add("cookie"),this.#e.add("host"),this.#e.add("user-agent")}getAlertById(e,...t){let n=t.length>0?t[0]:{};if(null==e)throw new Error("Missing the required parameter 'extId' when calling getAlertById");const i={extId:e};let s={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(s[e]=n[e])});const r={...s},o=Lt;return this.apiClient.callApi("/api/monitoring/v4.2/serviceability/alerts/{extId}","GET",i,{},r,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],o)}listAlerts(e,...t){let n=t.length>0?t[0]:{};const i={...(e=e||{}).hasOwnProperty("$page")?{$page:e.$page}:{},...e.hasOwnProperty("$limit")?{$limit:e.$limit}:{},...e.hasOwnProperty("$filter")?{$filter:e.$filter}:{},...e.hasOwnProperty("$orderby")?{$orderby:e.$orderby}:{},...e.hasOwnProperty("$select")?{$select:e.$select}:{}};let s={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(s[e]=n[e])});const r={...s},o=Nt;return this.apiClient.callApi("/api/monitoring/v4.2/serviceability/alerts","GET",{},i,r,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],o)}},SystemDefinedPoliciesApi:class{#e;static get ApiClient(){return le}constructor(e){this.apiClient=e||le.instance,this.#e=new Set,this.#e.add("authorization"),this.#e.add("cookie"),this.#e.add("host"),this.#e.add("user-agent")}getClusterConfigById(e,t,...n){let i=n.length>0?n[0]:{};if(null==e)throw new Error("Missing the required parameter 'systemDefinedPolicyExtId' when calling getClusterConfigById");if(null==t)throw new Error("Missing the required parameter 'extId' when calling getClusterConfigById");const s={systemDefinedPolicyExtId:e,extId:t};let r={};Object.keys(i).forEach(e=>{this.#e.has(e.toLowerCase())||(r[e]=i[e])});const o={...r},a=Ln;return this.apiClient.callApi("/api/monitoring/v4.2/serviceability/alerts/system-defined-policies/{systemDefinedPolicyExtId}/cluster-configs/{extId}","GET",s,{},o,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],a)}getSdaPolicyById(e,...t){let n=t.length>0?t[0]:{};if(null==e)throw new Error("Missing the required parameter 'extId' when calling getSdaPolicyById");const i={extId:e};let s={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(s[e]=n[e])});const r={...s},o=In;return this.apiClient.callApi("/api/monitoring/v4.2/serviceability/alerts/system-defined-policies/{extId}","GET",i,{},r,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],o)}listClusterConfigsBySdaId(e,t,...n){let i=n.length>0?n[0]:{};if(t=t||{},null==e)throw new Error("Missing the required parameter 'systemDefinedPolicyExtId' when calling listClusterConfigsBySdaId");const s={systemDefinedPolicyExtId:e},r={...t.hasOwnProperty("$page")?{$page:t.$page}:{},...t.hasOwnProperty("$limit")?{$limit:t.$limit}:{},...t.hasOwnProperty("$filter")?{$filter:t.$filter}:{},...t.hasOwnProperty("$orderby")?{$orderby:t.$orderby}:{},...t.hasOwnProperty("$select")?{$select:t.$select}:{}};let o={};Object.keys(i).forEach(e=>{this.#e.has(e.toLowerCase())||(o[e]=i[e])});const a={...o},l=Nn;return this.apiClient.callApi("/api/monitoring/v4.2/serviceability/alerts/system-defined-policies/{systemDefinedPolicyExtId}/cluster-configs","GET",s,r,a,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],l)}listSdaPolicies(e,...t){let n=t.length>0?t[0]:{};const i={...(e=e||{}).hasOwnProperty("$page")?{$page:e.$page}:{},...e.hasOwnProperty("$limit")?{$limit:e.$limit}:{},...e.hasOwnProperty("$filter")?{$filter:e.$filter}:{},...e.hasOwnProperty("$orderby")?{$orderby:e.$orderby}:{},...e.hasOwnProperty("$select")?{$select:e.$select}:{}};let s={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(s[e]=n[e])});const r={...s},o=Yn;return this.apiClient.callApi("/api/monitoring/v4.2/serviceability/alerts/system-defined-policies","GET",{},i,r,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],o)}updateClusterConfigById(e,t,n,...i){let s=i.length>0?i[0]:{},r=null;if(r=n instanceof yn&&"function"==typeof n.toJson?n.toJson():n,null==e)throw new Error("Missing the required parameter 'systemDefinedPolicyExtId' when calling updateClusterConfigById");if(null==t)throw new Error("Missing the required parameter 'extId' when calling updateClusterConfigById");if(null==r)throw new Error("Invalid body when calling updateClusterConfigById");const o={systemDefinedPolicyExtId:e,extId:t};let a={};Object.keys(s).forEach(e=>{this.#e.has(e.toLowerCase())||(a[e]=s[e])});const l={...a};le.addEtagReferenceToHeader(n,l);const d=zn;return this.apiClient.callApi("/api/monitoring/v4.2/serviceability/alerts/system-defined-policies/{systemDefinedPolicyExtId}/cluster-configs/{extId}","PUT",o,{},l,{},r,["apiKeyAuthScheme","basicAuthScheme"],["application/json"],["application/json"],d)}},AlertEmailConfigurationApi:class{#e;static get ApiClient(){return le}constructor(e){this.apiClient=e||le.instance,this.#e=new Set,this.#e.add("authorization"),this.#e.add("cookie"),this.#e.add("host"),this.#e.add("user-agent")}getAlertEmailConfiguration(...e){let t=e.length>0?e[0]:{},n={};Object.keys(t).forEach(e=>{this.#e.has(e.toLowerCase())||(n[e]=t[e])});const i={...n},s=Ui;return this.apiClient.callApi("/api/monitoring/v4.2/serviceability/alerts/email-config","GET",{},{},i,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],s)}updateAlertEmailConfiguration(e,...t){let n=t.length>0?t[0]:{},i=null;if(i=e instanceof Ai&&"function"==typeof e.toJson?e.toJson():e,null==i)throw new Error("Invalid body when calling updateAlertEmailConfiguration");let s={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(s[e]=n[e])});const r={...s};le.addEtagReferenceToHeader(e,r);const o=Ni;return this.apiClient.callApi("/api/monitoring/v4.2/serviceability/alerts/email-config","PUT",{},{},r,{},i,["apiKeyAuthScheme","basicAuthScheme"],["application/json"],["application/json"],o)}},AuditsApi:class{#e;static get ApiClient(){return le}constructor(e){this.apiClient=e||le.instance,this.#e=new Set,this.#e.add("authorization"),this.#e.add("cookie"),this.#e.add("host"),this.#e.add("user-agent")}getAuditById(e,...t){let n=t.length>0?t[0]:{};if(null==e)throw new Error("Missing the required parameter 'extId' when calling getAuditById");const i={extId:e};let s={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(s[e]=n[e])});const r={...s},o=Qi;return this.apiClient.callApi("/api/monitoring/v4.2/serviceability/audits/{extId}","GET",i,{},r,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],o)}listAudits(e,...t){let n=t.length>0?t[0]:{};const i={...(e=e||{}).hasOwnProperty("$page")?{$page:e.$page}:{},...e.hasOwnProperty("$limit")?{$limit:e.$limit}:{},...e.hasOwnProperty("$filter")?{$filter:e.$filter}:{},...e.hasOwnProperty("$orderby")?{$orderby:e.$orderby}:{},...e.hasOwnProperty("$select")?{$select:e.$select}:{}};let s={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(s[e]=n[e])});const r={...s},o=ns;return this.apiClient.callApi("/api/monitoring/v4.2/serviceability/audits","GET",{},i,r,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],o)}},ClusterLogsApi:class{#e;static get ApiClient(){return le}constructor(e){this.apiClient=e||le.instance,this.#e=new Set,this.#e.add("authorization"),this.#e.add("cookie"),this.#e.add("host"),this.#e.add("user-agent")}collectLogs(e,t,...n){let i=n.length>0?n[0]:{},s=null;if(s=t instanceof js&&"function"==typeof t.toJson?t.toJson():t,null==e)throw new Error("Missing the required parameter 'extId' when calling collectLogs");if(null==s)throw new Error("Invalid body when calling collectLogs");const r={extId:e};let o={};Object.keys(i).forEach(e=>{this.#e.has(e.toLowerCase())||(o[e]=i[e])});const a={...o};le.addEtagReferenceToHeader(t,a);const l=Ns;return this.apiClient.callApi("/api/monitoring/v4.2/serviceability/clusters/{extId}/$actions/collect-logs","POST",r,{},a,{},s,["apiKeyAuthScheme","basicAuthScheme"],["application/json"],["application/json"],l)}listTags(e,t,...n){let i=n.length>0?n[0]:{};if(t=t||{},null==e)throw new Error("Missing the required parameter 'clusterExtId' when calling listTags");const s={clusterExtId:e},r={...t.hasOwnProperty("$page")?{$page:t.$page}:{},...t.hasOwnProperty("$limit")?{$limit:t.$limit}:{},...t.hasOwnProperty("$filter")?{$filter:t.$filter}:{},...t.hasOwnProperty("$orderby")?{$orderby:t.$orderby}:{},...t.hasOwnProperty("$select")?{$select:t.$select}:{}};let o={};Object.keys(i).forEach(e=>{this.#e.has(e.toLowerCase())||(o[e]=i[e])});const a={...o},l=Us;return this.apiClient.callApi("/api/monitoring/v4.2/serviceability/clusters/{clusterExtId}/tags","GET",s,r,a,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],l)}},EventsApi:class{#e;static get ApiClient(){return le}constructor(e){this.apiClient=e||le.instance,this.#e=new Set,this.#e.add("authorization"),this.#e.add("cookie"),this.#e.add("host"),this.#e.add("user-agent")}getEventById(e,...t){let n=t.length>0?t[0]:{};if(null==e)throw new Error("Missing the required parameter 'extId' when calling getEventById");const i={extId:e};let s={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(s[e]=n[e])});const r={...s},o=Ys;return this.apiClient.callApi("/api/monitoring/v4.2/serviceability/events/{extId}","GET",i,{},r,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],o)}listEvents(e,...t){let n=t.length>0?t[0]:{};const i={...(e=e||{}).hasOwnProperty("$page")?{$page:e.$page}:{},...e.hasOwnProperty("$limit")?{$limit:e.$limit}:{},...e.hasOwnProperty("$filter")?{$filter:e.$filter}:{},...e.hasOwnProperty("$orderby")?{$orderby:e.$orderby}:{},...e.hasOwnProperty("$select")?{$select:e.$select}:{}};let s={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(s[e]=n[e])});const r={...s},o=zs;return this.apiClient.callApi("/api/monitoring/v4.2/serviceability/events","GET",{},i,r,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],o)}},ManageAlertsApi:class{#e;static get ApiClient(){return le}constructor(e){this.apiClient=e||le.instance,this.#e=new Set,this.#e.add("authorization"),this.#e.add("cookie"),this.#e.add("host"),this.#e.add("user-agent")}manageAlert(e,t,...n){let i=n.length>0?n[0]:{},s=null;if(s=t instanceof rr&&"function"==typeof t.toJson?t.toJson():t,null==e)throw new Error("Missing the required parameter 'extId' when calling manageAlert");if(null==s)throw new Error("Invalid body when calling manageAlert");const r={extId:e};let o={};Object.keys(i).forEach(e=>{this.#e.has(e.toLowerCase())||(o[e]=i[e])});const a={...o};le.addEtagReferenceToHeader(t,a);const l=er;return this.apiClient.callApi("/api/monitoring/v4.2/serviceability/alerts/{extId}/$actions/manage-alert","POST",r,{},a,{},s,["apiKeyAuthScheme","basicAuthScheme"],["application/json"],["application/json"],l)}},SystemDefinedChecksApi:class{#e;static get ApiClient(){return le}constructor(e){this.apiClient=e||le.instance,this.#e=new Set,this.#e.add("authorization"),this.#e.add("cookie"),this.#e.add("host"),this.#e.add("user-agent")}runSystemDefinedChecks(e,t,...n){let i=n.length>0?n[0]:{},s=null;if(s=t instanceof hr&&"function"==typeof t.toJson?t.toJson():t,null==e)throw new Error("Missing the required parameter 'clusterExtId' when calling runSystemDefinedChecks");if(null==s)throw new Error("Invalid body when calling runSystemDefinedChecks");const r={clusterExtId:e};let o={};Object.keys(i).forEach(e=>{this.#e.has(e.toLowerCase())||(o[e]=i[e])});const a={...o};le.addEtagReferenceToHeader(t,a);const l=lr;return this.apiClient.callApi("/api/monitoring/v4.2/serviceability/clusters/{clusterExtId}/$actions/run-system-defined-checks","POST",r,{},a,{},s,["apiKeyAuthScheme","basicAuthScheme"],["application/json"],["application/json"],l)}},UserDefinedPoliciesApi:class{#e;static get ApiClient(){return le}constructor(e){this.apiClient=e||le.instance,this.#e=new Set,this.#e.add("authorization"),this.#e.add("cookie"),this.#e.add("host"),this.#e.add("user-agent")}createUdaPolicy(e,...t){let n=t.length>0?t[0]:{},i=null;if(i=e instanceof Cr&&"function"==typeof e.toJson?e.toJson():e,null==i)throw new Error("Invalid body when calling createUdaPolicy");let s={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(s[e]=n[e])});const r={...s};le.addEtagReferenceToHeader(e,r);const o=Rr;return this.apiClient.callApi("/api/monitoring/v4.2/serviceability/alerts/user-defined-policies","POST",{},{},r,{},i,["apiKeyAuthScheme","basicAuthScheme"],["application/json"],["application/json"],o)}deleteUdaPolicyById(e,...t){let n=t.length>0?t[0]:{};if(null==e)throw new Error("Missing the required parameter 'extId' when calling deleteUdaPolicyById");const i={extId:e};let s={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(s[e]=n[e])});const r={...s},o=Hr;return this.apiClient.callApi("/api/monitoring/v4.2/serviceability/alerts/user-defined-policies/{extId}","DELETE",i,{},r,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],o)}findConflictingUdaPolicies(e,...t){let n=t.length>0?t[0]:{},i=null;if(i=e instanceof Cr&&"function"==typeof e.toJson?e.toJson():e,null==i)throw new Error("Invalid body when calling findConflictingUdaPolicies");let s={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(s[e]=n[e])});const r={...s};le.addEtagReferenceToHeader(e,r);const o=Jr;return this.apiClient.callApi("/api/monitoring/v4.2/serviceability/alerts/user-defined-policies/$actions/find-conflicts","POST",{},{},r,{},i,["apiKeyAuthScheme","basicAuthScheme"],["application/json"],["application/json"],o)}getUdaPolicyById(e,...t){let n=t.length>0?t[0]:{};if(null==e)throw new Error("Missing the required parameter 'extId' when calling getUdaPolicyById");const i={extId:e};let s={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(s[e]=n[e])});const r={...s},o=io;return this.apiClient.callApi("/api/monitoring/v4.2/serviceability/alerts/user-defined-policies/{extId}","GET",i,{},r,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],o)}listUdaPolicies(e,...t){let n=t.length>0?t[0]:{};const i={...(e=e||{}).hasOwnProperty("$page")?{$page:e.$page}:{},...e.hasOwnProperty("$limit")?{$limit:e.$limit}:{},...e.hasOwnProperty("$filter")?{$filter:e.$filter}:{},...e.hasOwnProperty("$orderby")?{$orderby:e.$orderby}:{},...e.hasOwnProperty("$select")?{$select:e.$select}:{}};let s={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(s[e]=n[e])});const r={...s},o=Zr;return this.apiClient.callApi("/api/monitoring/v4.2/serviceability/alerts/user-defined-policies","GET",{},i,r,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],o)}updateUdaPolicyById(e,t,...n){let i=n.length>0?n[0]:{},s=null;if(s=t instanceof Cr&&"function"==typeof t.toJson?t.toJson():t,null==e)throw new Error("Missing the required parameter 'extId' when calling updateUdaPolicyById");if(null==s)throw new Error("Invalid body when calling updateUdaPolicyById");const r={extId:e};let o={};Object.keys(i).forEach(e=>{this.#e.has(e.toLowerCase())||(o[e]=i[e])});const a={...o};le.addEtagReferenceToHeader(t,a);const l=Gr;return this.apiClient.callApi("/api/monitoring/v4.2/serviceability/alerts/user-defined-policies/{extId}","PUT",r,{},a,{},s,["apiKeyAuthScheme","basicAuthScheme"],["application/json"],["application/json"],l)}},FQDN:pi,Flag:E,IPAddressOrFQDN:$i,IPv4Address:yi,IPv6Address:mi,KVPair:S,KVStringPair:ri,MapOfStringWrapper:C,Message:V,MessageSeverity:x,TenantAwareModel:Be,ApiLink:J,ApiResponseMetadata:B,ExternalizableAbstractModel:ze,AlertEntityReference:Ke,BoolValue:et,CauseAndResolution:oo,ComparisonOperator:nt,ConditionType:st,DataType:ot,DoubleValue:lt,EntityReference:Ye,FloatValue:lo,ImpactType:Qe,IntValue:ut,MetricDetail:yt,OperationType:Vi,Parameter:wt,Severity:kt,StringValue:ct,AppMessage:Ie,ErrorResponse:Je,SchemaValidationError:xe,SchemaValidationErrorMessage:Se,ActionType:ir,Alert:Ut,AlertActionSpec:rr,AlertConfig:cn,AlertEmailConfiguration:Ai,AlertPolicyConfigurableParameter:rn,ArchiveOpts:fs,Audit:Ki,AuditEntityReference:Ji,AutoResolveState:Wt,BooleanConfigurableParamValue:Gt,ClusterConfig:yn,ClusterConfigProjection:Dn,ClusterType:fn,CollectLogsApiResponse:Ns,CommunicationStatus:ui,Condition:br,ConfigurableParamValueRange:Kt,ConflictingPolicy:Mr,ConnectionStatus:ii,CreateUdaPolicyApiResponse:Rr,Credential:rs,CustomServerUploadParams:ds,DeleteUdaPolicyApiResponse:Hr,EmailConfigurationRule:Zn,EmailTemplate:ti,EntityFilter:pr,EntityType:wn,Event:_s,EventEntityReference:Vs,FindConflictingUdaPoliciesApiResponse:Jr,FloatConfigurableParamValue:Xt,GetAlertApiResponse:Lt,GetAlertEmailConfigurationApiResponse:Ui,GetAuditApiResponse:Qi,GetClusterConfigApiResponse:Ln,GetEventApiResponse:Ys,GetSdaPolicyApiResponse:In,GetUdaPolicyApiResponse:io,GroupEntityType:yr,GroupFilter:mr,HttpProxy:ki,IntConfigurableParamValue:Zt,ListAlertsApiResponse:Nt,ListAuditsApiResponse:ns,ListClusterConfigsApiResponse:Nn,ListEventsApiResponse:zs,ListSdaPoliciesApiResponse:Yn,ListTagsApiResponse:Us,ListUdaPoliciesApiResponse:Zr,LocalUploadParams:hs,LogCollectionSpec:js,ManageAlertApiResponse:er,MspOpts:Ts,NtnxServerUploadParams:ps,ParameterizedMessage:ai,PolicySeverityLevel:Or,PropertyState:ln,ProxyType:Ti,RelatedPolicy:$r,RemoteTunnelDetails:Ei,RootCauseAnalysis:Ot,RootCauseAnalysisProjection:uo,RunSystemDefinedChecksApiResponse:lr,RunSystemDefinedChecksSpec:hr,Scope:bn,SdaSubType:Fn,SdaType:jn,ServerUploadProtocol:as,ServiceCenter:Oi,SeverityConfig:un,SeverityTrail:Pt,Status:Wi,StorageContainerUploadParams:ys,StringConfigurableParamValue:tn,SystemDefinedPolicy:Pn,Tag:As,TagOpts:ks,TriggerCondition:Er,UpdateAlertEmailConfigurationApiResponse:Ni,UpdateClusterConfigApiResponse:zn,UpdateUdaPolicyApiResponse:Gr,UserDefinedPolicy:Cr,UserReference:Gi,TaskReference:Wn}})(),i.default})());
|