@nutanix-scratch/microseg-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 +3 -3
- package/dist/Ntnx-Microseg-js-client-prod.js +1 -1
- package/dist/Ntnx-Microseg-js-client.js +133 -133
- 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/addressgroups-endpoints.d.ts +2 -2
- package/dist/es/apis/addressgroups-endpoints.js +4 -4
- package/dist/es/apis/directoryserverconfigs-endpoints.d.ts +2 -2
- package/dist/es/apis/directoryserverconfigs-endpoints.js +4 -4
- package/dist/es/apis/entitygroups-endpoints.d.ts +2 -2
- package/dist/es/apis/entitygroups-endpoints.js +4 -4
- package/dist/es/apis/networksecuritypolicies-endpoints.d.ts +3 -3
- package/dist/es/apis/networksecuritypolicies-endpoints.js +5 -5
- package/dist/es/apis/servicegroups-endpoints.d.ts +2 -2
- package/dist/es/apis/servicegroups-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/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/microseg/v4/config/AdInfo.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/AdInfo.js +3 -3
- package/dist/es/models/microseg/v4/config/AdStatus.js +2 -2
- package/dist/es/models/microseg/v4/config/AddressGroup.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/AddressGroup.js +3 -3
- package/dist/es/models/microseg/v4/config/Addresses.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/Addresses.js +3 -3
- package/dist/es/models/microseg/v4/config/AllToAllIsolationGroup.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/AllToAllIsolationGroup.js +3 -3
- package/dist/es/models/microseg/v4/config/AllowType.js +2 -2
- package/dist/es/models/microseg/v4/config/AllowedConfig.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/AllowedConfig.js +3 -3
- package/dist/es/models/microseg/v4/config/AllowedEntity.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/AllowedEntity.js +3 -3
- package/dist/es/models/microseg/v4/config/AllowedSelectBy.js +2 -2
- package/dist/es/models/microseg/v4/config/AllowedType.js +2 -2
- package/dist/es/models/microseg/v4/config/ApplicationRuleSpec.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/ApplicationRuleSpec.js +3 -3
- package/dist/es/models/microseg/v4/config/CategoryAssociatedEntityType.js +2 -2
- package/dist/es/models/microseg/v4/config/CategoryMapping.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/CategoryMapping.js +3 -3
- package/dist/es/models/microseg/v4/config/CreateAddressGroupApiResponse.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/CreateAddressGroupApiResponse.js +3 -3
- package/dist/es/models/microseg/v4/config/CreateDirectoryServerConfigApiResponse.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/CreateDirectoryServerConfigApiResponse.js +3 -3
- package/dist/es/models/microseg/v4/config/CreateDsCategoryMappingApiResponse.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/CreateDsCategoryMappingApiResponse.js +3 -3
- package/dist/es/models/microseg/v4/config/CreateEntityGroupApiResponse.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/CreateEntityGroupApiResponse.js +3 -3
- package/dist/es/models/microseg/v4/config/CreateNetworkSecurityPolicyApiResponse.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/CreateNetworkSecurityPolicyApiResponse.js +3 -3
- package/dist/es/models/microseg/v4/config/CreateNetworkSecurityPolicyExportApiResponse.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/CreateNetworkSecurityPolicyExportApiResponse.js +3 -3
- package/dist/es/models/microseg/v4/config/CreateNetworkSecurityPolicyImportApiResponse.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/CreateNetworkSecurityPolicyImportApiResponse.js +3 -3
- package/dist/es/models/microseg/v4/config/CreateServiceGroupApiResponse.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/CreateServiceGroupApiResponse.js +3 -3
- package/dist/es/models/microseg/v4/config/DeleteAddressGroupApiResponse.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/DeleteAddressGroupApiResponse.js +3 -3
- package/dist/es/models/microseg/v4/config/DeleteDirectoryServerConfigApiResponse.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/DeleteDirectoryServerConfigApiResponse.js +3 -3
- package/dist/es/models/microseg/v4/config/DeleteDsCategoryMappingApiResponse.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/DeleteDsCategoryMappingApiResponse.js +3 -3
- package/dist/es/models/microseg/v4/config/DeleteEntityGroupApiResponse.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/DeleteEntityGroupApiResponse.js +3 -3
- package/dist/es/models/microseg/v4/config/DeleteNetworkSecurityPolicyApiResponse.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/DeleteNetworkSecurityPolicyApiResponse.js +3 -3
- package/dist/es/models/microseg/v4/config/DeleteServiceGroupApiResponse.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/DeleteServiceGroupApiResponse.js +3 -3
- package/dist/es/models/microseg/v4/config/DirectoryServerConfig.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/DirectoryServerConfig.js +3 -3
- package/dist/es/models/microseg/v4/config/EntityGroup.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/EntityGroup.js +3 -3
- package/dist/es/models/microseg/v4/config/ExceptConfig.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/ExceptConfig.js +3 -3
- package/dist/es/models/microseg/v4/config/ExceptEntity.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/ExceptEntity.js +3 -3
- package/dist/es/models/microseg/v4/config/ExceptSelectBy.js +2 -2
- package/dist/es/models/microseg/v4/config/ExceptType.js +2 -2
- package/dist/es/models/microseg/v4/config/GetAddressGroupApiResponse.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/GetAddressGroupApiResponse.js +3 -3
- package/dist/es/models/microseg/v4/config/GetDirectoryServerConfigApiResponse.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/GetDirectoryServerConfigApiResponse.js +3 -3
- package/dist/es/models/microseg/v4/config/GetDsCategoryMappingApiResponse.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/GetDsCategoryMappingApiResponse.js +3 -3
- package/dist/es/models/microseg/v4/config/GetEntityGroupApiResponse.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/GetEntityGroupApiResponse.js +3 -3
- package/dist/es/models/microseg/v4/config/GetNetworkSecurityPolicyApiResponse.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/GetNetworkSecurityPolicyApiResponse.js +3 -3
- package/dist/es/models/microseg/v4/config/GetServiceGroupApiResponse.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/GetServiceGroupApiResponse.js +3 -3
- package/dist/es/models/microseg/v4/config/IPv4Range.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/IPv4Range.js +3 -3
- package/dist/es/models/microseg/v4/config/IPv6Range.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/IPv6Range.js +3 -3
- package/dist/es/models/microseg/v4/config/IcmpTypeCodeSpec.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/IcmpTypeCodeSpec.js +3 -3
- package/dist/es/models/microseg/v4/config/IcmpV6TypeCodeSpec.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/IcmpV6TypeCodeSpec.js +3 -3
- package/dist/es/models/microseg/v4/config/IntraEntityGroupRuleAction.js +2 -2
- package/dist/es/models/microseg/v4/config/IntraEntityGroupRuleSpec.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/IntraEntityGroupRuleSpec.js +3 -3
- package/dist/es/models/microseg/v4/config/IpRange.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/IpRange.js +3 -3
- package/dist/es/models/microseg/v4/config/IsolationGroup.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/IsolationGroup.js +3 -3
- package/dist/es/models/microseg/v4/config/ListAddressGroupsApiResponse.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/ListAddressGroupsApiResponse.js +3 -3
- package/dist/es/models/microseg/v4/config/ListDirectoryServerConfigsApiResponse.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/ListDirectoryServerConfigsApiResponse.js +3 -3
- package/dist/es/models/microseg/v4/config/ListDsCategoryMappingsApiResponse.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/ListDsCategoryMappingsApiResponse.js +3 -3
- package/dist/es/models/microseg/v4/config/ListEntityGroupsApiResponse.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/ListEntityGroupsApiResponse.js +3 -3
- package/dist/es/models/microseg/v4/config/ListNetworkSecurityPoliciesApiResponse.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/ListNetworkSecurityPoliciesApiResponse.js +3 -3
- package/dist/es/models/microseg/v4/config/ListNetworkSecurityPolicyRulesApiResponse.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/ListNetworkSecurityPolicyRulesApiResponse.js +3 -3
- package/dist/es/models/microseg/v4/config/ListServiceGroupsApiResponse.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/ListServiceGroupsApiResponse.js +3 -3
- package/dist/es/models/microseg/v4/config/MatchEntity.js +2 -2
- package/dist/es/models/microseg/v4/config/MatchField.js +2 -2
- package/dist/es/models/microseg/v4/config/MatchType.js +2 -2
- package/dist/es/models/microseg/v4/config/MatchingCriteria.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/MatchingCriteria.js +3 -3
- package/dist/es/models/microseg/v4/config/MultiEnvIsolationRuleSpec.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/MultiEnvIsolationRuleSpec.js +3 -3
- package/dist/es/models/microseg/v4/config/NetworkSecurityPolicy.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/NetworkSecurityPolicy.js +3 -3
- package/dist/es/models/microseg/v4/config/NetworkSecurityPolicyExportSpec.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/NetworkSecurityPolicyExportSpec.js +3 -3
- package/dist/es/models/microseg/v4/config/NetworkSecurityPolicyRule.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/NetworkSecurityPolicyRule.js +3 -3
- package/dist/es/models/microseg/v4/config/RuleType.js +2 -2
- package/dist/es/models/microseg/v4/config/SecurityPolicyScope.js +2 -2
- package/dist/es/models/microseg/v4/config/SecurityPolicyState.js +2 -2
- package/dist/es/models/microseg/v4/config/SecurityPolicyType.js +2 -2
- package/dist/es/models/microseg/v4/config/ServiceGroup.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/ServiceGroup.js +3 -3
- package/dist/es/models/microseg/v4/config/SyncPolicy.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/SyncPolicy.js +3 -3
- package/dist/es/models/microseg/v4/config/TcpPortRangeSpec.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/TcpPortRangeSpec.js +3 -3
- package/dist/es/models/microseg/v4/config/TwoEnvIsolationRuleSpec.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/TwoEnvIsolationRuleSpec.js +3 -3
- package/dist/es/models/microseg/v4/config/UdpPortRangeSpec.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/UdpPortRangeSpec.js +3 -3
- package/dist/es/models/microseg/v4/config/UpdateAddressGroupApiResponse.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/UpdateAddressGroupApiResponse.js +3 -3
- package/dist/es/models/microseg/v4/config/UpdateDirectoryServerConfigApiResponse.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/UpdateDirectoryServerConfigApiResponse.js +3 -3
- package/dist/es/models/microseg/v4/config/UpdateDsCategoryMappingApiResponse.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/UpdateDsCategoryMappingApiResponse.js +3 -3
- package/dist/es/models/microseg/v4/config/UpdateEntityGroupApiResponse.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/UpdateEntityGroupApiResponse.js +3 -3
- package/dist/es/models/microseg/v4/config/UpdateNetworkSecurityPolicyApiResponse.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/UpdateNetworkSecurityPolicyApiResponse.js +3 -3
- package/dist/es/models/microseg/v4/config/UpdateServiceGroupApiResponse.d.ts +1 -1
- package/dist/es/models/microseg/v4/config/UpdateServiceGroupApiResponse.js +3 -3
- package/dist/es/models/microseg/v4/error/AppMessage.d.ts +1 -1
- package/dist/es/models/microseg/v4/error/AppMessage.js +3 -3
- package/dist/es/models/microseg/v4/error/ErrorResponse.d.ts +1 -1
- package/dist/es/models/microseg/v4/error/ErrorResponse.js +3 -3
- package/dist/es/models/microseg/v4/error/SchemaValidationError.d.ts +1 -1
- package/dist/es/models/microseg/v4/error/SchemaValidationError.js +3 -3
- package/dist/es/models/microseg/v4/error/SchemaValidationErrorMessage.d.ts +1 -1
- package/dist/es/models/microseg/v4/error/SchemaValidationErrorMessage.js +3 -3
- package/dist/es/models/microseg/v4/operation/DryRunSpec.d.ts +1 -1
- package/dist/es/models/microseg/v4/operation/DryRunSpec.js +3 -3
- package/dist/es/models/microseg/v4/operation/DryRunSummary.d.ts +1 -1
- package/dist/es/models/microseg/v4/operation/DryRunSummary.js +3 -3
- package/dist/es/models/microseg/v4/operation/PolicyCount.d.ts +1 -1
- package/dist/es/models/microseg/v4/operation/PolicyCount.js +3 -3
- package/dist/es/models/microseg/v4/operation/PolicyCountByType.d.ts +1 -1
- package/dist/es/models/microseg/v4/operation/PolicyCountByType.js +3 -3
- package/dist/es/models/microseg/v4/operation/PolicyMetadata.d.ts +1 -1
- package/dist/es/models/microseg/v4/operation/PolicyMetadata.js +3 -3
- package/dist/es/models/microseg/v4/operation/PolicyPreview.d.ts +1 -1
- package/dist/es/models/microseg/v4/operation/PolicyPreview.js +3 -3
- package/dist/es/models/microseg/v4/operation/PolicyUpgradeSummary.d.ts +1 -1
- package/dist/es/models/microseg/v4/operation/PolicyUpgradeSummary.js +3 -3
- package/dist/es/models/microseg/v4/operation/SecurityPolicyOptions.d.ts +1 -1
- package/dist/es/models/microseg/v4/operation/SecurityPolicyOptions.js +3 -3
- package/dist/es/models/microseg/v4/operation/SecurityPolicyType.js +2 -2
- package/dist/es/models/microseg/v4/operation/SubnetUpgradeSummary.d.ts +1 -1
- package/dist/es/models/microseg/v4/operation/SubnetUpgradeSummary.js +3 -3
- package/dist/es/models/microseg/v4/operation/TotalPolicyCount.d.ts +1 -1
- package/dist/es/models/microseg/v4/operation/TotalPolicyCount.js +3 -3
- package/dist/es/models/microseg/v4/operation/UpgradeJob.d.ts +1 -1
- package/dist/es/models/microseg/v4/operation/UpgradeJob.js +3 -3
- package/dist/es/models/microseg/v4/operation/UpgradeSpec.d.ts +1 -1
- package/dist/es/models/microseg/v4/operation/UpgradeSpec.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/addressgroups-endpoints.d.ts +2 -2
- package/dist/lib/apis/addressgroups-endpoints.js +4 -4
- package/dist/lib/apis/directoryserverconfigs-endpoints.d.ts +2 -2
- package/dist/lib/apis/directoryserverconfigs-endpoints.js +4 -4
- package/dist/lib/apis/entitygroups-endpoints.d.ts +2 -2
- package/dist/lib/apis/entitygroups-endpoints.js +4 -4
- package/dist/lib/apis/networksecuritypolicies-endpoints.d.ts +3 -3
- package/dist/lib/apis/networksecuritypolicies-endpoints.js +5 -5
- package/dist/lib/apis/servicegroups-endpoints.d.ts +2 -2
- package/dist/lib/apis/servicegroups-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/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/microseg/v4/config/AdInfo.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/AdInfo.js +3 -3
- package/dist/lib/models/microseg/v4/config/AdStatus.js +2 -2
- package/dist/lib/models/microseg/v4/config/AddressGroup.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/AddressGroup.js +3 -3
- package/dist/lib/models/microseg/v4/config/Addresses.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/Addresses.js +3 -3
- package/dist/lib/models/microseg/v4/config/AllToAllIsolationGroup.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/AllToAllIsolationGroup.js +3 -3
- package/dist/lib/models/microseg/v4/config/AllowType.js +2 -2
- package/dist/lib/models/microseg/v4/config/AllowedConfig.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/AllowedConfig.js +3 -3
- package/dist/lib/models/microseg/v4/config/AllowedEntity.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/AllowedEntity.js +3 -3
- package/dist/lib/models/microseg/v4/config/AllowedSelectBy.js +2 -2
- package/dist/lib/models/microseg/v4/config/AllowedType.js +2 -2
- package/dist/lib/models/microseg/v4/config/ApplicationRuleSpec.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/ApplicationRuleSpec.js +3 -3
- package/dist/lib/models/microseg/v4/config/CategoryAssociatedEntityType.js +2 -2
- package/dist/lib/models/microseg/v4/config/CategoryMapping.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/CategoryMapping.js +3 -3
- package/dist/lib/models/microseg/v4/config/CreateAddressGroupApiResponse.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/CreateAddressGroupApiResponse.js +3 -3
- package/dist/lib/models/microseg/v4/config/CreateDirectoryServerConfigApiResponse.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/CreateDirectoryServerConfigApiResponse.js +3 -3
- package/dist/lib/models/microseg/v4/config/CreateDsCategoryMappingApiResponse.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/CreateDsCategoryMappingApiResponse.js +3 -3
- package/dist/lib/models/microseg/v4/config/CreateEntityGroupApiResponse.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/CreateEntityGroupApiResponse.js +3 -3
- package/dist/lib/models/microseg/v4/config/CreateNetworkSecurityPolicyApiResponse.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/CreateNetworkSecurityPolicyApiResponse.js +3 -3
- package/dist/lib/models/microseg/v4/config/CreateNetworkSecurityPolicyExportApiResponse.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/CreateNetworkSecurityPolicyExportApiResponse.js +3 -3
- package/dist/lib/models/microseg/v4/config/CreateNetworkSecurityPolicyImportApiResponse.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/CreateNetworkSecurityPolicyImportApiResponse.js +3 -3
- package/dist/lib/models/microseg/v4/config/CreateServiceGroupApiResponse.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/CreateServiceGroupApiResponse.js +3 -3
- package/dist/lib/models/microseg/v4/config/DeleteAddressGroupApiResponse.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/DeleteAddressGroupApiResponse.js +3 -3
- package/dist/lib/models/microseg/v4/config/DeleteDirectoryServerConfigApiResponse.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/DeleteDirectoryServerConfigApiResponse.js +3 -3
- package/dist/lib/models/microseg/v4/config/DeleteDsCategoryMappingApiResponse.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/DeleteDsCategoryMappingApiResponse.js +3 -3
- package/dist/lib/models/microseg/v4/config/DeleteEntityGroupApiResponse.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/DeleteEntityGroupApiResponse.js +3 -3
- package/dist/lib/models/microseg/v4/config/DeleteNetworkSecurityPolicyApiResponse.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/DeleteNetworkSecurityPolicyApiResponse.js +3 -3
- package/dist/lib/models/microseg/v4/config/DeleteServiceGroupApiResponse.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/DeleteServiceGroupApiResponse.js +3 -3
- package/dist/lib/models/microseg/v4/config/DirectoryServerConfig.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/DirectoryServerConfig.js +3 -3
- package/dist/lib/models/microseg/v4/config/EntityGroup.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/EntityGroup.js +3 -3
- package/dist/lib/models/microseg/v4/config/ExceptConfig.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/ExceptConfig.js +3 -3
- package/dist/lib/models/microseg/v4/config/ExceptEntity.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/ExceptEntity.js +3 -3
- package/dist/lib/models/microseg/v4/config/ExceptSelectBy.js +2 -2
- package/dist/lib/models/microseg/v4/config/ExceptType.js +2 -2
- package/dist/lib/models/microseg/v4/config/GetAddressGroupApiResponse.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/GetAddressGroupApiResponse.js +3 -3
- package/dist/lib/models/microseg/v4/config/GetDirectoryServerConfigApiResponse.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/GetDirectoryServerConfigApiResponse.js +3 -3
- package/dist/lib/models/microseg/v4/config/GetDsCategoryMappingApiResponse.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/GetDsCategoryMappingApiResponse.js +3 -3
- package/dist/lib/models/microseg/v4/config/GetEntityGroupApiResponse.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/GetEntityGroupApiResponse.js +3 -3
- package/dist/lib/models/microseg/v4/config/GetNetworkSecurityPolicyApiResponse.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/GetNetworkSecurityPolicyApiResponse.js +3 -3
- package/dist/lib/models/microseg/v4/config/GetServiceGroupApiResponse.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/GetServiceGroupApiResponse.js +3 -3
- package/dist/lib/models/microseg/v4/config/IPv4Range.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/IPv4Range.js +3 -3
- package/dist/lib/models/microseg/v4/config/IPv6Range.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/IPv6Range.js +3 -3
- package/dist/lib/models/microseg/v4/config/IcmpTypeCodeSpec.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/IcmpTypeCodeSpec.js +3 -3
- package/dist/lib/models/microseg/v4/config/IcmpV6TypeCodeSpec.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/IcmpV6TypeCodeSpec.js +3 -3
- package/dist/lib/models/microseg/v4/config/IntraEntityGroupRuleAction.js +2 -2
- package/dist/lib/models/microseg/v4/config/IntraEntityGroupRuleSpec.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/IntraEntityGroupRuleSpec.js +3 -3
- package/dist/lib/models/microseg/v4/config/IpRange.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/IpRange.js +3 -3
- package/dist/lib/models/microseg/v4/config/IsolationGroup.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/IsolationGroup.js +3 -3
- package/dist/lib/models/microseg/v4/config/ListAddressGroupsApiResponse.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/ListAddressGroupsApiResponse.js +3 -3
- package/dist/lib/models/microseg/v4/config/ListDirectoryServerConfigsApiResponse.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/ListDirectoryServerConfigsApiResponse.js +3 -3
- package/dist/lib/models/microseg/v4/config/ListDsCategoryMappingsApiResponse.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/ListDsCategoryMappingsApiResponse.js +3 -3
- package/dist/lib/models/microseg/v4/config/ListEntityGroupsApiResponse.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/ListEntityGroupsApiResponse.js +3 -3
- package/dist/lib/models/microseg/v4/config/ListNetworkSecurityPoliciesApiResponse.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/ListNetworkSecurityPoliciesApiResponse.js +3 -3
- package/dist/lib/models/microseg/v4/config/ListNetworkSecurityPolicyRulesApiResponse.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/ListNetworkSecurityPolicyRulesApiResponse.js +3 -3
- package/dist/lib/models/microseg/v4/config/ListServiceGroupsApiResponse.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/ListServiceGroupsApiResponse.js +3 -3
- package/dist/lib/models/microseg/v4/config/MatchEntity.js +2 -2
- package/dist/lib/models/microseg/v4/config/MatchField.js +2 -2
- package/dist/lib/models/microseg/v4/config/MatchType.js +2 -2
- package/dist/lib/models/microseg/v4/config/MatchingCriteria.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/MatchingCriteria.js +3 -3
- package/dist/lib/models/microseg/v4/config/MultiEnvIsolationRuleSpec.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/MultiEnvIsolationRuleSpec.js +3 -3
- package/dist/lib/models/microseg/v4/config/NetworkSecurityPolicy.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/NetworkSecurityPolicy.js +3 -3
- package/dist/lib/models/microseg/v4/config/NetworkSecurityPolicyExportSpec.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/NetworkSecurityPolicyExportSpec.js +3 -3
- package/dist/lib/models/microseg/v4/config/NetworkSecurityPolicyRule.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/NetworkSecurityPolicyRule.js +3 -3
- package/dist/lib/models/microseg/v4/config/RuleType.js +2 -2
- package/dist/lib/models/microseg/v4/config/SecurityPolicyScope.js +2 -2
- package/dist/lib/models/microseg/v4/config/SecurityPolicyState.js +2 -2
- package/dist/lib/models/microseg/v4/config/SecurityPolicyType.js +2 -2
- package/dist/lib/models/microseg/v4/config/ServiceGroup.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/ServiceGroup.js +3 -3
- package/dist/lib/models/microseg/v4/config/SyncPolicy.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/SyncPolicy.js +3 -3
- package/dist/lib/models/microseg/v4/config/TcpPortRangeSpec.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/TcpPortRangeSpec.js +3 -3
- package/dist/lib/models/microseg/v4/config/TwoEnvIsolationRuleSpec.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/TwoEnvIsolationRuleSpec.js +3 -3
- package/dist/lib/models/microseg/v4/config/UdpPortRangeSpec.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/UdpPortRangeSpec.js +3 -3
- package/dist/lib/models/microseg/v4/config/UpdateAddressGroupApiResponse.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/UpdateAddressGroupApiResponse.js +3 -3
- package/dist/lib/models/microseg/v4/config/UpdateDirectoryServerConfigApiResponse.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/UpdateDirectoryServerConfigApiResponse.js +3 -3
- package/dist/lib/models/microseg/v4/config/UpdateDsCategoryMappingApiResponse.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/UpdateDsCategoryMappingApiResponse.js +3 -3
- package/dist/lib/models/microseg/v4/config/UpdateEntityGroupApiResponse.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/UpdateEntityGroupApiResponse.js +3 -3
- package/dist/lib/models/microseg/v4/config/UpdateNetworkSecurityPolicyApiResponse.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/UpdateNetworkSecurityPolicyApiResponse.js +3 -3
- package/dist/lib/models/microseg/v4/config/UpdateServiceGroupApiResponse.d.ts +1 -1
- package/dist/lib/models/microseg/v4/config/UpdateServiceGroupApiResponse.js +3 -3
- package/dist/lib/models/microseg/v4/error/AppMessage.d.ts +1 -1
- package/dist/lib/models/microseg/v4/error/AppMessage.js +3 -3
- package/dist/lib/models/microseg/v4/error/ErrorResponse.d.ts +1 -1
- package/dist/lib/models/microseg/v4/error/ErrorResponse.js +3 -3
- package/dist/lib/models/microseg/v4/error/SchemaValidationError.d.ts +1 -1
- package/dist/lib/models/microseg/v4/error/SchemaValidationError.js +3 -3
- package/dist/lib/models/microseg/v4/error/SchemaValidationErrorMessage.d.ts +1 -1
- package/dist/lib/models/microseg/v4/error/SchemaValidationErrorMessage.js +3 -3
- package/dist/lib/models/microseg/v4/operation/DryRunSpec.d.ts +1 -1
- package/dist/lib/models/microseg/v4/operation/DryRunSpec.js +3 -3
- package/dist/lib/models/microseg/v4/operation/DryRunSummary.d.ts +1 -1
- package/dist/lib/models/microseg/v4/operation/DryRunSummary.js +3 -3
- package/dist/lib/models/microseg/v4/operation/PolicyCount.d.ts +1 -1
- package/dist/lib/models/microseg/v4/operation/PolicyCount.js +3 -3
- package/dist/lib/models/microseg/v4/operation/PolicyCountByType.d.ts +1 -1
- package/dist/lib/models/microseg/v4/operation/PolicyCountByType.js +3 -3
- package/dist/lib/models/microseg/v4/operation/PolicyMetadata.d.ts +1 -1
- package/dist/lib/models/microseg/v4/operation/PolicyMetadata.js +3 -3
- package/dist/lib/models/microseg/v4/operation/PolicyPreview.d.ts +1 -1
- package/dist/lib/models/microseg/v4/operation/PolicyPreview.js +3 -3
- package/dist/lib/models/microseg/v4/operation/PolicyUpgradeSummary.d.ts +1 -1
- package/dist/lib/models/microseg/v4/operation/PolicyUpgradeSummary.js +3 -3
- package/dist/lib/models/microseg/v4/operation/SecurityPolicyOptions.d.ts +1 -1
- package/dist/lib/models/microseg/v4/operation/SecurityPolicyOptions.js +3 -3
- package/dist/lib/models/microseg/v4/operation/SecurityPolicyType.js +2 -2
- package/dist/lib/models/microseg/v4/operation/SubnetUpgradeSummary.d.ts +1 -1
- package/dist/lib/models/microseg/v4/operation/SubnetUpgradeSummary.js +3 -3
- package/dist/lib/models/microseg/v4/operation/TotalPolicyCount.d.ts +1 -1
- package/dist/lib/models/microseg/v4/operation/TotalPolicyCount.js +3 -3
- package/dist/lib/models/microseg/v4/operation/UpgradeJob.d.ts +1 -1
- package/dist/lib/models/microseg/v4/operation/UpgradeJob.js +3 -3
- package/dist/lib/models/microseg/v4/operation/UpgradeSpec.d.ts +1 -1
- package/dist/lib/models/microseg/v4/operation/UpgradeSpec.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.Microseg=t())}(Object("undefined"==typeof self?this:self),()=>(()=>{var e={19(e,t,n){"use strict";var s=n(897);function i(e){if(e)return function(e){for(var t in i.prototype)Object.prototype.hasOwnProperty.call(i.prototype,t)&&(e[t]=i.prototype[t]);return e}(e)}e.exports=i,i.prototype.get=function(e){return this.header[e.toLowerCase()]},i.prototype._setHeaderProperties=function(e){var t=e["content-type"]||"";this.type=s.type(t);var n=s.params(t);for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(this[i]=n[i]);this.links={};try{e.link&&(this.links=s.parseLinks(e.link))}catch(e){}},i.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]",s=[],i=[];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()),d(e,"",0,[],void 0,0,o);try{a=0===i.length?JSON.stringify(e,t,n):JSON.stringify(e,h(t),n)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==s.length;){var l=s.pop();4===l.length?Object.defineProperty(l[0],l[1],l[3]):l[0][l[1]]=l[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}),s.push([r,n,t,o])):i.push([t,n,e]):(r[n]=e,s.push([r,n,t]))}function d(e,s,i,r,o,l,u){var c;if(l+=1,"object"==typeof e&&null!==e){for(c=0;c<r.length;c++)if(r[c]===e)return void a(n,e,s,o);if(void 0!==u.depthLimit&&l>u.depthLimit)return void a(t,e,s,o);if(void 0!==u.edgesLimit&&i+1>u.edgesLimit)return void a(t,e,s,o);if(r.push(e),Array.isArray(e))for(c=0;c<e.length;c++)d(e[c],c,c,r,e,l,u);else{var h=Object.keys(e);for(c=0;c<h.length;c++){var p=h[c];d(e[p],p,c,r,e,l,u)}}r.pop()}}function l(e,t){return e<t?-1:e>t?1:0}function u(e,t,n,o){void 0===o&&(o=r());var a,d=c(e,"",0,[],void 0,0,o)||e;try{a=0===i.length?JSON.stringify(d,t,n):JSON.stringify(d,h(t),n)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==s.length;){var l=s.pop();4===l.length?Object.defineProperty(l[0],l[1],l[3]):l[0][l[1]]=l[2]}}return a}function c(e,i,r,o,d,u,h){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,i,d);try{if("function"==typeof e.toJSON)return}catch(e){return}if(void 0!==h.depthLimit&&u>h.depthLimit)return void a(t,e,i,d);if(void 0!==h.edgesLimit&&r+1>h.edgesLimit)return void a(t,e,i,d);if(o.push(e),Array.isArray(e))for(p=0;p<e.length;p++)c(e[p],p,p,o,e,u,h);else{var y={},v=Object.keys(e).sort(l);for(p=0;p<v.length;p++){var g=v[p];c(e[g],g,p,o,e,u,h),y[g]=e[g]}if(void 0===d)return y;s.push([d,i,e]),d[i]=y}o.pop()}}function h(e){return e=void 0!==e?e:function(e,t){return t},function(t,n){if(i.length>0)for(var s=0;s<i.length;s++){var r=i[s];if(r[1]===t&&r[0]===n){n=r[2],i.splice(s,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,s){if(s)return s(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,s){0!==arguments.length&&!0!==e||(e=1),e<=0&&(e=0),"number"==typeof t&&(t=[t]);const i=t.length,r=e-i;if(0!==r){if(r<0)throw new Error("Cannot have more delays than retries");{const e=t[i-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=s,this}e.exports=function(e){const s=e.Request;return s.prototype.oldRetry=s.prototype.retry,s.prototype.retry=n,s.prototype.callback=t,e}},545(){},548(){},585(e,t,n){"use strict";function s(e){return s="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},s(e)}var i;"undefined"!=typeof window?i=window:"undefined"==typeof self?(console.warn("Using browser-only version of superagent in non-browser environment"),i=void 0):i=self;var r=n(960),o=n(340),a=n(695),d=n(388),l=n(19),u=n(619);function c(){}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 h=t=e.exports;t.Request=$,h.getXHR=function(){if(i.XMLHttpRequest&&(!i.location||"file:"!==i.location.protocol||!i.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 y(e){if(!d(e))return e;var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&v(t,n,e[n]);return t.join("&")}function v(e,t,n){if(void 0!==n)if(null!==n)if(Array.isArray(n))n.forEach(function(n){v(e,t,n)});else if(d(n))for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&v(e,"".concat(t,"[").concat(s,"]"),n[s]);else e.push(encodeURI(t)+"="+encodeURIComponent(n));else e.push(encodeURI(t))}function g(e){for(var t,n,s={},i=e.split("&"),r=0,o=i.length;r<o;++r)-1===(n=(t=i[r]).indexOf("="))?s[decodeURIComponent(t)]="":s[decodeURIComponent(t.slice(0,n))]=decodeURIComponent(t.slice(n+1));return s}function f(e){return/[/+]json($|[^-\w])/.test(e)}function w(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,s,i,r=e.split(/\r?\n/),o={},a=0,d=r.length;a<d;++a)-1!==(t=(n=r[a]).indexOf(":"))&&(s=n.slice(0,t).toLowerCase(),i=p(n.slice(t+1)),o[s]=i);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,s=null;try{s=new w(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",s);try{n._isResponseOK(s)||(e=new Error(s.statusText||s.text||"Unsuccessful HTTP response"))}catch(t){e=t}e?(e.original=t,e.response=s,e.status=s.status,n.callback(e,s)):n.callback(null,s)})}function m(e,t,n){var s=h("DELETE",e);return"function"==typeof t&&(n=t,t=null),t&&s.send(t),n&&s.end(n),s}h.serializeObject=y,h.parseString=g,h.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"},h.serialize={"application/x-www-form-urlencoded":y,"application/json":o},h.parse={"application/x-www-form-urlencoded":g,"application/json":JSON.parse},l(w.prototype),w.prototype._parseBody=function(e){var t=h.parse[this.type];return this.req._parser?this.req._parser(this,e):(!t&&f(this.type)&&(t=h.parse["application/json"]),t&&e&&(e.length>0||e instanceof Object)?t(e):null)},w.prototype.toError=function(){var e=this.req,t=e.method,n=e.url,s="cannot ".concat(t," ").concat(n," (").concat(this.status,")"),i=new Error(s);return i.status=this.status,i.method=t,i.url=n,i},h.Response=w,r($.prototype),a($.prototype),$.prototype.type=function(e){return this.set("Content-Type",h.types[e]||e),this},$.prototype.accept=function(e){return this.set("Accept",h.types[e]||e),this},$.prototype.auth=function(e,t,n){return 1===arguments.length&&(t=""),"object"===s(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=y(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 i.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"===s(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||c,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=h.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 s;try{s=t.status}catch(e){s=0}if(!s){if(e.timedout||e._aborted)return;return e.crossDomainError()}e.emit("end")}};var s=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",s.bind(null,"download")),t.upload&&t.upload.addEventListener("progress",s.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 i=this._header["content-type"],r=this._serializer||h.serialize[i?i.split(";")[0]:""];!r&&f(i)&&(r=h.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)},h.agent=function(){return new u},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach(function(e){u.prototype[e.toLowerCase()]=function(t,n){var s=new h.Request(e,t);return this._setDefaults(s),n&&s.end(n),s}}),u.prototype.del=u.prototype.delete,h.get=function(e,t,n){var s=h("GET",e);return"function"==typeof t&&(n=t,t=null),t&&s.query(t),n&&s.end(n),s},h.head=function(e,t,n){var s=h("HEAD",e);return"function"==typeof t&&(n=t,t=null),t&&s.query(t),n&&s.end(n),s},h.options=function(e,t,n){var s=h("OPTIONS",e);return"function"==typeof t&&(n=t,t=null),t&&s.send(t),n&&s.end(n),s},h.del=m,h.delete=m,h.patch=function(e,t,n){var s=h("PATCH",e);return"function"==typeof t&&(n=t,t=null),t&&s.send(t),n&&s.end(n),s},h.post=function(e,t,n){var s=h("POST",e);return"function"==typeof t&&(n=t,t=null),t&&s.send(t),n&&s.end(n),s},h.put=function(e,t,n){var s=h("PUT",e);return"function"==typeof t&&(n=t,t=null),t&&s.send(t),n&&s.end(n),s}},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,s=new Array(t);n<t;n++)s[n]=e[n];return s}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),s=0;s<t;s++)n[s]=arguments[s];return this._defaults.push({fn:e,args:n}),this}}),n.prototype._setDefaults=function(e){this._defaults.forEach(function(n){var s;e[n.fn].apply(e,function(e){if(Array.isArray(e))return t(e)}(s=n.args)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(s)||function(e,n){if(e){if("string"==typeof e)return t(e,n);var s=Object.prototype.toString.call(e).slice(8,-1);return"Object"===s&&e.constructor&&(s=e.constructor.name),"Map"===s||"Set"===s?Array.from(e):"Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?t(e,n):void 0}}(s)||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 s(e){return s="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},s(e)}var i=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"!==s(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 s=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){s.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)}}),s.end(function(n,s){n?t(n):e(s)})})}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(i(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(i(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 s in t)Object.prototype.hasOwnProperty.call(t,s)&&this.field(e,t[s]);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,s){switch(n.type){case"basic":this.set("Authorization","Basic ".concat(s("".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=i(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&&i(this._data))for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(this._data[s]=e[s]);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 s=new Error("".concat(e+t,"ms exceeded"));s.timeout=t,s.code="ECONNABORTED",s.errno=n,this.timedout=!0,this.timedoutError=s,this.abort(),this.callback(s)}},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 s="win32"===process.platform,i=n(818);function r(e,t){for(var n=[],s=0;s<e.length;s++){var i=e[s];i&&"."!==i&&(".."===i?n.length&&".."!==n[n.length-1]?n.pop():t&&n.push(".."):n.push(i))}return n}function o(e){for(var t=e.length-1,n=0;n<=t&&!e[n];n++);for(var s=t;s>=0&&!e[s];s--);return 0===n&&s===t?e:n>s?[]:e.slice(n,s+1)}var a=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/,d=/^([\s\S]*?)((?:\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))(?:[\\\/]*)$/,l={};function u(e){var t=a.exec(e),n=(t[1]||"")+(t[2]||""),s=t[3]||"",i=d.exec(s);return[n,i[1],i[2],i[3]]}function c(e){var t=a.exec(e),n=t[1]||"",s=!!n&&":"!==n[1];return{device:n,isUnc:s,isAbsolute:s||!!t[2],tail:t[3]}}function h(e){return"\\\\"+e.replace(/^[\\\/]+/,"").replace(/[\\\/]+/g,"\\")}l.resolve=function(){for(var e="",t="",n=!1,s=arguments.length-1;s>=-1;s--){var o;if(s>=0?o=arguments[s]:e?(o=process.env["="+e])&&o.substr(0,3).toLowerCase()===e.toLowerCase()+"\\"||(o=e+"\\"):o=process.cwd(),!i.isString(o))throw new TypeError("Arguments to path.resolve must be strings");if(o){var a=c(o),d=a.device,l=a.isUnc,u=a.isAbsolute,p=a.tail;if((!d||!e||d.toLowerCase()===e.toLowerCase())&&(e||(e=d),n||(t=p+"\\"+t,n=u),e&&n))break}}return l&&(e=h(e)),e+(n?"\\":"")+(t=r(t.split(/[\\\/]+/),!n).join("\\"))||"."},l.normalize=function(e){var t=c(e),n=t.device,s=t.isUnc,i=t.isAbsolute,o=t.tail,a=/[\\\/]$/.test(o);return(o=r(o.split(/[\\\/]+/),!i).join("\\"))||i||(o="."),o&&a&&(o+="\\"),s&&(n=h(n)),n+(i?"\\":"")+o},l.isAbsolute=function(e){return c(e).isAbsolute},l.join=function(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(!i.isString(n))throw new TypeError("Arguments to path.join must be strings");n&&e.push(n)}var s=e.join("\\");return/^[\\\/]{2}[^\\\/]/.test(e[0])||(s=s.replace(/^[\\\/]{2,}/,"\\")),l.normalize(s)},l.relative=function(e,t){e=l.resolve(e),t=l.resolve(t);for(var n=e.toLowerCase(),s=t.toLowerCase(),i=o(t.split("\\")),r=o(n.split("\\")),a=o(s.split("\\")),d=Math.min(r.length,a.length),u=d,c=0;c<d;c++)if(r[c]!==a[c]){u=c;break}if(0==u)return t;var h=[];for(c=u;c<r.length;c++)h.push("..");return(h=h.concat(i.slice(u))).join("\\")},l._makeLong=function(e){if(!i.isString(e))return e;if(!e)return"";var t=l.resolve(e);return/^[a-zA-Z]\:\\/.test(t)?"\\\\?\\"+t:/^\\\\[^?.]/.test(t)?"\\\\?\\UNC\\"+t.substring(2):e},l.dirname=function(e){var t=u(e),n=t[0],s=t[1];return n||s?(s&&(s=s.substr(0,s.length-1)),n+s):"."},l.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},l.extname=function(e){return u(e)[3]},l.format=function(e){if(!i.isObject(e))throw new TypeError("Parameter 'pathObject' must be an object, not "+typeof e);var t=e.root||"";if(!i.isString(t))throw new TypeError("'pathObject.root' must be a string or undefined, not "+typeof e.root);var n=e.dir,s=e.base||"";return n?n[n.length-1]===l.sep?n+s:n+l.sep+s:s},l.parse=function(e){if(!i.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)}},l.sep="\\",l.delimiter=";";var p=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,y={};function v(e){return p.exec(e).slice(1)}y.resolve=function(){for(var e="",t=!1,n=arguments.length-1;n>=-1&&!t;n--){var s=n>=0?arguments[n]:process.cwd();if(!i.isString(s))throw new TypeError("Arguments to path.resolve must be strings");s&&(e=s+"/"+e,t="/"===s[0])}return(t?"/":"")+(e=r(e.split("/"),!t).join("/"))||"."},y.normalize=function(e){var t=y.isAbsolute(e),n=e&&"/"===e[e.length-1];return(e=r(e.split("/"),!t).join("/"))||t||(e="."),e&&n&&(e+="/"),(t?"/":"")+e},y.isAbsolute=function(e){return"/"===e.charAt(0)},y.join=function(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];if(!i.isString(n))throw new TypeError("Arguments to path.join must be strings");n&&(e+=e?"/"+n:n)}return y.normalize(e)},y.relative=function(e,t){e=y.resolve(e).substr(1),t=y.resolve(t).substr(1);for(var n=o(e.split("/")),s=o(t.split("/")),i=Math.min(n.length,s.length),r=i,a=0;a<i;a++)if(n[a]!==s[a]){r=a;break}var d=[];for(a=r;a<n.length;a++)d.push("..");return(d=d.concat(s.slice(r))).join("/")},y._makeLong=function(e){return e},y.dirname=function(e){var t=v(e),n=t[0],s=t[1];return n||s?(s&&(s=s.substr(0,s.length-1)),n+s):"."},y.basename=function(e,t){var n=v(e)[2];return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},y.extname=function(e){return v(e)[3]},y.format=function(e){if(!i.isObject(e))throw new TypeError("Parameter 'pathObject' must be an object, not "+typeof e);var t=e.root||"";if(!i.isString(t))throw new TypeError("'pathObject.root' must be a string or undefined, not "+typeof e.root);return(e.dir?e.dir+y.sep:"")+(e.base||"")},y.parse=function(e){if(!i.isString(e))throw new TypeError("Parameter 'pathString' must be a string, not "+typeof e);var t=v(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)}},y.sep="/",y.delimiter=":",e.exports=s?l:y,e.exports.posix=y,e.exports.win32=l},799(){},818(e,t,n){var s=/%[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 i=arguments,r=i.length,a=String(e).replace(s,function(e){if("%%"===e)return"%";if(n>=r)return e;switch(e){case"%s":return String(i[n++]);case"%d":return Number(i[n++]);case"%j":try{return JSON.stringify(i[n++])}catch(e){return"[Circular]"}default:return e}}),d=i[n];n<r;d=i[++n])y(d)||!$(d)?a+=" "+d:a+=" "+o(d);return a},t.deprecate=function(e,s){if(f(n.g.process))return function(){return t.deprecate(e,s).apply(this,arguments)};if(!0===process.noDeprecation)return e;var i=!1;return function(){if(!i){if(process.throwDeprecation)throw new Error(s);process.traceDeprecation?console.trace(s):console.error(s),i=!0}return e.apply(this,arguments)}};var i,r={};function o(e,n){var s={seen:[],stylize:d};return arguments.length>=3&&(s.depth=arguments[2]),arguments.length>=4&&(s.colors=arguments[3]),p(n)?s.showHidden=n:n&&t._extend(s,n),f(s.showHidden)&&(s.showHidden=!1),f(s.depth)&&(s.depth=2),f(s.colors)&&(s.colors=!1),f(s.customInspect)&&(s.customInspect=!0),s.colors&&(s.stylize=a),l(s,e,s.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 d(e,t){return e}function l(e,n,s){if(e.customInspect&&n&&k(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(s,e);return g(i)||(i=l(e,i,s)),i}var r=function(e,t){if(f(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 v(t)?e.stylize(""+t,"number"):p(t)?e.stylize(""+t,"boolean"):y(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)),b(n)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return u(n);if(0===o.length){if(k(n)){var d=n.name?": "+n.name:"";return e.stylize("[Function"+d+"]","special")}if(w(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(m(n))return e.stylize(Date.prototype.toString.call(n),"date");if(b(n))return u(n)}var $,T="",F=!1,j=["{","}"];return h(n)&&(F=!0,j=["[","]"]),k(n)&&(T=" [Function"+(n.name?": "+n.name:"")+"]"),w(n)&&(T=" "+RegExp.prototype.toString.call(n)),m(n)&&(T=" "+Date.prototype.toUTCString.call(n)),b(n)&&(T=" "+u(n)),0!==o.length||F&&0!=n.length?s<0?w(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),$=F?function(e,t,n,s,i){for(var r=[],o=0,a=t.length;o<a;++o)O(t,String(o))?r.push(c(e,t,n,s,String(o),!0)):r.push("");return i.forEach(function(i){i.match(/^\d+$/)||r.push(c(e,t,n,s,i,!0))}),r}(e,n,s,a,o):o.map(function(t){return c(e,n,s,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]}($,T,j)):j[0]+T+j[1]}function u(e){return"["+Error.prototype.toString.call(e)+"]"}function c(e,t,n,s,i,r){var o,a,d;if((d=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?a=d.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):d.set&&(a=e.stylize("[Setter]","special")),O(s,i)||(o="["+i+"]"),a||(e.seen.indexOf(d.value)<0?(a=y(n)?l(e,d.value,null):l(e,d.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")),f(o)){if(r&&i.match(/^\d+$/))return a;(o=JSON.stringify(""+i)).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 h(e){return Array.isArray(e)}function p(e){return"boolean"==typeof e}function y(e){return null===e}function v(e){return"number"==typeof e}function g(e){return"string"==typeof e}function f(e){return void 0===e}function w(e){return $(e)&&"[object RegExp]"===T(e)}function $(e){return"object"==typeof e&&null!==e}function m(e){return $(e)&&"[object Date]"===T(e)}function b(e){return $(e)&&("[object Error]"===T(e)||e instanceof Error)}function k(e){return"function"==typeof e}function T(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(f(i)&&(i=process.env.NODE_DEBUG||""),e=e.toUpperCase(),!r[e])if(new RegExp("\\b"+e+"\\b","i").test(i)){var n=process.pid;r[e]=function(){var s=t.format.apply(t,arguments);console.error("%s %d: %s",e,n,s)}}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=h,t.isBoolean=p,t.isNull=y,t.isNullOrUndefined=function(e){return null==e},t.isNumber=v,t.isString=g,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=f,t.isRegExp=w,t.isObject=$,t.isDate=m,t.isError=b,t.isFunction=k,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 j=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function O(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(),j[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),s=n.length;s--;)e[n[s]]=t[n[s]];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(/ *= */),s=n.shift(),i=n.shift();return s&&i&&(e[s]=i),e},{})},t.parseLinks=function(e){return e.split(/ *, */).reduce(function(e,t){var n=t.split(/ *; */),s=n[0].slice(1,-1);return e[n[1].split(/ *= */)[1].slice(1,-1)]=s,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,s=this._callbacks["$"+e];if(!s)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var i=0;i<s.length;i++)if((n=s[i])===t||n.fn===t){s.splice(i,1);break}return 0===s.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],s=1;s<arguments.length;s++)t[s-1]=arguments[s];if(n){s=0;for(var i=(n=n.slice(0)).length;s<i;++s)n[s].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(){},975(){}},t={};function n(s){var i=t[s];if(void 0!==i)return i.exports;var r=t[s]={exports:{}};return e[s](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 s in t)n.o(t,s)&&!n.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},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 s={};return(()=>{"use strict";n.d(s,{default:()=>Zr});var e,t=n(585),i=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=de.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 d=/^(?:[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 l=[],u=0;u<256;++u)l.push((u+256).toString(16).substr(1));const c=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(l[e[t+0]]+l[e[t+1]]+l[e[t+2]]+l[e[t+3]]+"-"+l[e[t+4]]+l[e[t+5]]+"-"+l[e[t+6]]+l[e[t+7]]+"-"+l[e[t+8]]+l[e[t+9]]+"-"+l[e[t+10]]+l[e[t+11]]+l[e[t+12]]+l[e[t+13]]+l[e[t+14]]+l[e[t+15]]).toLowerCase();if(!function(e){return"string"==typeof e&&d.test(e)}(n))throw TypeError("Stringified UUID is invalid");return n},h=function(e,t,n){var s=(e=e||{}).random||(e.rng||a)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=s[i];return t}return c(s)};var p=n(540),y=n.n(p),v=n(545),g=n.n(v),f=n(799),w=n.n(f),$=n(784),m=n.n($),b=n(548);const k={DEFAULT:"DEFAULT",constructFromObject:function(e){if("string"==typeof e||e instanceof String)return k[e];throw new Error("Received object name is not an instance of String")},validate:function(e){if(null!=e){if(e===k.DEFAULT)return;throw new Error("Invalid : must be ValidationScopes.{ }")}}};Object.freeze(k);const T=k;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 j{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 O=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=O),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 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&&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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("name"===t){if(void 0===this.name||null===this.name)return new j("name","undefined or null");if(!F.validateMaxLength(this.name,128))return new j("name","does not satisfy required maxLength constraint: 128");if(!F.validateMinLength(this.name,3))return new j("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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("value","undefined or null")}}function A(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.name=void 0,S.prototype.value=!1,S.prototype.$reserved=void 0,S.prototype.$objectType=void 0,S.prototype.$unknownFields=void 0;var E=new WeakSet;class P{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=E),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 P,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:A(E,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:A(E,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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("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 R(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")}P.prototype.map=void 0,P.prototype.$reserved=void 0,P.prototype.$objectType=void 0,P.prototype.$unknownFields=void 0;var C=new WeakSet;class D{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=C),t.add(e),this.$objectType="common.v1.config.KVPair",this.$reserved={$fv:"v1.r0"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,r,o,a;if(e){if(t=t||new D,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=[],s=e.value,a=s[0].hasOwnProperty("$objectType")?s[0].$objectType:typeof s[0],r=0;r<s.length;r++)switch(a){case"string":case"integer":case"number":o.push(s[r]);break;case"common.v1.config.MapOfStringWrapper":i=P.constructFromObject(s[r],void 0),o.push(i);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):R(C,this,U).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):R(C,this,U).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("name"===t){if(void 0===this.name||null===this.name)return new j("name","undefined or null");if(!F.validateMaxLength(this.name,128))return new j("name","does not satisfy required maxLength constraint: 128");if(!F.validateMinLength(this.name,3))return new j("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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("value","undefined or null")}}function U(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}D.prototype.name=void 0,D.prototype.value=void 0,D.prototype.$reserved=void 0,D.prototype.$objectType=void 0,D.prototype.$unknownFields=void 0;const x={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",INFO:"INFO",WARNING:"WARNING",ERROR:"ERROR",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(x).find(t=>x[t]===e);return null==t?x.$UNKNOWN:x[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case x.$UNKNOWN:case x.$REDACTED:case x.INFO:case x.WARNING:case x.ERROR:return;default:throw new Error("Invalid : must be MessageSeverity.{ $UNKNOWN|$REDACTED|INFO|WARNING|ERROR }")}}};Object.freeze(x);const M=x;var J=new WeakSet;class N{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.Message",this.$reserved={$fv:"v1.r0"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new N,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(M.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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("severity","undefined or null"):new j("locale","undefined or null"):new j("message","undefined or null"):new j("code","undefined or null")}}N.prototype.code=void 0,N.prototype.message=void 0,N.prototype.locale="en_US",N.prototype.severity=void 0,N.prototype.$reserved=void 0,N.prototype.$objectType=void 0,N.prototype.$unknownFields=void 0;var G=new WeakSet;class L{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=G),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 L,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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("rel","undefined or null"):new j("href","undefined or null")}}L.prototype.href=void 0,L.prototype.rel=void 0,L.prototype.$reserved=void 0,L.prototype.$objectType=void 0,L.prototype.$unknownFields=void 0;var _,W=new WeakSet;class q{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 s,i,r,o;if(e){if(t=t||new q,e.hasOwnProperty("flags")&&null!==e.flags&&void 0!==e.flags){for(o=[],s=e.flags,r=0;r<s.length;r++)i=S.constructFromObject(s[r],void 0),o.push(i);t.setFlags(o)}if(e.hasOwnProperty("links")&&null!==e.links&&void 0!==e.links){for(o=[],s=e.links,r=0;r<s.length;r++)i=L.constructFromObject(s[r],void 0),o.push(i);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=[],s=e.messages,r=0;r<s.length;r++)i=N.constructFromObject(s[r],void 0),o.push(i);t.setMessages(o)}if(e.hasOwnProperty("extraInfo")&&null!==e.extraInfo&&void 0!==e.extraInfo){for(o=[],s=e.extraInfo,r=0;r<s.length;r++)i=D.constructFromObject(s[r],void 0),o.push(i);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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("flags"===t){if(void 0===this.flags||null===this.flags)return new j("flags","undefined or null");if(!F.validateMaxItems(this.flags,20))return new j("flags","does not satisfy required maxItems constraint: 20")}if("links"===t){if(void 0===this.links||null===this.links)return new j("links","undefined or null");if(!F.validateMaxItems(this.links,20))return new j("links","does not satisfy required maxItems constraint: 20")}if("totalAvailableResults"===t&&(void 0===this.totalAvailableResults||null===this.totalAvailableResults))return new j("totalAvailableResults","undefined or null");if("messages"===t){if(void 0===this.messages||null===this.messages)return new j("messages","undefined or null");if(!F.validateMaxItems(this.messages,20))return new j("messages","does not satisfy required maxItems constraint: 20")}if("extraInfo"===t){if(void 0===this.extraInfo||null===this.extraInfo)return new j("extraInfo","undefined or null");if(!F.validateMaxItems(this.extraInfo,20))return new j("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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null")}}function V(e,t,n){B(e,t),t.set(e,n)}function B(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function z(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")}q.prototype.flags=void 0,q.prototype.links=void 0,q.prototype.totalAvailableResults=void 0,q.prototype.messages=void 0,q.prototype.extraInfo=void 0,q.prototype.$reserved=void 0,q.prototype.$objectType=void 0,q.prototype.$unknownFields=void 0,y()(i());var Z=new WeakMap,X=new WeakMap,Q=new WeakMap,Y=new WeakMap,ee=new WeakMap,te=new WeakMap,ne=new WeakMap,se=new WeakMap,ie=new WeakMap,re=new WeakMap,oe=new WeakMap,ae=new WeakSet;class de{constructor(){var e;B(this,e=ae),e.add(this),V(this,Z,void 0),V(this,X,void 0),V(this,Q,void 0),V(this,Y,void 0),V(this,ee,void 0),V(this,te,void 0),V(this,ne,void 0),V(this,se,void 0),V(this,ie,void 0),V(this,re,void 0),V(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(se,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=z(te,this),this.connectTimeout=z(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(i().agent)),this.requestAgent=null,K(re,this,null),this.allowVersionNegotiation=!0,K(ie,this,!1),this.debug=!1,K(Q,this,null),this.username=null,this.password=null,K(Y,this,!0),this.downloadDestination=null,this.loggerFile=null}set verifySsl(e){this.requestAgent=e?null:new(g().Agent)({rejectUnauthorized:e}),K(Y,this,e)}get verifySsl(){return z(Y,this)}set host(e){K(se,this,e),K(ie,this,!1),K(re,this,null)}get host(){return z(se,this)}set loggerFile(e){null!=e&&(("string"==typeof e||e instanceof String)&&(e=w().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!==z(re,this)&&null!==z(re,this)&&null!==z(re,this).match(/v\d+\.\d+(\.[a|b]\d+)?/)&&"v4.2"!==z(re,this)){H(ae,this,Te).call(this,z(oe,this).INFO,null,"Changing uri",e,"to negotiated version",z(re,this));var n=new RegExp("(?<=/[-\\w]+/)v\\d+\\.\\d+(\\.[a|b]\\d+)?(?=/.*)","i");e=e.replace(n,z(re,this))}K(Z,this,"undefined"==typeof self?this.scheme+":":self.location.protocol);let s="";""!==z(Z,this)&&""!==this.host&&""!==this.port?s=z(Z,this)+"//"+this.host+":"+this.port:"undefined"!=typeof self&&(s=self.origin);var i=s+e;return i.replace(/\{([\w-]+)\}/g,(e,n)=>{var s;return s=t.hasOwnProperty(n)?this.paramToString(t[n]):e,encodeURIComponent(s)})}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 s=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=s);else t.getData().hasOwnProperty("$reserved")&&void 0!==t.getData().get$Reserved()&&(t.getData().get$Reserved().ETag=s)}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(),s=Object.keys(e).find(e=>e.toLowerCase()===n);return s?e[s]:null}return null}getNegotiatedVersion(){return z(re,this)}negotiateVersion(e,t){return new Promise(n=>{!0===this.allowVersionNegotiation&&!1===z(ie,this)?this.callApiInternal("/api/microseg/unversioned/info","OPTIONS",{},{},{},{},null,t,[],["application/json"],Object).then(({data:t,response:s})=>{if(200===s.status&&t.hasOwnProperty("data")&&null!==t.data){const s=t.data,i="v4.2";if(H(ae,this,we).call(this,H(ae,this,$e).call(this,s),H(ae,this,$e).call(this,i)))return H(ae,this,Te).call(this,z(oe,this).WARN,null,"Server version",s,"is below minimum supported version",i,". Version negotiation will not be performed."),K(re,this,null),K(ie,this,!1),void n(e);K(re,this,H(ae,this,fe).call(this,"v4.2",s)),K(ie,this,!0),H(ae,this,Te).call(this,z(oe,this).INFO,null,"Negotiated Version with server :",z(re,this)),n(e)}else H(ae,this,Te).call(this,z(oe,this).ERROR,null,"Could not fetch supported versions from server"),K(re,this,null),K(ie,this,!1),n(e)}).catch(t=>{H(ae,this,Te).call(this,z(oe,this).ERROR,null,"Could not fetch supported versions from server"),K(re,this,null),K(ie,this,!1),n(e)}):n(e)})}callApi(e,t,n,s,i,r,o,a,d,l,u){return this.negotiateVersion(this,a).then(function(c){return c.callApiInternal(e,t,n,s,i,r,o,a,d,l,u)})}callApiInternal(e,t,s,r,o,a,d,l,u,c,p){var y=this.buildUrl(e,s);const v="undefined"!=typeof window&&void 0!==window.document;let g=["application/octet-stream","application/pdf","application/zip"];if(c&&c.length>0&&c.some(e=>g.includes(e))&&v&&this.downloadDestination)return new Promise((e,n)=>{const s=H(ae,this,Se).call(this,y,t,r,o,d,l,u,c);fetch(s.url,s.options).then(t=>{if(!t.ok){const e=new Error(`HTTP error ${t.status}`);e.status=t.status,H(ae,this,Te).call(this,z(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,Te).call(this,z(oe,this).ERROR,null,e),n(e)}const s=t.body.getReader(),i=this.downloadDestination.getWriter(),r=()=>s.read().then(({done:n,value:s})=>(n&&(i.close(),H(ae,this,Te).call(this,z(oe,this).INFO,null,"Finished streaming response"),e({data:{},response:t})),i.write(s).then(r)));return r()}).catch(e=>{H(ae,this,Te).call(this,z(oe,this).ERROR,null,"Caught the following error :",e),n(e)})});var f=i()(t,y);if(f.oldCallback=f.callback,f.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,f,l),"GET"===t.toUpperCase()&&!1===this.cache&&(r._=(new Date).getTime()),f.query(H(ae,this,he).call(this,r)),f.set(this.defaultHeaders).set(H(ae,this,he).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=h();f.set(H(ae,this,he).call(this,{"NTNX-Request-Id":e}))}v||(this.downloadDestination=".",f.set(H(ae,this,he).call(this,{"User-Agent":"Nutanix-microseg-js-client/4.2.1"}))),this.requestAgent&&f.agent(this.requestAgent);var $={};$.response=H(ae,this,me).call(this,this.connectTimeout,z(ee,this)),$.deadline=H(ae,this,me).call(this,this.readTimeout,z(te,this)),f.timeout($);var m=o.hasOwnProperty("Content-Type")?o["Content-Type"]:H(ae,this,ue).call(this,u);if(m?"multipart/form-data"!=m&&f.type(m):f.header["Content-Type"]||f.type("application/json"),H(ae,this,Te).call(this,z(oe,this).INFO,null,"Request URL :",t,y),H(ae,this,Te).call(this,z(oe,this).DEBUG,H(ae,this,je),"Request Headers :",void 0===f.header?"":f.header),"application/x-www-form-urlencoded"===m)f.send(H(ae,this,he).call(this,a));else if("multipart/form-data"==m){var b=H(ae,this,he).call(this,a);for(var k in b)b.hasOwnProperty(k)&&(H(ae,this,ce).call(this,b[k])?f.attach(k,b[k]):f.field(k,b[k]))}else{if("application/octet-stream"===m&&null!=d&&"function"==typeof d.pipe){if(H(ae,this,Te).call(this,z(oe,this).INFO,null,"Piping octet-stream request"),"function"==typeof d.pipe)d.pipe(f);else{let e;try{e=n(965)}catch(e){H(ae,this,Te).call(this,z(oe,this).ERROR,null,"Error fetching steam/web")}d instanceof e.ReadableStream?d.pipeTo(new e.WritableStream({write(e){f.write(e)},close(){H(ae,this,Te).call(this,z(oe,this).INFO,null,"READABLE STREAM CLOSED")},abort(e){H(ae,this,Te).call(this,z(oe,this).ERROR,null,"READABLE STREAM ABORTED")}})):f.send(d)}return new Promise((t,n)=>{f.on("error",e=>{H(ae,this,Te).call(this,z(oe,this).DEBUG,null,"Caught the following error :",e),n(e)}).on("response",s=>{H(ae,this,Oe).call(this,s,e,r,p,t,n)})})}["POST","PUT","PATCH"].includes(t.toUpperCase())&&d&&f.send(d)}"Blob"==typeof p?f.responseType("blob"):"String"===p&&f.responseType("string"),H(ae,this,ke).call(this,f),H(ae,this,Te).call(this,z(oe,this).DEBUG,null,"Request Body :",void 0===f._data?"":f._data);var T=o.hasOwnProperty("Accept")&&null!=o.Accept?o.Accept:c.join(", ");return T&&f.accept(T),new Promise((n,s)=>{f.buffer(!1).redirects(0).retry(this.maxRetryAttempts,this.retryInterval,[]).withCredentials(this.withCredentials).on("error",e=>{H(ae,this,Te).call(this,z(oe,this).DEBUG,null,"Caught the following error :",e)}).end((o,a)=>{if(o)H(ae,this,Te).call(this,z(oe,this).DEBUG,null,"Caught error during the request!"),H(ae,this,Te).call(this,z(oe,this).ERROR,null,o),404===o.status&&(K(ie,this,!1),K(re,this,null)),null!==o.response&&void 0!==o.response?o.data=H(ae,this,ve).call(this,o.response,p):o.data=H(ae,this,ye).call(this,o),s(o);else{H(ae,this,Te).call(this,z(oe,this).INFO,null,"Response Status :",a.status),H(ae,this,Te).call(this,z(oe,this).DEBUG,H(ae,this,je),"Response Headers :",a.headers);let o="";if(a.headers.hasOwnProperty("content-type")&&(o=a.headers["content-type"]),g.includes(o)){if(!v){let e=this.downloadDestination+"/downloaded_file_"+Date.now()+".txt",t=w().createWriteStream(e);H(ae,this,Ae).call(this,a,t,e,n,s,p)}}else if(302==a.status){let e=this.downloadDestination+"/downloaded_file_"+Date.now()+".txt",r=this;H(ae,this,Te).call(this,z(oe,this).INFO,null,"Redirecting to :",a.headers.location);var d=i()(t,a.headers.location);d.set(f.header),a.headers.hasOwnProperty("x-redirect-token")&&(H(ae,this,Te).call(this,z(oe,this).INFO,null,"Writing X-Redirect-Token into Cookie"),d.set("Cookie",a.headers["x-redirect-token"])),this.requestAgent&&d.agent(this.requestAgent),d.redirects(0),d.withCredentials(this.withCredentials),d.buffer(!1);let o=w().createWriteStream(e);d.pipe(o),d.on("response",function(t){H(ae,r,Te).call(r,z(oe,r).INFO,null,"Received response after redirection :",t.status),H(ae,r,Ae).call(r,t,o,e,n,s,p)})}else H(ae,this,Oe).call(this,a,e,r,p,n,s)}})})}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,s){let i=null;if(void 0!==t&&t.hasOwnProperty(n)&&(i=t[n]),null===i&&("string"==typeof e||e instanceof String)){const t=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),s=e.match(new RegExp(`${t}=([0-9]+)`));s&&(i=s[1])}return null===i&&(i=s),i}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 de.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=>de.convertToType(e,n))}if("object"==typeof t){var s,i;for(var r in t)if(t.hasOwnProperty(r)){s=r,i=t[r];break}var o={};for(var r in e)if(e.hasOwnProperty(r)){var a=de.convertToType(r,s),d=de.convertToType(e[r],i);o[a]=d}return o}return e}}static constructFromObject(e,t,n){if(Array.isArray(e))for(var s=0;s<e.length;s++)e.hasOwnProperty(s)&&(t[s]=de.convertToType(e[s],n));else for(var i in e)e.hasOwnProperty(i)&&(t[i]=de.convertToType(e[i],n))}}function le(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,le).call(this,e[t]))return e[t];return e[0]}function ce(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 b.Blob&&e instanceof b.Blob||"function"==typeof File&&e instanceof File}function he(e){var t={};for(var n in e)if(e.hasOwnProperty(n)&&null!=e[n]&&null!=e[n]){var s=e[n];H(ae,this,ce).call(this,s)||Array.isArray(s)?t[n]=s:t[n]=this.paramToString(s)}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,Te).call(this,z(oe,this).DEBUG,null,"Basic Auth applied to request");break;case"apiKey":if(n.apiKey){var s={};n.apiKeyPrefix?s[n.name]=n.apiKeyPrefix+" "+n.apiKey:s[n.name]=n.apiKey,"header"===n.in?e.set(s):e.query(s)}H(ae,this,Te).call(this,z(oe,this).DEBUG,null,"apiKey applied to request");break;case"oauth2":n.accessToken&&e.set({Authorization:"Bearer "+n.accessToken}),H(ae,this,Te).call(this,z(oe,this).DEBUG,null,"oauth2 applied to request");break;default:throw H(ae,this,Te).call(this,z(oe,this).ERROR,null,"Unknown authentication type:",n.type),new Error("Unknown authentication type: "+n.type)}})}function ye(e){var t={data:{},metadata:{}};t.data.status=e.status,t.data.message=e.message}function ve(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 b.Blob([e.text],{type:e.headers["content-type"]});let s=new S;s.name="hasError",s.value=!1;let i=[s],r=new q;return r.flags=i,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 s=parseInt(this.constructor.parseQueryParam(t,n,"$page","0"),10),i=parseInt(this.constructor.parseQueryParam(t,n,"$limit","50"),10);e.populatePaginationMetadata(this,s,i)}function fe(e,t){if(!e||!t)return e;let n=H(ae,this,$e).call(this,e),s=H(ae,this,$e).call(this,t);return!n.family===s.family||H(ae,this,we).call(this,n,s)?e:t}function we(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),s=t.versionType.substring(0,1),i=parseInt(e.versionType.substring(1)),r="released"===t.versionType?0:parseInt(t.versionType.substring(1));return n===s?i<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 me(e,t){return e<=0?e=t:e>z(ne,this)&&(e=z(ne,this)),e}function be(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,Te).call(this,z(oe,this).DEBUG,null,"Retained cookie :",t)}else K(X,this,null)}function ke(e){null!=z(X,this)&&e.set(H(ae,this,he).call(this,{Cookie:z(X,this)}))}function Te(e,t,...n){if("object"==typeof e&&"key"in e&&"value"in e&&"symbol"==typeof e.value||(e=z(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 s=n.join(" ");s=(new Date).toISOString()+" "+e.key+" - "+s,void 0!==z(Q,this)&&null!==z(Q,this)&&"function"==typeof z(Q,this).log?z(Q,this).log(s):console.log(s)}}function Fe(e){return!this.debug&&e===z(oe,this).DEBUG}function je(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 Oe(e,t,n,s,i,r){try{var o=H(ae,this,ve).call(this,e,s);H(ae,this,Te).call(this,z(oe,this).INFO,null,"Response Status :",e.status),H(ae,this,Te).call(this,z(oe,this).DEBUG,H(ae,this,je),"Response Headers :",e.headers),H(ae,this,be).call(this,e||{}),H(ae,this,Te).call(this,z(oe,this).DEBUG,null,"Response Body :",o),204==e.status&&null==o?i({data:o,response:e}):e.ok&&null!=o?(this.addEtagToReservedMap(e,o),H(ae,this,ge).call(this,o,t,n),i({data:o,response:e})):(H(ae,this,Te).call(this,z(oe,this).ERROR,null,o),r({...e.error,data:o}))}catch(e){H(ae,this,Te).call(this,z(oe,this).DEBUG,null,"Caught error while processing response!"),H(ae,this,Te).call(this,z(oe,this).ERROR,null,e),e.data=H(ae,this,ye).call(this,e),r(e)}}function Se(e,t,n,s,i,r,o,a){let d={};r.forEach(e=>{const t=this.authentications[e];switch(t.type){case"basic":let e="",s="";if(t.username||t.password?(e=t.username||"",s=t.password||""):(this.username||this.password)&&(e=this.username||"",s=this.password||""),e||s){const t=btoa(`${e}:${s}`);d.Authorization=`Basic ${t}`}H(ae,this,Te).call(this,z(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?d[t.name]="Bearer "+e:"query"===t.in&&(n[t.name]=e)}H(ae,this,Te).call(this,z(oe,this).DEBUG,null,"apiKey applied to request");break;case"oauth2":t.accessToken&&(d.Authorization="Bearer "+t.accessToken),H(ae,this,Te).call(this,z(oe,this).DEBUG,null,"oauth2 applied to request");break;default:throw H(ae,this,Te).call(this,z(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 l=H(ae,this,he).call(this,n),u=Object.keys(l).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(l[e])}`).join("&");let c=e;u&&(c+=(c.includes("?")?"&":"?")+u);const p={...this.defaultHeaders,...H(ae,this,he).call(this,s),...d};if(!(null!==this.defaultHeaders["NTNX-Request-Id"]&&void 0!==this.defaultHeaders["NTNX-Request-Id"]||null!==s["NTNX-Request-Id"]&&void 0!==s["NTNX-Request-Id"])){let e=h();p["NTNX-Request-Id"]=e}null!=z(X,this)&&(p.Cookie=H(ae,this,he).call(this,{Cookie:z(X,this)}));var y=s.hasOwnProperty("Content-Type")?s["Content-Type"]:H(ae,this,ue).call(this,o);p["Content-Type"]=y;var v=s.hasOwnProperty("Accept")&&null!=s.Accept?s.Accept:a.join(", ");return v&&(p.Accept=v),H(ae,this,Te).call(this,z(oe,this).INFO,null,"Request URL :",t,e),H(ae,this,Te).call(this,z(oe,this).DEBUG,H(ae,this,je),"Request Headers :",p),H(ae,this,Te).call(this,z(oe,this).DEBUG,null,"Request Body :",i||""),{url:c,options:{method:t,headers:p,body:i,credentials:this.withCredentials?"include":"same-origin"}}}function Ae(e,t,n,s,i,r){H(ae,this,Te).call(this,z(oe,this).INFO,null,"Streaming response to : ",n);try{e.on("data",e=>{t.write(e)})}catch(e){H(ae,this,Te).call(this,z(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=m().parse(t.groups.filename);a=this.downloadDestination+"/"+n.name+"_"+Date.now()+n.ext,o.data={path:m().parse(a),$objectType:"Path"};let s=new S;s.name="hasError",s.value=!1;let i=[s],r=new q;r.flags=i,o.metadata=r}e.on("end",()=>{H(ae,this,Te).call(this,z(oe,this).INFO,null,"Finished streaming response"),0!==a.length?(H(ae,this,Te).call(this,z(oe,this).INFO,null,"Content-Disposition header found [",a,"] is final filename"),t.close(),w().renameSync(n,a),s({data:o,response:e})):(H(ae,this,Te).call(this,z(oe,this).ERROR,null,"Content-Disposition header not found [",n,"] is final filename"),s({data:o,response:e}))}),e.on("error",e=>{H(ae,this,Te).call(this,z(oe,this).ERROR,null,"Caught the following error :",e),error.data=H(ae,this,ye).call(this,error),i(e)})}function Ee(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")}_=de,de.instance=new de;var Pe=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=Pe),t.add(e),this.$objectType="microseg.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(M.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:Ee(Pe,this,Re).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:Ee(Pe,this,Re).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("argumentsMap","undefined or null"):new j("errorGroup","undefined or null"):new j("locale","undefined or null"):new j("code","undefined or null"):new j("severity","undefined or null"):new j("message","undefined or null")}}function Re(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 Ce=new WeakSet;class De{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="microseg.v4.error.SchemaValidationErrorMessage",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new De,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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("attributePath","undefined or null"):new j("message","undefined or null"):new j("location","undefined or null")}}function Ue(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")}De.prototype.location=void 0,De.prototype.message=void 0,De.prototype.attributePath=void 0,De.prototype.$reserved=void 0,De.prototype.$objectType=void 0,De.prototype.$unknownFields=void 0;var xe=new WeakSet;class Me{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=xe),t.add(e),this.$objectType="microseg.v4.error.SchemaValidationError",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,r,o;if(e){if(t=t||new Me,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=[],s=e.validationErrorMessages,r=0;r<s.length;r++)i=De.constructFromObject(s[r],void 0),o.push(i);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:Ue(xe,this,Je).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("validationErrorMessages","undefined or null"):new j("path","undefined or null"):new j("error","undefined or null"):new j("statusCode","undefined or null"):new j("timestamp","undefined or null")}}function Je(e,t){return e instanceof Date&&void 0!==t?t?e.toISOString().slice(0,10):e.toISOString():e}function Ne(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")}Me.prototype.timestamp=void 0,Me.prototype.statusCode=void 0,Me.prototype.error=void 0,Me.prototype.path=void 0,Me.prototype.validationErrorMessages=void 0,Me.prototype.$reserved=void 0,Me.prototype.$objectType=void 0,Me.prototype.$unknownFields=void 0;var Ge=new WeakSet;class Le{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=Ge),t.add(e),this.$objectType="microseg.v4.error.ErrorResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,r,o,a;if(e){if(t=t||new Le,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=[],s=e.error,a=s[0].hasOwnProperty("$objectType")?s[0].$objectType:typeof s[0],r=0;r<s.length;r++){if("microseg.v4.error.AppMessage"!==a)throw"Unknown list of type "+a+" in data";i=Ie.constructFromObject(s[r],void 0),o.push(i)}t.setError(o)}else{if(a=e.error.hasOwnProperty("$objectType")?e.error.$objectType:typeof e.error,"microseg.v4.error.SchemaValidationError"!==a)throw"Unknown datatype "+a+" in data";t.setError(Me.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):Ne(Ge,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):Ne(Ge,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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("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}Le.prototype.error=void 0,Le.prototype.$reserved=void 0,Le.prototype.$objectType=void 0,Le.prototype.$unknownFields=void 0;var We=new WeakSet;class qe{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="prism.v4.config.TaskReference",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new qe,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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("extId"===t){if(void 0===this.extId||null===this.extId)return new j("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 j("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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null")}}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")}qe.prototype.extId=void 0,qe.prototype.$reserved=void 0,qe.prototype.$objectType=void 0,qe.prototype.$unknownFields=void 0;var Be=new WeakSet;class ze 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=Be),t.add(e),this.$objectType="microseg.v4.config.CreateAddressGroupApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s;if(e){if(t=t||new ze,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(q.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(s=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,s){case"prism.v4.config.TaskReference":t.setData(qe.constructFromObject(e.data,void 0));break;case"microseg.v4.error.ErrorResponse":t.setData(Le.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+s+" 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):Ve(Be,this,Ke).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):Ve(Be,this,Ke).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("metadata","undefined or null")}}function Ke(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}ze.prototype.metadata=void 0,ze.prototype.data=void 0,ze.prototype.$reserved=void 0,ze.prototype.$objectType=void 0,ze.prototype.$unknownFields=void 0;var He=new WeakSet;class Ze{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=He),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 Ze,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 T?n=["value"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("value"===t){if(void 0===this.value||null===this.value)return new j("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 j("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 j("prefixLength","undefined or null");if(!F.validateMaximum(this.prefixLength,32))return new j("prefixLength","does not satisfy required maximum constraint: 32");if(!F.validateMinimum(this.prefixLength,0))return new j("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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null")}}Ze.prototype.value=void 0,Ze.prototype.prefixLength=32,Ze.prototype.$reserved=void 0,Ze.prototype.$objectType=void 0,Ze.prototype.$unknownFields=void 0;var Xe=new WeakSet;class Qe{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=Xe),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 Qe,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 T?n=["value"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("value"===t){if(void 0===this.value||null===this.value)return new j("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 j("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 j("prefixLength","undefined or null");if(!F.validateMaximum(this.prefixLength,128))return new j("prefixLength","does not satisfy required maximum constraint: 128");if(!F.validateMinimum(this.prefixLength,0))return new j("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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null")}}Qe.prototype.value=void 0,Qe.prototype.prefixLength=128,Qe.prototype.$reserved=void 0,Qe.prototype.$objectType=void 0,Qe.prototype.$unknownFields=void 0;var Ye=new WeakSet;class et{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=Ye),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 et,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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("tenantId"===t){if(void 0===this.tenantId||null===this.tenantId)return new j("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 j("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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null")}}et.prototype.tenantId=void 0,et.prototype.$reserved=void 0,et.prototype.$objectType=void 0,et.prototype.$unknownFields=void 0;var tt=new WeakSet;class nt extends et{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=tt),t.add(e),this.$objectType="common.v1.response.ExternalizableAbstractModel",this.$reserved={$fv:"v1.r0"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,r,o;if(e){if(t=t||new nt,et.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=[],s=e.links,r=0;r<s.length;r++)i=L.constructFromObject(s[r],void 0),o.push(i);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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("extId"===t){if(void 0===this.extId||null===this.extId)return new j("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 j("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===T.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 j("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 j("links","undefined or null");if(!F.validateMaxItems(this.links,20))return new j("links","does not satisfy required maxItems constraint: 20")}return new j(t,"no such property exists")}}nt.prototype.extId=void 0,nt.prototype.links=void 0,et.prototype.tenantId=void 0;var st=new WeakSet;class it{constructor(e,t){var n,s;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(n=this,s=st),s.add(n),this.startIp=e,this.endIp=t,this.$objectType="microseg.v4.config.IPv4Range",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new it,e.hasOwnProperty("startIp")&&null!==e.startIp&&void 0!==e.startIp&&t.setStartIp(e.startIp),e.hasOwnProperty("endIp")&&null!==e.endIp&&void 0!==e.endIp&&t.setEndIp(e.endIp),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())}getStartIp(){return this.startIp}setStartIp(e){this.startIp=e}getEndIp(){return this.endIp}setEndIp(e){this.endIp=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getStartIp()&&null!==this.getStartIp()?{startIp:this.getStartIp()}:{},...void 0!==this.getEndIp()&&null!==this.getEndIp()?{endIp:this.getEndIp()}:{},$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 T?n=["startIp","endIp"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("startIp"===t){if(void 0===this.startIp||null===this.startIp)return new j("startIp","undefined or null");if(!F.validatePattern(this.startIp,/^(?:(?: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 j("startIp","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("endIp"===t){if(void 0===this.endIp||null===this.endIp)return new j("endIp","undefined or null");if(!F.validatePattern(this.endIp,/^(?:(?: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 j("endIp","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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null")}}it.prototype.startIp=void 0,it.prototype.endIp=void 0,it.prototype.$reserved=void 0,it.prototype.$objectType=void 0,it.prototype.$unknownFields=void 0;var rt=new WeakSet;class ot{constructor(e,t){var n,s;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(n=this,s=rt),s.add(n),this.startIp=e,this.endIp=t,this.$objectType="microseg.v4.config.IPv6Range",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new ot,e.hasOwnProperty("startIp")&&null!==e.startIp&&void 0!==e.startIp&&t.setStartIp(e.startIp),e.hasOwnProperty("endIp")&&null!==e.endIp&&void 0!==e.endIp&&t.setEndIp(e.endIp),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())}getStartIp(){return this.startIp}setStartIp(e){this.startIp=e}getEndIp(){return this.endIp}setEndIp(e){this.endIp=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getStartIp()&&null!==this.getStartIp()?{startIp:this.getStartIp()}:{},...void 0!==this.getEndIp()&&null!==this.getEndIp()?{endIp:this.getEndIp()}:{},$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 T?n=["startIp","endIp"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("startIp"===t){if(void 0===this.startIp||null===this.startIp)return new j("startIp","undefined or null");if(!F.validatePattern(this.startIp,/^(?:(?:(?:[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 j("startIp","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("endIp"===t){if(void 0===this.endIp||null===this.endIp)return new j("endIp","undefined or null");if(!F.validatePattern(this.endIp,/^(?:(?:(?:[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 j("endIp","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})$/")}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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null")}}function at(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.startIp=void 0,ot.prototype.endIp=void 0,ot.prototype.$reserved=void 0,ot.prototype.$objectType=void 0,ot.prototype.$unknownFields=void 0;var dt=new WeakSet;class lt extends nt{constructor(e){var t,n;super(),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.name=e,this.$objectType="microseg.v4.config.AddressGroup",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,r,o;if(e){if(t=t||new lt,nt.constructFromObject(e,t,!0),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("ipv4Addresses")&&null!==e.ipv4Addresses&&void 0!==e.ipv4Addresses){for(o=[],s=e.ipv4Addresses,r=0;r<s.length;r++)i=Ze.constructFromObject(s[r],void 0),o.push(i);t.setIpv4Addresses(o)}if(e.hasOwnProperty("ipRanges")&&null!==e.ipRanges&&void 0!==e.ipRanges){for(o=[],s=e.ipRanges,r=0;r<s.length;r++)i=it.constructFromObject(s[r],void 0),o.push(i);t.setIpRanges(o)}if(e.hasOwnProperty("ipv6Addresses")&&null!==e.ipv6Addresses&&void 0!==e.ipv6Addresses){for(o=[],s=e.ipv6Addresses,r=0;r<s.length;r++)i=Qe.constructFromObject(s[r],void 0),o.push(i);t.setIpv6Addresses(o)}if(e.hasOwnProperty("ipv6Ranges")&&null!==e.ipv6Ranges&&void 0!==e.ipv6Ranges){for(o=[],s=e.ipv6Ranges,r=0;r<s.length;r++)i=ot.constructFromObject(s[r],void 0),o.push(i);t.setIpv6Ranges(o)}if(e.hasOwnProperty("policyReferences")&&null!==e.policyReferences&&void 0!==e.policyReferences){for(o=[],s=e.policyReferences,r=0;r<s.length;r++)o.push(s[r]);t.setPolicyReferences(o)}if(e.hasOwnProperty("createdBy")&&null!==e.createdBy&&void 0!==e.createdBy&&t.setCreatedBy(e.createdBy),e.hasOwnProperty("creationTime")&&null!==e.creationTime&&void 0!==e.creationTime&&t.setCreationTime(e.creationTime),e.hasOwnProperty("lastUpdateTime")&&null!==e.lastUpdateTime&&void 0!==e.lastUpdateTime&&t.setLastUpdateTime(e.lastUpdateTime),!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}getDescription(){return this.description}setDescription(e){this.description=e}getIpv4Addresses(){return this.ipv4Addresses}setIpv4Addresses(e){this.ipv4Addresses=e}getIpRanges(){return this.ipRanges}setIpRanges(e){this.ipRanges=e}getIpv6Addresses(){return this.ipv6Addresses}setIpv6Addresses(e){this.ipv6Addresses=e}getIpv6Ranges(){return this.ipv6Ranges}setIpv6Ranges(e){this.ipv6Ranges=e}getPolicyReferences(){return this.policyReferences}setPolicyReferences(e){this.policyReferences=e}getCreatedBy(){return this.createdBy}setCreatedBy(e){this.createdBy=e}getCreationTime(){return this.creationTime}setCreationTime(e){this.creationTime=e}getLastUpdateTime(){return this.lastUpdateTime}setLastUpdateTime(e){this.lastUpdateTime=e}toJson(e){return!1===e?{...void 0!==this.getName()&&null!==this.getName()?{name:this.getName()}:{},...void 0!==this.getDescription()&&null!==this.getDescription()?{description:this.getDescription()}:{},...void 0!==this.getIpv4Addresses()&&null!==this.getIpv4Addresses()?{ipv4Addresses:this.getIpv4Addresses().map(e=>e.toJson(!1))}:{},...void 0!==this.getIpRanges()&&null!==this.getIpRanges()?{ipRanges:this.getIpRanges().map(e=>e.toJson(!1))}:{},...void 0!==this.getIpv6Addresses()&&null!==this.getIpv6Addresses()?{ipv6Addresses:this.getIpv6Addresses().map(e=>e.toJson(!1))}:{},...void 0!==this.getIpv6Ranges()&&null!==this.getIpv6Ranges()?{ipv6Ranges:this.getIpv6Ranges().map(e=>e.toJson(!1))}:{},...void 0!==this.getPolicyReferences()&&null!==this.getPolicyReferences()?{policyReferences:this.getPolicyReferences()}:{},...void 0!==this.getCreatedBy()&&null!==this.getCreatedBy()?{createdBy:this.getCreatedBy()}:{},...void 0!==this.getCreationTime()&&null!==this.getCreationTime()?{creationTime:at(dt,this,ut).call(this,this.getCreationTime(),!1)}:{},...void 0!==this.getLastUpdateTime()&&null!==this.getLastUpdateTime()?{lastUpdateTime:at(dt,this,ut).call(this,this.getLastUpdateTime(),!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.getName()&&null!==this.getName()?{name:this.getName()}:{},...void 0!==this.getDescription()&&null!==this.getDescription()?{description:this.getDescription()}:{},...void 0!==this.getIpv4Addresses()&&null!==this.getIpv4Addresses()?{ipv4Addresses:this.getIpv4Addresses().map(e=>e.toJson(!1))}:{},...void 0!==this.getIpRanges()&&null!==this.getIpRanges()?{ipRanges:this.getIpRanges().map(e=>e.toJson(!1))}:{},...void 0!==this.getIpv6Addresses()&&null!==this.getIpv6Addresses()?{ipv6Addresses:this.getIpv6Addresses().map(e=>e.toJson(!1))}:{},...void 0!==this.getIpv6Ranges()&&null!==this.getIpv6Ranges()?{ipv6Ranges:this.getIpv6Ranges().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 T?n=["name"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("name"===t){if(void 0===this.name||null===this.name)return new j("name","undefined or null");if(!F.validateMaxLength(this.name,64))return new j("name","does not satisfy required maxLength constraint: 64");if(!F.validatePattern(this.name,/^\\s*[a-zA-Z0-9]([a-zA-Z0-9-_ \\\\.]*[a-zA-Z0-9])?\\s*$/))return new j("name","does not satisfy required pattern: /^\\s*[a-zA-Z0-9]([a-zA-Z0-9-_ \\\\.]*[a-zA-Z0-9])?\\s*$/")}if("description"===t){if(void 0===this.description||null===this.description)return new j("description","undefined or null");if(!F.validateMaxLength(this.description,1e3))return new j("description","does not satisfy required maxLength constraint: 1000");if(!F.validatePattern(this.description,/^\\s*([a-zA-Z0-9 _:.()-]*)\\s*$/))return new j("description","does not satisfy required pattern: /^\\s*([a-zA-Z0-9 _:.()-]*)\\s*$/")}if("ipv4Addresses"===t){if(void 0===this.ipv4Addresses||null===this.ipv4Addresses)return new j("ipv4Addresses","undefined or null");if(!F.validateMaxItems(this.ipv4Addresses,4e3))return new j("ipv4Addresses","does not satisfy required maxItems constraint: 4000");if(!F.validateMinItems(this.ipv4Addresses,1))return new j("ipv4Addresses","does not satisfy required minItems constraint: 1")}if("ipRanges"===t){if(void 0===this.ipRanges||null===this.ipRanges)return new j("ipRanges","undefined or null");if(!F.validateMaxItems(this.ipRanges,4e3))return new j("ipRanges","does not satisfy required maxItems constraint: 4000");if(!F.validateMinItems(this.ipRanges,1))return new j("ipRanges","does not satisfy required minItems constraint: 1")}if("ipv6Addresses"===t){if(void 0===this.ipv6Addresses||null===this.ipv6Addresses)return new j("ipv6Addresses","undefined or null");if(!F.validateMaxItems(this.ipv6Addresses,4e3))return new j("ipv6Addresses","does not satisfy required maxItems constraint: 4000");if(!F.validateMinItems(this.ipv6Addresses,1))return new j("ipv6Addresses","does not satisfy required minItems constraint: 1")}if("ipv6Ranges"===t){if(void 0===this.ipv6Ranges||null===this.ipv6Ranges)return new j("ipv6Ranges","undefined or null");if(!F.validateMaxItems(this.ipv6Ranges,4e3))return new j("ipv6Ranges","does not satisfy required maxItems constraint: 4000");if(!F.validateMinItems(this.ipv6Ranges,1))return new j("ipv6Ranges","does not satisfy required minItems constraint: 1")}if("policyReferences"===t){if(void 0===this.policyReferences||null===this.policyReferences)return new j("policyReferences","undefined or null");if(!F.validateMaxItems(this.policyReferences,1e3))return new j("policyReferences","does not satisfy required maxItems constraint: 1000");if(!F.validateMinItems(this.policyReferences,1))return new j("policyReferences","does not satisfy required minItems constraint: 1")}if("createdBy"===t){if(void 0===this.createdBy||null===this.createdBy)return new j("createdBy","undefined or null");if(!F.validatePattern(this.createdBy,/^[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 j("createdBy","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"creationTime"!==t||void 0!==this.creationTime&&null!==this.creationTime?"lastUpdateTime"!==t||void 0!==this.lastUpdateTime&&null!==this.lastUpdateTime?new j(t,"no such property exists"):new j("lastUpdateTime","undefined or null"):new j("creationTime","undefined or null")}}function ut(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")}lt.prototype.name=void 0,lt.prototype.description=void 0,lt.prototype.ipv4Addresses=void 0,lt.prototype.ipRanges=void 0,lt.prototype.ipv6Addresses=void 0,lt.prototype.ipv6Ranges=void 0,lt.prototype.policyReferences=void 0,lt.prototype.createdBy=void 0,lt.prototype.creationTime=void 0,lt.prototype.lastUpdateTime=void 0,nt.prototype.extId=void 0,nt.prototype.links=void 0,et.prototype.tenantId=void 0;var ht=new WeakSet;class pt 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=ht),t.add(e),this.$objectType="microseg.v4.config.ListAddressGroupsApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,o,a,d;if(e){if(t=t||new pt,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(q.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=[],s=e.data,d=s[0].hasOwnProperty("$objectType")?s[0].$objectType:typeof s[0],o=0;o<s.length;o++){if("microseg.v4.config.AddressGroup"!==d)throw"Unknown list of type "+d+" in data";i=lt.constructFromObject(s[o],void 0),a.push(i)}t.setData(a)}else{if(d=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,"microseg.v4.error.ErrorResponse"!==d)throw"Unknown datatype "+d+" in data";t.setData(Le.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):ct(ht,this,yt).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):ct(ht,this,yt).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("metadata","undefined or null")}}function yt(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 vt(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.metadata=void 0,pt.prototype.data=void 0,pt.prototype.$reserved=void 0,pt.prototype.$objectType=void 0,pt.prototype.$unknownFields=void 0;var gt=new WeakSet;class ft 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=gt),t.add(e),this.$objectType="microseg.v4.config.DeleteAddressGroupApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s;if(e){if(t=t||new ft,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(q.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(s=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,s){case"prism.v4.config.TaskReference":t.setData(qe.constructFromObject(e.data,void 0));break;case"microseg.v4.error.ErrorResponse":t.setData(Le.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+s+" 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):vt(gt,this,wt).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):vt(gt,this,wt).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("metadata","undefined or null")}}function wt(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 $t(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")}ft.prototype.metadata=void 0,ft.prototype.data=void 0,ft.prototype.$reserved=void 0,ft.prototype.$objectType=void 0,ft.prototype.$unknownFields=void 0;var mt=new WeakSet;class bt 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=mt),t.add(e),this.$objectType="microseg.v4.config.GetAddressGroupApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s;if(e){if(t=t||new bt,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(q.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(s=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,s){case"microseg.v4.config.AddressGroup":t.setData(lt.constructFromObject(e.data,void 0));break;case"microseg.v4.error.ErrorResponse":t.setData(Le.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+s+" 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):$t(mt,this,kt).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):$t(mt,this,kt).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("metadata","undefined or null")}}function kt(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 Tt(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")}bt.prototype.metadata=void 0,bt.prototype.data=void 0,bt.prototype.$reserved=void 0,bt.prototype.$objectType=void 0,bt.prototype.$unknownFields=void 0;var Ft=new WeakSet;class jt 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=Ft),t.add(e),this.$objectType="microseg.v4.config.UpdateAddressGroupApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s;if(e){if(t=t||new jt,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(q.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(s=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,s){case"prism.v4.config.TaskReference":t.setData(qe.constructFromObject(e.data,void 0));break;case"microseg.v4.error.ErrorResponse":t.setData(Le.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+s+" 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):Tt(Ft,this,Ot).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):Tt(Ft,this,Ot).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("metadata","undefined or null")}}function Ot(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 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")}jt.prototype.metadata=void 0,jt.prototype.data=void 0,jt.prototype.$reserved=void 0,jt.prototype.$objectType=void 0,jt.prototype.$unknownFields=void 0;var At=new WeakSet;class Et 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=At),t.add(e),this.$objectType="microseg.v4.config.DeleteDsCategoryMappingApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s;if(e){if(t=t||new Et,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(q.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(s=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,s){case"prism.v4.config.TaskReference":t.setData(qe.constructFromObject(e.data,void 0));break;case"microseg.v4.error.ErrorResponse":t.setData(Le.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+s+" 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):St(At,this,Pt).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(At,this,Pt).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("metadata","undefined or null")}}function Pt(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 It(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")}Et.prototype.metadata=void 0,Et.prototype.data=void 0,Et.prototype.$reserved=void 0,Et.prototype.$objectType=void 0,Et.prototype.$unknownFields=void 0;var Rt=new WeakSet;class Ct 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="microseg.v4.config.CreateDirectoryServerConfigApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s;if(e){if(t=t||new Ct,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(q.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(s=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,s){case"prism.v4.config.TaskReference":t.setData(qe.constructFromObject(e.data,void 0));break;case"microseg.v4.error.ErrorResponse":t.setData(Le.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+s+" 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):It(Rt,this,Dt).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):It(Rt,this,Dt).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("metadata","undefined or null")}}function Dt(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 Ut(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.metadata=void 0,Ct.prototype.data=void 0,Ct.prototype.$reserved=void 0,Ct.prototype.$objectType=void 0,Ct.prototype.$unknownFields=void 0;var xt=new WeakSet;class Mt 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=xt),t.add(e),this.$objectType="microseg.v4.config.UpdateDsCategoryMappingApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s;if(e){if(t=t||new Mt,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(q.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(s=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,s){case"prism.v4.config.TaskReference":t.setData(qe.constructFromObject(e.data,void 0));break;case"microseg.v4.error.ErrorResponse":t.setData(Le.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+s+" 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):Ut(xt,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):Ut(xt,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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("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}Mt.prototype.metadata=void 0,Mt.prototype.data=void 0,Mt.prototype.$reserved=void 0,Mt.prototype.$objectType=void 0,Mt.prototype.$unknownFields=void 0;const Nt={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",USABLE:"USABLE",DELETED:"DELETED",DIRECTORY_NOT_CONFIGURED:"DIRECTORY_NOT_CONFIGURED",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(Nt).find(t=>Nt[t]===e);return null==t?Nt.$UNKNOWN:Nt[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case Nt.$UNKNOWN:case Nt.$REDACTED:case Nt.USABLE:case Nt.DELETED:case Nt.DIRECTORY_NOT_CONFIGURED:return;default:throw new Error("Invalid : must be AdStatus.{ $UNKNOWN|$REDACTED|USABLE|DELETED|DIRECTORY_NOT_CONFIGURED }")}}};Object.freeze(Nt);const Gt=Nt;var Lt=new WeakSet;class _t{constructor(e,t){var n,s;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(n=this,s=Lt),s.add(n),this.directoryServiceReference=e,this.objectIdentifier=t,this.$objectType="microseg.v4.config.AdInfo",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new _t,e.hasOwnProperty("directoryServiceReference")&&null!==e.directoryServiceReference&&void 0!==e.directoryServiceReference&&t.setDirectoryServiceReference(e.directoryServiceReference),e.hasOwnProperty("objectIdentifier")&&null!==e.objectIdentifier&&void 0!==e.objectIdentifier&&t.setObjectIdentifier(e.objectIdentifier),e.hasOwnProperty("objectPath")&&null!==e.objectPath&&void 0!==e.objectPath&&t.setObjectPath(e.objectPath),e.hasOwnProperty("status")&&null!==e.status&&void 0!==e.status&&t.setStatus(Gt.constructFromObject(e.status)),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())}getDirectoryServiceReference(){return this.directoryServiceReference}setDirectoryServiceReference(e){this.directoryServiceReference=e}getObjectIdentifier(){return this.objectIdentifier}setObjectIdentifier(e){this.objectIdentifier=e}getObjectPath(){return this.objectPath}setObjectPath(e){this.objectPath=e}getStatus(){return this.status}setStatus(e){this.status=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getDirectoryServiceReference()&&null!==this.getDirectoryServiceReference()?{directoryServiceReference:this.getDirectoryServiceReference()}:{},...void 0!==this.getObjectIdentifier()&&null!==this.getObjectIdentifier()?{objectIdentifier:this.getObjectIdentifier()}:{},...void 0!==this.getObjectPath()&&null!==this.getObjectPath()?{objectPath:this.getObjectPath()}:{},...void 0!==this.getStatus()&&null!==this.getStatus()?{status:this.getStatus()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getDirectoryServiceReference()&&null!==this.getDirectoryServiceReference()?{directoryServiceReference:this.getDirectoryServiceReference()}:{},...void 0!==this.getObjectIdentifier()&&null!==this.getObjectIdentifier()?{objectIdentifier:this.getObjectIdentifier()}:{},...void 0!==this.getStatus()&&null!==this.getStatus()?{status:this.getStatus()}:{},$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 T?n=["directoryServiceReference","objectIdentifier"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("directoryServiceReference"===t){if(void 0===this.directoryServiceReference||null===this.directoryServiceReference)return new j("directoryServiceReference","undefined or null");if(!F.validatePattern(this.directoryServiceReference,/^[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 j("directoryServiceReference","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("objectIdentifier"===t){if(void 0===this.objectIdentifier||null===this.objectIdentifier)return new j("objectIdentifier","undefined or null");if(!F.validatePattern(this.objectIdentifier,/^[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 j("objectIdentifier","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("objectPath"===t){if(void 0===this.objectPath||null===this.objectPath)return new j("objectPath","undefined or null");if(!F.validateMaxLength(this.objectPath,1e3))return new j("objectPath","does not satisfy required maxLength constraint: 1000")}return"status"!==t||void 0!==this.status&&null!==this.status?"$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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("status","undefined or null")}}_t.prototype.directoryServiceReference=void 0,_t.prototype.objectIdentifier=void 0,_t.prototype.objectPath=void 0,_t.prototype.status=void 0,_t.prototype.$reserved=void 0,_t.prototype.$objectType=void 0,_t.prototype.$unknownFields=void 0;var Wt=new WeakSet;class qt extends nt{constructor(e,t,n,s){var i,r;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(i=this,r=Wt),r.add(i),this.name=e,this.categoryName=t,this.categoryValue=n,this.adInfo=s,this.$objectType="microseg.v4.config.CategoryMapping",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new qt,nt.constructFromObject(e,t,!0),e.hasOwnProperty("name")&&null!==e.name&&void 0!==e.name&&t.setName(e.name),e.hasOwnProperty("categoryName")&&null!==e.categoryName&&void 0!==e.categoryName&&t.setCategoryName(e.categoryName),e.hasOwnProperty("categoryValue")&&null!==e.categoryValue&&void 0!==e.categoryValue&&t.setCategoryValue(e.categoryValue),e.hasOwnProperty("adInfo")&&null!==e.adInfo&&void 0!==e.adInfo&&t.setAdInfo(_t.constructFromObject(e.adInfo)),!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}getCategoryName(){return this.categoryName}setCategoryName(e){this.categoryName=e}getCategoryValue(){return this.categoryValue}setCategoryValue(e){this.categoryValue=e}getAdInfo(){return this.adInfo}setAdInfo(e){this.adInfo=e}toJson(e){return!1===e?{...void 0!==this.getName()&&null!==this.getName()?{name:this.getName()}:{},...void 0!==this.getCategoryName()&&null!==this.getCategoryName()?{categoryName:this.getCategoryName()}:{},...void 0!==this.getCategoryValue()&&null!==this.getCategoryValue()?{categoryValue:this.getCategoryValue()}:{},...void 0!==this.getAdInfo()&&null!==this.getAdInfo()?{adInfo:this.getAdInfo().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.getName()&&null!==this.getName()?{name:this.getName()}:{},...void 0!==this.getCategoryName()&&null!==this.getCategoryName()?{categoryName:this.getCategoryName()}:{},...void 0!==this.getCategoryValue()&&null!==this.getCategoryValue()?{categoryValue:this.getCategoryValue()}:{},...void 0!==this.getAdInfo()&&null!==this.getAdInfo()?{adInfo:this.getAdInfo().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 T?n=["name","categoryName","categoryValue","adInfo"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("name"===t){if(void 0===this.name||null===this.name)return new j("name","undefined or null");if(!F.validateMaxLength(this.name,1e3))return new j("name","does not satisfy required maxLength constraint: 1000")}if("categoryName"===t){if(void 0===this.categoryName||null===this.categoryName)return new j("categoryName","undefined or null");if(!F.validateMaxLength(this.categoryName,200))return new j("categoryName","does not satisfy required maxLength constraint: 200")}if("categoryValue"===t){if(void 0===this.categoryValue||null===this.categoryValue)return new j("categoryValue","undefined or null");if(!F.validateMaxLength(this.categoryValue,1e3))return new j("categoryValue","does not satisfy required maxLength constraint: 1000")}return"adInfo"!==t||void 0!==this.adInfo&&null!==this.adInfo?new j(t,"no such property exists"):new j("adInfo","undefined or null")}}function Vt(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")}qt.prototype.name=void 0,qt.prototype.categoryName=void 0,qt.prototype.categoryValue=void 0,qt.prototype.adInfo=void 0,nt.prototype.extId=void 0,nt.prototype.links=void 0,et.prototype.tenantId=void 0;var Bt=new WeakSet;class zt 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=Bt),t.add(e),this.$objectType="microseg.v4.config.ListDsCategoryMappingsApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,o,a,d;if(e){if(t=t||new zt,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(q.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=[],s=e.data,d=s[0].hasOwnProperty("$objectType")?s[0].$objectType:typeof s[0],o=0;o<s.length;o++){if("microseg.v4.config.CategoryMapping"!==d)throw"Unknown list of type "+d+" in data";i=qt.constructFromObject(s[o],void 0),a.push(i)}t.setData(a)}else{if(d=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,"microseg.v4.error.ErrorResponse"!==d)throw"Unknown datatype "+d+" in data";t.setData(Le.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):Vt(Bt,this,Kt).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):Vt(Bt,this,Kt).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("metadata","undefined or null")}}function Kt(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 Ht(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")}zt.prototype.metadata=void 0,zt.prototype.data=void 0,zt.prototype.$reserved=void 0,zt.prototype.$objectType=void 0,zt.prototype.$unknownFields=void 0;var Zt=new WeakSet;class Xt 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=Zt),t.add(e),this.$objectType="microseg.v4.config.DeleteDirectoryServerConfigApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s;if(e){if(t=t||new Xt,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(q.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(s=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,s){case"prism.v4.config.TaskReference":t.setData(qe.constructFromObject(e.data,void 0));break;case"microseg.v4.error.ErrorResponse":t.setData(Le.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+s+" 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):Ht(Zt,this,Qt).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):Ht(Zt,this,Qt).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("metadata","undefined or null")}}function Qt(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}Xt.prototype.metadata=void 0,Xt.prototype.data=void 0,Xt.prototype.$reserved=void 0,Xt.prototype.$objectType=void 0,Xt.prototype.$unknownFields=void 0;var Yt=new WeakSet;class en{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=Yt),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 en,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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("value"===t){if(void 0===this.value||null===this.value)return new j("value","undefined or null");if(!F.validatePattern(this.value,/^([a-zA-Z0-9À-ÿ]+(?:-[a-zA-Z0-9À-ÿ]+)*\\.)+[a-zA-ZÀ-ÿ]{2,63}$/))return new j("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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null")}}en.prototype.value=void 0,en.prototype.$reserved=void 0,en.prototype.$objectType=void 0,en.prototype.$unknownFields=void 0;var tn=new WeakSet;class nn{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=tn),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 nn,e.hasOwnProperty("ipv4")&&null!==e.ipv4&&void 0!==e.ipv4&&t.setIpv4(Ze.constructFromObject(e.ipv4)),e.hasOwnProperty("ipv6")&&null!==e.ipv6&&void 0!==e.ipv6&&t.setIpv6(Qe.constructFromObject(e.ipv6)),e.hasOwnProperty("fqdn")&&null!==e.fqdn&&void 0!==e.fqdn&&t.setFqdn(en.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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("fqdn","undefined or null"):new j("ipv6","undefined or null"):new j("ipv4","undefined or null")}}nn.prototype.ipv4=void 0,nn.prototype.ipv6=void 0,nn.prototype.fqdn=void 0,nn.prototype.$reserved=void 0,nn.prototype.$objectType=void 0,nn.prototype.$unknownFields=void 0;const sn={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",VM:"VM",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(sn).find(t=>sn[t]===e);return null==t?sn.$UNKNOWN:sn[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case sn.$UNKNOWN:case sn.$REDACTED:case sn.VM:return;default:throw new Error("Invalid : must be MatchEntity.{ $UNKNOWN|$REDACTED|VM }")}}};Object.freeze(sn);const rn=sn,on={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",NAME:"NAME",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.NAME:return;default:throw new Error("Invalid : must be MatchField.{ $UNKNOWN|$REDACTED|NAME }")}}};Object.freeze(on);const an=on,dn={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",CONTAINS:"CONTAINS",ALL:"ALL",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(dn).find(t=>dn[t]===e);return null==t?dn.$UNKNOWN:dn[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case dn.$UNKNOWN:case dn.$REDACTED:case dn.CONTAINS:case dn.ALL:return;default:throw new Error("Invalid : must be MatchType.{ $UNKNOWN|$REDACTED|CONTAINS|ALL }")}}};Object.freeze(dn);const ln=dn;var un=new WeakSet;class cn{constructor(e,t,n){var s,i;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(s=this,i=un),i.add(s),this.matchEntity=e,this.matchField=t,this.matchType=n,this.$objectType="microseg.v4.config.MatchingCriteria",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new cn,e.hasOwnProperty("matchEntity")&&null!==e.matchEntity&&void 0!==e.matchEntity&&t.setMatchEntity(rn.constructFromObject(e.matchEntity)),e.hasOwnProperty("matchField")&&null!==e.matchField&&void 0!==e.matchField&&t.setMatchField(an.constructFromObject(e.matchField)),e.hasOwnProperty("matchType")&&null!==e.matchType&&void 0!==e.matchType&&t.setMatchType(ln.constructFromObject(e.matchType)),e.hasOwnProperty("criteria")&&null!==e.criteria&&void 0!==e.criteria&&t.setCriteria(e.criteria),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())}getMatchEntity(){return this.matchEntity}setMatchEntity(e){this.matchEntity=e}getMatchField(){return this.matchField}setMatchField(e){this.matchField=e}getMatchType(){return this.matchType}setMatchType(e){this.matchType=e}getCriteria(){return this.criteria}setCriteria(e){this.criteria=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getMatchEntity()&&null!==this.getMatchEntity()?{matchEntity:this.getMatchEntity()}:{},...void 0!==this.getMatchField()&&null!==this.getMatchField()?{matchField:this.getMatchField()}:{},...void 0!==this.getMatchType()&&null!==this.getMatchType()?{matchType:this.getMatchType()}:{},...void 0!==this.getCriteria()&&null!==this.getCriteria()?{criteria:this.getCriteria()}:{},$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 T?n=["matchEntity","matchField","matchType"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("matchEntity"===t&&(void 0===this.matchEntity||null===this.matchEntity))return new j("matchEntity","undefined or null");if("matchField"===t&&(void 0===this.matchField||null===this.matchField))return new j("matchField","undefined or null");if("matchType"===t&&(void 0===this.matchType||null===this.matchType))return new j("matchType","undefined or null");if("criteria"===t){if(void 0===this.criteria||null===this.criteria)return new j("criteria","undefined or null");if(!F.validateMaxLength(this.criteria,200))return new j("criteria","does not satisfy required maxLength constraint: 200")}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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null")}}cn.prototype.matchEntity=void 0,cn.prototype.matchField=void 0,cn.prototype.matchType=void 0,cn.prototype.criteria=void 0,cn.prototype.$reserved=void 0,cn.prototype.$objectType=void 0,cn.prototype.$unknownFields=void 0;var hn=new WeakSet;class pn extends nt{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="microseg.v4.config.DirectoryServerConfig",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,r,o;if(e){if(t=t||new pn,nt.constructFromObject(e,t,!0),e.hasOwnProperty("isDefaultCategoryEnabled")&&null!==e.isDefaultCategoryEnabled&&void 0!==e.isDefaultCategoryEnabled&&t.setIsDefaultCategoryEnabled(e.isDefaultCategoryEnabled),e.hasOwnProperty("shouldKeepDefaultCategoryOnLogin")&&null!==e.shouldKeepDefaultCategoryOnLogin&&void 0!==e.shouldKeepDefaultCategoryOnLogin&&t.setShouldKeepDefaultCategoryOnLogin(e.shouldKeepDefaultCategoryOnLogin),e.hasOwnProperty("matchingCriterias")&&null!==e.matchingCriterias&&void 0!==e.matchingCriterias){for(o=[],s=e.matchingCriterias,r=0;r<s.length;r++)i=cn.constructFromObject(s[r],void 0),o.push(i);t.setMatchingCriterias(o)}if(e.hasOwnProperty("directoryServiceReference")&&null!==e.directoryServiceReference&&void 0!==e.directoryServiceReference&&t.setDirectoryServiceReference(e.directoryServiceReference),e.hasOwnProperty("domainControllers")&&null!==e.domainControllers&&void 0!==e.domainControllers){for(o=[],s=e.domainControllers,r=0;r<s.length;r++)i=nn.constructFromObject(s[r],void 0),o.push(i);t.setDomainControllers(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())}getIsDefaultCategoryEnabled(){return this.isDefaultCategoryEnabled}setIsDefaultCategoryEnabled(e){this.isDefaultCategoryEnabled=e}getShouldKeepDefaultCategoryOnLogin(){return this.shouldKeepDefaultCategoryOnLogin}setShouldKeepDefaultCategoryOnLogin(e){this.shouldKeepDefaultCategoryOnLogin=e}getMatchingCriterias(){return this.matchingCriterias}setMatchingCriterias(e){this.matchingCriterias=e}getDirectoryServiceReference(){return this.directoryServiceReference}setDirectoryServiceReference(e){this.directoryServiceReference=e}getDomainControllers(){return this.domainControllers}setDomainControllers(e){this.domainControllers=e}toJson(e){return!1===e?{...void 0!==this.getIsDefaultCategoryEnabled()&&null!==this.getIsDefaultCategoryEnabled()?{isDefaultCategoryEnabled:this.getIsDefaultCategoryEnabled()}:{},...void 0!==this.getShouldKeepDefaultCategoryOnLogin()&&null!==this.getShouldKeepDefaultCategoryOnLogin()?{shouldKeepDefaultCategoryOnLogin:this.getShouldKeepDefaultCategoryOnLogin()}:{},...void 0!==this.getMatchingCriterias()&&null!==this.getMatchingCriterias()?{matchingCriterias:this.getMatchingCriterias().map(e=>e.toJson(!1))}:{},...void 0!==this.getDirectoryServiceReference()&&null!==this.getDirectoryServiceReference()?{directoryServiceReference:this.getDirectoryServiceReference()}:{},...void 0!==this.getDomainControllers()&&null!==this.getDomainControllers()?{domainControllers:this.getDomainControllers().map(e=>e.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.getIsDefaultCategoryEnabled()&&null!==this.getIsDefaultCategoryEnabled()?{isDefaultCategoryEnabled:this.getIsDefaultCategoryEnabled()}:{},...void 0!==this.getShouldKeepDefaultCategoryOnLogin()&&null!==this.getShouldKeepDefaultCategoryOnLogin()?{shouldKeepDefaultCategoryOnLogin:this.getShouldKeepDefaultCategoryOnLogin()}:{},...void 0!==this.getMatchingCriterias()&&null!==this.getMatchingCriterias()?{matchingCriterias:this.getMatchingCriterias().map(e=>e.toJson(!1))}:{},...void 0!==this.getDirectoryServiceReference()&&null!==this.getDirectoryServiceReference()?{directoryServiceReference:this.getDirectoryServiceReference()}:{},...void 0!==this.getDomainControllers()&&null!==this.getDomainControllers()?{domainControllers:this.getDomainControllers().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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("isDefaultCategoryEnabled"===t&&(void 0===this.isDefaultCategoryEnabled||null===this.isDefaultCategoryEnabled))return new j("isDefaultCategoryEnabled","undefined or null");if("shouldKeepDefaultCategoryOnLogin"===t&&(void 0===this.shouldKeepDefaultCategoryOnLogin||null===this.shouldKeepDefaultCategoryOnLogin))return new j("shouldKeepDefaultCategoryOnLogin","undefined or null");if("matchingCriterias"===t){if(void 0===this.matchingCriterias||null===this.matchingCriterias)return new j("matchingCriterias","undefined or null");if(!F.validateMaxItems(this.matchingCriterias,100))return new j("matchingCriterias","does not satisfy required maxItems constraint: 100");if(!F.validateMinItems(this.matchingCriterias,1))return new j("matchingCriterias","does not satisfy required minItems constraint: 1")}if("directoryServiceReference"===t){if(void 0===this.directoryServiceReference||null===this.directoryServiceReference)return new j("directoryServiceReference","undefined or null");if(!F.validatePattern(this.directoryServiceReference,/^[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 j("directoryServiceReference","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("domainControllers"===t){if(void 0===this.domainControllers||null===this.domainControllers)return new j("domainControllers","undefined or null");if(!F.validateMaxItems(this.domainControllers,100))return new j("domainControllers","does not satisfy required maxItems constraint: 100");if(!F.validateMinItems(this.domainControllers,1))return new j("domainControllers","does not satisfy required minItems constraint: 1")}return new j(t,"no such property exists")}}function yn(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.isDefaultCategoryEnabled=void 0,pn.prototype.shouldKeepDefaultCategoryOnLogin=void 0,pn.prototype.matchingCriterias=void 0,pn.prototype.directoryServiceReference=void 0,pn.prototype.domainControllers=void 0,nt.prototype.extId=void 0,nt.prototype.links=void 0,et.prototype.tenantId=void 0;var vn=new WeakSet;class gn 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="microseg.v4.config.GetDsCategoryMappingApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s;if(e){if(t=t||new gn,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(q.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(s=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,s){case"microseg.v4.config.CategoryMapping":t.setData(qt.constructFromObject(e.data,void 0));break;case"microseg.v4.error.ErrorResponse":t.setData(Le.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+s+" 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):yn(vn,this,fn).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):yn(vn,this,fn).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("metadata","undefined or null")}}function fn(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 wn(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")}gn.prototype.metadata=void 0,gn.prototype.data=void 0,gn.prototype.$reserved=void 0,gn.prototype.$objectType=void 0,gn.prototype.$unknownFields=void 0;var $n=new WeakSet;class mn 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=$n),t.add(e),this.$objectType="microseg.v4.config.GetDirectoryServerConfigApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s;if(e){if(t=t||new mn,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(q.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(s=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,s){case"microseg.v4.config.DirectoryServerConfig":t.setData(pn.constructFromObject(e.data,void 0));break;case"microseg.v4.error.ErrorResponse":t.setData(Le.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+s+" 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):wn($n,this,bn).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):wn($n,this,bn).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("metadata","undefined or null")}}function bn(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")}mn.prototype.metadata=void 0,mn.prototype.data=void 0,mn.prototype.$reserved=void 0,mn.prototype.$objectType=void 0,mn.prototype.$unknownFields=void 0;var Tn=new WeakSet;class Fn 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=Tn),t.add(e),this.$objectType="microseg.v4.config.ListDirectoryServerConfigsApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,o,a,d;if(e){if(t=t||new Fn,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(q.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=[],s=e.data,d=s[0].hasOwnProperty("$objectType")?s[0].$objectType:typeof s[0],o=0;o<s.length;o++){if("microseg.v4.config.DirectoryServerConfig"!==d)throw"Unknown list of type "+d+" in data";i=pn.constructFromObject(s[o],void 0),a.push(i)}t.setData(a)}else{if(d=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,"microseg.v4.error.ErrorResponse"!==d)throw"Unknown datatype "+d+" in data";t.setData(Le.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(Tn,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):kn(Tn,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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("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}function On(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")}Fn.prototype.metadata=void 0,Fn.prototype.data=void 0,Fn.prototype.$reserved=void 0,Fn.prototype.$objectType=void 0,Fn.prototype.$unknownFields=void 0;var Sn=new WeakSet;class An 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=Sn),t.add(e),this.$objectType="microseg.v4.config.CreateDsCategoryMappingApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s;if(e){if(t=t||new An,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(q.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(s=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,s){case"prism.v4.config.TaskReference":t.setData(qe.constructFromObject(e.data,void 0));break;case"microseg.v4.error.ErrorResponse":t.setData(Le.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+s+" 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):On(Sn,this,En).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):On(Sn,this,En).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("metadata","undefined or null")}}function En(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 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")}An.prototype.metadata=void 0,An.prototype.data=void 0,An.prototype.$reserved=void 0,An.prototype.$objectType=void 0,An.prototype.$unknownFields=void 0;var In=new WeakSet;class Rn 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=In),t.add(e),this.$objectType="microseg.v4.config.UpdateDirectoryServerConfigApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s;if(e){if(t=t||new Rn,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(q.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(s=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,s){case"prism.v4.config.TaskReference":t.setData(qe.constructFromObject(e.data,void 0));break;case"microseg.v4.error.ErrorResponse":t.setData(Le.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+s+" 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):Pn(In,this,Cn).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):Pn(In,this,Cn).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("metadata","undefined or null")}}function Cn(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 Dn(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")}Rn.prototype.metadata=void 0,Rn.prototype.data=void 0,Rn.prototype.$reserved=void 0,Rn.prototype.$objectType=void 0,Rn.prototype.$unknownFields=void 0;var Un=new WeakSet;class xn 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=Un),t.add(e),this.$objectType="microseg.v4.config.DeleteEntityGroupApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s;if(e){if(t=t||new xn,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(q.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(s=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,s){case"prism.v4.config.TaskReference":t.setData(qe.constructFromObject(e.data,void 0));break;case"microseg.v4.error.ErrorResponse":t.setData(Le.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+s+" 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):Dn(Un,this,Mn).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):Dn(Un,this,Mn).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("metadata","undefined or null")}}function Mn(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}xn.prototype.metadata=void 0,xn.prototype.data=void 0,xn.prototype.$reserved=void 0,xn.prototype.$objectType=void 0,xn.prototype.$unknownFields=void 0;var Jn=new WeakSet;class Nn{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=Jn),t.add(e),this.$objectType="microseg.v4.config.Addresses",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,r,o;if(e){if(t=t||new Nn,e.hasOwnProperty("ipv4Addresses")&&null!==e.ipv4Addresses&&void 0!==e.ipv4Addresses){for(o=[],s=e.ipv4Addresses,r=0;r<s.length;r++)i=Ze.constructFromObject(s[r],void 0),o.push(i);t.setIpv4Addresses(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())}getIpv4Addresses(){return this.ipv4Addresses}setIpv4Addresses(e){this.ipv4Addresses=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getIpv4Addresses()&&null!==this.getIpv4Addresses()?{ipv4Addresses:this.getIpv4Addresses().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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("ipv4Addresses"===t){if(void 0===this.ipv4Addresses||null===this.ipv4Addresses)return new j("ipv4Addresses","undefined or null");if(!F.validateMaxItems(this.ipv4Addresses,4e3))return new j("ipv4Addresses","does not satisfy required maxItems constraint: 4000");if(!F.validateMinItems(this.ipv4Addresses,1))return new j("ipv4Addresses","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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null")}}Nn.prototype.ipv4Addresses=void 0,Nn.prototype.$reserved=void 0,Nn.prototype.$objectType=void 0,Nn.prototype.$unknownFields=void 0;const Gn={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",CATEGORY_EXT_ID:"CATEGORY_EXT_ID",EXT_ID:"EXT_ID",NAME:"NAME",LABELS:"LABELS",IP_VALUES:"IP_VALUES",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(Gn).find(t=>Gn[t]===e);return null==t?Gn.$UNKNOWN:Gn[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case Gn.$UNKNOWN:case Gn.$REDACTED:case Gn.CATEGORY_EXT_ID:case Gn.EXT_ID:case Gn.NAME:case Gn.LABELS:case Gn.IP_VALUES:return;default:throw new Error("Invalid : must be AllowedSelectBy.{ $UNKNOWN|$REDACTED|CATEGORY_EXT_ID|EXT_ID|NAME|LABELS|IP_VALUES }")}}};Object.freeze(Gn);const Ln=Gn,_n={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",VM:"VM",SUBNET:"SUBNET",VPC:"VPC",KUBE_CLUSTER:"KUBE_CLUSTER",KUBE_NAMESPACE:"KUBE_NAMESPACE",KUBE_PODS:"KUBE_PODS",KUBE_SERVICE:"KUBE_SERVICE",ADDRESS_GROUP:"ADDRESS_GROUP",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.VM:case _n.SUBNET:case _n.VPC:case _n.KUBE_CLUSTER:case _n.KUBE_NAMESPACE:case _n.KUBE_PODS:case _n.KUBE_SERVICE:case _n.ADDRESS_GROUP:return;default:throw new Error("Invalid : must be AllowedType.{ $UNKNOWN|$REDACTED|VM|SUBNET|VPC|KUBE_CLUSTER|KUBE_NAMESPACE|KUBE_PODS|KUBE_SERVICE|ADDRESS_GROUP }")}}};Object.freeze(_n);const Wn=_n;var qn=new WeakSet;class Vn{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="microseg.v4.config.IpRange",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,r,o;if(e){if(t=t||new Vn,e.hasOwnProperty("ipv4Ranges")&&null!==e.ipv4Ranges&&void 0!==e.ipv4Ranges){for(o=[],s=e.ipv4Ranges,r=0;r<s.length;r++)i=it.constructFromObject(s[r],void 0),o.push(i);t.setIpv4Ranges(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())}getIpv4Ranges(){return this.ipv4Ranges}setIpv4Ranges(e){this.ipv4Ranges=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getIpv4Ranges()&&null!==this.getIpv4Ranges()?{ipv4Ranges:this.getIpv4Ranges().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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("ipv4Ranges"===t){if(void 0===this.ipv4Ranges||null===this.ipv4Ranges)return new j("ipv4Ranges","undefined or null");if(!F.validateMaxItems(this.ipv4Ranges,4e3))return new j("ipv4Ranges","does not satisfy required maxItems constraint: 4000");if(!F.validateMinItems(this.ipv4Ranges,1))return new j("ipv4Ranges","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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null")}}Vn.prototype.ipv4Ranges=void 0,Vn.prototype.$reserved=void 0,Vn.prototype.$objectType=void 0,Vn.prototype.$unknownFields=void 0;var Bn=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=Bn),t.add(e),this.$objectType="microseg.v4.config.AllowedEntity",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,r;if(e){if(t=t||new zn,e.hasOwnProperty("selectBy")&&null!==e.selectBy&&void 0!==e.selectBy&&t.setSelectBy(Ln.constructFromObject(e.selectBy)),e.hasOwnProperty("type")&&null!==e.type&&void 0!==e.type&&t.setType(Wn.constructFromObject(e.type)),e.hasOwnProperty("referenceExtIds")&&null!==e.referenceExtIds&&void 0!==e.referenceExtIds){for(r=[],s=e.referenceExtIds,i=0;i<s.length;i++)r.push(s[i]);t.setReferenceExtIds(r)}if(e.hasOwnProperty("kubeEntities")&&null!==e.kubeEntities&&void 0!==e.kubeEntities){for(r=[],s=e.kubeEntities,i=0;i<s.length;i++)r.push(s[i]);t.setKubeEntities(r)}if(e.hasOwnProperty("addresses")&&null!==e.addresses&&void 0!==e.addresses&&t.setAddresses(Nn.constructFromObject(e.addresses)),e.hasOwnProperty("ipRanges")&&null!==e.ipRanges&&void 0!==e.ipRanges&&t.setIpRanges(Vn.constructFromObject(e.ipRanges)),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())}getSelectBy(){return this.selectBy}setSelectBy(e){this.selectBy=e}getType(){return this.type}setType(e){this.type=e}getReferenceExtIds(){return this.referenceExtIds}setReferenceExtIds(e){this.referenceExtIds=e}getKubeEntities(){return this.kubeEntities}setKubeEntities(e){this.kubeEntities=e}getAddresses(){return this.addresses}setAddresses(e){this.addresses=e}getIpRanges(){return this.ipRanges}setIpRanges(e){this.ipRanges=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getSelectBy()&&null!==this.getSelectBy()?{selectBy:this.getSelectBy()}:{},...void 0!==this.getType()&&null!==this.getType()?{type:this.getType()}:{},...void 0!==this.getReferenceExtIds()&&null!==this.getReferenceExtIds()?{referenceExtIds:this.getReferenceExtIds()}:{},...void 0!==this.getKubeEntities()&&null!==this.getKubeEntities()?{kubeEntities:this.getKubeEntities()}:{},...void 0!==this.getAddresses()&&null!==this.getAddresses()?{addresses:this.getAddresses().toJson(!1)}:{},...void 0!==this.getIpRanges()&&null!==this.getIpRanges()?{ipRanges:this.getIpRanges().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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("selectBy"===t&&(void 0===this.selectBy||null===this.selectBy))return new j("selectBy","undefined or null");if("type"===t&&(void 0===this.type||null===this.type))return new j("type","undefined or null");if("referenceExtIds"===t){if(void 0===this.referenceExtIds||null===this.referenceExtIds)return new j("referenceExtIds","undefined or null");if(!F.validateMaxItems(this.referenceExtIds,10))return new j("referenceExtIds","does not satisfy required maxItems constraint: 10");if(!F.validateMinItems(this.referenceExtIds,1))return new j("referenceExtIds","does not satisfy required minItems constraint: 1")}if("kubeEntities"===t){if(void 0===this.kubeEntities||null===this.kubeEntities)return new j("kubeEntities","undefined or null");if(!F.validateMaxItems(this.kubeEntities,5))return new j("kubeEntities","does not satisfy required maxItems constraint: 5");if(!F.validateMinItems(this.kubeEntities,1))return new j("kubeEntities","does not satisfy required minItems constraint: 1")}return"addresses"!==t||void 0!==this.addresses&&null!==this.addresses?"ipRanges"!==t||void 0!==this.ipRanges&&null!==this.ipRanges?"$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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("ipRanges","undefined or null"):new j("addresses","undefined or null")}}zn.prototype.selectBy=void 0,zn.prototype.type=void 0,zn.prototype.referenceExtIds=void 0,zn.prototype.kubeEntities=void 0,zn.prototype.addresses=void 0,zn.prototype.ipRanges=void 0,zn.prototype.$reserved=void 0,zn.prototype.$objectType=void 0,zn.prototype.$unknownFields=void 0;var Kn=new WeakSet;class Hn{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=Kn),t.add(e),this.$objectType="microseg.v4.config.AllowedConfig",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,r,o;if(e){if(t=t||new Hn,e.hasOwnProperty("entities")&&null!==e.entities&&void 0!==e.entities){for(o=[],s=e.entities,r=0;r<s.length;r++)i=zn.constructFromObject(s[r],void 0),o.push(i);t.setEntities(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())}getEntities(){return this.entities}setEntities(e){this.entities=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getEntities()&&null!==this.getEntities()?{entities:this.getEntities().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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("entities"===t){if(void 0===this.entities||null===this.entities)return new j("entities","undefined or null");if(!F.validateMaxItems(this.entities,3))return new j("entities","does not satisfy required maxItems constraint: 3");if(!F.validateMinItems(this.entities,1))return new j("entities","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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null")}}Hn.prototype.entities=void 0,Hn.prototype.$reserved=void 0,Hn.prototype.$objectType=void 0,Hn.prototype.$unknownFields=void 0;const Zn={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",EXT_ID:"EXT_ID",IP_VALUES:"IP_VALUES",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(Zn).find(t=>Zn[t]===e);return null==t?Zn.$UNKNOWN:Zn[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case Zn.$UNKNOWN:case Zn.$REDACTED:case Zn.EXT_ID:case Zn.IP_VALUES:return;default:throw new Error("Invalid : must be ExceptSelectBy.{ $UNKNOWN|$REDACTED|EXT_ID|IP_VALUES }")}}};Object.freeze(Zn);const Xn=Zn,Qn={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",ADDRESS_GROUP:"ADDRESS_GROUP",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(Qn).find(t=>Qn[t]===e);return null==t?Qn.$UNKNOWN:Qn[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case Qn.$UNKNOWN:case Qn.$REDACTED:case Qn.ADDRESS_GROUP:return;default:throw new Error("Invalid : must be ExceptType.{ $UNKNOWN|$REDACTED|ADDRESS_GROUP }")}}};Object.freeze(Qn);const Yn=Qn;var es=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=es),t.add(e),this.$objectType="microseg.v4.config.ExceptEntity",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,r;if(e){if(t=t||new ts,e.hasOwnProperty("selectBy")&&null!==e.selectBy&&void 0!==e.selectBy&&t.setSelectBy(Xn.constructFromObject(e.selectBy)),e.hasOwnProperty("type")&&null!==e.type&&void 0!==e.type&&t.setType(Yn.constructFromObject(e.type)),e.hasOwnProperty("referenceExtIds")&&null!==e.referenceExtIds&&void 0!==e.referenceExtIds){for(r=[],s=e.referenceExtIds,i=0;i<s.length;i++)r.push(s[i]);t.setReferenceExtIds(r)}if(e.hasOwnProperty("addresses")&&null!==e.addresses&&void 0!==e.addresses&&t.setAddresses(Nn.constructFromObject(e.addresses)),e.hasOwnProperty("ipRanges")&&null!==e.ipRanges&&void 0!==e.ipRanges&&t.setIpRanges(Vn.constructFromObject(e.ipRanges)),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())}getSelectBy(){return this.selectBy}setSelectBy(e){this.selectBy=e}getType(){return this.type}setType(e){this.type=e}getReferenceExtIds(){return this.referenceExtIds}setReferenceExtIds(e){this.referenceExtIds=e}getAddresses(){return this.addresses}setAddresses(e){this.addresses=e}getIpRanges(){return this.ipRanges}setIpRanges(e){this.ipRanges=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getSelectBy()&&null!==this.getSelectBy()?{selectBy:this.getSelectBy()}:{},...void 0!==this.getType()&&null!==this.getType()?{type:this.getType()}:{},...void 0!==this.getReferenceExtIds()&&null!==this.getReferenceExtIds()?{referenceExtIds:this.getReferenceExtIds()}:{},...void 0!==this.getAddresses()&&null!==this.getAddresses()?{addresses:this.getAddresses().toJson(!1)}:{},...void 0!==this.getIpRanges()&&null!==this.getIpRanges()?{ipRanges:this.getIpRanges().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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("selectBy"===t&&(void 0===this.selectBy||null===this.selectBy))return new j("selectBy","undefined or null");if("type"===t&&(void 0===this.type||null===this.type))return new j("type","undefined or null");if("referenceExtIds"===t){if(void 0===this.referenceExtIds||null===this.referenceExtIds)return new j("referenceExtIds","undefined or null");if(!F.validateMaxItems(this.referenceExtIds,10))return new j("referenceExtIds","does not satisfy required maxItems constraint: 10");if(!F.validateMinItems(this.referenceExtIds,1))return new j("referenceExtIds","does not satisfy required minItems constraint: 1")}return"addresses"!==t||void 0!==this.addresses&&null!==this.addresses?"ipRanges"!==t||void 0!==this.ipRanges&&null!==this.ipRanges?"$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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("ipRanges","undefined or null"):new j("addresses","undefined or null")}}ts.prototype.selectBy=void 0,ts.prototype.type=void 0,ts.prototype.referenceExtIds=void 0,ts.prototype.addresses=void 0,ts.prototype.ipRanges=void 0,ts.prototype.$reserved=void 0,ts.prototype.$objectType=void 0,ts.prototype.$unknownFields=void 0;var ns=new WeakSet;class ss{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=ns),t.add(e),this.$objectType="microseg.v4.config.ExceptConfig",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,r,o;if(e){if(t=t||new ss,e.hasOwnProperty("entities")&&null!==e.entities&&void 0!==e.entities){for(o=[],s=e.entities,r=0;r<s.length;r++)i=ts.constructFromObject(s[r],void 0),o.push(i);t.setEntities(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())}getEntities(){return this.entities}setEntities(e){this.entities=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getEntities()&&null!==this.getEntities()?{entities:this.getEntities().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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("entities"===t){if(void 0===this.entities||null===this.entities)return new j("entities","undefined or null");if(!F.validateMaxItems(this.entities,3))return new j("entities","does not satisfy required maxItems constraint: 3");if(!F.validateMinItems(this.entities,1))return new j("entities","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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null")}}function is(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")}ss.prototype.entities=void 0,ss.prototype.$reserved=void 0,ss.prototype.$objectType=void 0,ss.prototype.$unknownFields=void 0;var rs=new WeakSet;class os extends nt{constructor(e){var t,n;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t=this,n=rs),n.add(t),this.name=e,this.$objectType="microseg.v4.config.EntityGroup",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,r;if(e){if(t=t||new os,nt.constructFromObject(e,t,!0),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("allowedConfig")&&null!==e.allowedConfig&&void 0!==e.allowedConfig&&t.setAllowedConfig(Hn.constructFromObject(e.allowedConfig)),e.hasOwnProperty("exceptConfig")&&null!==e.exceptConfig&&void 0!==e.exceptConfig&&t.setExceptConfig(ss.constructFromObject(e.exceptConfig)),e.hasOwnProperty("policyExtIds")&&null!==e.policyExtIds&&void 0!==e.policyExtIds){for(r=[],s=e.policyExtIds,i=0;i<s.length;i++)r.push(s[i]);t.setPolicyExtIds(r)}if(e.hasOwnProperty("ownerExtId")&&null!==e.ownerExtId&&void 0!==e.ownerExtId&&t.setOwnerExtId(e.ownerExtId),e.hasOwnProperty("creationTime")&&null!==e.creationTime&&void 0!==e.creationTime&&t.setCreationTime(e.creationTime),e.hasOwnProperty("lastUpdateTime")&&null!==e.lastUpdateTime&&void 0!==e.lastUpdateTime&&t.setLastUpdateTime(e.lastUpdateTime),!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}getDescription(){return this.description}setDescription(e){this.description=e}getAllowedConfig(){return this.allowedConfig}setAllowedConfig(e){this.allowedConfig=e}getExceptConfig(){return this.exceptConfig}setExceptConfig(e){this.exceptConfig=e}getPolicyExtIds(){return this.policyExtIds}setPolicyExtIds(e){this.policyExtIds=e}getOwnerExtId(){return this.ownerExtId}setOwnerExtId(e){this.ownerExtId=e}getCreationTime(){return this.creationTime}setCreationTime(e){this.creationTime=e}getLastUpdateTime(){return this.lastUpdateTime}setLastUpdateTime(e){this.lastUpdateTime=e}toJson(e){return!1===e?{...void 0!==this.getName()&&null!==this.getName()?{name:this.getName()}:{},...void 0!==this.getDescription()&&null!==this.getDescription()?{description:this.getDescription()}:{},...void 0!==this.getAllowedConfig()&&null!==this.getAllowedConfig()?{allowedConfig:this.getAllowedConfig().toJson(!1)}:{},...void 0!==this.getExceptConfig()&&null!==this.getExceptConfig()?{exceptConfig:this.getExceptConfig().toJson(!1)}:{},...void 0!==this.getPolicyExtIds()&&null!==this.getPolicyExtIds()?{policyExtIds:this.getPolicyExtIds()}:{},...void 0!==this.getOwnerExtId()&&null!==this.getOwnerExtId()?{ownerExtId:this.getOwnerExtId()}:{},...void 0!==this.getCreationTime()&&null!==this.getCreationTime()?{creationTime:is(rs,this,as).call(this,this.getCreationTime(),!1)}:{},...void 0!==this.getLastUpdateTime()&&null!==this.getLastUpdateTime()?{lastUpdateTime:is(rs,this,as).call(this,this.getLastUpdateTime(),!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.getName()&&null!==this.getName()?{name:this.getName()}:{},...void 0!==this.getDescription()&&null!==this.getDescription()?{description:this.getDescription()}:{},...void 0!==this.getAllowedConfig()&&null!==this.getAllowedConfig()?{allowedConfig:this.getAllowedConfig().toJson(!1)}:{},...void 0!==this.getExceptConfig()&&null!==this.getExceptConfig()?{exceptConfig:this.getExceptConfig().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 T?n=["name"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("name"===t){if(void 0===this.name||null===this.name)return new j("name","undefined or null");if(!F.validateMaxLength(this.name,64))return new j("name","does not satisfy required maxLength constraint: 64");if(!F.validatePattern(this.name,/^\\s*[a-zA-Z0-9]([a-zA-Z0-9-_ \\\\.]*[a-zA-Z0-9])?\\s*$/))return new j("name","does not satisfy required pattern: /^\\s*[a-zA-Z0-9]([a-zA-Z0-9-_ \\\\.]*[a-zA-Z0-9])?\\s*$/")}if("description"===t){if(void 0===this.description||null===this.description)return new j("description","undefined or null");if(!F.validateMaxLength(this.description,1e3))return new j("description","does not satisfy required maxLength constraint: 1000");if(!F.validatePattern(this.description,/^\\s*([a-zA-Z0-9 _:.()-]*)\\s*$/))return new j("description","does not satisfy required pattern: /^\\s*([a-zA-Z0-9 _:.()-]*)\\s*$/")}if("allowedConfig"===t&&(void 0===this.allowedConfig||null===this.allowedConfig))return new j("allowedConfig","undefined or null");if("exceptConfig"===t&&(void 0===this.exceptConfig||null===this.exceptConfig))return new j("exceptConfig","undefined or null");if("policyExtIds"===t){if(void 0===this.policyExtIds||null===this.policyExtIds)return new j("policyExtIds","undefined or null");if(!F.validateMaxItems(this.policyExtIds,1e3))return new j("policyExtIds","does not satisfy required maxItems constraint: 1000");if(!F.validateMinItems(this.policyExtIds,1))return new j("policyExtIds","does not satisfy required minItems constraint: 1")}if("ownerExtId"===t){if(void 0===this.ownerExtId||null===this.ownerExtId)return new j("ownerExtId","undefined or null");if(!F.validatePattern(this.ownerExtId,/^[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 j("ownerExtId","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"creationTime"!==t||void 0!==this.creationTime&&null!==this.creationTime?"lastUpdateTime"!==t||void 0!==this.lastUpdateTime&&null!==this.lastUpdateTime?new j(t,"no such property exists"):new j("lastUpdateTime","undefined or null"):new j("creationTime","undefined or null")}}function as(e,t){return e instanceof Date&&void 0!==t?t?e.toISOString().slice(0,10):e.toISOString():e}function ds(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")}os.prototype.name=void 0,os.prototype.description=void 0,os.prototype.allowedConfig=void 0,os.prototype.exceptConfig=void 0,os.prototype.policyExtIds=void 0,os.prototype.ownerExtId=void 0,os.prototype.creationTime=void 0,os.prototype.lastUpdateTime=void 0,nt.prototype.extId=void 0,nt.prototype.links=void 0,et.prototype.tenantId=void 0;var ls=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=ls),t.add(e),this.$objectType="microseg.v4.config.UpdateEntityGroupApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s;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(q.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(s=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,s){case"prism.v4.config.TaskReference":t.setData(qe.constructFromObject(e.data,void 0));break;case"microseg.v4.error.ErrorResponse":t.setData(Le.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+s+" 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):ds(ls,this,cs).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):ds(ls,this,cs).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("metadata","undefined or null")}}function cs(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 hs(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 ps=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=ps),t.add(e),this.$objectType="microseg.v4.config.GetEntityGroupApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s;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(q.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(s=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,s){case"microseg.v4.config.EntityGroup":t.setData(os.constructFromObject(e.data,void 0));break;case"microseg.v4.error.ErrorResponse":t.setData(Le.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+s+" 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):hs(ps,this,vs).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):hs(ps,this,vs).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("metadata","undefined or null")}}function vs(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 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.metadata=void 0,ys.prototype.data=void 0,ys.prototype.$reserved=void 0,ys.prototype.$objectType=void 0,ys.prototype.$unknownFields=void 0;var fs=new WeakSet;class ws 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=fs),t.add(e),this.$objectType="microseg.v4.config.CreateEntityGroupApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s;if(e){if(t=t||new ws,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(q.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(s=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,s){case"prism.v4.config.TaskReference":t.setData(qe.constructFromObject(e.data,void 0));break;case"microseg.v4.error.ErrorResponse":t.setData(Le.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+s+" 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):gs(fs,this,$s).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):gs(fs,this,$s).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("metadata","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}function ms(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")}ws.prototype.metadata=void 0,ws.prototype.data=void 0,ws.prototype.$reserved=void 0,ws.prototype.$objectType=void 0,ws.prototype.$unknownFields=void 0;var bs=new WeakSet;class ks 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=bs),t.add(e),this.$objectType="microseg.v4.config.ListEntityGroupsApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,o,a,d;if(e){if(t=t||new ks,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(q.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=[],s=e.data,d=s[0].hasOwnProperty("$objectType")?s[0].$objectType:typeof s[0],o=0;o<s.length;o++){if("microseg.v4.config.EntityGroup"!==d)throw"Unknown list of type "+d+" in data";i=os.constructFromObject(s[o],void 0),a.push(i)}t.setData(a)}else{if(d=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,"microseg.v4.error.ErrorResponse"!==d)throw"Unknown datatype "+d+" in data";t.setData(Le.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):ms(bs,this,Ts).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):ms(bs,this,Ts).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("metadata","undefined or null")}}function Ts(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}ks.prototype.metadata=void 0,ks.prototype.data=void 0,ks.prototype.$reserved=void 0,ks.prototype.$objectType=void 0,ks.prototype.$unknownFields=void 0;const Fs={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",ALL:"ALL",NONE:"NONE",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(Fs).find(t=>Fs[t]===e);return null==t?Fs.$UNKNOWN:Fs[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case Fs.$UNKNOWN:case Fs.$REDACTED:case Fs.ALL:case Fs.NONE:return;default:throw new Error("Invalid : must be AllowType.{ $UNKNOWN|$REDACTED|ALL|NONE }")}}};Object.freeze(Fs);const js=Fs,Os={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",VM:"VM",VPC:"VPC",SUBNET:"SUBNET",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.VM:case Os.VPC:case Os.SUBNET:return;default:throw new Error("Invalid : must be CategoryAssociatedEntityType.{ $UNKNOWN|$REDACTED|VM|VPC|SUBNET }")}}};Object.freeze(Os);const Ss=Os;var As=new WeakSet;class Es{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=As),t.add(e),this.$objectType="microseg.v4.config.IcmpTypeCodeSpec",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new Es,e.hasOwnProperty("isAllAllowed")&&null!==e.isAllAllowed&&void 0!==e.isAllAllowed&&t.setIsAllAllowed(e.isAllAllowed),e.hasOwnProperty("type")&&null!==e.type&&void 0!==e.type&&t.setType(e.type),e.hasOwnProperty("code")&&null!==e.code&&void 0!==e.code&&t.setCode(e.code),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())}getIsAllAllowed(){return this.isAllAllowed}setIsAllAllowed(e){this.isAllAllowed=e}getType(){return this.type}setType(e){this.type=e}getCode(){return this.code}setCode(e){this.code=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getIsAllAllowed()&&null!==this.getIsAllAllowed()?{isAllAllowed:this.getIsAllAllowed()}:{},...void 0!==this.getType()&&null!==this.getType()?{type:this.getType()}:{},...void 0!==this.getCode()&&null!==this.getCode()?{code:this.getCode()}:{},$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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("isAllAllowed"===t&&(void 0===this.isAllAllowed||null===this.isAllAllowed))return new j("isAllAllowed","undefined or null");if("type"===t){if(void 0===this.type||null===this.type)return new j("type","undefined or null");if(!F.validateMaximum(this.type,43))return new j("type","does not satisfy required maximum constraint: 43");if(!F.validateMinimum(this.type,0))return new j("type","does not satisfy required minimum constraint: 0")}if("code"===t){if(void 0===this.code||null===this.code)return new j("code","undefined or null");if(!F.validateMaximum(this.code,15))return new j("code","does not satisfy required maximum constraint: 15");if(!F.validateMinimum(this.code,0))return new j("code","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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null")}}Es.prototype.isAllAllowed=!1,Es.prototype.type=void 0,Es.prototype.code=void 0,Es.prototype.$reserved=void 0,Es.prototype.$objectType=void 0,Es.prototype.$unknownFields=void 0;var Ps=new WeakSet;class Is{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=Ps),t.add(e),this.$objectType="microseg.v4.config.IcmpV6TypeCodeSpec",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new Is,e.hasOwnProperty("isAllAllowed")&&null!==e.isAllAllowed&&void 0!==e.isAllAllowed&&t.setIsAllAllowed(e.isAllAllowed),e.hasOwnProperty("type")&&null!==e.type&&void 0!==e.type&&t.setType(e.type),e.hasOwnProperty("code")&&null!==e.code&&void 0!==e.code&&t.setCode(e.code),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())}getIsAllAllowed(){return this.isAllAllowed}setIsAllAllowed(e){this.isAllAllowed=e}getType(){return this.type}setType(e){this.type=e}getCode(){return this.code}setCode(e){this.code=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getIsAllAllowed()&&null!==this.getIsAllAllowed()?{isAllAllowed:this.getIsAllAllowed()}:{},...void 0!==this.getType()&&null!==this.getType()?{type:this.getType()}:{},...void 0!==this.getCode()&&null!==this.getCode()?{code:this.getCode()}:{},$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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("isAllAllowed"===t&&(void 0===this.isAllAllowed||null===this.isAllAllowed))return new j("isAllAllowed","undefined or null");if("type"===t){if(void 0===this.type||null===this.type)return new j("type","undefined or null");if(!F.validateMaximum(this.type,201))return new j("type","does not satisfy required maximum constraint: 201");if(!F.validateMinimum(this.type,0))return new j("type","does not satisfy required minimum constraint: 0")}if("code"===t){if(void 0===this.code||null===this.code)return new j("code","undefined or null");if(!F.validateMaximum(this.code,10))return new j("code","does not satisfy required maximum constraint: 10");if(!F.validateMinimum(this.code,0))return new j("code","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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null")}}Is.prototype.isAllAllowed=!1,Is.prototype.type=void 0,Is.prototype.code=void 0,Is.prototype.$reserved=void 0,Is.prototype.$objectType=void 0,Is.prototype.$unknownFields=void 0;var Rs=new WeakSet;class Cs{constructor(e,t){var n,s;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(n=this,s=Rs),s.add(n),this.startPort=e,this.endPort=t,this.$objectType="microseg.v4.config.TcpPortRangeSpec",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new Cs,e.hasOwnProperty("startPort")&&null!==e.startPort&&void 0!==e.startPort&&t.setStartPort(e.startPort),e.hasOwnProperty("endPort")&&null!==e.endPort&&void 0!==e.endPort&&t.setEndPort(e.endPort),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())}getStartPort(){return this.startPort}setStartPort(e){this.startPort=e}getEndPort(){return this.endPort}setEndPort(e){this.endPort=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getStartPort()&&null!==this.getStartPort()?{startPort:this.getStartPort()}:{},...void 0!==this.getEndPort()&&null!==this.getEndPort()?{endPort:this.getEndPort()}:{},$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 T?n=["startPort","endPort"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("startPort"===t){if(void 0===this.startPort||null===this.startPort)return new j("startPort","undefined or null");if(!F.validateMaximum(this.startPort,65535))return new j("startPort","does not satisfy required maximum constraint: 65535");if(!F.validateMinimum(this.startPort,0))return new j("startPort","does not satisfy required minimum constraint: 0")}if("endPort"===t){if(void 0===this.endPort||null===this.endPort)return new j("endPort","undefined or null");if(!F.validateMaximum(this.endPort,65535))return new j("endPort","does not satisfy required maximum constraint: 65535");if(!F.validateMinimum(this.endPort,0))return new j("endPort","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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null")}}Cs.prototype.startPort=void 0,Cs.prototype.endPort=void 0,Cs.prototype.$reserved=void 0,Cs.prototype.$objectType=void 0,Cs.prototype.$unknownFields=void 0;var Ds=new WeakSet;class Us{constructor(e,t){var n,s;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(n=this,s=Ds),s.add(n),this.startPort=e,this.endPort=t,this.$objectType="microseg.v4.config.UdpPortRangeSpec",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new Us,e.hasOwnProperty("startPort")&&null!==e.startPort&&void 0!==e.startPort&&t.setStartPort(e.startPort),e.hasOwnProperty("endPort")&&null!==e.endPort&&void 0!==e.endPort&&t.setEndPort(e.endPort),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())}getStartPort(){return this.startPort}setStartPort(e){this.startPort=e}getEndPort(){return this.endPort}setEndPort(e){this.endPort=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getStartPort()&&null!==this.getStartPort()?{startPort:this.getStartPort()}:{},...void 0!==this.getEndPort()&&null!==this.getEndPort()?{endPort:this.getEndPort()}:{},$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 T?n=["startPort","endPort"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("startPort"===t){if(void 0===this.startPort||null===this.startPort)return new j("startPort","undefined or null");if(!F.validateMaximum(this.startPort,65535))return new j("startPort","does not satisfy required maximum constraint: 65535");if(!F.validateMinimum(this.startPort,0))return new j("startPort","does not satisfy required minimum constraint: 0")}if("endPort"===t){if(void 0===this.endPort||null===this.endPort)return new j("endPort","undefined or null");if(!F.validateMaximum(this.endPort,65535))return new j("endPort","does not satisfy required maximum constraint: 65535");if(!F.validateMinimum(this.endPort,0))return new j("endPort","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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null")}}Us.prototype.startPort=void 0,Us.prototype.endPort=void 0,Us.prototype.$reserved=void 0,Us.prototype.$objectType=void 0,Us.prototype.$unknownFields=void 0;var xs=new WeakSet;class Ms{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=xs),t.add(e),this.$objectType="microseg.v4.config.ApplicationRuleSpec",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,r,o;if(e){if(t=t||new Ms,e.hasOwnProperty("securedGroupCategoryAssociatedEntityType")&&null!==e.securedGroupCategoryAssociatedEntityType&&void 0!==e.securedGroupCategoryAssociatedEntityType&&t.setSecuredGroupCategoryAssociatedEntityType(Ss.constructFromObject(e.securedGroupCategoryAssociatedEntityType)),e.hasOwnProperty("securedGroupCategoryReferences")&&null!==e.securedGroupCategoryReferences&&void 0!==e.securedGroupCategoryReferences){for(o=[],s=e.securedGroupCategoryReferences,r=0;r<s.length;r++)o.push(s[r]);t.setSecuredGroupCategoryReferences(o)}if(e.hasOwnProperty("securedGroupEntityGroupReference")&&null!==e.securedGroupEntityGroupReference&&void 0!==e.securedGroupEntityGroupReference&&t.setSecuredGroupEntityGroupReference(e.securedGroupEntityGroupReference),e.hasOwnProperty("srcAllowSpec")&&null!==e.srcAllowSpec&&void 0!==e.srcAllowSpec&&t.setSrcAllowSpec(js.constructFromObject(e.srcAllowSpec)),e.hasOwnProperty("destAllowSpec")&&null!==e.destAllowSpec&&void 0!==e.destAllowSpec&&t.setDestAllowSpec(js.constructFromObject(e.destAllowSpec)),e.hasOwnProperty("srcCategoryAssociatedEntityType")&&null!==e.srcCategoryAssociatedEntityType&&void 0!==e.srcCategoryAssociatedEntityType&&t.setSrcCategoryAssociatedEntityType(Ss.constructFromObject(e.srcCategoryAssociatedEntityType)),e.hasOwnProperty("srcCategoryReferences")&&null!==e.srcCategoryReferences&&void 0!==e.srcCategoryReferences){for(o=[],s=e.srcCategoryReferences,r=0;r<s.length;r++)o.push(s[r]);t.setSrcCategoryReferences(o)}if(e.hasOwnProperty("srcEntityGroupReference")&&null!==e.srcEntityGroupReference&&void 0!==e.srcEntityGroupReference&&t.setSrcEntityGroupReference(e.srcEntityGroupReference),e.hasOwnProperty("destCategoryAssociatedEntityType")&&null!==e.destCategoryAssociatedEntityType&&void 0!==e.destCategoryAssociatedEntityType&&t.setDestCategoryAssociatedEntityType(Ss.constructFromObject(e.destCategoryAssociatedEntityType)),e.hasOwnProperty("destCategoryReferences")&&null!==e.destCategoryReferences&&void 0!==e.destCategoryReferences){for(o=[],s=e.destCategoryReferences,r=0;r<s.length;r++)o.push(s[r]);t.setDestCategoryReferences(o)}if(e.hasOwnProperty("destEntityGroupReference")&&null!==e.destEntityGroupReference&&void 0!==e.destEntityGroupReference&&t.setDestEntityGroupReference(e.destEntityGroupReference),e.hasOwnProperty("srcSubnet")&&null!==e.srcSubnet&&void 0!==e.srcSubnet&&t.setSrcSubnet(Ze.constructFromObject(e.srcSubnet)),e.hasOwnProperty("srcIpv6Subnet")&&null!==e.srcIpv6Subnet&&void 0!==e.srcIpv6Subnet&&t.setSrcIpv6Subnet(Qe.constructFromObject(e.srcIpv6Subnet)),e.hasOwnProperty("destSubnet")&&null!==e.destSubnet&&void 0!==e.destSubnet&&t.setDestSubnet(Ze.constructFromObject(e.destSubnet)),e.hasOwnProperty("destIpv6Subnet")&&null!==e.destIpv6Subnet&&void 0!==e.destIpv6Subnet&&t.setDestIpv6Subnet(Qe.constructFromObject(e.destIpv6Subnet)),e.hasOwnProperty("srcAddressGroupReferences")&&null!==e.srcAddressGroupReferences&&void 0!==e.srcAddressGroupReferences){for(o=[],s=e.srcAddressGroupReferences,r=0;r<s.length;r++)o.push(s[r]);t.setSrcAddressGroupReferences(o)}if(e.hasOwnProperty("destAddressGroupReferences")&&null!==e.destAddressGroupReferences&&void 0!==e.destAddressGroupReferences){for(o=[],s=e.destAddressGroupReferences,r=0;r<s.length;r++)o.push(s[r]);t.setDestAddressGroupReferences(o)}if(e.hasOwnProperty("serviceGroupReferences")&&null!==e.serviceGroupReferences&&void 0!==e.serviceGroupReferences){for(o=[],s=e.serviceGroupReferences,r=0;r<s.length;r++)o.push(s[r]);t.setServiceGroupReferences(o)}if(e.hasOwnProperty("isAllProtocolAllowed")&&null!==e.isAllProtocolAllowed&&void 0!==e.isAllProtocolAllowed&&t.setIsAllProtocolAllowed(e.isAllProtocolAllowed),e.hasOwnProperty("tcpServices")&&null!==e.tcpServices&&void 0!==e.tcpServices){for(o=[],s=e.tcpServices,r=0;r<s.length;r++)i=Cs.constructFromObject(s[r],void 0),o.push(i);t.setTcpServices(o)}if(e.hasOwnProperty("udpServices")&&null!==e.udpServices&&void 0!==e.udpServices){for(o=[],s=e.udpServices,r=0;r<s.length;r++)i=Us.constructFromObject(s[r],void 0),o.push(i);t.setUdpServices(o)}if(e.hasOwnProperty("icmpServices")&&null!==e.icmpServices&&void 0!==e.icmpServices){for(o=[],s=e.icmpServices,r=0;r<s.length;r++)i=Es.constructFromObject(s[r],void 0),o.push(i);t.setIcmpServices(o)}if(e.hasOwnProperty("icmpV6Services")&&null!==e.icmpV6Services&&void 0!==e.icmpV6Services){for(o=[],s=e.icmpV6Services,r=0;r<s.length;r++)i=Is.constructFromObject(s[r],void 0),o.push(i);t.setIcmpV6Services(o)}if(e.hasOwnProperty("networkFunctionChainReference")&&null!==e.networkFunctionChainReference&&void 0!==e.networkFunctionChainReference&&t.setNetworkFunctionChainReference(e.networkFunctionChainReference),e.hasOwnProperty("networkFunctionReference")&&null!==e.networkFunctionReference&&void 0!==e.networkFunctionReference&&t.setNetworkFunctionReference(e.networkFunctionReference),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())}getSecuredGroupCategoryAssociatedEntityType(){return this.securedGroupCategoryAssociatedEntityType}setSecuredGroupCategoryAssociatedEntityType(e){this.securedGroupCategoryAssociatedEntityType=e}getSecuredGroupCategoryReferences(){return this.securedGroupCategoryReferences}setSecuredGroupCategoryReferences(e){this.securedGroupCategoryReferences=e}getSecuredGroupEntityGroupReference(){return this.securedGroupEntityGroupReference}setSecuredGroupEntityGroupReference(e){this.securedGroupEntityGroupReference=e}getSrcAllowSpec(){return this.srcAllowSpec}setSrcAllowSpec(e){this.srcAllowSpec=e}getDestAllowSpec(){return this.destAllowSpec}setDestAllowSpec(e){this.destAllowSpec=e}getSrcCategoryAssociatedEntityType(){return this.srcCategoryAssociatedEntityType}setSrcCategoryAssociatedEntityType(e){this.srcCategoryAssociatedEntityType=e}getSrcCategoryReferences(){return this.srcCategoryReferences}setSrcCategoryReferences(e){this.srcCategoryReferences=e}getSrcEntityGroupReference(){return this.srcEntityGroupReference}setSrcEntityGroupReference(e){this.srcEntityGroupReference=e}getDestCategoryAssociatedEntityType(){return this.destCategoryAssociatedEntityType}setDestCategoryAssociatedEntityType(e){this.destCategoryAssociatedEntityType=e}getDestCategoryReferences(){return this.destCategoryReferences}setDestCategoryReferences(e){this.destCategoryReferences=e}getDestEntityGroupReference(){return this.destEntityGroupReference}setDestEntityGroupReference(e){this.destEntityGroupReference=e}getSrcSubnet(){return this.srcSubnet}setSrcSubnet(e){this.srcSubnet=e}getSrcIpv6Subnet(){return this.srcIpv6Subnet}setSrcIpv6Subnet(e){this.srcIpv6Subnet=e}getDestSubnet(){return this.destSubnet}setDestSubnet(e){this.destSubnet=e}getDestIpv6Subnet(){return this.destIpv6Subnet}setDestIpv6Subnet(e){this.destIpv6Subnet=e}getSrcAddressGroupReferences(){return this.srcAddressGroupReferences}setSrcAddressGroupReferences(e){this.srcAddressGroupReferences=e}getDestAddressGroupReferences(){return this.destAddressGroupReferences}setDestAddressGroupReferences(e){this.destAddressGroupReferences=e}getServiceGroupReferences(){return this.serviceGroupReferences}setServiceGroupReferences(e){this.serviceGroupReferences=e}getIsAllProtocolAllowed(){return this.isAllProtocolAllowed}setIsAllProtocolAllowed(e){this.isAllProtocolAllowed=e}getTcpServices(){return this.tcpServices}setTcpServices(e){this.tcpServices=e}getUdpServices(){return this.udpServices}setUdpServices(e){this.udpServices=e}getIcmpServices(){return this.icmpServices}setIcmpServices(e){this.icmpServices=e}getIcmpV6Services(){return this.icmpV6Services}setIcmpV6Services(e){this.icmpV6Services=e}getNetworkFunctionChainReference(){return this.networkFunctionChainReference}setNetworkFunctionChainReference(e){this.networkFunctionChainReference=e}getNetworkFunctionReference(){return this.networkFunctionReference}setNetworkFunctionReference(e){this.networkFunctionReference=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getSecuredGroupCategoryAssociatedEntityType()&&null!==this.getSecuredGroupCategoryAssociatedEntityType()?{securedGroupCategoryAssociatedEntityType:this.getSecuredGroupCategoryAssociatedEntityType()}:{},...void 0!==this.getSecuredGroupCategoryReferences()&&null!==this.getSecuredGroupCategoryReferences()?{securedGroupCategoryReferences:this.getSecuredGroupCategoryReferences()}:{},...void 0!==this.getSecuredGroupEntityGroupReference()&&null!==this.getSecuredGroupEntityGroupReference()?{securedGroupEntityGroupReference:this.getSecuredGroupEntityGroupReference()}:{},...void 0!==this.getSrcAllowSpec()&&null!==this.getSrcAllowSpec()?{srcAllowSpec:this.getSrcAllowSpec()}:{},...void 0!==this.getDestAllowSpec()&&null!==this.getDestAllowSpec()?{destAllowSpec:this.getDestAllowSpec()}:{},...void 0!==this.getSrcCategoryAssociatedEntityType()&&null!==this.getSrcCategoryAssociatedEntityType()?{srcCategoryAssociatedEntityType:this.getSrcCategoryAssociatedEntityType()}:{},...void 0!==this.getSrcCategoryReferences()&&null!==this.getSrcCategoryReferences()?{srcCategoryReferences:this.getSrcCategoryReferences()}:{},...void 0!==this.getSrcEntityGroupReference()&&null!==this.getSrcEntityGroupReference()?{srcEntityGroupReference:this.getSrcEntityGroupReference()}:{},...void 0!==this.getDestCategoryAssociatedEntityType()&&null!==this.getDestCategoryAssociatedEntityType()?{destCategoryAssociatedEntityType:this.getDestCategoryAssociatedEntityType()}:{},...void 0!==this.getDestCategoryReferences()&&null!==this.getDestCategoryReferences()?{destCategoryReferences:this.getDestCategoryReferences()}:{},...void 0!==this.getDestEntityGroupReference()&&null!==this.getDestEntityGroupReference()?{destEntityGroupReference:this.getDestEntityGroupReference()}:{},...void 0!==this.getSrcSubnet()&&null!==this.getSrcSubnet()?{srcSubnet:this.getSrcSubnet().toJson(!1)}:{},...void 0!==this.getSrcIpv6Subnet()&&null!==this.getSrcIpv6Subnet()?{srcIpv6Subnet:this.getSrcIpv6Subnet().toJson(!1)}:{},...void 0!==this.getDestSubnet()&&null!==this.getDestSubnet()?{destSubnet:this.getDestSubnet().toJson(!1)}:{},...void 0!==this.getDestIpv6Subnet()&&null!==this.getDestIpv6Subnet()?{destIpv6Subnet:this.getDestIpv6Subnet().toJson(!1)}:{},...void 0!==this.getSrcAddressGroupReferences()&&null!==this.getSrcAddressGroupReferences()?{srcAddressGroupReferences:this.getSrcAddressGroupReferences()}:{},...void 0!==this.getDestAddressGroupReferences()&&null!==this.getDestAddressGroupReferences()?{destAddressGroupReferences:this.getDestAddressGroupReferences()}:{},...void 0!==this.getServiceGroupReferences()&&null!==this.getServiceGroupReferences()?{serviceGroupReferences:this.getServiceGroupReferences()}:{},...void 0!==this.getIsAllProtocolAllowed()&&null!==this.getIsAllProtocolAllowed()?{isAllProtocolAllowed:this.getIsAllProtocolAllowed()}:{},...void 0!==this.getTcpServices()&&null!==this.getTcpServices()?{tcpServices:this.getTcpServices().map(e=>e.toJson(!1))}:{},...void 0!==this.getUdpServices()&&null!==this.getUdpServices()?{udpServices:this.getUdpServices().map(e=>e.toJson(!1))}:{},...void 0!==this.getIcmpServices()&&null!==this.getIcmpServices()?{icmpServices:this.getIcmpServices().map(e=>e.toJson(!1))}:{},...void 0!==this.getIcmpV6Services()&&null!==this.getIcmpV6Services()?{icmpV6Services:this.getIcmpV6Services().map(e=>e.toJson(!1))}:{},...void 0!==this.getNetworkFunctionChainReference()&&null!==this.getNetworkFunctionChainReference()?{networkFunctionChainReference:this.getNetworkFunctionChainReference()}:{},...void 0!==this.getNetworkFunctionReference()&&null!==this.getNetworkFunctionReference()?{networkFunctionReference:this.getNetworkFunctionReference()}:{},$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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("securedGroupCategoryAssociatedEntityType"===t&&(void 0===this.securedGroupCategoryAssociatedEntityType||null===this.securedGroupCategoryAssociatedEntityType))return new j("securedGroupCategoryAssociatedEntityType","undefined or null");if("securedGroupCategoryReferences"===t){if(void 0===this.securedGroupCategoryReferences||null===this.securedGroupCategoryReferences)return new j("securedGroupCategoryReferences","undefined or null");if(!F.validateMaxItems(this.securedGroupCategoryReferences,10))return new j("securedGroupCategoryReferences","does not satisfy required maxItems constraint: 10");if(!F.validateMinItems(this.securedGroupCategoryReferences,1))return new j("securedGroupCategoryReferences","does not satisfy required minItems constraint: 1")}if("securedGroupEntityGroupReference"===t){if(void 0===this.securedGroupEntityGroupReference||null===this.securedGroupEntityGroupReference)return new j("securedGroupEntityGroupReference","undefined or null");if(!F.validatePattern(this.securedGroupEntityGroupReference,/^[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 j("securedGroupEntityGroupReference","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("srcAllowSpec"===t&&(void 0===this.srcAllowSpec||null===this.srcAllowSpec))return new j("srcAllowSpec","undefined or null");if("destAllowSpec"===t&&(void 0===this.destAllowSpec||null===this.destAllowSpec))return new j("destAllowSpec","undefined or null");if("srcCategoryAssociatedEntityType"===t&&(void 0===this.srcCategoryAssociatedEntityType||null===this.srcCategoryAssociatedEntityType))return new j("srcCategoryAssociatedEntityType","undefined or null");if("srcCategoryReferences"===t){if(void 0===this.srcCategoryReferences||null===this.srcCategoryReferences)return new j("srcCategoryReferences","undefined or null");if(!F.validateMaxItems(this.srcCategoryReferences,10))return new j("srcCategoryReferences","does not satisfy required maxItems constraint: 10");if(!F.validateMinItems(this.srcCategoryReferences,1))return new j("srcCategoryReferences","does not satisfy required minItems constraint: 1")}if("srcEntityGroupReference"===t){if(void 0===this.srcEntityGroupReference||null===this.srcEntityGroupReference)return new j("srcEntityGroupReference","undefined or null");if(!F.validatePattern(this.srcEntityGroupReference,/^[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 j("srcEntityGroupReference","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("destCategoryAssociatedEntityType"===t&&(void 0===this.destCategoryAssociatedEntityType||null===this.destCategoryAssociatedEntityType))return new j("destCategoryAssociatedEntityType","undefined or null");if("destCategoryReferences"===t){if(void 0===this.destCategoryReferences||null===this.destCategoryReferences)return new j("destCategoryReferences","undefined or null");if(!F.validateMaxItems(this.destCategoryReferences,10))return new j("destCategoryReferences","does not satisfy required maxItems constraint: 10");if(!F.validateMinItems(this.destCategoryReferences,1))return new j("destCategoryReferences","does not satisfy required minItems constraint: 1")}if("destEntityGroupReference"===t){if(void 0===this.destEntityGroupReference||null===this.destEntityGroupReference)return new j("destEntityGroupReference","undefined or null");if(!F.validatePattern(this.destEntityGroupReference,/^[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 j("destEntityGroupReference","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("srcSubnet"===t&&(void 0===this.srcSubnet||null===this.srcSubnet))return new j("srcSubnet","undefined or null");if("srcIpv6Subnet"===t&&(void 0===this.srcIpv6Subnet||null===this.srcIpv6Subnet))return new j("srcIpv6Subnet","undefined or null");if("destSubnet"===t&&(void 0===this.destSubnet||null===this.destSubnet))return new j("destSubnet","undefined or null");if("destIpv6Subnet"===t&&(void 0===this.destIpv6Subnet||null===this.destIpv6Subnet))return new j("destIpv6Subnet","undefined or null");if("srcAddressGroupReferences"===t){if(void 0===this.srcAddressGroupReferences||null===this.srcAddressGroupReferences)return new j("srcAddressGroupReferences","undefined or null");if(!F.validateMaxItems(this.srcAddressGroupReferences,1))return new j("srcAddressGroupReferences","does not satisfy required maxItems constraint: 1");if(!F.validateMinItems(this.srcAddressGroupReferences,1))return new j("srcAddressGroupReferences","does not satisfy required minItems constraint: 1")}if("destAddressGroupReferences"===t){if(void 0===this.destAddressGroupReferences||null===this.destAddressGroupReferences)return new j("destAddressGroupReferences","undefined or null");if(!F.validateMaxItems(this.destAddressGroupReferences,1))return new j("destAddressGroupReferences","does not satisfy required maxItems constraint: 1");if(!F.validateMinItems(this.destAddressGroupReferences,1))return new j("destAddressGroupReferences","does not satisfy required minItems constraint: 1")}if("serviceGroupReferences"===t){if(void 0===this.serviceGroupReferences||null===this.serviceGroupReferences)return new j("serviceGroupReferences","undefined or null");if(!F.validateMaxItems(this.serviceGroupReferences,160))return new j("serviceGroupReferences","does not satisfy required maxItems constraint: 160")}if("isAllProtocolAllowed"===t&&(void 0===this.isAllProtocolAllowed||null===this.isAllProtocolAllowed))return new j("isAllProtocolAllowed","undefined or null");if("tcpServices"===t){if(void 0===this.tcpServices||null===this.tcpServices)return new j("tcpServices","undefined or null");if(!F.validateMaxItems(this.tcpServices,160))return new j("tcpServices","does not satisfy required maxItems constraint: 160")}if("udpServices"===t){if(void 0===this.udpServices||null===this.udpServices)return new j("udpServices","undefined or null");if(!F.validateMaxItems(this.udpServices,160))return new j("udpServices","does not satisfy required maxItems constraint: 160")}if("icmpServices"===t){if(void 0===this.icmpServices||null===this.icmpServices)return new j("icmpServices","undefined or null");if(!F.validateMaxItems(this.icmpServices,160))return new j("icmpServices","does not satisfy required maxItems constraint: 160")}if("icmpV6Services"===t){if(void 0===this.icmpV6Services||null===this.icmpV6Services)return new j("icmpV6Services","undefined or null");if(!F.validateMaxItems(this.icmpV6Services,160))return new j("icmpV6Services","does not satisfy required maxItems constraint: 160")}if("networkFunctionChainReference"===t){if(void 0===this.networkFunctionChainReference||null===this.networkFunctionChainReference)return new j("networkFunctionChainReference","undefined or null");if(!F.validatePattern(this.networkFunctionChainReference,/^[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 j("networkFunctionChainReference","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("networkFunctionReference"===t){if(void 0===this.networkFunctionReference||null===this.networkFunctionReference)return new j("networkFunctionReference","undefined or null");if(!F.validatePattern(this.networkFunctionReference,/^[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 j("networkFunctionReference","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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null")}}Ms.prototype.securedGroupCategoryAssociatedEntityType=void 0,Ms.prototype.securedGroupCategoryReferences=void 0,Ms.prototype.securedGroupEntityGroupReference=void 0,Ms.prototype.srcAllowSpec=void 0,Ms.prototype.destAllowSpec=void 0,Ms.prototype.srcCategoryAssociatedEntityType=void 0,Ms.prototype.srcCategoryReferences=void 0,Ms.prototype.srcEntityGroupReference=void 0,Ms.prototype.destCategoryAssociatedEntityType=void 0,Ms.prototype.destCategoryReferences=void 0,Ms.prototype.destEntityGroupReference=void 0,Ms.prototype.srcSubnet=void 0,Ms.prototype.srcIpv6Subnet=void 0,Ms.prototype.destSubnet=void 0,Ms.prototype.destIpv6Subnet=void 0,Ms.prototype.srcAddressGroupReferences=void 0,Ms.prototype.destAddressGroupReferences=void 0,Ms.prototype.serviceGroupReferences=void 0,Ms.prototype.isAllProtocolAllowed=void 0,Ms.prototype.tcpServices=void 0,Ms.prototype.udpServices=void 0,Ms.prototype.icmpServices=void 0,Ms.prototype.icmpV6Services=void 0,Ms.prototype.networkFunctionChainReference=void 0,Ms.prototype.networkFunctionReference=void 0,Ms.prototype.$reserved=void 0,Ms.prototype.$objectType=void 0,Ms.prototype.$unknownFields=void 0;const Js={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",ALLOW:"ALLOW",DENY:"DENY",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(Js).find(t=>Js[t]===e);return null==t?Js.$UNKNOWN:Js[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case Js.$UNKNOWN:case Js.$REDACTED:case Js.ALLOW:case Js.DENY:return;default:throw new Error("Invalid : must be IntraEntityGroupRuleAction.{ $UNKNOWN|$REDACTED|ALLOW|DENY }")}}};Object.freeze(Js);const Ns=Js;var Gs=new WeakSet;class Ls{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=Gs),n.add(t),this.securedGroupAction=e,this.$objectType="microseg.v4.config.IntraEntityGroupRuleSpec",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,r,o;if(e){if(t=t||new Ls,e.hasOwnProperty("securedGroupCategoryAssociatedEntityType")&&null!==e.securedGroupCategoryAssociatedEntityType&&void 0!==e.securedGroupCategoryAssociatedEntityType&&t.setSecuredGroupCategoryAssociatedEntityType(Ss.constructFromObject(e.securedGroupCategoryAssociatedEntityType)),e.hasOwnProperty("securedGroupCategoryReferences")&&null!==e.securedGroupCategoryReferences&&void 0!==e.securedGroupCategoryReferences){for(o=[],s=e.securedGroupCategoryReferences,r=0;r<s.length;r++)o.push(s[r]);t.setSecuredGroupCategoryReferences(o)}if(e.hasOwnProperty("securedGroupEntityGroupReference")&&null!==e.securedGroupEntityGroupReference&&void 0!==e.securedGroupEntityGroupReference&&t.setSecuredGroupEntityGroupReference(e.securedGroupEntityGroupReference),e.hasOwnProperty("securedGroupAction")&&null!==e.securedGroupAction&&void 0!==e.securedGroupAction&&t.setSecuredGroupAction(Ns.constructFromObject(e.securedGroupAction)),e.hasOwnProperty("securedGroupServiceReferences")&&null!==e.securedGroupServiceReferences&&void 0!==e.securedGroupServiceReferences){for(o=[],s=e.securedGroupServiceReferences,r=0;r<s.length;r++)o.push(s[r]);t.setSecuredGroupServiceReferences(o)}if(e.hasOwnProperty("tcpServices")&&null!==e.tcpServices&&void 0!==e.tcpServices){for(o=[],s=e.tcpServices,r=0;r<s.length;r++)i=Cs.constructFromObject(s[r],void 0),o.push(i);t.setTcpServices(o)}if(e.hasOwnProperty("udpServices")&&null!==e.udpServices&&void 0!==e.udpServices){for(o=[],s=e.udpServices,r=0;r<s.length;r++)i=Us.constructFromObject(s[r],void 0),o.push(i);t.setUdpServices(o)}if(e.hasOwnProperty("icmpServices")&&null!==e.icmpServices&&void 0!==e.icmpServices){for(o=[],s=e.icmpServices,r=0;r<s.length;r++)i=Es.constructFromObject(s[r],void 0),o.push(i);t.setIcmpServices(o)}if(e.hasOwnProperty("icmpV6Services")&&null!==e.icmpV6Services&&void 0!==e.icmpV6Services){for(o=[],s=e.icmpV6Services,r=0;r<s.length;r++)i=Is.constructFromObject(s[r],void 0),o.push(i);t.setIcmpV6Services(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())}getSecuredGroupCategoryAssociatedEntityType(){return this.securedGroupCategoryAssociatedEntityType}setSecuredGroupCategoryAssociatedEntityType(e){this.securedGroupCategoryAssociatedEntityType=e}getSecuredGroupCategoryReferences(){return this.securedGroupCategoryReferences}setSecuredGroupCategoryReferences(e){this.securedGroupCategoryReferences=e}getSecuredGroupEntityGroupReference(){return this.securedGroupEntityGroupReference}setSecuredGroupEntityGroupReference(e){this.securedGroupEntityGroupReference=e}getSecuredGroupAction(){return this.securedGroupAction}setSecuredGroupAction(e){this.securedGroupAction=e}getSecuredGroupServiceReferences(){return this.securedGroupServiceReferences}setSecuredGroupServiceReferences(e){this.securedGroupServiceReferences=e}getTcpServices(){return this.tcpServices}setTcpServices(e){this.tcpServices=e}getUdpServices(){return this.udpServices}setUdpServices(e){this.udpServices=e}getIcmpServices(){return this.icmpServices}setIcmpServices(e){this.icmpServices=e}getIcmpV6Services(){return this.icmpV6Services}setIcmpV6Services(e){this.icmpV6Services=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getSecuredGroupCategoryAssociatedEntityType()&&null!==this.getSecuredGroupCategoryAssociatedEntityType()?{securedGroupCategoryAssociatedEntityType:this.getSecuredGroupCategoryAssociatedEntityType()}:{},...void 0!==this.getSecuredGroupCategoryReferences()&&null!==this.getSecuredGroupCategoryReferences()?{securedGroupCategoryReferences:this.getSecuredGroupCategoryReferences()}:{},...void 0!==this.getSecuredGroupEntityGroupReference()&&null!==this.getSecuredGroupEntityGroupReference()?{securedGroupEntityGroupReference:this.getSecuredGroupEntityGroupReference()}:{},...void 0!==this.getSecuredGroupAction()&&null!==this.getSecuredGroupAction()?{securedGroupAction:this.getSecuredGroupAction()}:{},...void 0!==this.getSecuredGroupServiceReferences()&&null!==this.getSecuredGroupServiceReferences()?{securedGroupServiceReferences:this.getSecuredGroupServiceReferences()}:{},...void 0!==this.getTcpServices()&&null!==this.getTcpServices()?{tcpServices:this.getTcpServices().map(e=>e.toJson(!1))}:{},...void 0!==this.getUdpServices()&&null!==this.getUdpServices()?{udpServices:this.getUdpServices().map(e=>e.toJson(!1))}:{},...void 0!==this.getIcmpServices()&&null!==this.getIcmpServices()?{icmpServices:this.getIcmpServices().map(e=>e.toJson(!1))}:{},...void 0!==this.getIcmpV6Services()&&null!==this.getIcmpV6Services()?{icmpV6Services:this.getIcmpV6Services().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 T?n=["securedGroupAction"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("securedGroupCategoryAssociatedEntityType"===t&&(void 0===this.securedGroupCategoryAssociatedEntityType||null===this.securedGroupCategoryAssociatedEntityType))return new j("securedGroupCategoryAssociatedEntityType","undefined or null");if("securedGroupCategoryReferences"===t){if(void 0===this.securedGroupCategoryReferences||null===this.securedGroupCategoryReferences)return new j("securedGroupCategoryReferences","undefined or null");if(!F.validateMaxItems(this.securedGroupCategoryReferences,10))return new j("securedGroupCategoryReferences","does not satisfy required maxItems constraint: 10");if(!F.validateMinItems(this.securedGroupCategoryReferences,1))return new j("securedGroupCategoryReferences","does not satisfy required minItems constraint: 1")}if("securedGroupEntityGroupReference"===t){if(void 0===this.securedGroupEntityGroupReference||null===this.securedGroupEntityGroupReference)return new j("securedGroupEntityGroupReference","undefined or null");if(!F.validatePattern(this.securedGroupEntityGroupReference,/^[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 j("securedGroupEntityGroupReference","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("securedGroupAction"===t&&(void 0===this.securedGroupAction||null===this.securedGroupAction))return new j("securedGroupAction","undefined or null");if("securedGroupServiceReferences"===t){if(void 0===this.securedGroupServiceReferences||null===this.securedGroupServiceReferences)return new j("securedGroupServiceReferences","undefined or null");if(!F.validateMaxItems(this.securedGroupServiceReferences,160))return new j("securedGroupServiceReferences","does not satisfy required maxItems constraint: 160")}if("tcpServices"===t){if(void 0===this.tcpServices||null===this.tcpServices)return new j("tcpServices","undefined or null");if(!F.validateMaxItems(this.tcpServices,160))return new j("tcpServices","does not satisfy required maxItems constraint: 160")}if("udpServices"===t){if(void 0===this.udpServices||null===this.udpServices)return new j("udpServices","undefined or null");if(!F.validateMaxItems(this.udpServices,160))return new j("udpServices","does not satisfy required maxItems constraint: 160")}if("icmpServices"===t){if(void 0===this.icmpServices||null===this.icmpServices)return new j("icmpServices","undefined or null");if(!F.validateMaxItems(this.icmpServices,160))return new j("icmpServices","does not satisfy required maxItems constraint: 160")}if("icmpV6Services"===t){if(void 0===this.icmpV6Services||null===this.icmpV6Services)return new j("icmpV6Services","undefined or null");if(!F.validateMaxItems(this.icmpV6Services,160))return new j("icmpV6Services","does not satisfy required maxItems constraint: 160")}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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null")}}Ls.prototype.securedGroupCategoryAssociatedEntityType=void 0,Ls.prototype.securedGroupCategoryReferences=void 0,Ls.prototype.securedGroupEntityGroupReference=void 0,Ls.prototype.securedGroupAction=void 0,Ls.prototype.securedGroupServiceReferences=void 0,Ls.prototype.tcpServices=void 0,Ls.prototype.udpServices=void 0,Ls.prototype.icmpServices=void 0,Ls.prototype.icmpV6Services=void 0,Ls.prototype.$reserved=void 0,Ls.prototype.$objectType=void 0,Ls.prototype.$unknownFields=void 0;var _s=new WeakSet;class Ws{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=_s),t.add(e),this.$objectType="microseg.v4.config.IsolationGroup",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,r;if(e){if(t=t||new Ws,e.hasOwnProperty("groupCategoryAssociatedEntityType")&&null!==e.groupCategoryAssociatedEntityType&&void 0!==e.groupCategoryAssociatedEntityType&&t.setGroupCategoryAssociatedEntityType(Ss.constructFromObject(e.groupCategoryAssociatedEntityType)),e.hasOwnProperty("groupCategoryReferences")&&null!==e.groupCategoryReferences&&void 0!==e.groupCategoryReferences){for(r=[],s=e.groupCategoryReferences,i=0;i<s.length;i++)r.push(s[i]);t.setGroupCategoryReferences(r)}if(e.hasOwnProperty("groupEntityGroupReference")&&null!==e.groupEntityGroupReference&&void 0!==e.groupEntityGroupReference&&t.setGroupEntityGroupReference(e.groupEntityGroupReference),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())}getGroupCategoryAssociatedEntityType(){return this.groupCategoryAssociatedEntityType}setGroupCategoryAssociatedEntityType(e){this.groupCategoryAssociatedEntityType=e}getGroupCategoryReferences(){return this.groupCategoryReferences}setGroupCategoryReferences(e){this.groupCategoryReferences=e}getGroupEntityGroupReference(){return this.groupEntityGroupReference}setGroupEntityGroupReference(e){this.groupEntityGroupReference=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getGroupCategoryAssociatedEntityType()&&null!==this.getGroupCategoryAssociatedEntityType()?{groupCategoryAssociatedEntityType:this.getGroupCategoryAssociatedEntityType()}:{},...void 0!==this.getGroupCategoryReferences()&&null!==this.getGroupCategoryReferences()?{groupCategoryReferences:this.getGroupCategoryReferences()}:{},...void 0!==this.getGroupEntityGroupReference()&&null!==this.getGroupEntityGroupReference()?{groupEntityGroupReference:this.getGroupEntityGroupReference()}:{},$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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("groupCategoryAssociatedEntityType"===t&&(void 0===this.groupCategoryAssociatedEntityType||null===this.groupCategoryAssociatedEntityType))return new j("groupCategoryAssociatedEntityType","undefined or null");if("groupCategoryReferences"===t){if(void 0===this.groupCategoryReferences||null===this.groupCategoryReferences)return new j("groupCategoryReferences","undefined or null");if(!F.validateMaxItems(this.groupCategoryReferences,10))return new j("groupCategoryReferences","does not satisfy required maxItems constraint: 10");if(!F.validateMinItems(this.groupCategoryReferences,1))return new j("groupCategoryReferences","does not satisfy required minItems constraint: 1")}if("groupEntityGroupReference"===t){if(void 0===this.groupEntityGroupReference||null===this.groupEntityGroupReference)return new j("groupEntityGroupReference","undefined or null");if(!F.validatePattern(this.groupEntityGroupReference,/^[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 j("groupEntityGroupReference","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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null")}}Ws.prototype.groupCategoryAssociatedEntityType=void 0,Ws.prototype.groupCategoryReferences=void 0,Ws.prototype.groupEntityGroupReference=void 0,Ws.prototype.$reserved=void 0,Ws.prototype.$objectType=void 0,Ws.prototype.$unknownFields=void 0;var qs=new WeakSet;class Vs{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=qs),n.add(t),this.isolationGroups=e,this.$objectType="microseg.v4.config.AllToAllIsolationGroup",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,r,o;if(e){if(t=t||new Vs,e.hasOwnProperty("isolationGroups")&&null!==e.isolationGroups&&void 0!==e.isolationGroups){for(o=[],s=e.isolationGroups,r=0;r<s.length;r++)i=Ws.constructFromObject(s[r],void 0),o.push(i);t.setIsolationGroups(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())}getIsolationGroups(){return this.isolationGroups}setIsolationGroups(e){this.isolationGroups=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getIsolationGroups()&&null!==this.getIsolationGroups()?{isolationGroups:this.getIsolationGroups().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 T?n=["isolationGroups"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("isolationGroups"===t){if(void 0===this.isolationGroups||null===this.isolationGroups)return new j("isolationGroups","undefined or null");if(!F.validateMaxItems(this.isolationGroups,32))return new j("isolationGroups","does not satisfy required maxItems constraint: 32");if(!F.validateMinItems(this.isolationGroups,2))return new j("isolationGroups","does not satisfy required minItems constraint: 2")}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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null")}}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")}Vs.prototype.isolationGroups=void 0,Vs.prototype.$reserved=void 0,Vs.prototype.$objectType=void 0,Vs.prototype.$unknownFields=void 0;var zs=new WeakSet;class Ks{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=zs),n.add(t),this.spec=e,this.$objectType="microseg.v4.config.MultiEnvIsolationRuleSpec",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s;if(e){if(t=t||new Ks,e.hasOwnProperty("spec")&&null!==e.spec&&void 0!==e.spec){if(s=e.spec.hasOwnProperty("$objectType")?e.spec.$objectType:typeof e.spec,"microseg.v4.config.AllToAllIsolationGroup"!==s)throw"Unknown datatype "+s+" in data";t.setSpec(Vs.constructFromObject(e.spec,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())}getSpec(){return this.spec}setSpec(e){this.spec=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getSpec()&&null!==this.getSpec()?{spec:void 0!==this.getSpec().toJson?this.getSpec().toJson(!1):Array.isArray(this.getSpec())?this.getSpec().map(e=>void 0!==e.toJson?e.toJson(!1):e):Bs(zs,this,Hs).call(this,this.getSpec(),!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.getSpec()&&null!==this.getSpec()?{spec:void 0!==this.getSpec().toJson?this.getSpec().toJson():Array.isArray(this.getSpec())?this.getSpec().map(e=>void 0!==e.toJson?e.toJson():e):Bs(zs,this,Hs).call(this,this.getSpec())}:{},$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 T?n=["spec"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){return"spec"!==t||void 0!==this.spec&&null!==this.spec?"$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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("spec","undefined or null")}}function Hs(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}Ks.prototype.spec=void 0,Ks.prototype.$reserved=void 0,Ks.prototype.$objectType=void 0,Ks.prototype.$unknownFields=void 0;const Zs={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",QUARANTINE:"QUARANTINE",TWO_ENV_ISOLATION:"TWO_ENV_ISOLATION",APPLICATION:"APPLICATION",INTRA_GROUP:"INTRA_GROUP",MULTI_ENV_ISOLATION:"MULTI_ENV_ISOLATION",SHARED_SERVICE:"SHARED_SERVICE",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(Zs).find(t=>Zs[t]===e);return null==t?Zs.$UNKNOWN:Zs[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case Zs.$UNKNOWN:case Zs.$REDACTED:case Zs.QUARANTINE:case Zs.TWO_ENV_ISOLATION:case Zs.APPLICATION:case Zs.INTRA_GROUP:case Zs.MULTI_ENV_ISOLATION:case Zs.SHARED_SERVICE:return;default:throw new Error("Invalid : must be RuleType.{ $UNKNOWN|$REDACTED|QUARANTINE|TWO_ENV_ISOLATION|APPLICATION|INTRA_GROUP|MULTI_ENV_ISOLATION|SHARED_SERVICE }")}}};Object.freeze(Zs);const Xs=Zs;var Qs=new WeakSet;class Ys{constructor(e,t){var n,s;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(n=this,s=Qs),s.add(n),this.firstIsolationGroup=e,this.secondIsolationGroup=t,this.$objectType="microseg.v4.config.TwoEnvIsolationRuleSpec",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,r;if(e){if(t=t||new Ys,e.hasOwnProperty("firstIsolationGroup")&&null!==e.firstIsolationGroup&&void 0!==e.firstIsolationGroup){for(r=[],s=e.firstIsolationGroup,i=0;i<s.length;i++)r.push(s[i]);t.setFirstIsolationGroup(r)}if(e.hasOwnProperty("secondIsolationGroup")&&null!==e.secondIsolationGroup&&void 0!==e.secondIsolationGroup){for(r=[],s=e.secondIsolationGroup,i=0;i<s.length;i++)r.push(s[i]);t.setSecondIsolationGroup(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())}getFirstIsolationGroup(){return this.firstIsolationGroup}setFirstIsolationGroup(e){this.firstIsolationGroup=e}getSecondIsolationGroup(){return this.secondIsolationGroup}setSecondIsolationGroup(e){this.secondIsolationGroup=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getFirstIsolationGroup()&&null!==this.getFirstIsolationGroup()?{firstIsolationGroup:this.getFirstIsolationGroup()}:{},...void 0!==this.getSecondIsolationGroup()&&null!==this.getSecondIsolationGroup()?{secondIsolationGroup:this.getSecondIsolationGroup()}:{},$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 T?n=["firstIsolationGroup","secondIsolationGroup"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("firstIsolationGroup"===t){if(void 0===this.firstIsolationGroup||null===this.firstIsolationGroup)return new j("firstIsolationGroup","undefined or null");if(!F.validateMaxItems(this.firstIsolationGroup,10))return new j("firstIsolationGroup","does not satisfy required maxItems constraint: 10");if(!F.validateMinItems(this.firstIsolationGroup,1))return new j("firstIsolationGroup","does not satisfy required minItems constraint: 1")}if("secondIsolationGroup"===t){if(void 0===this.secondIsolationGroup||null===this.secondIsolationGroup)return new j("secondIsolationGroup","undefined or null");if(!F.validateMaxItems(this.secondIsolationGroup,10))return new j("secondIsolationGroup","does not satisfy required maxItems constraint: 10");if(!F.validateMinItems(this.secondIsolationGroup,1))return new j("secondIsolationGroup","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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null")}}function ei(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.firstIsolationGroup=void 0,Ys.prototype.secondIsolationGroup=void 0,Ys.prototype.$reserved=void 0,Ys.prototype.$objectType=void 0,Ys.prototype.$unknownFields=void 0;var ti=new WeakSet;class ni extends nt{constructor(e,t){var n,s;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(n=this,s=ti),s.add(n),this.type=e,this.spec=t,this.$objectType="microseg.v4.config.NetworkSecurityPolicyRule",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s;if(e){if(t=t||new ni,nt.constructFromObject(e,t,!0),e.hasOwnProperty("description")&&null!==e.description&&void 0!==e.description&&t.setDescription(e.description),e.hasOwnProperty("type")&&null!==e.type&&void 0!==e.type&&t.setType(Xs.constructFromObject(e.type)),e.hasOwnProperty("spec")&&null!==e.spec&&void 0!==e.spec)switch(s=e.spec.hasOwnProperty("$objectType")?e.spec.$objectType:typeof e.spec,s){case"microseg.v4.config.TwoEnvIsolationRuleSpec":t.setSpec(Ys.constructFromObject(e.spec,void 0));break;case"microseg.v4.config.ApplicationRuleSpec":t.setSpec(Ms.constructFromObject(e.spec,void 0));break;case"microseg.v4.config.IntraEntityGroupRuleSpec":t.setSpec(Ls.constructFromObject(e.spec,void 0));break;case"microseg.v4.config.MultiEnvIsolationRuleSpec":t.setSpec(Ks.constructFromObject(e.spec,void 0));break;default:throw"Unknown datatype "+s+" in data"}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())}getDescription(){return this.description}setDescription(e){this.description=e}getType(){return this.type}setType(e){this.type=e}getSpec(){return this.spec}setSpec(e){this.spec=e}toJson(e){return!1===e?{...void 0!==this.getDescription()&&null!==this.getDescription()?{description:this.getDescription()}:{},...void 0!==this.getType()&&null!==this.getType()?{type:this.getType()}:{},...void 0!==this.getSpec()&&null!==this.getSpec()?{spec:void 0!==this.getSpec().toJson?this.getSpec().toJson(!1):Array.isArray(this.getSpec())?this.getSpec().map(e=>void 0!==e.toJson?e.toJson(!1):e):ei(ti,this,si).call(this,this.getSpec(),!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.getDescription()&&null!==this.getDescription()?{description:this.getDescription()}:{},...void 0!==this.getType()&&null!==this.getType()?{type:this.getType()}:{},...void 0!==this.getSpec()&&null!==this.getSpec()?{spec:void 0!==this.getSpec().toJson?this.getSpec().toJson():Array.isArray(this.getSpec())?this.getSpec().map(e=>void 0!==e.toJson?e.toJson():e):ei(ti,this,si).call(this,this.getSpec())}:{},$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 T?n=["type","spec"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("description"===t){if(void 0===this.description||null===this.description)return new j("description","undefined or null");if(!F.validateMaxLength(this.description,64))return new j("description","does not satisfy required maxLength constraint: 64")}return"type"!==t||void 0!==this.type&&null!==this.type?"spec"!==t||void 0!==this.spec&&null!==this.spec?new j(t,"no such property exists"):new j("spec","undefined or null"):new j("type","undefined or null")}}function si(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.description=void 0,ni.prototype.type=void 0,ni.prototype.spec=void 0,nt.prototype.extId=void 0,nt.prototype.links=void 0,et.prototype.tenantId=void 0;const ii={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",ALL_VLAN:"ALL_VLAN",ALL_VPC:"ALL_VPC",VPC_LIST:"VPC_LIST",GLOBAL:"GLOBAL",VPC_AS_CATEGORY:"VPC_AS_CATEGORY",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(ii).find(t=>ii[t]===e);return null==t?ii.$UNKNOWN:ii[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case ii.$UNKNOWN:case ii.$REDACTED:case ii.ALL_VLAN:case ii.ALL_VPC:case ii.VPC_LIST:case ii.GLOBAL:case ii.VPC_AS_CATEGORY:return;default:throw new Error("Invalid : must be SecurityPolicyScope.{ $UNKNOWN|$REDACTED|ALL_VLAN|ALL_VPC|VPC_LIST|GLOBAL|VPC_AS_CATEGORY }")}}};Object.freeze(ii);const ri=ii,oi={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",SAVE:"SAVE",MONITOR:"MONITOR",ENFORCE:"ENFORCE",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(oi).find(t=>oi[t]===e);return null==t?oi.$UNKNOWN:oi[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case oi.$UNKNOWN:case oi.$REDACTED:case oi.SAVE:case oi.MONITOR:case oi.ENFORCE:return;default:throw new Error("Invalid : must be SecurityPolicyState.{ $UNKNOWN|$REDACTED|SAVE|MONITOR|ENFORCE }")}}};Object.freeze(oi);const ai=oi,di={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",QUARANTINE:"QUARANTINE",ISOLATION:"ISOLATION",APPLICATION:"APPLICATION",SHAREDSERVICE:"SHAREDSERVICE",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(di).find(t=>di[t]===e);return null==t?di.$UNKNOWN:di[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case di.$UNKNOWN:case di.$REDACTED:case di.QUARANTINE:case di.ISOLATION:case di.APPLICATION:case di.SHAREDSERVICE:return;default:throw new Error("Invalid : must be SecurityPolicyType.{ $UNKNOWN|$REDACTED|QUARANTINE|ISOLATION|APPLICATION|SHAREDSERVICE }")}}};Object.freeze(di);const li=di;function ui(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 ci=new WeakSet;class hi extends nt{constructor(e,t){var n,s;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(n=this,s=ci),s.add(n),this.name=e,this.type=t,this.$objectType="microseg.v4.config.NetworkSecurityPolicy",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,r,o;if(e){if(t=t||new hi,nt.constructFromObject(e,t,!0),e.hasOwnProperty("name")&&null!==e.name&&void 0!==e.name&&t.setName(e.name),e.hasOwnProperty("type")&&null!==e.type&&void 0!==e.type&&t.setType(li.constructFromObject(e.type)),e.hasOwnProperty("description")&&null!==e.description&&void 0!==e.description&&t.setDescription(e.description),e.hasOwnProperty("state")&&null!==e.state&&void 0!==e.state&&t.setState(ai.constructFromObject(e.state)),e.hasOwnProperty("rules")&&null!==e.rules&&void 0!==e.rules){for(o=[],s=e.rules,r=0;r<s.length;r++)i=ni.constructFromObject(s[r],void 0),o.push(i);t.setRules(o)}if(e.hasOwnProperty("networkFunctionReferences")&&null!==e.networkFunctionReferences&&void 0!==e.networkFunctionReferences){for(o=[],s=e.networkFunctionReferences,r=0;r<s.length;r++)o.push(s[r]);t.setNetworkFunctionReferences(o)}if(e.hasOwnProperty("isIpv6TrafficAllowed")&&null!==e.isIpv6TrafficAllowed&&void 0!==e.isIpv6TrafficAllowed&&t.setIsIpv6TrafficAllowed(e.isIpv6TrafficAllowed),e.hasOwnProperty("isIpv4AddressScope")&&null!==e.isIpv4AddressScope&&void 0!==e.isIpv4AddressScope&&t.setIsIpv4AddressScope(e.isIpv4AddressScope),e.hasOwnProperty("isIpv6AddressScope")&&null!==e.isIpv6AddressScope&&void 0!==e.isIpv6AddressScope&&t.setIsIpv6AddressScope(e.isIpv6AddressScope),e.hasOwnProperty("isHitlogEnabled")&&null!==e.isHitlogEnabled&&void 0!==e.isHitlogEnabled&&t.setIsHitlogEnabled(e.isHitlogEnabled),e.hasOwnProperty("scope")&&null!==e.scope&&void 0!==e.scope&&t.setScope(ri.constructFromObject(e.scope)),e.hasOwnProperty("vpcReferences")&&null!==e.vpcReferences&&void 0!==e.vpcReferences){for(o=[],s=e.vpcReferences,r=0;r<s.length;r++)o.push(s[r]);t.setVpcReferences(o)}if(e.hasOwnProperty("scopeReferences")&&null!==e.scopeReferences&&void 0!==e.scopeReferences){for(o=[],s=e.scopeReferences,r=0;r<s.length;r++)o.push(s[r]);t.setScopeReferences(o)}if(e.hasOwnProperty("securedGroups")&&null!==e.securedGroups&&void 0!==e.securedGroups){for(o=[],s=e.securedGroups,r=0;r<s.length;r++)o.push(s[r]);t.setSecuredGroups(o)}if(e.hasOwnProperty("securedEntityGroupReferences")&&null!==e.securedEntityGroupReferences&&void 0!==e.securedEntityGroupReferences){for(o=[],s=e.securedEntityGroupReferences,r=0;r<s.length;r++)o.push(s[r]);t.setSecuredEntityGroupReferences(o)}if(e.hasOwnProperty("lastUpdateTime")&&null!==e.lastUpdateTime&&void 0!==e.lastUpdateTime&&t.setLastUpdateTime(e.lastUpdateTime),e.hasOwnProperty("creationTime")&&null!==e.creationTime&&void 0!==e.creationTime&&t.setCreationTime(e.creationTime),e.hasOwnProperty("isSystemDefined")&&null!==e.isSystemDefined&&void 0!==e.isSystemDefined&&t.setIsSystemDefined(e.isSystemDefined),e.hasOwnProperty("createdBy")&&null!==e.createdBy&&void 0!==e.createdBy&&t.setCreatedBy(e.createdBy),!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}getType(){return this.type}setType(e){this.type=e}getDescription(){return this.description}setDescription(e){this.description=e}getState(){return this.state}setState(e){this.state=e}getRules(){return this.rules}setRules(e){this.rules=e}getNetworkFunctionReferences(){return this.networkFunctionReferences}setNetworkFunctionReferences(e){this.networkFunctionReferences=e}getIsIpv6TrafficAllowed(){return this.isIpv6TrafficAllowed}setIsIpv6TrafficAllowed(e){this.isIpv6TrafficAllowed=e}getIsIpv4AddressScope(){return this.isIpv4AddressScope}setIsIpv4AddressScope(e){this.isIpv4AddressScope=e}getIsIpv6AddressScope(){return this.isIpv6AddressScope}setIsIpv6AddressScope(e){this.isIpv6AddressScope=e}getIsHitlogEnabled(){return this.isHitlogEnabled}setIsHitlogEnabled(e){this.isHitlogEnabled=e}getScope(){return this.scope}setScope(e){this.scope=e}getVpcReferences(){return this.vpcReferences}setVpcReferences(e){this.vpcReferences=e}getScopeReferences(){return this.scopeReferences}setScopeReferences(e){this.scopeReferences=e}getSecuredGroups(){return this.securedGroups}setSecuredGroups(e){this.securedGroups=e}getSecuredEntityGroupReferences(){return this.securedEntityGroupReferences}setSecuredEntityGroupReferences(e){this.securedEntityGroupReferences=e}getLastUpdateTime(){return this.lastUpdateTime}setLastUpdateTime(e){this.lastUpdateTime=e}getCreationTime(){return this.creationTime}setCreationTime(e){this.creationTime=e}getIsSystemDefined(){return this.isSystemDefined}setIsSystemDefined(e){this.isSystemDefined=e}getCreatedBy(){return this.createdBy}setCreatedBy(e){this.createdBy=e}toJson(e){return!1===e?{...void 0!==this.getName()&&null!==this.getName()?{name:this.getName()}:{},...void 0!==this.getType()&&null!==this.getType()?{type:this.getType()}:{},...void 0!==this.getDescription()&&null!==this.getDescription()?{description:this.getDescription()}:{},...void 0!==this.getState()&&null!==this.getState()?{state:this.getState()}:{},...void 0!==this.getRules()&&null!==this.getRules()?{rules:this.getRules().map(e=>e.toJson(!1))}:{},...void 0!==this.getNetworkFunctionReferences()&&null!==this.getNetworkFunctionReferences()?{networkFunctionReferences:this.getNetworkFunctionReferences()}:{},...void 0!==this.getIsIpv6TrafficAllowed()&&null!==this.getIsIpv6TrafficAllowed()?{isIpv6TrafficAllowed:this.getIsIpv6TrafficAllowed()}:{},...void 0!==this.getIsIpv4AddressScope()&&null!==this.getIsIpv4AddressScope()?{isIpv4AddressScope:this.getIsIpv4AddressScope()}:{},...void 0!==this.getIsIpv6AddressScope()&&null!==this.getIsIpv6AddressScope()?{isIpv6AddressScope:this.getIsIpv6AddressScope()}:{},...void 0!==this.getIsHitlogEnabled()&&null!==this.getIsHitlogEnabled()?{isHitlogEnabled:this.getIsHitlogEnabled()}:{},...void 0!==this.getScope()&&null!==this.getScope()?{scope:this.getScope()}:{},...void 0!==this.getVpcReferences()&&null!==this.getVpcReferences()?{vpcReferences:this.getVpcReferences()}:{},...void 0!==this.getScopeReferences()&&null!==this.getScopeReferences()?{scopeReferences:this.getScopeReferences()}:{},...void 0!==this.getSecuredGroups()&&null!==this.getSecuredGroups()?{securedGroups:this.getSecuredGroups()}:{},...void 0!==this.getSecuredEntityGroupReferences()&&null!==this.getSecuredEntityGroupReferences()?{securedEntityGroupReferences:this.getSecuredEntityGroupReferences()}:{},...void 0!==this.getLastUpdateTime()&&null!==this.getLastUpdateTime()?{lastUpdateTime:ui(ci,this,pi).call(this,this.getLastUpdateTime(),!1)}:{},...void 0!==this.getCreationTime()&&null!==this.getCreationTime()?{creationTime:ui(ci,this,pi).call(this,this.getCreationTime(),!1)}:{},...void 0!==this.getIsSystemDefined()&&null!==this.getIsSystemDefined()?{isSystemDefined:this.getIsSystemDefined()}:{},...void 0!==this.getCreatedBy()&&null!==this.getCreatedBy()?{createdBy:this.getCreatedBy()}:{},...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.getName()&&null!==this.getName()?{name:this.getName()}:{},...void 0!==this.getType()&&null!==this.getType()?{type:this.getType()}:{},...void 0!==this.getDescription()&&null!==this.getDescription()?{description:this.getDescription()}:{},...void 0!==this.getState()&&null!==this.getState()?{state:this.getState()}:{},...void 0!==this.getRules()&&null!==this.getRules()?{rules:this.getRules().map(e=>e.toJson(!1))}:{},...void 0!==this.getIsIpv6TrafficAllowed()&&null!==this.getIsIpv6TrafficAllowed()?{isIpv6TrafficAllowed:this.getIsIpv6TrafficAllowed()}:{},...void 0!==this.getIsIpv4AddressScope()&&null!==this.getIsIpv4AddressScope()?{isIpv4AddressScope:this.getIsIpv4AddressScope()}:{},...void 0!==this.getIsIpv6AddressScope()&&null!==this.getIsIpv6AddressScope()?{isIpv6AddressScope:this.getIsIpv6AddressScope()}:{},...void 0!==this.getIsHitlogEnabled()&&null!==this.getIsHitlogEnabled()?{isHitlogEnabled:this.getIsHitlogEnabled()}:{},...void 0!==this.getScope()&&null!==this.getScope()?{scope:this.getScope()}:{},...void 0!==this.getVpcReferences()&&null!==this.getVpcReferences()?{vpcReferences:this.getVpcReferences()}:{},...void 0!==this.getScopeReferences()&&null!==this.getScopeReferences()?{scopeReferences:this.getScopeReferences()}:{},$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 T?n=["name","type"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("name"===t){if(void 0===this.name||null===this.name)return new j("name","undefined or null");if(!F.validateMaxLength(this.name,63))return new j("name","does not satisfy required maxLength constraint: 63");if(!F.validatePattern(this.name,/^\\s*[a-zA-Z0-9]([a-zA-Z0-9-_ \\\\.]*[a-zA-Z0-9])?\\s*$/))return new j("name","does not satisfy required pattern: /^\\s*[a-zA-Z0-9]([a-zA-Z0-9-_ \\\\.]*[a-zA-Z0-9])?\\s*$/")}if("type"===t&&(void 0===this.type||null===this.type))return new j("type","undefined or null");if("description"===t){if(void 0===this.description||null===this.description)return new j("description","undefined or null");if(!F.validateMaxLength(this.description,512))return new j("description","does not satisfy required maxLength constraint: 512");if(!F.validatePattern(this.description,/^\\s*([a-zA-Z0-9 _:.()-]*)\\s*$/))return new j("description","does not satisfy required pattern: /^\\s*([a-zA-Z0-9 _:.()-]*)\\s*$/")}if("state"===t&&(void 0===this.state||null===this.state))return new j("state","undefined or null");if("rules"===t){if(void 0===this.rules||null===this.rules)return new j("rules","undefined or null");if(!F.validateMaxItems(this.rules,500))return new j("rules","does not satisfy required maxItems constraint: 500");if(!F.validateMinItems(this.rules,1))return new j("rules","does not satisfy required minItems constraint: 1")}if("networkFunctionReferences"===t){if(void 0===this.networkFunctionReferences||null===this.networkFunctionReferences)return new j("networkFunctionReferences","undefined or null");if(!F.validateMaxItems(this.networkFunctionReferences,2))return new j("networkFunctionReferences","does not satisfy required maxItems constraint: 2")}if("isIpv6TrafficAllowed"===t&&(void 0===this.isIpv6TrafficAllowed||null===this.isIpv6TrafficAllowed))return new j("isIpv6TrafficAllowed","undefined or null");if("isIpv4AddressScope"===t&&(void 0===this.isIpv4AddressScope||null===this.isIpv4AddressScope))return new j("isIpv4AddressScope","undefined or null");if("isIpv6AddressScope"===t&&(void 0===this.isIpv6AddressScope||null===this.isIpv6AddressScope))return new j("isIpv6AddressScope","undefined or null");if("isHitlogEnabled"===t&&(void 0===this.isHitlogEnabled||null===this.isHitlogEnabled))return new j("isHitlogEnabled","undefined or null");if("scope"===t&&(void 0===this.scope||null===this.scope))return new j("scope","undefined or null");if("vpcReferences"===t){if(void 0===this.vpcReferences||null===this.vpcReferences)return new j("vpcReferences","undefined or null");if(!F.validateMaxItems(this.vpcReferences,1))return new j("vpcReferences","does not satisfy required maxItems constraint: 1");if(!F.validateMinItems(this.vpcReferences,1))return new j("vpcReferences","does not satisfy required minItems constraint: 1")}if("scopeReferences"===t){if(void 0===this.scopeReferences||null===this.scopeReferences)return new j("scopeReferences","undefined or null");if(!F.validateMaxItems(this.scopeReferences,3))return new j("scopeReferences","does not satisfy required maxItems constraint: 3");if(!F.validateMinItems(this.scopeReferences,1))return new j("scopeReferences","does not satisfy required minItems constraint: 1")}if("securedGroups"===t){if(void 0===this.securedGroups||null===this.securedGroups)return new j("securedGroups","undefined or null");if(!F.validateMaxItems(this.securedGroups,1e3))return new j("securedGroups","does not satisfy required maxItems constraint: 1000");if(!F.validateMinItems(this.securedGroups,1))return new j("securedGroups","does not satisfy required minItems constraint: 1")}if("securedEntityGroupReferences"===t){if(void 0===this.securedEntityGroupReferences||null===this.securedEntityGroupReferences)return new j("securedEntityGroupReferences","undefined or null");if(!F.validateMaxItems(this.securedEntityGroupReferences,1e3))return new j("securedEntityGroupReferences","does not satisfy required maxItems constraint: 1000");if(!F.validateMinItems(this.securedEntityGroupReferences,1))return new j("securedEntityGroupReferences","does not satisfy required minItems constraint: 1")}if("lastUpdateTime"===t&&(void 0===this.lastUpdateTime||null===this.lastUpdateTime))return new j("lastUpdateTime","undefined or null");if("creationTime"===t&&(void 0===this.creationTime||null===this.creationTime))return new j("creationTime","undefined or null");if("isSystemDefined"===t&&(void 0===this.isSystemDefined||null===this.isSystemDefined))return new j("isSystemDefined","undefined or null");if("createdBy"===t){if(void 0===this.createdBy||null===this.createdBy)return new j("createdBy","undefined or null");if(!F.validatePattern(this.createdBy,/^[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 j("createdBy","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 new j(t,"no such property exists")}}function pi(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")}hi.prototype.name=void 0,hi.prototype.type=void 0,hi.prototype.description=void 0,hi.prototype.state=void 0,hi.prototype.rules=void 0,hi.prototype.networkFunctionReferences=void 0,hi.prototype.isIpv6TrafficAllowed=void 0,hi.prototype.isIpv4AddressScope=void 0,hi.prototype.isIpv6AddressScope=void 0,hi.prototype.isHitlogEnabled=void 0,hi.prototype.scope=void 0,hi.prototype.vpcReferences=void 0,hi.prototype.scopeReferences=void 0,hi.prototype.securedGroups=void 0,hi.prototype.securedEntityGroupReferences=void 0,hi.prototype.lastUpdateTime=void 0,hi.prototype.creationTime=void 0,hi.prototype.isSystemDefined=void 0,hi.prototype.createdBy=void 0,nt.prototype.extId=void 0,nt.prototype.links=void 0,et.prototype.tenantId=void 0;var vi=new WeakSet;class gi 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=vi),t.add(e),this.$objectType="microseg.v4.config.ListNetworkSecurityPoliciesApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,o,a,d;if(e){if(t=t||new gi,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(q.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=[],s=e.data,d=s[0].hasOwnProperty("$objectType")?s[0].$objectType:typeof s[0],o=0;o<s.length;o++){if("microseg.v4.config.NetworkSecurityPolicy"!==d)throw"Unknown list of type "+d+" in data";i=hi.constructFromObject(s[o],void 0),a.push(i)}t.setData(a)}else switch(d=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,d){case"Map":t.setData(e.data);break;case"microseg.v4.error.ErrorResponse":t.setData(Le.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+d+" 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(vi,this,fi).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(vi,this,fi).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("metadata","undefined or null")}}function fi(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 wi(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.metadata=void 0,gi.prototype.data=void 0,gi.prototype.$reserved=void 0,gi.prototype.$objectType=void 0,gi.prototype.$unknownFields=void 0;var $i=new WeakSet;class mi 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=$i),t.add(e),this.$objectType="microseg.v4.config.UpdateNetworkSecurityPolicyApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s;if(e){if(t=t||new mi,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(q.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(s=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,s){case"prism.v4.config.TaskReference":t.setData(qe.constructFromObject(e.data,void 0));break;case"microseg.v4.error.ErrorResponse":t.setData(Le.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+s+" 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):wi($i,this,bi).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):wi($i,this,bi).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("metadata","undefined or null")}}function bi(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 ki(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")}mi.prototype.metadata=void 0,mi.prototype.data=void 0,mi.prototype.$reserved=void 0,mi.prototype.$objectType=void 0,mi.prototype.$unknownFields=void 0;var Ti=new WeakSet;class Fi 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=Ti),t.add(e),this.$objectType="microseg.v4.config.GetNetworkSecurityPolicyApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s;if(e){if(t=t||new Fi,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(q.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(s=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,s){case"microseg.v4.config.NetworkSecurityPolicy":t.setData(hi.constructFromObject(e.data,void 0));break;case"microseg.v4.error.ErrorResponse":t.setData(Le.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+s+" 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):ki(Ti,this,ji).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):ki(Ti,this,ji).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("metadata","undefined or null")}}function ji(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 Oi(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")}Fi.prototype.metadata=void 0,Fi.prototype.data=void 0,Fi.prototype.$reserved=void 0,Fi.prototype.$objectType=void 0,Fi.prototype.$unknownFields=void 0;var Si=new WeakSet;class Ai 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=Si),t.add(e),this.$objectType="microseg.v4.config.CreateNetworkSecurityPolicyExportApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s;if(e){if(t=t||new Ai,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(q.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(s=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,s){case"prism.v4.config.TaskReference":t.setData(qe.constructFromObject(e.data,void 0));break;case"microseg.v4.error.ErrorResponse":t.setData(Le.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+s+" 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):Oi(Si,this,Ei).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):Oi(Si,this,Ei).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("metadata","undefined or null")}}function Ei(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 Pi(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.metadata=void 0,Ai.prototype.data=void 0,Ai.prototype.$reserved=void 0,Ai.prototype.$objectType=void 0,Ai.prototype.$unknownFields=void 0;var Ii=new WeakSet;class Ri 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="microseg.v4.config.CreateNetworkSecurityPolicyApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s;if(e){if(t=t||new Ri,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(q.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(s=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,s){case"prism.v4.config.TaskReference":t.setData(qe.constructFromObject(e.data,void 0));break;case"microseg.v4.error.ErrorResponse":t.setData(Le.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+s+" 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):Pi(Ii,this,Ci).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):Pi(Ii,this,Ci).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("metadata","undefined or null")}}function Ci(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}Ri.prototype.metadata=void 0,Ri.prototype.data=void 0,Ri.prototype.$reserved=void 0,Ri.prototype.$objectType=void 0,Ri.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="microseg.v4.config.NetworkSecurityPolicyExportSpec",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,r;if(e){if(t=t||new Ui,e.hasOwnProperty("policyReferences")&&null!==e.policyReferences&&void 0!==e.policyReferences){for(r=[],s=e.policyReferences,i=0;i<s.length;i++)r.push(s[i]);t.setPolicyReferences(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())}getPolicyReferences(){return this.policyReferences}setPolicyReferences(e){this.policyReferences=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getPolicyReferences()&&null!==this.getPolicyReferences()?{policyReferences:this.getPolicyReferences()}:{},$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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("policyReferences"===t){if(void 0===this.policyReferences||null===this.policyReferences)return new j("policyReferences","undefined or null");if(!F.validateMaxItems(this.policyReferences,1e3))return new j("policyReferences","does not satisfy required maxItems constraint: 1000");if(!F.validateMinItems(this.policyReferences,1))return new j("policyReferences","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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null")}}function xi(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.policyReferences=void 0,Ui.prototype.$reserved=void 0,Ui.prototype.$objectType=void 0,Ui.prototype.$unknownFields=void 0;var Mi=new WeakSet;class Ji 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=Mi),t.add(e),this.$objectType="microseg.v4.config.DeleteNetworkSecurityPolicyApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s;if(e){if(t=t||new Ji,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(q.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(s=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,s){case"prism.v4.config.TaskReference":t.setData(qe.constructFromObject(e.data,void 0));break;case"microseg.v4.error.ErrorResponse":t.setData(Le.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+s+" 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):xi(Mi,this,Ni).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):xi(Mi,this,Ni).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("metadata","undefined or null")}}function Ni(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 Gi(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")}Ji.prototype.metadata=void 0,Ji.prototype.data=void 0,Ji.prototype.$reserved=void 0,Ji.prototype.$objectType=void 0,Ji.prototype.$unknownFields=void 0;var Li=new WeakSet;class _i 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=Li),t.add(e),this.$objectType="microseg.v4.config.ListNetworkSecurityPolicyRulesApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,o,a,d;if(e){if(t=t||new _i,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(q.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=[],s=e.data,d=s[0].hasOwnProperty("$objectType")?s[0].$objectType:typeof s[0],o=0;o<s.length;o++){if("microseg.v4.config.NetworkSecurityPolicyRule"!==d)throw"Unknown list of type "+d+" in data";i=ni.constructFromObject(s[o],void 0),a.push(i)}t.setData(a)}else{if(d=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,"microseg.v4.error.ErrorResponse"!==d)throw"Unknown datatype "+d+" in data";t.setData(Le.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):Gi(Li,this,Wi).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):Gi(Li,this,Wi).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("metadata","undefined or null")}}function Wi(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 qi(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")}_i.prototype.metadata=void 0,_i.prototype.data=void 0,_i.prototype.$reserved=void 0,_i.prototype.$objectType=void 0,_i.prototype.$unknownFields=void 0;var Vi=new WeakSet;class Bi 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=Vi),t.add(e),this.$objectType="microseg.v4.config.CreateNetworkSecurityPolicyImportApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s;if(e){if(t=t||new Bi,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(q.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(s=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,s){case"prism.v4.config.TaskReference":t.setData(qe.constructFromObject(e.data,void 0));break;case"microseg.v4.error.ErrorResponse":t.setData(Le.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+s+" 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):qi(Vi,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):qi(Vi,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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("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 Ki(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")}Bi.prototype.metadata=void 0,Bi.prototype.data=void 0,Bi.prototype.$reserved=void 0,Bi.prototype.$objectType=void 0,Bi.prototype.$unknownFields=void 0;var Hi=new WeakSet;class Zi 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=Hi),t.add(e),this.$objectType="microseg.v4.config.UpdateServiceGroupApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s;if(e){if(t=t||new Zi,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(q.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(s=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,s){case"prism.v4.config.TaskReference":t.setData(qe.constructFromObject(e.data,void 0));break;case"microseg.v4.error.ErrorResponse":t.setData(Le.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+s+" 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):Ki(Hi,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):Ki(Hi,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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("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}function Qi(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")}Zi.prototype.metadata=void 0,Zi.prototype.data=void 0,Zi.prototype.$reserved=void 0,Zi.prototype.$objectType=void 0,Zi.prototype.$unknownFields=void 0;var Yi=new WeakSet;class er extends nt{constructor(e){var t,n;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t=this,n=Yi),n.add(t),this.name=e,this.$objectType="microseg.v4.config.ServiceGroup",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,r,o;if(e){if(t=t||new er,nt.constructFromObject(e,t,!0),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("isSystemDefined")&&null!==e.isSystemDefined&&void 0!==e.isSystemDefined&&t.setIsSystemDefined(e.isSystemDefined),e.hasOwnProperty("tcpServices")&&null!==e.tcpServices&&void 0!==e.tcpServices){for(o=[],s=e.tcpServices,r=0;r<s.length;r++)i=Cs.constructFromObject(s[r],void 0),o.push(i);t.setTcpServices(o)}if(e.hasOwnProperty("udpServices")&&null!==e.udpServices&&void 0!==e.udpServices){for(o=[],s=e.udpServices,r=0;r<s.length;r++)i=Us.constructFromObject(s[r],void 0),o.push(i);t.setUdpServices(o)}if(e.hasOwnProperty("icmpServices")&&null!==e.icmpServices&&void 0!==e.icmpServices){for(o=[],s=e.icmpServices,r=0;r<s.length;r++)i=Es.constructFromObject(s[r],void 0),o.push(i);t.setIcmpServices(o)}if(e.hasOwnProperty("icmpV6Services")&&null!==e.icmpV6Services&&void 0!==e.icmpV6Services){for(o=[],s=e.icmpV6Services,r=0;r<s.length;r++)i=Is.constructFromObject(s[r],void 0),o.push(i);t.setIcmpV6Services(o)}if(e.hasOwnProperty("policyReferences")&&null!==e.policyReferences&&void 0!==e.policyReferences){for(o=[],s=e.policyReferences,r=0;r<s.length;r++)o.push(s[r]);t.setPolicyReferences(o)}if(e.hasOwnProperty("createdBy")&&null!==e.createdBy&&void 0!==e.createdBy&&t.setCreatedBy(e.createdBy),e.hasOwnProperty("creationTime")&&null!==e.creationTime&&void 0!==e.creationTime&&t.setCreationTime(e.creationTime),e.hasOwnProperty("lastUpdateTime")&&null!==e.lastUpdateTime&&void 0!==e.lastUpdateTime&&t.setLastUpdateTime(e.lastUpdateTime),!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}getDescription(){return this.description}setDescription(e){this.description=e}getIsSystemDefined(){return this.isSystemDefined}setIsSystemDefined(e){this.isSystemDefined=e}getTcpServices(){return this.tcpServices}setTcpServices(e){this.tcpServices=e}getUdpServices(){return this.udpServices}setUdpServices(e){this.udpServices=e}getIcmpServices(){return this.icmpServices}setIcmpServices(e){this.icmpServices=e}getIcmpV6Services(){return this.icmpV6Services}setIcmpV6Services(e){this.icmpV6Services=e}getPolicyReferences(){return this.policyReferences}setPolicyReferences(e){this.policyReferences=e}getCreatedBy(){return this.createdBy}setCreatedBy(e){this.createdBy=e}getCreationTime(){return this.creationTime}setCreationTime(e){this.creationTime=e}getLastUpdateTime(){return this.lastUpdateTime}setLastUpdateTime(e){this.lastUpdateTime=e}toJson(e){return!1===e?{...void 0!==this.getName()&&null!==this.getName()?{name:this.getName()}:{},...void 0!==this.getDescription()&&null!==this.getDescription()?{description:this.getDescription()}:{},...void 0!==this.getIsSystemDefined()&&null!==this.getIsSystemDefined()?{isSystemDefined:this.getIsSystemDefined()}:{},...void 0!==this.getTcpServices()&&null!==this.getTcpServices()?{tcpServices:this.getTcpServices().map(e=>e.toJson(!1))}:{},...void 0!==this.getUdpServices()&&null!==this.getUdpServices()?{udpServices:this.getUdpServices().map(e=>e.toJson(!1))}:{},...void 0!==this.getIcmpServices()&&null!==this.getIcmpServices()?{icmpServices:this.getIcmpServices().map(e=>e.toJson(!1))}:{},...void 0!==this.getIcmpV6Services()&&null!==this.getIcmpV6Services()?{icmpV6Services:this.getIcmpV6Services().map(e=>e.toJson(!1))}:{},...void 0!==this.getPolicyReferences()&&null!==this.getPolicyReferences()?{policyReferences:this.getPolicyReferences()}:{},...void 0!==this.getCreatedBy()&&null!==this.getCreatedBy()?{createdBy:this.getCreatedBy()}:{},...void 0!==this.getCreationTime()&&null!==this.getCreationTime()?{creationTime:Qi(Yi,this,tr).call(this,this.getCreationTime(),!1)}:{},...void 0!==this.getLastUpdateTime()&&null!==this.getLastUpdateTime()?{lastUpdateTime:Qi(Yi,this,tr).call(this,this.getLastUpdateTime(),!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.getName()&&null!==this.getName()?{name:this.getName()}:{},...void 0!==this.getDescription()&&null!==this.getDescription()?{description:this.getDescription()}:{},...void 0!==this.getTcpServices()&&null!==this.getTcpServices()?{tcpServices:this.getTcpServices().map(e=>e.toJson(!1))}:{},...void 0!==this.getUdpServices()&&null!==this.getUdpServices()?{udpServices:this.getUdpServices().map(e=>e.toJson(!1))}:{},...void 0!==this.getIcmpServices()&&null!==this.getIcmpServices()?{icmpServices:this.getIcmpServices().map(e=>e.toJson(!1))}:{},...void 0!==this.getIcmpV6Services()&&null!==this.getIcmpV6Services()?{icmpV6Services:this.getIcmpV6Services().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 T?n=["name"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("name"===t){if(void 0===this.name||null===this.name)return new j("name","undefined or null");if(!F.validateMaxLength(this.name,64))return new j("name","does not satisfy required maxLength constraint: 64");if(!F.validatePattern(this.name,/^\\s*[a-zA-Z0-9]([a-zA-Z0-9-_ \\\\.]*[a-zA-Z0-9])?\\s*$/))return new j("name","does not satisfy required pattern: /^\\s*[a-zA-Z0-9]([a-zA-Z0-9-_ \\\\.]*[a-zA-Z0-9])?\\s*$/")}if("description"===t){if(void 0===this.description||null===this.description)return new j("description","undefined or null");if(!F.validateMaxLength(this.description,1e3))return new j("description","does not satisfy required maxLength constraint: 1000");if(!F.validatePattern(this.description,/^\\s*([a-zA-Z0-9 _:.()-]*)\\s*$/))return new j("description","does not satisfy required pattern: /^\\s*([a-zA-Z0-9 _:.()-]*)\\s*$/")}if("isSystemDefined"===t&&(void 0===this.isSystemDefined||null===this.isSystemDefined))return new j("isSystemDefined","undefined or null");if("tcpServices"===t){if(void 0===this.tcpServices||null===this.tcpServices)return new j("tcpServices","undefined or null");if(!F.validateMaxItems(this.tcpServices,250))return new j("tcpServices","does not satisfy required maxItems constraint: 250");if(!F.validateMinItems(this.tcpServices,1))return new j("tcpServices","does not satisfy required minItems constraint: 1")}if("udpServices"===t){if(void 0===this.udpServices||null===this.udpServices)return new j("udpServices","undefined or null");if(!F.validateMaxItems(this.udpServices,250))return new j("udpServices","does not satisfy required maxItems constraint: 250");if(!F.validateMinItems(this.udpServices,1))return new j("udpServices","does not satisfy required minItems constraint: 1")}if("icmpServices"===t){if(void 0===this.icmpServices||null===this.icmpServices)return new j("icmpServices","undefined or null");if(!F.validateMaxItems(this.icmpServices,250))return new j("icmpServices","does not satisfy required maxItems constraint: 250");if(!F.validateMinItems(this.icmpServices,1))return new j("icmpServices","does not satisfy required minItems constraint: 1")}if("icmpV6Services"===t){if(void 0===this.icmpV6Services||null===this.icmpV6Services)return new j("icmpV6Services","undefined or null");if(!F.validateMaxItems(this.icmpV6Services,250))return new j("icmpV6Services","does not satisfy required maxItems constraint: 250");if(!F.validateMinItems(this.icmpV6Services,1))return new j("icmpV6Services","does not satisfy required minItems constraint: 1")}if("policyReferences"===t){if(void 0===this.policyReferences||null===this.policyReferences)return new j("policyReferences","undefined or null");if(!F.validateMaxItems(this.policyReferences,1e3))return new j("policyReferences","does not satisfy required maxItems constraint: 1000");if(!F.validateMinItems(this.policyReferences,1))return new j("policyReferences","does not satisfy required minItems constraint: 1")}if("createdBy"===t){if(void 0===this.createdBy||null===this.createdBy)return new j("createdBy","undefined or null");if(!F.validatePattern(this.createdBy,/^[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 j("createdBy","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"creationTime"!==t||void 0!==this.creationTime&&null!==this.creationTime?"lastUpdateTime"!==t||void 0!==this.lastUpdateTime&&null!==this.lastUpdateTime?new j(t,"no such property exists"):new j("lastUpdateTime","undefined or null"):new j("creationTime","undefined or null")}}function tr(e,t){return e instanceof Date&&void 0!==t?t?e.toISOString().slice(0,10):e.toISOString():e}function nr(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.name=void 0,er.prototype.description=void 0,er.prototype.isSystemDefined=void 0,er.prototype.tcpServices=void 0,er.prototype.udpServices=void 0,er.prototype.icmpServices=void 0,er.prototype.icmpV6Services=void 0,er.prototype.policyReferences=void 0,er.prototype.createdBy=void 0,er.prototype.creationTime=void 0,er.prototype.lastUpdateTime=void 0,nt.prototype.extId=void 0,nt.prototype.links=void 0,et.prototype.tenantId=void 0;var sr=new WeakSet;class ir 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="microseg.v4.config.GetServiceGroupApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s;if(e){if(t=t||new ir,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(q.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(s=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,s){case"microseg.v4.config.ServiceGroup":t.setData(er.constructFromObject(e.data,void 0));break;case"microseg.v4.error.ErrorResponse":t.setData(Le.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+s+" 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):nr(sr,this,rr).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):nr(sr,this,rr).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("metadata","undefined or null")}}function rr(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 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")}ir.prototype.metadata=void 0,ir.prototype.data=void 0,ir.prototype.$reserved=void 0,ir.prototype.$objectType=void 0,ir.prototype.$unknownFields=void 0;var ar=new WeakSet;class dr 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="microseg.v4.config.ListServiceGroupsApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,o,a,d;if(e){if(t=t||new dr,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(q.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=[],s=e.data,d=s[0].hasOwnProperty("$objectType")?s[0].$objectType:typeof s[0],o=0;o<s.length;o++){if("microseg.v4.config.ServiceGroup"!==d)throw"Unknown list of type "+d+" in data";i=er.constructFromObject(s[o],void 0),a.push(i)}t.setData(a)}else{if(d=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,"microseg.v4.error.ErrorResponse"!==d)throw"Unknown datatype "+d+" in data";t.setData(Le.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):or(ar,this,lr).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,lr).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("metadata","undefined or null")}}function lr(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,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")}dr.prototype.metadata=void 0,dr.prototype.data=void 0,dr.prototype.$reserved=void 0,dr.prototype.$objectType=void 0,dr.prototype.$unknownFields=void 0;var cr=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=cr),t.add(e),this.$objectType="microseg.v4.config.DeleteServiceGroupApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s;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(q.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(s=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,s){case"prism.v4.config.TaskReference":t.setData(qe.constructFromObject(e.data,void 0));break;case"microseg.v4.error.ErrorResponse":t.setData(Le.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+s+" 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):ur(cr,this,pr).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):ur(cr,this,pr).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("metadata","undefined or null")}}function pr(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 yr(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 vr=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=vr),t.add(e),this.$objectType="microseg.v4.config.CreateServiceGroupApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s;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(q.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(s=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,s){case"prism.v4.config.TaskReference":t.setData(qe.constructFromObject(e.data,void 0));break;case"microseg.v4.error.ErrorResponse":t.setData(Le.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+s+" 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):yr(vr,this,fr).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):yr(vr,this,fr).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("metadata","undefined or null")}}function fr(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}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 wr=new WeakSet;class $r extends nt{constructor(e,t){var n,s;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(n=this,s=wr),s.add(n),this.sourceDomainManagerExtId=e,this.targetDomainManagerExtId=t,this.$objectType="microseg.v4.config.SyncPolicy",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,r;if(e){if(t=t||new $r,nt.constructFromObject(e,t,!0),e.hasOwnProperty("sourceDomainManagerExtId")&&null!==e.sourceDomainManagerExtId&&void 0!==e.sourceDomainManagerExtId&&t.setSourceDomainManagerExtId(e.sourceDomainManagerExtId),e.hasOwnProperty("targetDomainManagerExtId")&&null!==e.targetDomainManagerExtId&&void 0!==e.targetDomainManagerExtId&&t.setTargetDomainManagerExtId(e.targetDomainManagerExtId),e.hasOwnProperty("policyExtIds")&&null!==e.policyExtIds&&void 0!==e.policyExtIds){for(r=[],s=e.policyExtIds,i=0;i<s.length;i++)r.push(s[i]);t.setPolicyExtIds(r)}if(e.hasOwnProperty("hasSyncCompatibility")&&null!==e.hasSyncCompatibility&&void 0!==e.hasSyncCompatibility&&t.setHasSyncCompatibility(e.hasSyncCompatibility),!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())}getSourceDomainManagerExtId(){return this.sourceDomainManagerExtId}setSourceDomainManagerExtId(e){this.sourceDomainManagerExtId=e}getTargetDomainManagerExtId(){return this.targetDomainManagerExtId}setTargetDomainManagerExtId(e){this.targetDomainManagerExtId=e}getPolicyExtIds(){return this.policyExtIds}setPolicyExtIds(e){this.policyExtIds=e}getHasSyncCompatibility(){return this.hasSyncCompatibility}setHasSyncCompatibility(e){this.hasSyncCompatibility=e}toJson(e){return!1===e?{...void 0!==this.getSourceDomainManagerExtId()&&null!==this.getSourceDomainManagerExtId()?{sourceDomainManagerExtId:this.getSourceDomainManagerExtId()}:{},...void 0!==this.getTargetDomainManagerExtId()&&null!==this.getTargetDomainManagerExtId()?{targetDomainManagerExtId:this.getTargetDomainManagerExtId()}:{},...void 0!==this.getPolicyExtIds()&&null!==this.getPolicyExtIds()?{policyExtIds:this.getPolicyExtIds()}:{},...void 0!==this.getHasSyncCompatibility()&&null!==this.getHasSyncCompatibility()?{hasSyncCompatibility:this.getHasSyncCompatibility()}:{},...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.getSourceDomainManagerExtId()&&null!==this.getSourceDomainManagerExtId()?{sourceDomainManagerExtId:this.getSourceDomainManagerExtId()}:{},...void 0!==this.getTargetDomainManagerExtId()&&null!==this.getTargetDomainManagerExtId()?{targetDomainManagerExtId:this.getTargetDomainManagerExtId()}:{},...void 0!==this.getPolicyExtIds()&&null!==this.getPolicyExtIds()?{policyExtIds:this.getPolicyExtIds()}:{},...void 0!==this.getHasSyncCompatibility()&&null!==this.getHasSyncCompatibility()?{hasSyncCompatibility:this.getHasSyncCompatibility()}:{},$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 T?n=["sourceDomainManagerExtId","targetDomainManagerExtId"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("sourceDomainManagerExtId"===t){if(void 0===this.sourceDomainManagerExtId||null===this.sourceDomainManagerExtId)return new j("sourceDomainManagerExtId","undefined or null");if(!F.validatePattern(this.sourceDomainManagerExtId,/^[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 j("sourceDomainManagerExtId","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("targetDomainManagerExtId"===t){if(void 0===this.targetDomainManagerExtId||null===this.targetDomainManagerExtId)return new j("targetDomainManagerExtId","undefined or null");if(!F.validatePattern(this.targetDomainManagerExtId,/^[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 j("targetDomainManagerExtId","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("policyExtIds"===t){if(void 0===this.policyExtIds||null===this.policyExtIds)return new j("policyExtIds","undefined or null");if(!F.validateMaxItems(this.policyExtIds,1e3))return new j("policyExtIds","does not satisfy required maxItems constraint: 1000")}return"hasSyncCompatibility"!==t||void 0!==this.hasSyncCompatibility&&null!==this.hasSyncCompatibility?new j(t,"no such property exists"):new j("hasSyncCompatibility","undefined or null")}}$r.prototype.sourceDomainManagerExtId=void 0,$r.prototype.targetDomainManagerExtId=void 0,$r.prototype.policyExtIds=void 0,$r.prototype.hasSyncCompatibility=void 0,nt.prototype.extId=void 0,nt.prototype.links=void 0,et.prototype.tenantId=void 0;var mr=new WeakSet;class br{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=mr),t.add(e),this.$objectType="microseg.v4.operation.DryRunSpec",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,r;if(e){if(t=t||new br,e.hasOwnProperty("policyNames")&&null!==e.policyNames&&void 0!==e.policyNames){for(r=[],s=e.policyNames,i=0;i<s.length;i++)r.push(s[i]);t.setPolicyNames(r)}if(e.hasOwnProperty("shouldIncludeSecureSubnetsInfo")&&null!==e.shouldIncludeSecureSubnetsInfo&&void 0!==e.shouldIncludeSecureSubnetsInfo&&t.setShouldIncludeSecureSubnetsInfo(e.shouldIncludeSecureSubnetsInfo),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())}getPolicyNames(){return this.policyNames}setPolicyNames(e){this.policyNames=e}getShouldIncludeSecureSubnetsInfo(){return this.shouldIncludeSecureSubnetsInfo}setShouldIncludeSecureSubnetsInfo(e){this.shouldIncludeSecureSubnetsInfo=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getPolicyNames()&&null!==this.getPolicyNames()?{policyNames:this.getPolicyNames()}:{},...void 0!==this.getShouldIncludeSecureSubnetsInfo()&&null!==this.getShouldIncludeSecureSubnetsInfo()?{shouldIncludeSecureSubnetsInfo:this.getShouldIncludeSecureSubnetsInfo()}:{},$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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("policyNames"===t){if(void 0===this.policyNames||null===this.policyNames)return new j("policyNames","undefined or null");if(!F.validateMaxItems(this.policyNames,20))return new j("policyNames","does not satisfy required maxItems constraint: 20")}return"shouldIncludeSecureSubnetsInfo"!==t||void 0!==this.shouldIncludeSecureSubnetsInfo&&null!==this.shouldIncludeSecureSubnetsInfo?"$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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("shouldIncludeSecureSubnetsInfo","undefined or null")}}br.prototype.policyNames=void 0,br.prototype.shouldIncludeSecureSubnetsInfo=void 0,br.prototype.$reserved=void 0,br.prototype.$objectType=void 0,br.prototype.$unknownFields=void 0;var kr=new WeakSet;class Tr{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=kr),t.add(e),this.$objectType="microseg.v4.operation.SecurityPolicyOptions",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new Tr,e.hasOwnProperty("isIpv6TrafficAllowed")&&null!==e.isIpv6TrafficAllowed&&void 0!==e.isIpv6TrafficAllowed&&t.setIsIpv6TrafficAllowed(e.isIpv6TrafficAllowed),e.hasOwnProperty("isHitlogEnabled")&&null!==e.isHitlogEnabled&&void 0!==e.isHitlogEnabled&&t.setIsHitlogEnabled(e.isHitlogEnabled),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())}getIsIpv6TrafficAllowed(){return this.isIpv6TrafficAllowed}setIsIpv6TrafficAllowed(e){this.isIpv6TrafficAllowed=e}getIsHitlogEnabled(){return this.isHitlogEnabled}setIsHitlogEnabled(e){this.isHitlogEnabled=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getIsIpv6TrafficAllowed()&&null!==this.getIsIpv6TrafficAllowed()?{isIpv6TrafficAllowed:this.getIsIpv6TrafficAllowed()}:{},...void 0!==this.getIsHitlogEnabled()&&null!==this.getIsHitlogEnabled()?{isHitlogEnabled:this.getIsHitlogEnabled()}:{},$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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){return"isIpv6TrafficAllowed"!==t||void 0!==this.isIpv6TrafficAllowed&&null!==this.isIpv6TrafficAllowed?"isHitlogEnabled"!==t||void 0!==this.isHitlogEnabled&&null!==this.isHitlogEnabled?"$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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("isHitlogEnabled","undefined or null"):new j("isIpv6TrafficAllowed","undefined or null")}}Tr.prototype.isIpv6TrafficAllowed=!1,Tr.prototype.isHitlogEnabled=!1,Tr.prototype.$reserved=void 0,Tr.prototype.$objectType=void 0,Tr.prototype.$unknownFields=void 0;const Fr={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",QUARANTINE:"QUARANTINE",ISOLATION:"ISOLATION",APPLICATION:"APPLICATION",AD:"AD",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.QUARANTINE:case Fr.ISOLATION:case Fr.APPLICATION:case Fr.AD:return;default:throw new Error("Invalid : must be SecurityPolicyType.{ $UNKNOWN|$REDACTED|QUARANTINE|ISOLATION|APPLICATION|AD }")}}};Object.freeze(Fr);const jr=Fr;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")}var Sr=new WeakSet;class Ar{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.state=e,this.$objectType="microseg.v4.operation.PolicyMetadata",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,r;if(e){if(t=t||new Ar,e.hasOwnProperty("description")&&null!==e.description&&void 0!==e.description&&t.setDescription(e.description),e.hasOwnProperty("securedGroupCategoryReferences")&&null!==e.securedGroupCategoryReferences&&void 0!==e.securedGroupCategoryReferences){for(r=[],s=e.securedGroupCategoryReferences,i=0;i<s.length;i++)r.push(s[i]);t.setSecuredGroupCategoryReferences(r)}if(e.hasOwnProperty("state")&&null!==e.state&&void 0!==e.state&&t.setState(ai.constructFromObject(e.state)),e.hasOwnProperty("lastUpdateTime")&&null!==e.lastUpdateTime&&void 0!==e.lastUpdateTime&&t.setLastUpdateTime(e.lastUpdateTime),e.hasOwnProperty("type")&&null!==e.type&&void 0!==e.type&&t.setType(jr.constructFromObject(e.type)),e.hasOwnProperty("previewReference")&&null!==e.previewReference&&void 0!==e.previewReference&&t.setPreviewReference(e.previewReference),e.hasOwnProperty("options")&&null!==e.options&&void 0!==e.options&&t.setOptions(Tr.constructFromObject(e.options)),e.hasOwnProperty("name")&&null!==e.name&&void 0!==e.name&&t.setName(e.name),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())}getDescription(){return this.description}setDescription(e){this.description=e}getSecuredGroupCategoryReferences(){return this.securedGroupCategoryReferences}setSecuredGroupCategoryReferences(e){this.securedGroupCategoryReferences=e}getState(){return this.state}setState(e){this.state=e}getLastUpdateTime(){return this.lastUpdateTime}setLastUpdateTime(e){this.lastUpdateTime=e}getType(){return this.type}setType(e){this.type=e}getPreviewReference(){return this.previewReference}setPreviewReference(e){this.previewReference=e}getOptions(){return this.options}setOptions(e){this.options=e}getName(){return this.name}setName(e){this.name=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getDescription()&&null!==this.getDescription()?{description:this.getDescription()}:{},...void 0!==this.getSecuredGroupCategoryReferences()&&null!==this.getSecuredGroupCategoryReferences()?{securedGroupCategoryReferences:this.getSecuredGroupCategoryReferences()}:{},...void 0!==this.getState()&&null!==this.getState()?{state:this.getState()}:{},...void 0!==this.getLastUpdateTime()&&null!==this.getLastUpdateTime()?{lastUpdateTime:Or(Sr,this,Er).call(this,this.getLastUpdateTime(),!1)}:{},...void 0!==this.getType()&&null!==this.getType()?{type:this.getType()}:{},...void 0!==this.getPreviewReference()&&null!==this.getPreviewReference()?{previewReference:this.getPreviewReference()}:{},...void 0!==this.getOptions()&&null!==this.getOptions()?{options:this.getOptions().toJson(!1)}:{},...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:{}}:{...void 0!==this.getDescription()&&null!==this.getDescription()?{description:this.getDescription()}:{},...void 0!==this.getSecuredGroupCategoryReferences()&&null!==this.getSecuredGroupCategoryReferences()?{securedGroupCategoryReferences:this.getSecuredGroupCategoryReferences()}:{},...void 0!==this.getState()&&null!==this.getState()?{state:this.getState()}:{},...void 0!==this.getType()&&null!==this.getType()?{type:this.getType()}:{},...void 0!==this.getPreviewReference()&&null!==this.getPreviewReference()?{previewReference:this.getPreviewReference()}:{},...void 0!==this.getOptions()&&null!==this.getOptions()?{options:this.getOptions().toJson(!1)}:{},...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 T?n=["state"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("description"===t){if(void 0===this.description||null===this.description)return new j("description","undefined or null");if(!F.validateMaxLength(this.description,512))return new j("description","does not satisfy required maxLength constraint: 512")}if("securedGroupCategoryReferences"===t){if(void 0===this.securedGroupCategoryReferences||null===this.securedGroupCategoryReferences)return new j("securedGroupCategoryReferences","undefined or null");if(!F.validateMaxItems(this.securedGroupCategoryReferences,64))return new j("securedGroupCategoryReferences","does not satisfy required maxItems constraint: 64");if(!F.validateMinItems(this.securedGroupCategoryReferences,1))return new j("securedGroupCategoryReferences","does not satisfy required minItems constraint: 1")}if("state"===t&&(void 0===this.state||null===this.state))return new j("state","undefined or null");if("lastUpdateTime"===t&&(void 0===this.lastUpdateTime||null===this.lastUpdateTime))return new j("lastUpdateTime","undefined or null");if("type"===t&&(void 0===this.type||null===this.type))return new j("type","undefined or null");if("previewReference"===t){if(void 0===this.previewReference||null===this.previewReference)return new j("previewReference","undefined or null");if(!F.validatePattern(this.previewReference,/^[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 j("previewReference","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("options"===t&&(void 0===this.options||null===this.options))return new j("options","undefined or null");if("name"===t){if(void 0===this.name||null===this.name)return new j("name","undefined or null");if(!F.validateMaxLength(this.name,63))return new j("name","does not satisfy required maxLength constraint: 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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null")}}function Er(e,t){return e instanceof Date&&void 0!==t?t?e.toISOString().slice(0,10):e.toISOString():e}Ar.prototype.description=void 0,Ar.prototype.securedGroupCategoryReferences=void 0,Ar.prototype.state=void 0,Ar.prototype.lastUpdateTime=void 0,Ar.prototype.type=void 0,Ar.prototype.previewReference=void 0,Ar.prototype.options=void 0,Ar.prototype.name=void 0,Ar.prototype.$reserved=void 0,Ar.prototype.$objectType=void 0,Ar.prototype.$unknownFields=void 0;var Pr=new WeakSet;class Ir{constructor(e,t){var n,s;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(n=this,s=Pr),s.add(n),this.policyName=e,this.policyMetadata=t,this.$objectType="microseg.v4.operation.PolicyUpgradeSummary",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,r,o;if(e){if(t=t||new Ir,e.hasOwnProperty("policyName")&&null!==e.policyName&&void 0!==e.policyName&&t.setPolicyName(e.policyName),e.hasOwnProperty("policyMetadata")&&null!==e.policyMetadata&&void 0!==e.policyMetadata&&t.setPolicyMetadata(Ar.constructFromObject(e.policyMetadata)),e.hasOwnProperty("systemGenPolicyMetadata")&&null!==e.systemGenPolicyMetadata&&void 0!==e.systemGenPolicyMetadata){for(o=[],s=e.systemGenPolicyMetadata,r=0;r<s.length;r++)i=Ar.constructFromObject(s[r],void 0),o.push(i);t.setSystemGenPolicyMetadata(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())}getPolicyName(){return this.policyName}setPolicyName(e){this.policyName=e}getPolicyMetadata(){return this.policyMetadata}setPolicyMetadata(e){this.policyMetadata=e}getSystemGenPolicyMetadata(){return this.systemGenPolicyMetadata}setSystemGenPolicyMetadata(e){this.systemGenPolicyMetadata=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getPolicyName()&&null!==this.getPolicyName()?{policyName:this.getPolicyName()}:{},...void 0!==this.getPolicyMetadata()&&null!==this.getPolicyMetadata()?{policyMetadata:this.getPolicyMetadata().toJson(!1)}:{},...void 0!==this.getSystemGenPolicyMetadata()&&null!==this.getSystemGenPolicyMetadata()?{systemGenPolicyMetadata:this.getSystemGenPolicyMetadata().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 T?n=["policyName","policyMetadata"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("policyName"===t){if(void 0===this.policyName||null===this.policyName)return new j("policyName","undefined or null");if(!F.validateMaxLength(this.policyName,63))return new j("policyName","does not satisfy required maxLength constraint: 63")}if("policyMetadata"===t&&(void 0===this.policyMetadata||null===this.policyMetadata))return new j("policyMetadata","undefined or null");if("systemGenPolicyMetadata"===t){if(void 0===this.systemGenPolicyMetadata||null===this.systemGenPolicyMetadata)return new j("systemGenPolicyMetadata","undefined or null");if(!F.validateMaxItems(this.systemGenPolicyMetadata,9999))return new j("systemGenPolicyMetadata","does not satisfy required maxItems constraint: 9999")}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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null")}}Ir.prototype.policyName=void 0,Ir.prototype.policyMetadata=void 0,Ir.prototype.systemGenPolicyMetadata=void 0,Ir.prototype.$reserved=void 0,Ir.prototype.$objectType=void 0,Ir.prototype.$unknownFields=void 0;var Rr=new WeakSet;class Cr{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=Rr),n.add(t),this.vlanID=e,this.$objectType="microseg.v4.operation.SubnetUpgradeSummary",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new Cr,e.hasOwnProperty("vlanName")&&null!==e.vlanName&&void 0!==e.vlanName&&t.setVlanName(e.vlanName),e.hasOwnProperty("vlanID")&&null!==e.vlanID&&void 0!==e.vlanID&&t.setVlanID(e.vlanID),e.hasOwnProperty("subnetReference")&&null!==e.subnetReference&&void 0!==e.subnetReference&&t.setSubnetReference(e.subnetReference),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())}getVlanName(){return this.vlanName}setVlanName(e){this.vlanName=e}getVlanID(){return this.vlanID}setVlanID(e){this.vlanID=e}getSubnetReference(){return this.subnetReference}setSubnetReference(e){this.subnetReference=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getVlanName()&&null!==this.getVlanName()?{vlanName:this.getVlanName()}:{},...void 0!==this.getVlanID()&&null!==this.getVlanID()?{vlanID:this.getVlanID()}:{},...void 0!==this.getSubnetReference()&&null!==this.getSubnetReference()?{subnetReference:this.getSubnetReference()}:{},$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 T?n=["vlanID"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("vlanName"===t){if(void 0===this.vlanName||null===this.vlanName)return new j("vlanName","undefined or null");if(!F.validateMaxLength(this.vlanName,64))return new j("vlanName","does not satisfy required maxLength constraint: 64")}if("vlanID"===t&&(void 0===this.vlanID||null===this.vlanID))return new j("vlanID","undefined or null");if("subnetReference"===t){if(void 0===this.subnetReference||null===this.subnetReference)return new j("subnetReference","undefined or null");if(!F.validatePattern(this.subnetReference,/^[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 j("subnetReference","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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null")}}Cr.prototype.vlanName=void 0,Cr.prototype.vlanID=void 0,Cr.prototype.subnetReference=void 0,Cr.prototype.$reserved=void 0,Cr.prototype.$objectType=void 0,Cr.prototype.$unknownFields=void 0;var Dr=new WeakSet;class Ur{constructor(e,t,n){var s,i;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(s=this,i=Dr),i.add(s),this.newPoliciesCount=e,this.oldPoliciesCount=t,this.systemDefinedPoliciesCount=n,this.$objectType="microseg.v4.operation.PolicyCount",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new Ur,e.hasOwnProperty("newPoliciesCount")&&null!==e.newPoliciesCount&&void 0!==e.newPoliciesCount&&t.setNewPoliciesCount(e.newPoliciesCount),e.hasOwnProperty("oldPoliciesCount")&&null!==e.oldPoliciesCount&&void 0!==e.oldPoliciesCount&&t.setOldPoliciesCount(e.oldPoliciesCount),e.hasOwnProperty("systemDefinedPoliciesCount")&&null!==e.systemDefinedPoliciesCount&&void 0!==e.systemDefinedPoliciesCount&&t.setSystemDefinedPoliciesCount(e.systemDefinedPoliciesCount),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())}getNewPoliciesCount(){return this.newPoliciesCount}setNewPoliciesCount(e){this.newPoliciesCount=e}getOldPoliciesCount(){return this.oldPoliciesCount}setOldPoliciesCount(e){this.oldPoliciesCount=e}getSystemDefinedPoliciesCount(){return this.systemDefinedPoliciesCount}setSystemDefinedPoliciesCount(e){this.systemDefinedPoliciesCount=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getNewPoliciesCount()&&null!==this.getNewPoliciesCount()?{newPoliciesCount:this.getNewPoliciesCount()}:{},...void 0!==this.getOldPoliciesCount()&&null!==this.getOldPoliciesCount()?{oldPoliciesCount:this.getOldPoliciesCount()}:{},...void 0!==this.getSystemDefinedPoliciesCount()&&null!==this.getSystemDefinedPoliciesCount()?{systemDefinedPoliciesCount:this.getSystemDefinedPoliciesCount()}:{},$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 T?n=["newPoliciesCount","oldPoliciesCount","systemDefinedPoliciesCount"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){return"newPoliciesCount"!==t||void 0!==this.newPoliciesCount&&null!==this.newPoliciesCount?"oldPoliciesCount"!==t||void 0!==this.oldPoliciesCount&&null!==this.oldPoliciesCount?"systemDefinedPoliciesCount"!==t||void 0!==this.systemDefinedPoliciesCount&&null!==this.systemDefinedPoliciesCount?"$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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("systemDefinedPoliciesCount","undefined or null"):new j("oldPoliciesCount","undefined or null"):new j("newPoliciesCount","undefined or null")}}Ur.prototype.newPoliciesCount=void 0,Ur.prototype.oldPoliciesCount=void 0,Ur.prototype.systemDefinedPoliciesCount=void 0,Ur.prototype.$reserved=void 0,Ur.prototype.$objectType=void 0,Ur.prototype.$unknownFields=void 0;var xr=new WeakSet;class Mr{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=xr),t.add(e),this.$objectType="microseg.v4.operation.PolicyCountByType",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new Mr,e.hasOwnProperty("type")&&null!==e.type&&void 0!==e.type&&t.setType(jr.constructFromObject(e.type)),e.hasOwnProperty("countSummary")&&null!==e.countSummary&&void 0!==e.countSummary&&t.setCountSummary(Ur.constructFromObject(e.countSummary)),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}getCountSummary(){return this.countSummary}setCountSummary(e){this.countSummary=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.getCountSummary()&&null!==this.getCountSummary()?{countSummary:this.getCountSummary().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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){return"type"!==t||void 0!==this.type&&null!==this.type?"countSummary"!==t||void 0!==this.countSummary&&null!==this.countSummary?"$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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("countSummary","undefined or null"):new j("type","undefined or null")}}Mr.prototype.type=void 0,Mr.prototype.countSummary=void 0,Mr.prototype.$reserved=void 0,Mr.prototype.$objectType=void 0,Mr.prototype.$unknownFields=void 0;var Jr=new WeakSet;class Nr{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=Jr),n.add(t),this.totalCountsSummary=e,this.$objectType="microseg.v4.operation.TotalPolicyCount",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,r,o;if(e){if(t=t||new Nr,e.hasOwnProperty("totalCountsSummary")&&null!==e.totalCountsSummary&&void 0!==e.totalCountsSummary&&t.setTotalCountsSummary(Ur.constructFromObject(e.totalCountsSummary)),e.hasOwnProperty("policyTypeCountsSummary")&&null!==e.policyTypeCountsSummary&&void 0!==e.policyTypeCountsSummary){for(o=[],s=e.policyTypeCountsSummary,r=0;r<s.length;r++)i=Mr.constructFromObject(s[r],void 0),o.push(i);t.setPolicyTypeCountsSummary(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())}getTotalCountsSummary(){return this.totalCountsSummary}setTotalCountsSummary(e){this.totalCountsSummary=e}getPolicyTypeCountsSummary(){return this.policyTypeCountsSummary}setPolicyTypeCountsSummary(e){this.policyTypeCountsSummary=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getTotalCountsSummary()&&null!==this.getTotalCountsSummary()?{totalCountsSummary:this.getTotalCountsSummary().toJson(!1)}:{},...void 0!==this.getPolicyTypeCountsSummary()&&null!==this.getPolicyTypeCountsSummary()?{policyTypeCountsSummary:this.getPolicyTypeCountsSummary().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 T?n=["totalCountsSummary"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("totalCountsSummary"===t&&(void 0===this.totalCountsSummary||null===this.totalCountsSummary))return new j("totalCountsSummary","undefined or null");if("policyTypeCountsSummary"===t){if(void 0===this.policyTypeCountsSummary||null===this.policyTypeCountsSummary)return new j("policyTypeCountsSummary","undefined or null");if(!F.validateMaxItems(this.policyTypeCountsSummary,4))return new j("policyTypeCountsSummary","does not satisfy required maxItems constraint: 4")}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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null")}}Nr.prototype.totalCountsSummary=void 0,Nr.prototype.policyTypeCountsSummary=void 0,Nr.prototype.$reserved=void 0,Nr.prototype.$objectType=void 0,Nr.prototype.$unknownFields=void 0;var Gr=new WeakSet;class Lr extends nt{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=Gr),t.add(e),this.$objectType="microseg.v4.operation.DryRunSummary",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,r,o;if(e){if(t=t||new Lr,nt.constructFromObject(e,t,!0),e.hasOwnProperty("policySummaries")&&null!==e.policySummaries&&void 0!==e.policySummaries){for(o=[],s=e.policySummaries,r=0;r<s.length;r++)i=Ir.constructFromObject(s[r],void 0),o.push(i);t.setPolicySummaries(o)}if(e.hasOwnProperty("countSummary")&&null!==e.countSummary&&void 0!==e.countSummary&&t.setCountSummary(Nr.constructFromObject(e.countSummary)),e.hasOwnProperty("subnetSummaries")&&null!==e.subnetSummaries&&void 0!==e.subnetSummaries){for(o=[],s=e.subnetSummaries,r=0;r<s.length;r++)i=Cr.constructFromObject(s[r],void 0),o.push(i);t.setSubnetSummaries(o)}if(e.hasOwnProperty("summaryFailures")&&null!==e.summaryFailures&&void 0!==e.summaryFailures){for(o=[],s=e.summaryFailures,r=0;r<s.length;r++)i=N.constructFromObject(s[r],void 0),o.push(i);t.setSummaryFailures(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())}getPolicySummaries(){return this.policySummaries}setPolicySummaries(e){this.policySummaries=e}getCountSummary(){return this.countSummary}setCountSummary(e){this.countSummary=e}getSubnetSummaries(){return this.subnetSummaries}setSubnetSummaries(e){this.subnetSummaries=e}getSummaryFailures(){return this.summaryFailures}setSummaryFailures(e){this.summaryFailures=e}toJson(e){return!1===e?{...void 0!==this.getPolicySummaries()&&null!==this.getPolicySummaries()?{policySummaries:this.getPolicySummaries().map(e=>e.toJson(!1))}:{},...void 0!==this.getCountSummary()&&null!==this.getCountSummary()?{countSummary:this.getCountSummary().toJson(!1)}:{},...void 0!==this.getSubnetSummaries()&&null!==this.getSubnetSummaries()?{subnetSummaries:this.getSubnetSummaries().map(e=>e.toJson(!1))}:{},...void 0!==this.getSummaryFailures()&&null!==this.getSummaryFailures()?{summaryFailures:this.getSummaryFailures().map(e=>e.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.getPolicySummaries()&&null!==this.getPolicySummaries()?{policySummaries:this.getPolicySummaries().map(e=>e.toJson(!1))}:{},...void 0!==this.getCountSummary()&&null!==this.getCountSummary()?{countSummary:this.getCountSummary().toJson(!1)}:{},...void 0!==this.getSubnetSummaries()&&null!==this.getSubnetSummaries()?{subnetSummaries:this.getSubnetSummaries().map(e=>e.toJson(!1))}:{},...void 0!==this.getSummaryFailures()&&null!==this.getSummaryFailures()?{summaryFailures:this.getSummaryFailures().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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("policySummaries"===t){if(void 0===this.policySummaries||null===this.policySummaries)return new j("policySummaries","undefined or null");if(!F.validateMaxItems(this.policySummaries,5e3))return new j("policySummaries","does not satisfy required maxItems constraint: 5000")}if("countSummary"===t&&(void 0===this.countSummary||null===this.countSummary))return new j("countSummary","undefined or null");if("subnetSummaries"===t){if(void 0===this.subnetSummaries||null===this.subnetSummaries)return new j("subnetSummaries","undefined or null");if(!F.validateMaxItems(this.subnetSummaries,9999))return new j("subnetSummaries","does not satisfy required maxItems constraint: 9999")}if("summaryFailures"===t){if(void 0===this.summaryFailures||null===this.summaryFailures)return new j("summaryFailures","undefined or null");if(!F.validateMaxItems(this.summaryFailures,20))return new j("summaryFailures","does not satisfy required maxItems constraint: 20")}return new j(t,"no such property exists")}}Lr.prototype.policySummaries=void 0,Lr.prototype.countSummary=void 0,Lr.prototype.subnetSummaries=void 0,Lr.prototype.summaryFailures=void 0,nt.prototype.extId=void 0,nt.prototype.links=void 0,et.prototype.tenantId=void 0;var _r=new WeakSet;class Wr extends nt{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=_r),t.add(e),this.$objectType="microseg.v4.operation.PolicyPreview",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,r,o;if(e){if(t=t||new Wr,nt.constructFromObject(e,t,!0),e.hasOwnProperty("newPolicySpec")&&null!==e.newPolicySpec&&void 0!==e.newPolicySpec&&t.setNewPolicySpec(hi.constructFromObject(e.newPolicySpec)),e.hasOwnProperty("systemGeneratedPolicies")&&null!==e.systemGeneratedPolicies&&void 0!==e.systemGeneratedPolicies){for(o=[],s=e.systemGeneratedPolicies,r=0;r<s.length;r++)i=hi.constructFromObject(s[r],void 0),o.push(i);t.setSystemGeneratedPolicies(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())}getNewPolicySpec(){return this.newPolicySpec}setNewPolicySpec(e){this.newPolicySpec=e}getSystemGeneratedPolicies(){return this.systemGeneratedPolicies}setSystemGeneratedPolicies(e){this.systemGeneratedPolicies=e}toJson(e){return!1===e?{...void 0!==this.getNewPolicySpec()&&null!==this.getNewPolicySpec()?{newPolicySpec:this.getNewPolicySpec().toJson(!1)}:{},...void 0!==this.getSystemGeneratedPolicies()&&null!==this.getSystemGeneratedPolicies()?{systemGeneratedPolicies:this.getSystemGeneratedPolicies().map(e=>e.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.getNewPolicySpec()&&null!==this.getNewPolicySpec()?{newPolicySpec:this.getNewPolicySpec().toJson(!1)}:{},...void 0!==this.getSystemGeneratedPolicies()&&null!==this.getSystemGeneratedPolicies()?{systemGeneratedPolicies:this.getSystemGeneratedPolicies().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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("newPolicySpec"===t&&(void 0===this.newPolicySpec||null===this.newPolicySpec))return new j("newPolicySpec","undefined or null");if("systemGeneratedPolicies"===t){if(void 0===this.systemGeneratedPolicies||null===this.systemGeneratedPolicies)return new j("systemGeneratedPolicies","undefined or null");if(!F.validateMaxItems(this.systemGeneratedPolicies,9999))return new j("systemGeneratedPolicies","does not satisfy required maxItems constraint: 9999")}return new j(t,"no such property exists")}}Wr.prototype.newPolicySpec=void 0,Wr.prototype.systemGeneratedPolicies=void 0,nt.prototype.extId=void 0,nt.prototype.links=void 0,et.prototype.tenantId=void 0;var qr=new WeakSet;class Vr{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=qr),n.add(t),this.shouldSetMonitorMode=e,this.$objectType="microseg.v4.operation.UpgradeSpec",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new Vr,e.hasOwnProperty("shouldSetMonitorMode")&&null!==e.shouldSetMonitorMode&&void 0!==e.shouldSetMonitorMode&&t.setShouldSetMonitorMode(e.shouldSetMonitorMode),e.hasOwnProperty("shouldUpgradeSecuredSubnetsOnly")&&null!==e.shouldUpgradeSecuredSubnetsOnly&&void 0!==e.shouldUpgradeSecuredSubnetsOnly&&t.setShouldUpgradeSecuredSubnetsOnly(e.shouldUpgradeSecuredSubnetsOnly),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())}getShouldSetMonitorMode(){return this.shouldSetMonitorMode}setShouldSetMonitorMode(e){this.shouldSetMonitorMode=e}getShouldUpgradeSecuredSubnetsOnly(){return this.shouldUpgradeSecuredSubnetsOnly}setShouldUpgradeSecuredSubnetsOnly(e){this.shouldUpgradeSecuredSubnetsOnly=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getShouldSetMonitorMode()&&null!==this.getShouldSetMonitorMode()?{shouldSetMonitorMode:this.getShouldSetMonitorMode()}:{},...void 0!==this.getShouldUpgradeSecuredSubnetsOnly()&&null!==this.getShouldUpgradeSecuredSubnetsOnly()?{shouldUpgradeSecuredSubnetsOnly:this.getShouldUpgradeSecuredSubnetsOnly()}:{},$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 T?n=["shouldSetMonitorMode"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){return"shouldSetMonitorMode"!==t||void 0!==this.shouldSetMonitorMode&&null!==this.shouldSetMonitorMode?"shouldUpgradeSecuredSubnetsOnly"!==t||void 0!==this.shouldUpgradeSecuredSubnetsOnly&&null!==this.shouldUpgradeSecuredSubnetsOnly?"$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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("shouldUpgradeSecuredSubnetsOnly","undefined or null"):new j("shouldSetMonitorMode","undefined or null")}}function Br(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")}Vr.prototype.shouldSetMonitorMode=void 0,Vr.prototype.shouldUpgradeSecuredSubnetsOnly=void 0,Vr.prototype.$reserved=void 0,Vr.prototype.$objectType=void 0,Vr.prototype.$unknownFields=void 0;var zr=new WeakSet;class Kr{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=zr),n.add(t),this.spec=e,this.$objectType="microseg.v4.operation.UpgradeJob",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s;if(e){if(t=t||new Kr,e.hasOwnProperty("spec")&&null!==e.spec&&void 0!==e.spec)switch(s=e.spec.hasOwnProperty("$objectType")?e.spec.$objectType:typeof e.spec,s){case"microseg.v4.operation.UpgradeSpec":t.setSpec(Vr.constructFromObject(e.spec,void 0));break;case"microseg.v4.operation.DryRunSpec":t.setSpec(br.constructFromObject(e.spec,void 0));break;default:throw"Unknown datatype "+s+" 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())}getSpec(){return this.spec}setSpec(e){this.spec=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getSpec()&&null!==this.getSpec()?{spec:void 0!==this.getSpec().toJson?this.getSpec().toJson(!1):Array.isArray(this.getSpec())?this.getSpec().map(e=>void 0!==e.toJson?e.toJson(!1):e):Br(zr,this,Hr).call(this,this.getSpec(),!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.getSpec()&&null!==this.getSpec()?{spec:void 0!==this.getSpec().toJson?this.getSpec().toJson():Array.isArray(this.getSpec())?this.getSpec().map(e=>void 0!==e.toJson?e.toJson():e):Br(zr,this,Hr).call(this,this.getSpec())}:{},$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 T?n=["spec"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){return"spec"!==t||void 0!==this.spec&&null!==this.spec?"$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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("spec","undefined or null")}}function Hr(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}Kr.prototype.spec=void 0,Kr.prototype.$reserved=void 0,Kr.prototype.$objectType=void 0,Kr.prototype.$unknownFields=void 0;const Zr={ApiClient:de,AddressGroupsApi:class{#e;static get ApiClient(){return de}constructor(e){this.apiClient=e||de.instance,this.#e=new Set,this.#e.add("authorization"),this.#e.add("cookie"),this.#e.add("host"),this.#e.add("user-agent")}createAddressGroup(e,...t){let n=t.length>0?t[0]:{},s=null;if(s=e instanceof lt&&"function"==typeof e.toJson?e.toJson():e,null==s)throw new Error("Invalid body when calling createAddressGroup");let i={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(i[e]=n[e])});const r={...i};de.addEtagReferenceToHeader(e,r);const o=ze;return this.apiClient.callApi("/api/microseg/v4.2/config/address-groups","POST",{},{},r,{},s,["apiKeyAuthScheme","basicAuthScheme"],["application/json"],["application/json"],o)}deleteAddressGroupById(e,...t){let n=t.length>0?t[0]:{};if(null==e)throw new Error("Missing the required parameter 'extId' when calling deleteAddressGroupById");const s={extId:e};let i={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(i[e]=n[e])});const r={...i},o=ft;return this.apiClient.callApi("/api/microseg/v4.2/config/address-groups/{extId}","DELETE",s,{},r,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],o)}getAddressGroupById(e,...t){let n=t.length>0?t[0]:{};if(null==e)throw new Error("Missing the required parameter 'extId' when calling getAddressGroupById");const s={extId:e};let i={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(i[e]=n[e])});const r={...i},o=bt;return this.apiClient.callApi("/api/microseg/v4.2/config/address-groups/{extId}","GET",s,{},r,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],o)}listAddressGroups(e,...t){let n=t.length>0?t[0]:{};const s={...(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 i={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(i[e]=n[e])});const r={...i},o=pt;return this.apiClient.callApi("/api/microseg/v4.2/config/address-groups","GET",{},s,r,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],o)}updateAddressGroupById(e,t,...n){let s=n.length>0?n[0]:{},i=null;if(i=t instanceof lt&&"function"==typeof t.toJson?t.toJson():t,null==e)throw new Error("Missing the required parameter 'extId' when calling updateAddressGroupById");if(null==i)throw new Error("Invalid body when calling updateAddressGroupById");const r={extId:e};let o={};Object.keys(s).forEach(e=>{this.#e.has(e.toLowerCase())||(o[e]=s[e])});const a={...o};de.addEtagReferenceToHeader(t,a);const d=jt;return this.apiClient.callApi("/api/microseg/v4.2/config/address-groups/{extId}","PUT",r,{},a,{},i,["apiKeyAuthScheme","basicAuthScheme"],["application/json"],["application/json"],d)}},DirectoryServerConfigsApi:class{#e;static get ApiClient(){return de}constructor(e){this.apiClient=e||de.instance,this.#e=new Set,this.#e.add("authorization"),this.#e.add("cookie"),this.#e.add("host"),this.#e.add("user-agent")}createCategoryMapping(e,...t){let n=t.length>0?t[0]:{},s=null;if(s=e instanceof qt&&"function"==typeof e.toJson?e.toJson():e,null==s)throw new Error("Invalid body when calling createCategoryMapping");let i={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(i[e]=n[e])});const r={...i};de.addEtagReferenceToHeader(e,r);const o=An;return this.apiClient.callApi("/api/microseg/v4.2/config/category-mappings","POST",{},{},r,{},s,["apiKeyAuthScheme","basicAuthScheme"],["application/json"],["application/json"],o)}createDirectoryServerConfig(e,...t){let n=t.length>0?t[0]:{},s=null;if(s=e instanceof pn&&"function"==typeof e.toJson?e.toJson():e,null==s)throw new Error("Invalid body when calling createDirectoryServerConfig");let i={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(i[e]=n[e])});const r={...i};de.addEtagReferenceToHeader(e,r);const o=Ct;return this.apiClient.callApi("/api/microseg/v4.2/config/directory-server-configs","POST",{},{},r,{},s,["apiKeyAuthScheme","basicAuthScheme"],["application/json"],["application/json"],o)}deleteDirectoryServerConfigById(e,...t){let n=t.length>0?t[0]:{};if(null==e)throw new Error("Missing the required parameter 'extId' when calling deleteDirectoryServerConfigById");const s={extId:e};let i={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(i[e]=n[e])});const r={...i},o=Xt;return this.apiClient.callApi("/api/microseg/v4.2/config/directory-server-configs/{extId}","DELETE",s,{},r,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],o)}deleteDsCategoryMappingById(e,...t){let n=t.length>0?t[0]:{};if(null==e)throw new Error("Missing the required parameter 'extId' when calling deleteDsCategoryMappingById");const s={extId:e};let i={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(i[e]=n[e])});const r={...i},o=Et;return this.apiClient.callApi("/api/microseg/v4.2/config/category-mappings/{extId}","DELETE",s,{},r,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],o)}getDirectoryServerConfigById(e,...t){let n=t.length>0?t[0]:{};if(null==e)throw new Error("Missing the required parameter 'extId' when calling getDirectoryServerConfigById");const s={extId:e};let i={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(i[e]=n[e])});const r={...i},o=mn;return this.apiClient.callApi("/api/microseg/v4.2/config/directory-server-configs/{extId}","GET",s,{},r,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],o)}getDsCategoryMappingById(e,...t){let n=t.length>0?t[0]:{};if(null==e)throw new Error("Missing the required parameter 'extId' when calling getDsCategoryMappingById");const s={extId:e};let i={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(i[e]=n[e])});const r={...i},o=gn;return this.apiClient.callApi("/api/microseg/v4.2/config/category-mappings/{extId}","GET",s,{},r,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],o)}listCategoryMappings(e,...t){let n=t.length>0?t[0]:{};const s={...(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 i={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(i[e]=n[e])});const r={...i},o=zt;return this.apiClient.callApi("/api/microseg/v4.2/config/category-mappings","GET",{},s,r,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],o)}listDirectoryServerConfigs(e,...t){let n=t.length>0?t[0]:{};const s={...(e=e||{}).hasOwnProperty("$select")?{$select:e.$select}:{}};let i={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(i[e]=n[e])});const r={...i},o=Fn;return this.apiClient.callApi("/api/microseg/v4.2/config/directory-server-configs","GET",{},s,r,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],o)}updateDirectoryServerConfigById(e,t,...n){let s=n.length>0?n[0]:{},i=null;if(i=t instanceof pn&&"function"==typeof t.toJson?t.toJson():t,null==e)throw new Error("Missing the required parameter 'extId' when calling updateDirectoryServerConfigById");if(null==i)throw new Error("Invalid body when calling updateDirectoryServerConfigById");const r={extId:e};let o={};Object.keys(s).forEach(e=>{this.#e.has(e.toLowerCase())||(o[e]=s[e])});const a={...o};de.addEtagReferenceToHeader(t,a);const d=Rn;return this.apiClient.callApi("/api/microseg/v4.2/config/directory-server-configs/{extId}","PUT",r,{},a,{},i,["apiKeyAuthScheme","basicAuthScheme"],["application/json"],["application/json"],d)}updateDsCategoryMappingById(e,t,...n){let s=n.length>0?n[0]:{},i=null;if(i=t instanceof qt&&"function"==typeof t.toJson?t.toJson():t,null==e)throw new Error("Missing the required parameter 'extId' when calling updateDsCategoryMappingById");if(null==i)throw new Error("Invalid body when calling updateDsCategoryMappingById");const r={extId:e};let o={};Object.keys(s).forEach(e=>{this.#e.has(e.toLowerCase())||(o[e]=s[e])});const a={...o};de.addEtagReferenceToHeader(t,a);const d=Mt;return this.apiClient.callApi("/api/microseg/v4.2/config/category-mappings/{extId}","PUT",r,{},a,{},i,["apiKeyAuthScheme","basicAuthScheme"],["application/json"],["application/json"],d)}},EntityGroupsApi:class{#e;static get ApiClient(){return de}constructor(e){this.apiClient=e||de.instance,this.#e=new Set,this.#e.add("authorization"),this.#e.add("cookie"),this.#e.add("host"),this.#e.add("user-agent")}createEntityGroup(e,...t){let n=t.length>0?t[0]:{},s=null;if(s=e instanceof os&&"function"==typeof e.toJson?e.toJson():e,null==s)throw new Error("Invalid body when calling createEntityGroup");let i={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(i[e]=n[e])});const r={...i};de.addEtagReferenceToHeader(e,r);const o=ws;return this.apiClient.callApi("/api/microseg/v4.2/config/entity-groups","POST",{},{},r,{},s,["apiKeyAuthScheme","basicAuthScheme"],["application/json"],["application/json"],o)}deleteEntityGroupById(e,...t){let n=t.length>0?t[0]:{};if(null==e)throw new Error("Missing the required parameter 'extId' when calling deleteEntityGroupById");const s={extId:e};let i={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(i[e]=n[e])});const r={...i},o=xn;return this.apiClient.callApi("/api/microseg/v4.2/config/entity-groups/{extId}","DELETE",s,{},r,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],o)}getEntityGroupById(e,...t){let n=t.length>0?t[0]:{};if(null==e)throw new Error("Missing the required parameter 'extId' when calling getEntityGroupById");const s={extId:e};let i={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(i[e]=n[e])});const r={...i},o=ys;return this.apiClient.callApi("/api/microseg/v4.2/config/entity-groups/{extId}","GET",s,{},r,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],o)}listEntityGroups(e,...t){let n=t.length>0?t[0]:{};const s={...(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 i={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(i[e]=n[e])});const r={...i},o=ks;return this.apiClient.callApi("/api/microseg/v4.2/config/entity-groups","GET",{},s,r,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],o)}updateEntityGroupById(e,t,...n){let s=n.length>0?n[0]:{},i=null;if(i=t instanceof os&&"function"==typeof t.toJson?t.toJson():t,null==e)throw new Error("Missing the required parameter 'extId' when calling updateEntityGroupById");if(null==i)throw new Error("Invalid body when calling updateEntityGroupById");const r={extId:e};let o={};Object.keys(s).forEach(e=>{this.#e.has(e.toLowerCase())||(o[e]=s[e])});const a={...o};de.addEtagReferenceToHeader(t,a);const d=us;return this.apiClient.callApi("/api/microseg/v4.2/config/entity-groups/{extId}","PUT",r,{},a,{},i,["apiKeyAuthScheme","basicAuthScheme"],["application/json"],["application/json"],d)}},NetworkSecurityPoliciesApi:class{#e;static get ApiClient(){return de}constructor(e){this.apiClient=e||de.instance,this.#e=new Set,this.#e.add("authorization"),this.#e.add("cookie"),this.#e.add("host"),this.#e.add("user-agent")}applyNetworkSecurityPolicyImport(e,t,...s){let i=s.length>0?s[0]:{};t=t||{};let r,o=null;try{r=n(975)}catch(e){}if("function"==typeof e.pipe)o=e,i["Content-Length"]=r.statSync(e.path).size,i.hasOwnProperty("Content-Disposition")||(i["Content-Disposition"]='attachment; filename="'+m().parse(e.path).base+'"');else if("string"==typeof e){let t;try{t=n(784)}catch(e){throw new Error("Cannot find module 'path'. Ensure you are using a Node.js environment. If not, use ReadableStream for body parameter.")}try{o=r.createReadStream(e),i["Content-Length"]=r.statSync(e).size,i.hasOwnProperty("Content-Disposition")||(i["Content-Disposition"]='attachment; filename="'+t.basename(e)+'"')}catch(t){throw new Error("Cannot read file: "+e+". Error: "+t.message)}}else o=e;if(null==o)throw new Error("Invalid body when calling applyNetworkSecurityPolicyImport");const a={...t.hasOwnProperty("$dryrun")?{$dryrun:t.$dryrun}:{}};let d={};Object.keys(i).forEach(e=>{this.#e.has(e.toLowerCase())||(d[e]=i[e])});const l={"NTNX-Purge-Policies":t.nTNXPurgePolicies,...d};de.addEtagReferenceToHeader(e,l);const u=Bi;return this.apiClient.callApi("/api/microseg/v4.2/config/policies/$actions/import","POST",{},a,l,{},o,["apiKeyAuthScheme","basicAuthScheme"],["application/octet-stream"],["application/json"],u)}createNetworkSecurityPolicy(e,...t){let n=t.length>0?t[0]:{},s=null;if(s=e instanceof hi&&"function"==typeof e.toJson?e.toJson():e,null==s)throw new Error("Invalid body when calling createNetworkSecurityPolicy");let i={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(i[e]=n[e])});const r={...i};de.addEtagReferenceToHeader(e,r);const o=Ri;return this.apiClient.callApi("/api/microseg/v4.2/config/policies","POST",{},{},r,{},s,["apiKeyAuthScheme","basicAuthScheme"],["application/json"],["application/json"],o)}deleteNetworkSecurityPolicyById(e,...t){let n=t.length>0?t[0]:{};if(null==e)throw new Error("Missing the required parameter 'extId' when calling deleteNetworkSecurityPolicyById");const s={extId:e};let i={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(i[e]=n[e])});const r={...i},o=Ji;return this.apiClient.callApi("/api/microseg/v4.2/config/policies/{extId}","DELETE",s,{},r,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],o)}exportNetworkSecurityPolicy(e,...t){let n=t.length>0?t[0]:{},s=null;s=e instanceof Ui&&"function"==typeof e.toJson?e.toJson():e;let i={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(i[e]=n[e])});const r={...i};de.addEtagReferenceToHeader(e,r);const o=Ai;return this.apiClient.callApi("/api/microseg/v4.2/config/policies/$actions/prepare-export","POST",{},{},r,{},s,["apiKeyAuthScheme","basicAuthScheme"],["application/json"],["application/json"],o)}getNetworkSecurityPolicyById(e,...t){let n=t.length>0?t[0]:{};if(null==e)throw new Error("Missing the required parameter 'extId' when calling getNetworkSecurityPolicyById");const s={extId:e};let i={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(i[e]=n[e])});const r={...i},o=Fi;return this.apiClient.callApi("/api/microseg/v4.2/config/policies/{extId}","GET",s,{},r,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],o)}listNetworkSecurityPolicies(e,...t){let n=t.length>0?t[0]:{};const s={...(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 i={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(i[e]=n[e])});const r={...i},o=gi;return this.apiClient.callApi("/api/microseg/v4.2/config/policies","GET",{},s,r,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json","application/octet-stream"],o)}listNetworkSecurityPolicyRules(e,t,...n){let s=n.length>0?n[0]:{};if(t=t||{},null==e)throw new Error("Missing the required parameter 'policyExtId' when calling listNetworkSecurityPolicyRules");const i={policyExtId: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(s).forEach(e=>{this.#e.has(e.toLowerCase())||(o[e]=s[e])});const a={...o},d=_i;return this.apiClient.callApi("/api/microseg/v4.2/config/policies/{policyExtId}/rules","GET",i,r,a,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],d)}updateNetworkSecurityPolicyById(e,t,...n){let s=n.length>0?n[0]:{},i=null;if(i=t instanceof hi&&"function"==typeof t.toJson?t.toJson():t,null==e)throw new Error("Missing the required parameter 'extId' when calling updateNetworkSecurityPolicyById");if(null==i)throw new Error("Invalid body when calling updateNetworkSecurityPolicyById");const r={extId:e};let o={};Object.keys(s).forEach(e=>{this.#e.has(e.toLowerCase())||(o[e]=s[e])});const a={...o};de.addEtagReferenceToHeader(t,a);const d=mi;return this.apiClient.callApi("/api/microseg/v4.2/config/policies/{extId}","PUT",r,{},a,{},i,["apiKeyAuthScheme","basicAuthScheme"],["application/json"],["application/json"],d)}},ServiceGroupsApi:class{#e;static get ApiClient(){return de}constructor(e){this.apiClient=e||de.instance,this.#e=new Set,this.#e.add("authorization"),this.#e.add("cookie"),this.#e.add("host"),this.#e.add("user-agent")}createServiceGroup(e,...t){let n=t.length>0?t[0]:{},s=null;if(s=e instanceof er&&"function"==typeof e.toJson?e.toJson():e,null==s)throw new Error("Invalid body when calling createServiceGroup");let i={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(i[e]=n[e])});const r={...i};de.addEtagReferenceToHeader(e,r);const o=gr;return this.apiClient.callApi("/api/microseg/v4.2/config/service-groups","POST",{},{},r,{},s,["apiKeyAuthScheme","basicAuthScheme"],["application/json"],["application/json"],o)}deleteServiceGroupById(e,...t){let n=t.length>0?t[0]:{};if(null==e)throw new Error("Missing the required parameter 'extId' when calling deleteServiceGroupById");const s={extId:e};let i={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(i[e]=n[e])});const r={...i},o=hr;return this.apiClient.callApi("/api/microseg/v4.2/config/service-groups/{extId}","DELETE",s,{},r,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],o)}getServiceGroupById(e,...t){let n=t.length>0?t[0]:{};if(null==e)throw new Error("Missing the required parameter 'extId' when calling getServiceGroupById");const s={extId:e};let i={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(i[e]=n[e])});const r={...i},o=ir;return this.apiClient.callApi("/api/microseg/v4.2/config/service-groups/{extId}","GET",s,{},r,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],o)}listServiceGroups(e,...t){let n=t.length>0?t[0]:{};const s={...(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 i={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(i[e]=n[e])});const r={...i},o=dr;return this.apiClient.callApi("/api/microseg/v4.2/config/service-groups","GET",{},s,r,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],o)}updateServiceGroupById(e,t,...n){let s=n.length>0?n[0]:{},i=null;if(i=t instanceof er&&"function"==typeof t.toJson?t.toJson():t,null==e)throw new Error("Missing the required parameter 'extId' when calling updateServiceGroupById");if(null==i)throw new Error("Invalid body when calling updateServiceGroupById");const r={extId:e};let o={};Object.keys(s).forEach(e=>{this.#e.has(e.toLowerCase())||(o[e]=s[e])});const a={...o};de.addEtagReferenceToHeader(t,a);const d=Zi;return this.apiClient.callApi("/api/microseg/v4.2/config/service-groups/{extId}","PUT",r,{},a,{},i,["apiKeyAuthScheme","basicAuthScheme"],["application/json"],["application/json"],d)}},FQDN:en,Flag:S,IPAddressOrFQDN:nn,IPv4Address:Ze,IPv6Address:Qe,KVPair:D,MapOfStringWrapper:P,Message:N,MessageSeverity:M,TenantAwareModel:et,ApiLink:L,ApiResponseMetadata:q,ExternalizableAbstractModel:nt,AdInfo:_t,AdStatus:Gt,AddressGroup:lt,Addresses:Nn,AllToAllIsolationGroup:Vs,AllowType:js,AllowedConfig:Hn,AllowedEntity:zn,AllowedSelectBy:Ln,AllowedType:Wn,ApplicationRuleSpec:Ms,CategoryAssociatedEntityType:Ss,CategoryMapping:qt,CreateAddressGroupApiResponse:ze,CreateDirectoryServerConfigApiResponse:Ct,CreateDsCategoryMappingApiResponse:An,CreateEntityGroupApiResponse:ws,CreateNetworkSecurityPolicyApiResponse:Ri,CreateNetworkSecurityPolicyExportApiResponse:Ai,CreateNetworkSecurityPolicyImportApiResponse:Bi,CreateServiceGroupApiResponse:gr,DeleteAddressGroupApiResponse:ft,DeleteDirectoryServerConfigApiResponse:Xt,DeleteDsCategoryMappingApiResponse:Et,DeleteEntityGroupApiResponse:xn,DeleteNetworkSecurityPolicyApiResponse:Ji,DeleteServiceGroupApiResponse:hr,DirectoryServerConfig:pn,EntityGroup:os,ExceptConfig:ss,ExceptEntity:ts,ExceptSelectBy:Xn,ExceptType:Yn,GetAddressGroupApiResponse:bt,GetDirectoryServerConfigApiResponse:mn,GetDsCategoryMappingApiResponse:gn,GetEntityGroupApiResponse:ys,GetNetworkSecurityPolicyApiResponse:Fi,GetServiceGroupApiResponse:ir,IPv4Range:it,IPv6Range:ot,IcmpTypeCodeSpec:Es,IcmpV6TypeCodeSpec:Is,IntraEntityGroupRuleAction:Ns,IntraEntityGroupRuleSpec:Ls,IpRange:Vn,IsolationGroup:Ws,ListAddressGroupsApiResponse:pt,ListDirectoryServerConfigsApiResponse:Fn,ListDsCategoryMappingsApiResponse:zt,ListEntityGroupsApiResponse:ks,ListNetworkSecurityPoliciesApiResponse:gi,ListNetworkSecurityPolicyRulesApiResponse:_i,ListServiceGroupsApiResponse:dr,MatchEntity:rn,MatchField:an,MatchType:ln,MatchingCriteria:cn,MultiEnvIsolationRuleSpec:Ks,NetworkSecurityPolicy:hi,NetworkSecurityPolicyExportSpec:Ui,NetworkSecurityPolicyRule:ni,RuleType:Xs,SecurityPolicyScope:ri,SecurityPolicyState:ai,ConfigSecurityPolicyType:li,ServiceGroup:er,SyncPolicy:$r,TcpPortRangeSpec:Cs,TwoEnvIsolationRuleSpec:Ys,UdpPortRangeSpec:Us,UpdateAddressGroupApiResponse:jt,UpdateDirectoryServerConfigApiResponse:Rn,UpdateDsCategoryMappingApiResponse:Mt,UpdateEntityGroupApiResponse:us,UpdateNetworkSecurityPolicyApiResponse:mi,UpdateServiceGroupApiResponse:Zi,AppMessage:Ie,ErrorResponse:Le,SchemaValidationError:Me,SchemaValidationErrorMessage:De,DryRunSpec:br,DryRunSummary:Lr,PolicyCount:Ur,PolicyCountByType:Mr,PolicyMetadata:Ar,PolicyPreview:Wr,PolicyUpgradeSummary:Ir,SecurityPolicyOptions:Tr,OperationSecurityPolicyType:jr,SubnetUpgradeSummary:Cr,TotalPolicyCount:Nr,UpgradeJob:Kr,UpgradeSpec:Vr,TaskReference:qe}})(),s.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.Microseg=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,s=this._callbacks["$"+e];if(!s)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var i=0;i<s.length;i++)if((n=s[i])===t||n.fn===t){s.splice(i,1);break}return 0===s.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],s=1;s<arguments.length;s++)t[s-1]=arguments[s];if(n){s=0;for(var i=(n=n.slice(0)).length;s<i;++s)n[s].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]",s=[],i=[];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()),d(e,"",0,[],void 0,0,o);try{a=0===i.length?JSON.stringify(e,t,n):JSON.stringify(e,h(t),n)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==s.length;){var l=s.pop();4===l.length?Object.defineProperty(l[0],l[1],l[3]):l[0][l[1]]=l[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}),s.push([r,n,t,o])):i.push([t,n,e]):(r[n]=e,s.push([r,n,t]))}function d(e,s,i,r,o,l,u){var c;if(l+=1,"object"==typeof e&&null!==e){for(c=0;c<r.length;c++)if(r[c]===e)return void a(n,e,s,o);if(void 0!==u.depthLimit&&l>u.depthLimit)return void a(t,e,s,o);if(void 0!==u.edgesLimit&&i+1>u.edgesLimit)return void a(t,e,s,o);if(r.push(e),Array.isArray(e))for(c=0;c<e.length;c++)d(e[c],c,c,r,e,l,u);else{var h=Object.keys(e);for(c=0;c<h.length;c++){var p=h[c];d(e[p],p,c,r,e,l,u)}}r.pop()}}function l(e,t){return e<t?-1:e>t?1:0}function u(e,t,n,o){void 0===o&&(o=r());var a,d=c(e,"",0,[],void 0,0,o)||e;try{a=0===i.length?JSON.stringify(d,t,n):JSON.stringify(d,h(t),n)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==s.length;){var l=s.pop();4===l.length?Object.defineProperty(l[0],l[1],l[3]):l[0][l[1]]=l[2]}}return a}function c(e,i,r,o,d,u,h){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,i,d);try{if("function"==typeof e.toJSON)return}catch(e){return}if(void 0!==h.depthLimit&&u>h.depthLimit)return void a(t,e,i,d);if(void 0!==h.edgesLimit&&r+1>h.edgesLimit)return void a(t,e,i,d);if(o.push(e),Array.isArray(e))for(p=0;p<e.length;p++)c(e[p],p,p,o,e,u,h);else{var y={},v=Object.keys(e).sort(l);for(p=0;p<v.length;p++){var g=v[p];c(e[g],g,p,o,e,u,h),y[g]=e[g]}if(void 0===d)return y;s.push([d,i,e]),d[i]=y}o.pop()}}function h(e){return e=void 0!==e?e:function(e,t){return t},function(t,n){if(i.length>0)for(var s=0;s<i.length;s++){var r=i[s];if(r[1]===t&&r[0]===n){n=r[2],i.splice(s,1);break}}return e.call(this,t,n)}}},784(e,t,n){"use strict";var s="win32"===process.platform,i=n(818);function r(e,t){for(var n=[],s=0;s<e.length;s++){var i=e[s];i&&"."!==i&&(".."===i?n.length&&".."!==n[n.length-1]?n.pop():t&&n.push(".."):n.push(i))}return n}function o(e){for(var t=e.length-1,n=0;n<=t&&!e[n];n++);for(var s=t;s>=0&&!e[s];s--);return 0===n&&s===t?e:n>s?[]:e.slice(n,s+1)}var a=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/,d=/^([\s\S]*?)((?:\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))(?:[\\\/]*)$/,l={};function u(e){var t=a.exec(e),n=(t[1]||"")+(t[2]||""),s=t[3]||"",i=d.exec(s);return[n,i[1],i[2],i[3]]}function c(e){var t=a.exec(e),n=t[1]||"",s=!!n&&":"!==n[1];return{device:n,isUnc:s,isAbsolute:s||!!t[2],tail:t[3]}}function h(e){return"\\\\"+e.replace(/^[\\\/]+/,"").replace(/[\\\/]+/g,"\\")}l.resolve=function(){for(var e="",t="",n=!1,s=arguments.length-1;s>=-1;s--){var o;if(s>=0?o=arguments[s]:e?(o=process.env["="+e])&&o.substr(0,3).toLowerCase()===e.toLowerCase()+"\\"||(o=e+"\\"):o=process.cwd(),!i.isString(o))throw new TypeError("Arguments to path.resolve must be strings");if(o){var a=c(o),d=a.device,l=a.isUnc,u=a.isAbsolute,p=a.tail;if((!d||!e||d.toLowerCase()===e.toLowerCase())&&(e||(e=d),n||(t=p+"\\"+t,n=u),e&&n))break}}return l&&(e=h(e)),e+(n?"\\":"")+(t=r(t.split(/[\\\/]+/),!n).join("\\"))||"."},l.normalize=function(e){var t=c(e),n=t.device,s=t.isUnc,i=t.isAbsolute,o=t.tail,a=/[\\\/]$/.test(o);return(o=r(o.split(/[\\\/]+/),!i).join("\\"))||i||(o="."),o&&a&&(o+="\\"),s&&(n=h(n)),n+(i?"\\":"")+o},l.isAbsolute=function(e){return c(e).isAbsolute},l.join=function(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(!i.isString(n))throw new TypeError("Arguments to path.join must be strings");n&&e.push(n)}var s=e.join("\\");return/^[\\\/]{2}[^\\\/]/.test(e[0])||(s=s.replace(/^[\\\/]{2,}/,"\\")),l.normalize(s)},l.relative=function(e,t){e=l.resolve(e),t=l.resolve(t);for(var n=e.toLowerCase(),s=t.toLowerCase(),i=o(t.split("\\")),r=o(n.split("\\")),a=o(s.split("\\")),d=Math.min(r.length,a.length),u=d,c=0;c<d;c++)if(r[c]!==a[c]){u=c;break}if(0==u)return t;var h=[];for(c=u;c<r.length;c++)h.push("..");return(h=h.concat(i.slice(u))).join("\\")},l._makeLong=function(e){if(!i.isString(e))return e;if(!e)return"";var t=l.resolve(e);return/^[a-zA-Z]\:\\/.test(t)?"\\\\?\\"+t:/^\\\\[^?.]/.test(t)?"\\\\?\\UNC\\"+t.substring(2):e},l.dirname=function(e){var t=u(e),n=t[0],s=t[1];return n||s?(s&&(s=s.substr(0,s.length-1)),n+s):"."},l.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},l.extname=function(e){return u(e)[3]},l.format=function(e){if(!i.isObject(e))throw new TypeError("Parameter 'pathObject' must be an object, not "+typeof e);var t=e.root||"";if(!i.isString(t))throw new TypeError("'pathObject.root' must be a string or undefined, not "+typeof e.root);var n=e.dir,s=e.base||"";return n?n[n.length-1]===l.sep?n+s:n+l.sep+s:s},l.parse=function(e){if(!i.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)}},l.sep="\\",l.delimiter=";";var p=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,y={};function v(e){return p.exec(e).slice(1)}y.resolve=function(){for(var e="",t=!1,n=arguments.length-1;n>=-1&&!t;n--){var s=n>=0?arguments[n]:process.cwd();if(!i.isString(s))throw new TypeError("Arguments to path.resolve must be strings");s&&(e=s+"/"+e,t="/"===s[0])}return(t?"/":"")+(e=r(e.split("/"),!t).join("/"))||"."},y.normalize=function(e){var t=y.isAbsolute(e),n=e&&"/"===e[e.length-1];return(e=r(e.split("/"),!t).join("/"))||t||(e="."),e&&n&&(e+="/"),(t?"/":"")+e},y.isAbsolute=function(e){return"/"===e.charAt(0)},y.join=function(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];if(!i.isString(n))throw new TypeError("Arguments to path.join must be strings");n&&(e+=e?"/"+n:n)}return y.normalize(e)},y.relative=function(e,t){e=y.resolve(e).substr(1),t=y.resolve(t).substr(1);for(var n=o(e.split("/")),s=o(t.split("/")),i=Math.min(n.length,s.length),r=i,a=0;a<i;a++)if(n[a]!==s[a]){r=a;break}var d=[];for(a=r;a<n.length;a++)d.push("..");return(d=d.concat(s.slice(r))).join("/")},y._makeLong=function(e){return e},y.dirname=function(e){var t=v(e),n=t[0],s=t[1];return n||s?(s&&(s=s.substr(0,s.length-1)),n+s):"."},y.basename=function(e,t){var n=v(e)[2];return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},y.extname=function(e){return v(e)[3]},y.format=function(e){if(!i.isObject(e))throw new TypeError("Parameter 'pathObject' must be an object, not "+typeof e);var t=e.root||"";if(!i.isString(t))throw new TypeError("'pathObject.root' must be a string or undefined, not "+typeof e.root);return(e.dir?e.dir+y.sep:"")+(e.base||"")},y.parse=function(e){if(!i.isString(e))throw new TypeError("Parameter 'pathString' must be a string, not "+typeof e);var t=v(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)}},y.sep="/",y.delimiter=":",e.exports=s?l:y,e.exports.posix=y,e.exports.win32=l},540(e){function t(e,t){if(this._maxRetries&&this._retries++<this._maxRetries&&function(e,t,n,s){if(s)return s(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,s){0!==arguments.length&&!0!==e||(e=1),e<=0&&(e=0),"number"==typeof t&&(t=[t]);const i=t.length,r=e-i;if(0!==r){if(r<0)throw new Error("Cannot have more delays than retries");{const e=t[i-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=s,this}e.exports=function(e){const s=e.Request;return s.prototype.oldRetry=s.prototype.retry,s.prototype.retry=n,s.prototype.callback=t,e}},619(e){"use strict";function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,s=new Array(t);n<t;n++)s[n]=e[n];return s}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),s=0;s<t;s++)n[s]=arguments[s];return this._defaults.push({fn:e,args:n}),this}}),n.prototype._setDefaults=function(e){this._defaults.forEach(function(n){var s;e[n.fn].apply(e,function(e){if(Array.isArray(e))return t(e)}(s=n.args)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(s)||function(e,n){if(e){if("string"==typeof e)return t(e,n);var s=Object.prototype.toString.call(e).slice(8,-1);return"Object"===s&&e.constructor&&(s=e.constructor.name),"Map"===s||"Set"===s?Array.from(e):"Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?t(e,n):void 0}}(s)||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 s(e){return s="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},s(e)}var i;"undefined"!=typeof window?i=window:"undefined"==typeof self?(console.warn("Using browser-only version of superagent in non-browser environment"),i=void 0):i=self;var r=n(960),o=n(340),a=n(695),d=n(388),l=n(19),u=n(619);function c(){}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 h=t=e.exports;t.Request=$,h.getXHR=function(){if(i.XMLHttpRequest&&(!i.location||"file:"!==i.location.protocol||!i.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 y(e){if(!d(e))return e;var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&v(t,n,e[n]);return t.join("&")}function v(e,t,n){if(void 0!==n)if(null!==n)if(Array.isArray(n))n.forEach(function(n){v(e,t,n)});else if(d(n))for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&v(e,"".concat(t,"[").concat(s,"]"),n[s]);else e.push(encodeURI(t)+"="+encodeURIComponent(n));else e.push(encodeURI(t))}function g(e){for(var t,n,s={},i=e.split("&"),r=0,o=i.length;r<o;++r)-1===(n=(t=i[r]).indexOf("="))?s[decodeURIComponent(t)]="":s[decodeURIComponent(t.slice(0,n))]=decodeURIComponent(t.slice(n+1));return s}function f(e){return/[/+]json($|[^-\w])/.test(e)}function w(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,s,i,r=e.split(/\r?\n/),o={},a=0,d=r.length;a<d;++a)-1!==(t=(n=r[a]).indexOf(":"))&&(s=n.slice(0,t).toLowerCase(),i=p(n.slice(t+1)),o[s]=i);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,s=null;try{s=new w(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",s);try{n._isResponseOK(s)||(e=new Error(s.statusText||s.text||"Unsuccessful HTTP response"))}catch(t){e=t}e?(e.original=t,e.response=s,e.status=s.status,n.callback(e,s)):n.callback(null,s)})}function m(e,t,n){var s=h("DELETE",e);return"function"==typeof t&&(n=t,t=null),t&&s.send(t),n&&s.end(n),s}h.serializeObject=y,h.parseString=g,h.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"},h.serialize={"application/x-www-form-urlencoded":y,"application/json":o},h.parse={"application/x-www-form-urlencoded":g,"application/json":JSON.parse},l(w.prototype),w.prototype._parseBody=function(e){var t=h.parse[this.type];return this.req._parser?this.req._parser(this,e):(!t&&f(this.type)&&(t=h.parse["application/json"]),t&&e&&(e.length>0||e instanceof Object)?t(e):null)},w.prototype.toError=function(){var e=this.req,t=e.method,n=e.url,s="cannot ".concat(t," ").concat(n," (").concat(this.status,")"),i=new Error(s);return i.status=this.status,i.method=t,i.url=n,i},h.Response=w,r($.prototype),a($.prototype),$.prototype.type=function(e){return this.set("Content-Type",h.types[e]||e),this},$.prototype.accept=function(e){return this.set("Accept",h.types[e]||e),this},$.prototype.auth=function(e,t,n){return 1===arguments.length&&(t=""),"object"===s(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=y(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 i.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"===s(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||c,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=h.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 s;try{s=t.status}catch(e){s=0}if(!s){if(e.timedout||e._aborted)return;return e.crossDomainError()}e.emit("end")}};var s=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",s.bind(null,"download")),t.upload&&t.upload.addEventListener("progress",s.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 i=this._header["content-type"],r=this._serializer||h.serialize[i?i.split(";")[0]:""];!r&&f(i)&&(r=h.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)},h.agent=function(){return new u},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach(function(e){u.prototype[e.toLowerCase()]=function(t,n){var s=new h.Request(e,t);return this._setDefaults(s),n&&s.end(n),s}}),u.prototype.del=u.prototype.delete,h.get=function(e,t,n){var s=h("GET",e);return"function"==typeof t&&(n=t,t=null),t&&s.query(t),n&&s.end(n),s},h.head=function(e,t,n){var s=h("HEAD",e);return"function"==typeof t&&(n=t,t=null),t&&s.query(t),n&&s.end(n),s},h.options=function(e,t,n){var s=h("OPTIONS",e);return"function"==typeof t&&(n=t,t=null),t&&s.send(t),n&&s.end(n),s},h.del=m,h.delete=m,h.patch=function(e,t,n){var s=h("PATCH",e);return"function"==typeof t&&(n=t,t=null),t&&s.send(t),n&&s.end(n),s},h.post=function(e,t,n){var s=h("POST",e);return"function"==typeof t&&(n=t,t=null),t&&s.send(t),n&&s.end(n),s},h.put=function(e,t,n){var s=h("PUT",e);return"function"==typeof t&&(n=t,t=null),t&&s.send(t),n&&s.end(n),s}},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 s(e){return s="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},s(e)}var i=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"!==s(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 s=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){s.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)}}),s.end(function(n,s){n?t(n):e(s)})})}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(i(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(i(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 s in t)Object.prototype.hasOwnProperty.call(t,s)&&this.field(e,t[s]);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,s){switch(n.type){case"basic":this.set("Authorization","Basic ".concat(s("".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=i(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&&i(this._data))for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(this._data[s]=e[s]);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 s=new Error("".concat(e+t,"ms exceeded"));s.timeout=t,s.code="ECONNABORTED",s.errno=n,this.timedout=!0,this.timedoutError=s,this.abort(),this.callback(s)}},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 s=n(897);function i(e){if(e)return function(e){for(var t in i.prototype)Object.prototype.hasOwnProperty.call(i.prototype,t)&&(e[t]=i.prototype[t]);return e}(e)}e.exports=i,i.prototype.get=function(e){return this.header[e.toLowerCase()]},i.prototype._setHeaderProperties=function(e){var t=e["content-type"]||"";this.type=s.type(t);var n=s.params(t);for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(this[i]=n[i]);this.links={};try{e.link&&(this.links=s.parseLinks(e.link))}catch(e){}},i.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(/ *= */),s=n.shift(),i=n.shift();return s&&i&&(e[s]=i),e},{})},t.parseLinks=function(e){return e.split(/ *, */).reduce(function(e,t){var n=t.split(/ *; */),s=n[0].slice(1,-1);return e[n[1].split(/ *= */)[1].slice(1,-1)]=s,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 s=/%[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 i=arguments,r=i.length,a=String(e).replace(s,function(e){if("%%"===e)return"%";if(n>=r)return e;switch(e){case"%s":return String(i[n++]);case"%d":return Number(i[n++]);case"%j":try{return JSON.stringify(i[n++])}catch(e){return"[Circular]"}default:return e}}),d=i[n];n<r;d=i[++n])y(d)||!$(d)?a+=" "+d:a+=" "+o(d);return a},t.deprecate=function(e,s){if(f(n.g.process))return function(){return t.deprecate(e,s).apply(this,arguments)};if(!0===process.noDeprecation)return e;var i=!1;return function(){if(!i){if(process.throwDeprecation)throw new Error(s);process.traceDeprecation?console.trace(s):console.error(s),i=!0}return e.apply(this,arguments)}};var i,r={};function o(e,n){var s={seen:[],stylize:d};return arguments.length>=3&&(s.depth=arguments[2]),arguments.length>=4&&(s.colors=arguments[3]),p(n)?s.showHidden=n:n&&t._extend(s,n),f(s.showHidden)&&(s.showHidden=!1),f(s.depth)&&(s.depth=2),f(s.colors)&&(s.colors=!1),f(s.customInspect)&&(s.customInspect=!0),s.colors&&(s.stylize=a),l(s,e,s.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 d(e,t){return e}function l(e,n,s){if(e.customInspect&&n&&k(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(s,e);return g(i)||(i=l(e,i,s)),i}var r=function(e,t){if(f(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 v(t)?e.stylize(""+t,"number"):p(t)?e.stylize(""+t,"boolean"):y(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)),b(n)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return u(n);if(0===o.length){if(k(n)){var d=n.name?": "+n.name:"";return e.stylize("[Function"+d+"]","special")}if(w(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(m(n))return e.stylize(Date.prototype.toString.call(n),"date");if(b(n))return u(n)}var $,T="",F=!1,j=["{","}"];return h(n)&&(F=!0,j=["[","]"]),k(n)&&(T=" [Function"+(n.name?": "+n.name:"")+"]"),w(n)&&(T=" "+RegExp.prototype.toString.call(n)),m(n)&&(T=" "+Date.prototype.toUTCString.call(n)),b(n)&&(T=" "+u(n)),0!==o.length||F&&0!=n.length?s<0?w(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),$=F?function(e,t,n,s,i){for(var r=[],o=0,a=t.length;o<a;++o)O(t,String(o))?r.push(c(e,t,n,s,String(o),!0)):r.push("");return i.forEach(function(i){i.match(/^\d+$/)||r.push(c(e,t,n,s,i,!0))}),r}(e,n,s,a,o):o.map(function(t){return c(e,n,s,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]}($,T,j)):j[0]+T+j[1]}function u(e){return"["+Error.prototype.toString.call(e)+"]"}function c(e,t,n,s,i,r){var o,a,d;if((d=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?a=d.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):d.set&&(a=e.stylize("[Setter]","special")),O(s,i)||(o="["+i+"]"),a||(e.seen.indexOf(d.value)<0?(a=y(n)?l(e,d.value,null):l(e,d.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")),f(o)){if(r&&i.match(/^\d+$/))return a;(o=JSON.stringify(""+i)).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 h(e){return Array.isArray(e)}function p(e){return"boolean"==typeof e}function y(e){return null===e}function v(e){return"number"==typeof e}function g(e){return"string"==typeof e}function f(e){return void 0===e}function w(e){return $(e)&&"[object RegExp]"===T(e)}function $(e){return"object"==typeof e&&null!==e}function m(e){return $(e)&&"[object Date]"===T(e)}function b(e){return $(e)&&("[object Error]"===T(e)||e instanceof Error)}function k(e){return"function"==typeof e}function T(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(f(i)&&(i=process.env.NODE_DEBUG||""),e=e.toUpperCase(),!r[e])if(new RegExp("\\b"+e+"\\b","i").test(i)){var n=process.pid;r[e]=function(){var s=t.format.apply(t,arguments);console.error("%s %d: %s",e,n,s)}}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=h,t.isBoolean=p,t.isNull=y,t.isNullOrUndefined=function(e){return null==e},t.isNumber=v,t.isString=g,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=f,t.isRegExp=w,t.isObject=$,t.isDate=m,t.isError=b,t.isFunction=k,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 j=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function O(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(),j[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),s=n.length;s--;)e[n[s]]=t[n[s]];return e}},975(){},548(){},799(){},545(){},965(){}},t={};function n(s){var i=t[s];if(void 0!==i)return i.exports;var r=t[s]={exports:{}};return e[s](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 s in t)n.o(t,s)&&!n.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},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 s={};return(()=>{"use strict";n.d(s,{default:()=>Zr});var e,t=n(585),i=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=de.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 d=/^(?:[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 l=[],u=0;u<256;++u)l.push((u+256).toString(16).substr(1));const c=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(l[e[t+0]]+l[e[t+1]]+l[e[t+2]]+l[e[t+3]]+"-"+l[e[t+4]]+l[e[t+5]]+"-"+l[e[t+6]]+l[e[t+7]]+"-"+l[e[t+8]]+l[e[t+9]]+"-"+l[e[t+10]]+l[e[t+11]]+l[e[t+12]]+l[e[t+13]]+l[e[t+14]]+l[e[t+15]]).toLowerCase();if(!function(e){return"string"==typeof e&&d.test(e)}(n))throw TypeError("Stringified UUID is invalid");return n},h=function(e,t,n){var s=(e=e||{}).random||(e.rng||a)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=s[i];return t}return c(s)};var p=n(540),y=n.n(p),v=n(545),g=n.n(v),f=n(799),w=n.n(f),$=n(784),m=n.n($),b=n(548);const k={DEFAULT:"DEFAULT",constructFromObject:function(e){if("string"==typeof e||e instanceof String)return k[e];throw new Error("Received object name is not an instance of String")},validate:function(e){if(null!=e){if(e===k.DEFAULT)return;throw new Error("Invalid : must be ValidationScopes.{ }")}}};Object.freeze(k);const T=k;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 j{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 O=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=O),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 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&&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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("name"===t){if(void 0===this.name||null===this.name)return new j("name","undefined or null");if(!F.validateMaxLength(this.name,128))return new j("name","does not satisfy required maxLength constraint: 128");if(!F.validateMinLength(this.name,3))return new j("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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("value","undefined or null")}}function A(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.name=void 0,S.prototype.value=!1,S.prototype.$reserved=void 0,S.prototype.$objectType=void 0,S.prototype.$unknownFields=void 0;var E=new WeakSet;class P{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=E),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 P,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:A(E,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:A(E,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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("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 R(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")}P.prototype.map=void 0,P.prototype.$reserved=void 0,P.prototype.$objectType=void 0,P.prototype.$unknownFields=void 0;var C=new WeakSet;class D{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=C),t.add(e),this.$objectType="common.v1.config.KVPair",this.$reserved={$fv:"v1.r0"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,r,o,a;if(e){if(t=t||new D,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=[],s=e.value,a=s[0].hasOwnProperty("$objectType")?s[0].$objectType:typeof s[0],r=0;r<s.length;r++)switch(a){case"string":case"integer":case"number":o.push(s[r]);break;case"common.v1.config.MapOfStringWrapper":i=P.constructFromObject(s[r],void 0),o.push(i);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):R(C,this,U).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):R(C,this,U).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("name"===t){if(void 0===this.name||null===this.name)return new j("name","undefined or null");if(!F.validateMaxLength(this.name,128))return new j("name","does not satisfy required maxLength constraint: 128");if(!F.validateMinLength(this.name,3))return new j("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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("value","undefined or null")}}function U(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}D.prototype.name=void 0,D.prototype.value=void 0,D.prototype.$reserved=void 0,D.prototype.$objectType=void 0,D.prototype.$unknownFields=void 0;const x={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",INFO:"INFO",WARNING:"WARNING",ERROR:"ERROR",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(x).find(t=>x[t]===e);return null==t?x.$UNKNOWN:x[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case x.$UNKNOWN:case x.$REDACTED:case x.INFO:case x.WARNING:case x.ERROR:return;default:throw new Error("Invalid : must be MessageSeverity.{ $UNKNOWN|$REDACTED|INFO|WARNING|ERROR }")}}};Object.freeze(x);const M=x;var J=new WeakSet;class N{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.Message",this.$reserved={$fv:"v1.r0"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new N,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(M.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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("severity","undefined or null"):new j("locale","undefined or null"):new j("message","undefined or null"):new j("code","undefined or null")}}N.prototype.code=void 0,N.prototype.message=void 0,N.prototype.locale="en_US",N.prototype.severity=void 0,N.prototype.$reserved=void 0,N.prototype.$objectType=void 0,N.prototype.$unknownFields=void 0;var G=new WeakSet;class L{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=G),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 L,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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("rel","undefined or null"):new j("href","undefined or null")}}L.prototype.href=void 0,L.prototype.rel=void 0,L.prototype.$reserved=void 0,L.prototype.$objectType=void 0,L.prototype.$unknownFields=void 0;var _,W=new WeakSet;class q{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 s,i,r,o;if(e){if(t=t||new q,e.hasOwnProperty("flags")&&null!==e.flags&&void 0!==e.flags){for(o=[],s=e.flags,r=0;r<s.length;r++)i=S.constructFromObject(s[r],void 0),o.push(i);t.setFlags(o)}if(e.hasOwnProperty("links")&&null!==e.links&&void 0!==e.links){for(o=[],s=e.links,r=0;r<s.length;r++)i=L.constructFromObject(s[r],void 0),o.push(i);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=[],s=e.messages,r=0;r<s.length;r++)i=N.constructFromObject(s[r],void 0),o.push(i);t.setMessages(o)}if(e.hasOwnProperty("extraInfo")&&null!==e.extraInfo&&void 0!==e.extraInfo){for(o=[],s=e.extraInfo,r=0;r<s.length;r++)i=D.constructFromObject(s[r],void 0),o.push(i);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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("flags"===t){if(void 0===this.flags||null===this.flags)return new j("flags","undefined or null");if(!F.validateMaxItems(this.flags,20))return new j("flags","does not satisfy required maxItems constraint: 20")}if("links"===t){if(void 0===this.links||null===this.links)return new j("links","undefined or null");if(!F.validateMaxItems(this.links,20))return new j("links","does not satisfy required maxItems constraint: 20")}if("totalAvailableResults"===t&&(void 0===this.totalAvailableResults||null===this.totalAvailableResults))return new j("totalAvailableResults","undefined or null");if("messages"===t){if(void 0===this.messages||null===this.messages)return new j("messages","undefined or null");if(!F.validateMaxItems(this.messages,20))return new j("messages","does not satisfy required maxItems constraint: 20")}if("extraInfo"===t){if(void 0===this.extraInfo||null===this.extraInfo)return new j("extraInfo","undefined or null");if(!F.validateMaxItems(this.extraInfo,20))return new j("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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null")}}function V(e,t,n){B(e,t),t.set(e,n)}function B(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function z(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")}q.prototype.flags=void 0,q.prototype.links=void 0,q.prototype.totalAvailableResults=void 0,q.prototype.messages=void 0,q.prototype.extraInfo=void 0,q.prototype.$reserved=void 0,q.prototype.$objectType=void 0,q.prototype.$unknownFields=void 0,y()(i());var Z=new WeakMap,X=new WeakMap,Q=new WeakMap,Y=new WeakMap,ee=new WeakMap,te=new WeakMap,ne=new WeakMap,se=new WeakMap,ie=new WeakMap,re=new WeakMap,oe=new WeakMap,ae=new WeakSet;class de{constructor(){var e;B(this,e=ae),e.add(this),V(this,Z,void 0),V(this,X,void 0),V(this,Q,void 0),V(this,Y,void 0),V(this,ee,void 0),V(this,te,void 0),V(this,ne,void 0),V(this,se,void 0),V(this,ie,void 0),V(this,re,void 0),V(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(se,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=z(te,this),this.connectTimeout=z(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(i().agent)),this.requestAgent=null,K(re,this,null),this.allowVersionNegotiation=!0,K(ie,this,!1),this.debug=!1,K(Q,this,null),this.username=null,this.password=null,K(Y,this,!0),this.downloadDestination=null,this.loggerFile=null}set verifySsl(e){this.requestAgent=e?null:new(g().Agent)({rejectUnauthorized:e}),K(Y,this,e)}get verifySsl(){return z(Y,this)}set host(e){K(se,this,e),K(ie,this,!1),K(re,this,null)}get host(){return z(se,this)}set loggerFile(e){null!=e&&(("string"==typeof e||e instanceof String)&&(e=w().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!==z(re,this)&&null!==z(re,this)&&null!==z(re,this).match(/v\d+\.\d+(\.[a|b]\d+)?/)&&"v4.2"!==z(re,this)){H(ae,this,Te).call(this,z(oe,this).INFO,null,"Changing uri",e,"to negotiated version",z(re,this));var n=new RegExp("(?<=/[-\\w]+/)v\\d+\\.\\d+(\\.[a|b]\\d+)?(?=/.*)","i");e=e.replace(n,z(re,this))}K(Z,this,"undefined"==typeof self?this.scheme+":":self.location.protocol);let s="";""!==z(Z,this)&&""!==this.host&&""!==this.port?s=z(Z,this)+"//"+this.host+":"+this.port:"undefined"!=typeof self&&(s=self.origin);var i=s+e;return i.replace(/\{([\w-]+)\}/g,(e,n)=>{var s;return s=t.hasOwnProperty(n)?this.paramToString(t[n]):e,encodeURIComponent(s)})}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 s=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=s);else t.getData().hasOwnProperty("$reserved")&&void 0!==t.getData().get$Reserved()&&(t.getData().get$Reserved().ETag=s)}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(),s=Object.keys(e).find(e=>e.toLowerCase()===n);return s?e[s]:null}return null}getNegotiatedVersion(){return z(re,this)}negotiateVersion(e,t){return new Promise(n=>{!0===this.allowVersionNegotiation&&!1===z(ie,this)?this.callApiInternal("/api/microseg/unversioned/info","OPTIONS",{},{},{},{},null,t,[],["application/json"],Object).then(({data:t,response:s})=>{if(200===s.status&&t.hasOwnProperty("data")&&null!==t.data){const s=t.data,i="v4.2";if(H(ae,this,we).call(this,H(ae,this,$e).call(this,s),H(ae,this,$e).call(this,i)))return H(ae,this,Te).call(this,z(oe,this).WARN,null,"Server version",s,"is below minimum supported version",i,". Version negotiation will not be performed."),K(re,this,null),K(ie,this,!1),void n(e);K(re,this,H(ae,this,fe).call(this,"v4.2",s)),K(ie,this,!0),H(ae,this,Te).call(this,z(oe,this).INFO,null,"Negotiated Version with server :",z(re,this)),n(e)}else H(ae,this,Te).call(this,z(oe,this).ERROR,null,"Could not fetch supported versions from server"),K(re,this,null),K(ie,this,!1),n(e)}).catch(t=>{H(ae,this,Te).call(this,z(oe,this).ERROR,null,"Could not fetch supported versions from server"),K(re,this,null),K(ie,this,!1),n(e)}):n(e)})}callApi(e,t,n,s,i,r,o,a,d,l,u){return this.negotiateVersion(this,a).then(function(c){return c.callApiInternal(e,t,n,s,i,r,o,a,d,l,u)})}callApiInternal(e,t,s,r,o,a,d,l,u,c,p){var y=this.buildUrl(e,s);const v="undefined"!=typeof window&&void 0!==window.document;let g=["application/octet-stream","application/pdf","application/zip"];if(c&&c.length>0&&c.some(e=>g.includes(e))&&v&&this.downloadDestination)return new Promise((e,n)=>{const s=H(ae,this,Se).call(this,y,t,r,o,d,l,u,c);fetch(s.url,s.options).then(t=>{if(!t.ok){const e=new Error(`HTTP error ${t.status}`);e.status=t.status,H(ae,this,Te).call(this,z(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,Te).call(this,z(oe,this).ERROR,null,e),n(e)}const s=t.body.getReader(),i=this.downloadDestination.getWriter(),r=()=>s.read().then(({done:n,value:s})=>(n&&(i.close(),H(ae,this,Te).call(this,z(oe,this).INFO,null,"Finished streaming response"),e({data:{},response:t})),i.write(s).then(r)));return r()}).catch(e=>{H(ae,this,Te).call(this,z(oe,this).ERROR,null,"Caught the following error :",e),n(e)})});var f=i()(t,y);if(f.oldCallback=f.callback,f.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,f,l),"GET"===t.toUpperCase()&&!1===this.cache&&(r._=(new Date).getTime()),f.query(H(ae,this,he).call(this,r)),f.set(this.defaultHeaders).set(H(ae,this,he).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=h();f.set(H(ae,this,he).call(this,{"NTNX-Request-Id":e}))}v||(this.downloadDestination=".",f.set(H(ae,this,he).call(this,{"User-Agent":"Nutanix-microseg-js-client/4.2.2"}))),this.requestAgent&&f.agent(this.requestAgent);var $={};$.response=H(ae,this,me).call(this,this.connectTimeout,z(ee,this)),$.deadline=H(ae,this,me).call(this,this.readTimeout,z(te,this)),f.timeout($);var m=o.hasOwnProperty("Content-Type")?o["Content-Type"]:H(ae,this,ue).call(this,u);if(m?"multipart/form-data"!=m&&f.type(m):f.header["Content-Type"]||f.type("application/json"),H(ae,this,Te).call(this,z(oe,this).INFO,null,"Request URL :",t,y),H(ae,this,Te).call(this,z(oe,this).DEBUG,H(ae,this,je),"Request Headers :",void 0===f.header?"":f.header),"application/x-www-form-urlencoded"===m)f.send(H(ae,this,he).call(this,a));else if("multipart/form-data"==m){var b=H(ae,this,he).call(this,a);for(var k in b)b.hasOwnProperty(k)&&(H(ae,this,ce).call(this,b[k])?f.attach(k,b[k]):f.field(k,b[k]))}else{if("application/octet-stream"===m&&null!=d&&"function"==typeof d.pipe){if(H(ae,this,Te).call(this,z(oe,this).INFO,null,"Piping octet-stream request"),"function"==typeof d.pipe)d.pipe(f);else{let e;try{e=n(965)}catch(e){H(ae,this,Te).call(this,z(oe,this).ERROR,null,"Error fetching steam/web")}d instanceof e.ReadableStream?d.pipeTo(new e.WritableStream({write(e){f.write(e)},close(){H(ae,this,Te).call(this,z(oe,this).INFO,null,"READABLE STREAM CLOSED")},abort(e){H(ae,this,Te).call(this,z(oe,this).ERROR,null,"READABLE STREAM ABORTED")}})):f.send(d)}return new Promise((t,n)=>{f.on("error",e=>{H(ae,this,Te).call(this,z(oe,this).DEBUG,null,"Caught the following error :",e),n(e)}).on("response",s=>{H(ae,this,Oe).call(this,s,e,r,p,t,n)})})}["POST","PUT","PATCH"].includes(t.toUpperCase())&&d&&f.send(d)}"Blob"==typeof p?f.responseType("blob"):"String"===p&&f.responseType("string"),H(ae,this,ke).call(this,f),H(ae,this,Te).call(this,z(oe,this).DEBUG,null,"Request Body :",void 0===f._data?"":f._data);var T=o.hasOwnProperty("Accept")&&null!=o.Accept?o.Accept:c.join(", ");return T&&f.accept(T),new Promise((n,s)=>{f.buffer(!1).redirects(0).retry(this.maxRetryAttempts,this.retryInterval,[]).withCredentials(this.withCredentials).on("error",e=>{H(ae,this,Te).call(this,z(oe,this).DEBUG,null,"Caught the following error :",e)}).end((o,a)=>{if(o)H(ae,this,Te).call(this,z(oe,this).DEBUG,null,"Caught error during the request!"),H(ae,this,Te).call(this,z(oe,this).ERROR,null,o),404===o.status&&(K(ie,this,!1),K(re,this,null)),null!==o.response&&void 0!==o.response?o.data=H(ae,this,ve).call(this,o.response,p):o.data=H(ae,this,ye).call(this,o),s(o);else{H(ae,this,Te).call(this,z(oe,this).INFO,null,"Response Status :",a.status),H(ae,this,Te).call(this,z(oe,this).DEBUG,H(ae,this,je),"Response Headers :",a.headers);let o="";if(a.headers.hasOwnProperty("content-type")&&(o=a.headers["content-type"]),g.includes(o)){if(!v){let e=this.downloadDestination+"/downloaded_file_"+Date.now()+".txt",t=w().createWriteStream(e);H(ae,this,Ae).call(this,a,t,e,n,s,p)}}else if(302==a.status){let e=this.downloadDestination+"/downloaded_file_"+Date.now()+".txt",r=this;H(ae,this,Te).call(this,z(oe,this).INFO,null,"Redirecting to :",a.headers.location);var d=i()(t,a.headers.location);d.set(f.header),a.headers.hasOwnProperty("x-redirect-token")&&(H(ae,this,Te).call(this,z(oe,this).INFO,null,"Writing X-Redirect-Token into Cookie"),d.set("Cookie",a.headers["x-redirect-token"])),this.requestAgent&&d.agent(this.requestAgent),d.redirects(0),d.withCredentials(this.withCredentials),d.buffer(!1);let o=w().createWriteStream(e);d.pipe(o),d.on("response",function(t){H(ae,r,Te).call(r,z(oe,r).INFO,null,"Received response after redirection :",t.status),H(ae,r,Ae).call(r,t,o,e,n,s,p)})}else H(ae,this,Oe).call(this,a,e,r,p,n,s)}})})}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,s){let i=null;if(void 0!==t&&t.hasOwnProperty(n)&&(i=t[n]),null===i&&("string"==typeof e||e instanceof String)){const t=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),s=e.match(new RegExp(`${t}=([0-9]+)`));s&&(i=s[1])}return null===i&&(i=s),i}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 de.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=>de.convertToType(e,n))}if("object"==typeof t){var s,i;for(var r in t)if(t.hasOwnProperty(r)){s=r,i=t[r];break}var o={};for(var r in e)if(e.hasOwnProperty(r)){var a=de.convertToType(r,s),d=de.convertToType(e[r],i);o[a]=d}return o}return e}}static constructFromObject(e,t,n){if(Array.isArray(e))for(var s=0;s<e.length;s++)e.hasOwnProperty(s)&&(t[s]=de.convertToType(e[s],n));else for(var i in e)e.hasOwnProperty(i)&&(t[i]=de.convertToType(e[i],n))}}function le(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,le).call(this,e[t]))return e[t];return e[0]}function ce(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 b.Blob&&e instanceof b.Blob||"function"==typeof File&&e instanceof File}function he(e){var t={};for(var n in e)if(e.hasOwnProperty(n)&&null!=e[n]&&null!=e[n]){var s=e[n];H(ae,this,ce).call(this,s)||Array.isArray(s)?t[n]=s:t[n]=this.paramToString(s)}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,Te).call(this,z(oe,this).DEBUG,null,"Basic Auth applied to request");break;case"apiKey":if(n.apiKey){var s={};n.apiKeyPrefix?s[n.name]=n.apiKeyPrefix+" "+n.apiKey:s[n.name]=n.apiKey,"header"===n.in?e.set(s):e.query(s)}H(ae,this,Te).call(this,z(oe,this).DEBUG,null,"apiKey applied to request");break;case"oauth2":n.accessToken&&e.set({Authorization:"Bearer "+n.accessToken}),H(ae,this,Te).call(this,z(oe,this).DEBUG,null,"oauth2 applied to request");break;default:throw H(ae,this,Te).call(this,z(oe,this).ERROR,null,"Unknown authentication type:",n.type),new Error("Unknown authentication type: "+n.type)}})}function ye(e){var t={data:{},metadata:{}};t.data.status=e.status,t.data.message=e.message}function ve(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 b.Blob([e.text],{type:e.headers["content-type"]});let s=new S;s.name="hasError",s.value=!1;let i=[s],r=new q;return r.flags=i,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 s=parseInt(this.constructor.parseQueryParam(t,n,"$page","0"),10),i=parseInt(this.constructor.parseQueryParam(t,n,"$limit","50"),10);e.populatePaginationMetadata(this,s,i)}function fe(e,t){if(!e||!t)return e;let n=H(ae,this,$e).call(this,e),s=H(ae,this,$e).call(this,t);return!n.family===s.family||H(ae,this,we).call(this,n,s)?e:t}function we(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),s=t.versionType.substring(0,1),i=parseInt(e.versionType.substring(1)),r="released"===t.versionType?0:parseInt(t.versionType.substring(1));return n===s?i<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 me(e,t){return e<=0?e=t:e>z(ne,this)&&(e=z(ne,this)),e}function be(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,Te).call(this,z(oe,this).DEBUG,null,"Retained cookie :",t)}else K(X,this,null)}function ke(e){null!=z(X,this)&&e.set(H(ae,this,he).call(this,{Cookie:z(X,this)}))}function Te(e,t,...n){if("object"==typeof e&&"key"in e&&"value"in e&&"symbol"==typeof e.value||(e=z(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 s=n.join(" ");s=(new Date).toISOString()+" "+e.key+" - "+s,void 0!==z(Q,this)&&null!==z(Q,this)&&"function"==typeof z(Q,this).log?z(Q,this).log(s):console.log(s)}}function Fe(e){return!this.debug&&e===z(oe,this).DEBUG}function je(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 Oe(e,t,n,s,i,r){try{var o=H(ae,this,ve).call(this,e,s);H(ae,this,Te).call(this,z(oe,this).INFO,null,"Response Status :",e.status),H(ae,this,Te).call(this,z(oe,this).DEBUG,H(ae,this,je),"Response Headers :",e.headers),H(ae,this,be).call(this,e||{}),H(ae,this,Te).call(this,z(oe,this).DEBUG,null,"Response Body :",o),204==e.status&&null==o?i({data:o,response:e}):e.ok&&null!=o?(this.addEtagToReservedMap(e,o),H(ae,this,ge).call(this,o,t,n),i({data:o,response:e})):(H(ae,this,Te).call(this,z(oe,this).ERROR,null,o),r({...e.error,data:o}))}catch(e){H(ae,this,Te).call(this,z(oe,this).DEBUG,null,"Caught error while processing response!"),H(ae,this,Te).call(this,z(oe,this).ERROR,null,e),e.data=H(ae,this,ye).call(this,e),r(e)}}function Se(e,t,n,s,i,r,o,a){let d={};r.forEach(e=>{const t=this.authentications[e];switch(t.type){case"basic":let e="",s="";if(t.username||t.password?(e=t.username||"",s=t.password||""):(this.username||this.password)&&(e=this.username||"",s=this.password||""),e||s){const t=btoa(`${e}:${s}`);d.Authorization=`Basic ${t}`}H(ae,this,Te).call(this,z(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?d[t.name]="Bearer "+e:"query"===t.in&&(n[t.name]=e)}H(ae,this,Te).call(this,z(oe,this).DEBUG,null,"apiKey applied to request");break;case"oauth2":t.accessToken&&(d.Authorization="Bearer "+t.accessToken),H(ae,this,Te).call(this,z(oe,this).DEBUG,null,"oauth2 applied to request");break;default:throw H(ae,this,Te).call(this,z(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 l=H(ae,this,he).call(this,n),u=Object.keys(l).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(l[e])}`).join("&");let c=e;u&&(c+=(c.includes("?")?"&":"?")+u);const p={...this.defaultHeaders,...H(ae,this,he).call(this,s),...d};if(!(null!==this.defaultHeaders["NTNX-Request-Id"]&&void 0!==this.defaultHeaders["NTNX-Request-Id"]||null!==s["NTNX-Request-Id"]&&void 0!==s["NTNX-Request-Id"])){let e=h();p["NTNX-Request-Id"]=e}null!=z(X,this)&&(p.Cookie=H(ae,this,he).call(this,{Cookie:z(X,this)}));var y=s.hasOwnProperty("Content-Type")?s["Content-Type"]:H(ae,this,ue).call(this,o);p["Content-Type"]=y;var v=s.hasOwnProperty("Accept")&&null!=s.Accept?s.Accept:a.join(", ");return v&&(p.Accept=v),H(ae,this,Te).call(this,z(oe,this).INFO,null,"Request URL :",t,e),H(ae,this,Te).call(this,z(oe,this).DEBUG,H(ae,this,je),"Request Headers :",p),H(ae,this,Te).call(this,z(oe,this).DEBUG,null,"Request Body :",i||""),{url:c,options:{method:t,headers:p,body:i,credentials:this.withCredentials?"include":"same-origin"}}}function Ae(e,t,n,s,i,r){H(ae,this,Te).call(this,z(oe,this).INFO,null,"Streaming response to : ",n);try{e.on("data",e=>{t.write(e)})}catch(e){H(ae,this,Te).call(this,z(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=m().parse(t.groups.filename);a=this.downloadDestination+"/"+n.name+"_"+Date.now()+n.ext,o.data={path:m().parse(a),$objectType:"Path"};let s=new S;s.name="hasError",s.value=!1;let i=[s],r=new q;r.flags=i,o.metadata=r}e.on("end",()=>{H(ae,this,Te).call(this,z(oe,this).INFO,null,"Finished streaming response"),0!==a.length?(H(ae,this,Te).call(this,z(oe,this).INFO,null,"Content-Disposition header found [",a,"] is final filename"),t.close(),w().renameSync(n,a),s({data:o,response:e})):(H(ae,this,Te).call(this,z(oe,this).ERROR,null,"Content-Disposition header not found [",n,"] is final filename"),s({data:o,response:e}))}),e.on("error",e=>{H(ae,this,Te).call(this,z(oe,this).ERROR,null,"Caught the following error :",e),error.data=H(ae,this,ye).call(this,error),i(e)})}function Ee(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")}_=de,de.instance=new de;var Pe=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=Pe),t.add(e),this.$objectType="microseg.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(M.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:Ee(Pe,this,Re).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:Ee(Pe,this,Re).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("argumentsMap","undefined or null"):new j("errorGroup","undefined or null"):new j("locale","undefined or null"):new j("code","undefined or null"):new j("severity","undefined or null"):new j("message","undefined or null")}}function Re(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 Ce=new WeakSet;class De{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="microseg.v4.error.SchemaValidationErrorMessage",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new De,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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("attributePath","undefined or null"):new j("message","undefined or null"):new j("location","undefined or null")}}function Ue(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")}De.prototype.location=void 0,De.prototype.message=void 0,De.prototype.attributePath=void 0,De.prototype.$reserved=void 0,De.prototype.$objectType=void 0,De.prototype.$unknownFields=void 0;var xe=new WeakSet;class Me{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=xe),t.add(e),this.$objectType="microseg.v4.error.SchemaValidationError",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,r,o;if(e){if(t=t||new Me,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=[],s=e.validationErrorMessages,r=0;r<s.length;r++)i=De.constructFromObject(s[r],void 0),o.push(i);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:Ue(xe,this,Je).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("validationErrorMessages","undefined or null"):new j("path","undefined or null"):new j("error","undefined or null"):new j("statusCode","undefined or null"):new j("timestamp","undefined or null")}}function Je(e,t){return e instanceof Date&&void 0!==t?t?e.toISOString().slice(0,10):e.toISOString():e}function Ne(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")}Me.prototype.timestamp=void 0,Me.prototype.statusCode=void 0,Me.prototype.error=void 0,Me.prototype.path=void 0,Me.prototype.validationErrorMessages=void 0,Me.prototype.$reserved=void 0,Me.prototype.$objectType=void 0,Me.prototype.$unknownFields=void 0;var Ge=new WeakSet;class Le{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=Ge),t.add(e),this.$objectType="microseg.v4.error.ErrorResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,r,o,a;if(e){if(t=t||new Le,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=[],s=e.error,a=s[0].hasOwnProperty("$objectType")?s[0].$objectType:typeof s[0],r=0;r<s.length;r++){if("microseg.v4.error.AppMessage"!==a)throw"Unknown list of type "+a+" in data";i=Ie.constructFromObject(s[r],void 0),o.push(i)}t.setError(o)}else{if(a=e.error.hasOwnProperty("$objectType")?e.error.$objectType:typeof e.error,"microseg.v4.error.SchemaValidationError"!==a)throw"Unknown datatype "+a+" in data";t.setError(Me.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):Ne(Ge,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):Ne(Ge,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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("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}Le.prototype.error=void 0,Le.prototype.$reserved=void 0,Le.prototype.$objectType=void 0,Le.prototype.$unknownFields=void 0;var We=new WeakSet;class qe{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="prism.v4.config.TaskReference",this.$reserved={$fv:"v4.r3"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new qe,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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("extId"===t){if(void 0===this.extId||null===this.extId)return new j("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 j("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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null")}}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")}qe.prototype.extId=void 0,qe.prototype.$reserved=void 0,qe.prototype.$objectType=void 0,qe.prototype.$unknownFields=void 0;var Be=new WeakSet;class ze 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=Be),t.add(e),this.$objectType="microseg.v4.config.CreateAddressGroupApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s;if(e){if(t=t||new ze,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(q.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(s=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,s){case"prism.v4.config.TaskReference":t.setData(qe.constructFromObject(e.data,void 0));break;case"microseg.v4.error.ErrorResponse":t.setData(Le.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+s+" 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):Ve(Be,this,Ke).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):Ve(Be,this,Ke).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("metadata","undefined or null")}}function Ke(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}ze.prototype.metadata=void 0,ze.prototype.data=void 0,ze.prototype.$reserved=void 0,ze.prototype.$objectType=void 0,ze.prototype.$unknownFields=void 0;var He=new WeakSet;class Ze{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=He),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 Ze,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 T?n=["value"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("value"===t){if(void 0===this.value||null===this.value)return new j("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 j("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 j("prefixLength","undefined or null");if(!F.validateMaximum(this.prefixLength,32))return new j("prefixLength","does not satisfy required maximum constraint: 32");if(!F.validateMinimum(this.prefixLength,0))return new j("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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null")}}Ze.prototype.value=void 0,Ze.prototype.prefixLength=32,Ze.prototype.$reserved=void 0,Ze.prototype.$objectType=void 0,Ze.prototype.$unknownFields=void 0;var Xe=new WeakSet;class Qe{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=Xe),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 Qe,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 T?n=["value"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("value"===t){if(void 0===this.value||null===this.value)return new j("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 j("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 j("prefixLength","undefined or null");if(!F.validateMaximum(this.prefixLength,128))return new j("prefixLength","does not satisfy required maximum constraint: 128");if(!F.validateMinimum(this.prefixLength,0))return new j("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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null")}}Qe.prototype.value=void 0,Qe.prototype.prefixLength=128,Qe.prototype.$reserved=void 0,Qe.prototype.$objectType=void 0,Qe.prototype.$unknownFields=void 0;var Ye=new WeakSet;class et{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=Ye),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 et,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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("tenantId"===t){if(void 0===this.tenantId||null===this.tenantId)return new j("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 j("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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null")}}et.prototype.tenantId=void 0,et.prototype.$reserved=void 0,et.prototype.$objectType=void 0,et.prototype.$unknownFields=void 0;var tt=new WeakSet;class nt extends et{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=tt),t.add(e),this.$objectType="common.v1.response.ExternalizableAbstractModel",this.$reserved={$fv:"v1.r0"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,r,o;if(e){if(t=t||new nt,et.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=[],s=e.links,r=0;r<s.length;r++)i=L.constructFromObject(s[r],void 0),o.push(i);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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("extId"===t){if(void 0===this.extId||null===this.extId)return new j("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 j("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===T.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 j("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 j("links","undefined or null");if(!F.validateMaxItems(this.links,20))return new j("links","does not satisfy required maxItems constraint: 20")}return new j(t,"no such property exists")}}nt.prototype.extId=void 0,nt.prototype.links=void 0,et.prototype.tenantId=void 0;var st=new WeakSet;class it{constructor(e,t){var n,s;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(n=this,s=st),s.add(n),this.startIp=e,this.endIp=t,this.$objectType="microseg.v4.config.IPv4Range",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new it,e.hasOwnProperty("startIp")&&null!==e.startIp&&void 0!==e.startIp&&t.setStartIp(e.startIp),e.hasOwnProperty("endIp")&&null!==e.endIp&&void 0!==e.endIp&&t.setEndIp(e.endIp),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())}getStartIp(){return this.startIp}setStartIp(e){this.startIp=e}getEndIp(){return this.endIp}setEndIp(e){this.endIp=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getStartIp()&&null!==this.getStartIp()?{startIp:this.getStartIp()}:{},...void 0!==this.getEndIp()&&null!==this.getEndIp()?{endIp:this.getEndIp()}:{},$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 T?n=["startIp","endIp"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("startIp"===t){if(void 0===this.startIp||null===this.startIp)return new j("startIp","undefined or null");if(!F.validatePattern(this.startIp,/^(?:(?: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 j("startIp","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("endIp"===t){if(void 0===this.endIp||null===this.endIp)return new j("endIp","undefined or null");if(!F.validatePattern(this.endIp,/^(?:(?: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 j("endIp","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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null")}}it.prototype.startIp=void 0,it.prototype.endIp=void 0,it.prototype.$reserved=void 0,it.prototype.$objectType=void 0,it.prototype.$unknownFields=void 0;var rt=new WeakSet;class ot{constructor(e,t){var n,s;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(n=this,s=rt),s.add(n),this.startIp=e,this.endIp=t,this.$objectType="microseg.v4.config.IPv6Range",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new ot,e.hasOwnProperty("startIp")&&null!==e.startIp&&void 0!==e.startIp&&t.setStartIp(e.startIp),e.hasOwnProperty("endIp")&&null!==e.endIp&&void 0!==e.endIp&&t.setEndIp(e.endIp),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())}getStartIp(){return this.startIp}setStartIp(e){this.startIp=e}getEndIp(){return this.endIp}setEndIp(e){this.endIp=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getStartIp()&&null!==this.getStartIp()?{startIp:this.getStartIp()}:{},...void 0!==this.getEndIp()&&null!==this.getEndIp()?{endIp:this.getEndIp()}:{},$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 T?n=["startIp","endIp"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("startIp"===t){if(void 0===this.startIp||null===this.startIp)return new j("startIp","undefined or null");if(!F.validatePattern(this.startIp,/^(?:(?:(?:[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 j("startIp","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("endIp"===t){if(void 0===this.endIp||null===this.endIp)return new j("endIp","undefined or null");if(!F.validatePattern(this.endIp,/^(?:(?:(?:[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 j("endIp","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})$/")}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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null")}}function at(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.startIp=void 0,ot.prototype.endIp=void 0,ot.prototype.$reserved=void 0,ot.prototype.$objectType=void 0,ot.prototype.$unknownFields=void 0;var dt=new WeakSet;class lt extends nt{constructor(e){var t,n;super(),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.name=e,this.$objectType="microseg.v4.config.AddressGroup",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,r,o;if(e){if(t=t||new lt,nt.constructFromObject(e,t,!0),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("ipv4Addresses")&&null!==e.ipv4Addresses&&void 0!==e.ipv4Addresses){for(o=[],s=e.ipv4Addresses,r=0;r<s.length;r++)i=Ze.constructFromObject(s[r],void 0),o.push(i);t.setIpv4Addresses(o)}if(e.hasOwnProperty("ipRanges")&&null!==e.ipRanges&&void 0!==e.ipRanges){for(o=[],s=e.ipRanges,r=0;r<s.length;r++)i=it.constructFromObject(s[r],void 0),o.push(i);t.setIpRanges(o)}if(e.hasOwnProperty("ipv6Addresses")&&null!==e.ipv6Addresses&&void 0!==e.ipv6Addresses){for(o=[],s=e.ipv6Addresses,r=0;r<s.length;r++)i=Qe.constructFromObject(s[r],void 0),o.push(i);t.setIpv6Addresses(o)}if(e.hasOwnProperty("ipv6Ranges")&&null!==e.ipv6Ranges&&void 0!==e.ipv6Ranges){for(o=[],s=e.ipv6Ranges,r=0;r<s.length;r++)i=ot.constructFromObject(s[r],void 0),o.push(i);t.setIpv6Ranges(o)}if(e.hasOwnProperty("policyReferences")&&null!==e.policyReferences&&void 0!==e.policyReferences){for(o=[],s=e.policyReferences,r=0;r<s.length;r++)o.push(s[r]);t.setPolicyReferences(o)}if(e.hasOwnProperty("createdBy")&&null!==e.createdBy&&void 0!==e.createdBy&&t.setCreatedBy(e.createdBy),e.hasOwnProperty("creationTime")&&null!==e.creationTime&&void 0!==e.creationTime&&t.setCreationTime(e.creationTime),e.hasOwnProperty("lastUpdateTime")&&null!==e.lastUpdateTime&&void 0!==e.lastUpdateTime&&t.setLastUpdateTime(e.lastUpdateTime),!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}getDescription(){return this.description}setDescription(e){this.description=e}getIpv4Addresses(){return this.ipv4Addresses}setIpv4Addresses(e){this.ipv4Addresses=e}getIpRanges(){return this.ipRanges}setIpRanges(e){this.ipRanges=e}getIpv6Addresses(){return this.ipv6Addresses}setIpv6Addresses(e){this.ipv6Addresses=e}getIpv6Ranges(){return this.ipv6Ranges}setIpv6Ranges(e){this.ipv6Ranges=e}getPolicyReferences(){return this.policyReferences}setPolicyReferences(e){this.policyReferences=e}getCreatedBy(){return this.createdBy}setCreatedBy(e){this.createdBy=e}getCreationTime(){return this.creationTime}setCreationTime(e){this.creationTime=e}getLastUpdateTime(){return this.lastUpdateTime}setLastUpdateTime(e){this.lastUpdateTime=e}toJson(e){return!1===e?{...void 0!==this.getName()&&null!==this.getName()?{name:this.getName()}:{},...void 0!==this.getDescription()&&null!==this.getDescription()?{description:this.getDescription()}:{},...void 0!==this.getIpv4Addresses()&&null!==this.getIpv4Addresses()?{ipv4Addresses:this.getIpv4Addresses().map(e=>e.toJson(!1))}:{},...void 0!==this.getIpRanges()&&null!==this.getIpRanges()?{ipRanges:this.getIpRanges().map(e=>e.toJson(!1))}:{},...void 0!==this.getIpv6Addresses()&&null!==this.getIpv6Addresses()?{ipv6Addresses:this.getIpv6Addresses().map(e=>e.toJson(!1))}:{},...void 0!==this.getIpv6Ranges()&&null!==this.getIpv6Ranges()?{ipv6Ranges:this.getIpv6Ranges().map(e=>e.toJson(!1))}:{},...void 0!==this.getPolicyReferences()&&null!==this.getPolicyReferences()?{policyReferences:this.getPolicyReferences()}:{},...void 0!==this.getCreatedBy()&&null!==this.getCreatedBy()?{createdBy:this.getCreatedBy()}:{},...void 0!==this.getCreationTime()&&null!==this.getCreationTime()?{creationTime:at(dt,this,ut).call(this,this.getCreationTime(),!1)}:{},...void 0!==this.getLastUpdateTime()&&null!==this.getLastUpdateTime()?{lastUpdateTime:at(dt,this,ut).call(this,this.getLastUpdateTime(),!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.getName()&&null!==this.getName()?{name:this.getName()}:{},...void 0!==this.getDescription()&&null!==this.getDescription()?{description:this.getDescription()}:{},...void 0!==this.getIpv4Addresses()&&null!==this.getIpv4Addresses()?{ipv4Addresses:this.getIpv4Addresses().map(e=>e.toJson(!1))}:{},...void 0!==this.getIpRanges()&&null!==this.getIpRanges()?{ipRanges:this.getIpRanges().map(e=>e.toJson(!1))}:{},...void 0!==this.getIpv6Addresses()&&null!==this.getIpv6Addresses()?{ipv6Addresses:this.getIpv6Addresses().map(e=>e.toJson(!1))}:{},...void 0!==this.getIpv6Ranges()&&null!==this.getIpv6Ranges()?{ipv6Ranges:this.getIpv6Ranges().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 T?n=["name"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("name"===t){if(void 0===this.name||null===this.name)return new j("name","undefined or null");if(!F.validateMaxLength(this.name,64))return new j("name","does not satisfy required maxLength constraint: 64");if(!F.validatePattern(this.name,/^\\s*[a-zA-Z0-9]([a-zA-Z0-9-_ \\\\.]*[a-zA-Z0-9])?\\s*$/))return new j("name","does not satisfy required pattern: /^\\s*[a-zA-Z0-9]([a-zA-Z0-9-_ \\\\.]*[a-zA-Z0-9])?\\s*$/")}if("description"===t){if(void 0===this.description||null===this.description)return new j("description","undefined or null");if(!F.validateMaxLength(this.description,1e3))return new j("description","does not satisfy required maxLength constraint: 1000");if(!F.validatePattern(this.description,/^\\s*([a-zA-Z0-9 _:.()-]*)\\s*$/))return new j("description","does not satisfy required pattern: /^\\s*([a-zA-Z0-9 _:.()-]*)\\s*$/")}if("ipv4Addresses"===t){if(void 0===this.ipv4Addresses||null===this.ipv4Addresses)return new j("ipv4Addresses","undefined or null");if(!F.validateMaxItems(this.ipv4Addresses,4e3))return new j("ipv4Addresses","does not satisfy required maxItems constraint: 4000");if(!F.validateMinItems(this.ipv4Addresses,1))return new j("ipv4Addresses","does not satisfy required minItems constraint: 1")}if("ipRanges"===t){if(void 0===this.ipRanges||null===this.ipRanges)return new j("ipRanges","undefined or null");if(!F.validateMaxItems(this.ipRanges,4e3))return new j("ipRanges","does not satisfy required maxItems constraint: 4000");if(!F.validateMinItems(this.ipRanges,1))return new j("ipRanges","does not satisfy required minItems constraint: 1")}if("ipv6Addresses"===t){if(void 0===this.ipv6Addresses||null===this.ipv6Addresses)return new j("ipv6Addresses","undefined or null");if(!F.validateMaxItems(this.ipv6Addresses,4e3))return new j("ipv6Addresses","does not satisfy required maxItems constraint: 4000");if(!F.validateMinItems(this.ipv6Addresses,1))return new j("ipv6Addresses","does not satisfy required minItems constraint: 1")}if("ipv6Ranges"===t){if(void 0===this.ipv6Ranges||null===this.ipv6Ranges)return new j("ipv6Ranges","undefined or null");if(!F.validateMaxItems(this.ipv6Ranges,4e3))return new j("ipv6Ranges","does not satisfy required maxItems constraint: 4000");if(!F.validateMinItems(this.ipv6Ranges,1))return new j("ipv6Ranges","does not satisfy required minItems constraint: 1")}if("policyReferences"===t){if(void 0===this.policyReferences||null===this.policyReferences)return new j("policyReferences","undefined or null");if(!F.validateMaxItems(this.policyReferences,1e3))return new j("policyReferences","does not satisfy required maxItems constraint: 1000");if(!F.validateMinItems(this.policyReferences,1))return new j("policyReferences","does not satisfy required minItems constraint: 1")}if("createdBy"===t){if(void 0===this.createdBy||null===this.createdBy)return new j("createdBy","undefined or null");if(!F.validatePattern(this.createdBy,/^[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 j("createdBy","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"creationTime"!==t||void 0!==this.creationTime&&null!==this.creationTime?"lastUpdateTime"!==t||void 0!==this.lastUpdateTime&&null!==this.lastUpdateTime?new j(t,"no such property exists"):new j("lastUpdateTime","undefined or null"):new j("creationTime","undefined or null")}}function ut(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")}lt.prototype.name=void 0,lt.prototype.description=void 0,lt.prototype.ipv4Addresses=void 0,lt.prototype.ipRanges=void 0,lt.prototype.ipv6Addresses=void 0,lt.prototype.ipv6Ranges=void 0,lt.prototype.policyReferences=void 0,lt.prototype.createdBy=void 0,lt.prototype.creationTime=void 0,lt.prototype.lastUpdateTime=void 0,nt.prototype.extId=void 0,nt.prototype.links=void 0,et.prototype.tenantId=void 0;var ht=new WeakSet;class pt 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=ht),t.add(e),this.$objectType="microseg.v4.config.ListAddressGroupsApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,o,a,d;if(e){if(t=t||new pt,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(q.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=[],s=e.data,d=s[0].hasOwnProperty("$objectType")?s[0].$objectType:typeof s[0],o=0;o<s.length;o++){if("microseg.v4.config.AddressGroup"!==d)throw"Unknown list of type "+d+" in data";i=lt.constructFromObject(s[o],void 0),a.push(i)}t.setData(a)}else{if(d=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,"microseg.v4.error.ErrorResponse"!==d)throw"Unknown datatype "+d+" in data";t.setData(Le.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):ct(ht,this,yt).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):ct(ht,this,yt).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("metadata","undefined or null")}}function yt(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 vt(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.metadata=void 0,pt.prototype.data=void 0,pt.prototype.$reserved=void 0,pt.prototype.$objectType=void 0,pt.prototype.$unknownFields=void 0;var gt=new WeakSet;class ft 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=gt),t.add(e),this.$objectType="microseg.v4.config.DeleteAddressGroupApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s;if(e){if(t=t||new ft,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(q.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(s=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,s){case"prism.v4.config.TaskReference":t.setData(qe.constructFromObject(e.data,void 0));break;case"microseg.v4.error.ErrorResponse":t.setData(Le.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+s+" 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):vt(gt,this,wt).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):vt(gt,this,wt).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("metadata","undefined or null")}}function wt(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 $t(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")}ft.prototype.metadata=void 0,ft.prototype.data=void 0,ft.prototype.$reserved=void 0,ft.prototype.$objectType=void 0,ft.prototype.$unknownFields=void 0;var mt=new WeakSet;class bt 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=mt),t.add(e),this.$objectType="microseg.v4.config.GetAddressGroupApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s;if(e){if(t=t||new bt,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(q.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(s=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,s){case"microseg.v4.config.AddressGroup":t.setData(lt.constructFromObject(e.data,void 0));break;case"microseg.v4.error.ErrorResponse":t.setData(Le.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+s+" 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):$t(mt,this,kt).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):$t(mt,this,kt).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("metadata","undefined or null")}}function kt(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 Tt(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")}bt.prototype.metadata=void 0,bt.prototype.data=void 0,bt.prototype.$reserved=void 0,bt.prototype.$objectType=void 0,bt.prototype.$unknownFields=void 0;var Ft=new WeakSet;class jt 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=Ft),t.add(e),this.$objectType="microseg.v4.config.UpdateAddressGroupApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s;if(e){if(t=t||new jt,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(q.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(s=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,s){case"prism.v4.config.TaskReference":t.setData(qe.constructFromObject(e.data,void 0));break;case"microseg.v4.error.ErrorResponse":t.setData(Le.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+s+" 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):Tt(Ft,this,Ot).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):Tt(Ft,this,Ot).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("metadata","undefined or null")}}function Ot(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 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")}jt.prototype.metadata=void 0,jt.prototype.data=void 0,jt.prototype.$reserved=void 0,jt.prototype.$objectType=void 0,jt.prototype.$unknownFields=void 0;var At=new WeakSet;class Et 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=At),t.add(e),this.$objectType="microseg.v4.config.DeleteDsCategoryMappingApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s;if(e){if(t=t||new Et,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(q.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(s=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,s){case"prism.v4.config.TaskReference":t.setData(qe.constructFromObject(e.data,void 0));break;case"microseg.v4.error.ErrorResponse":t.setData(Le.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+s+" 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):St(At,this,Pt).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(At,this,Pt).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("metadata","undefined or null")}}function Pt(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 It(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")}Et.prototype.metadata=void 0,Et.prototype.data=void 0,Et.prototype.$reserved=void 0,Et.prototype.$objectType=void 0,Et.prototype.$unknownFields=void 0;var Rt=new WeakSet;class Ct 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="microseg.v4.config.CreateDirectoryServerConfigApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s;if(e){if(t=t||new Ct,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(q.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(s=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,s){case"prism.v4.config.TaskReference":t.setData(qe.constructFromObject(e.data,void 0));break;case"microseg.v4.error.ErrorResponse":t.setData(Le.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+s+" 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):It(Rt,this,Dt).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):It(Rt,this,Dt).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("metadata","undefined or null")}}function Dt(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 Ut(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.metadata=void 0,Ct.prototype.data=void 0,Ct.prototype.$reserved=void 0,Ct.prototype.$objectType=void 0,Ct.prototype.$unknownFields=void 0;var xt=new WeakSet;class Mt 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=xt),t.add(e),this.$objectType="microseg.v4.config.UpdateDsCategoryMappingApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s;if(e){if(t=t||new Mt,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(q.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(s=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,s){case"prism.v4.config.TaskReference":t.setData(qe.constructFromObject(e.data,void 0));break;case"microseg.v4.error.ErrorResponse":t.setData(Le.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+s+" 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):Ut(xt,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):Ut(xt,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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("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}Mt.prototype.metadata=void 0,Mt.prototype.data=void 0,Mt.prototype.$reserved=void 0,Mt.prototype.$objectType=void 0,Mt.prototype.$unknownFields=void 0;const Nt={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",USABLE:"USABLE",DELETED:"DELETED",DIRECTORY_NOT_CONFIGURED:"DIRECTORY_NOT_CONFIGURED",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(Nt).find(t=>Nt[t]===e);return null==t?Nt.$UNKNOWN:Nt[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case Nt.$UNKNOWN:case Nt.$REDACTED:case Nt.USABLE:case Nt.DELETED:case Nt.DIRECTORY_NOT_CONFIGURED:return;default:throw new Error("Invalid : must be AdStatus.{ $UNKNOWN|$REDACTED|USABLE|DELETED|DIRECTORY_NOT_CONFIGURED }")}}};Object.freeze(Nt);const Gt=Nt;var Lt=new WeakSet;class _t{constructor(e,t){var n,s;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(n=this,s=Lt),s.add(n),this.directoryServiceReference=e,this.objectIdentifier=t,this.$objectType="microseg.v4.config.AdInfo",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new _t,e.hasOwnProperty("directoryServiceReference")&&null!==e.directoryServiceReference&&void 0!==e.directoryServiceReference&&t.setDirectoryServiceReference(e.directoryServiceReference),e.hasOwnProperty("objectIdentifier")&&null!==e.objectIdentifier&&void 0!==e.objectIdentifier&&t.setObjectIdentifier(e.objectIdentifier),e.hasOwnProperty("objectPath")&&null!==e.objectPath&&void 0!==e.objectPath&&t.setObjectPath(e.objectPath),e.hasOwnProperty("status")&&null!==e.status&&void 0!==e.status&&t.setStatus(Gt.constructFromObject(e.status)),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())}getDirectoryServiceReference(){return this.directoryServiceReference}setDirectoryServiceReference(e){this.directoryServiceReference=e}getObjectIdentifier(){return this.objectIdentifier}setObjectIdentifier(e){this.objectIdentifier=e}getObjectPath(){return this.objectPath}setObjectPath(e){this.objectPath=e}getStatus(){return this.status}setStatus(e){this.status=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getDirectoryServiceReference()&&null!==this.getDirectoryServiceReference()?{directoryServiceReference:this.getDirectoryServiceReference()}:{},...void 0!==this.getObjectIdentifier()&&null!==this.getObjectIdentifier()?{objectIdentifier:this.getObjectIdentifier()}:{},...void 0!==this.getObjectPath()&&null!==this.getObjectPath()?{objectPath:this.getObjectPath()}:{},...void 0!==this.getStatus()&&null!==this.getStatus()?{status:this.getStatus()}:{},$reserved:this.get$Reserved(),$objectType:this.get$ObjectType(),...void 0!==this.get$UnknownFields()&&null!==this.get$UnknownFields()?this.get$UnknownFields():{},$unknownFields:{}}:{...void 0!==this.getDirectoryServiceReference()&&null!==this.getDirectoryServiceReference()?{directoryServiceReference:this.getDirectoryServiceReference()}:{},...void 0!==this.getObjectIdentifier()&&null!==this.getObjectIdentifier()?{objectIdentifier:this.getObjectIdentifier()}:{},...void 0!==this.getStatus()&&null!==this.getStatus()?{status:this.getStatus()}:{},$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 T?n=["directoryServiceReference","objectIdentifier"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("directoryServiceReference"===t){if(void 0===this.directoryServiceReference||null===this.directoryServiceReference)return new j("directoryServiceReference","undefined or null");if(!F.validatePattern(this.directoryServiceReference,/^[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 j("directoryServiceReference","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("objectIdentifier"===t){if(void 0===this.objectIdentifier||null===this.objectIdentifier)return new j("objectIdentifier","undefined or null");if(!F.validatePattern(this.objectIdentifier,/^[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 j("objectIdentifier","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("objectPath"===t){if(void 0===this.objectPath||null===this.objectPath)return new j("objectPath","undefined or null");if(!F.validateMaxLength(this.objectPath,1e3))return new j("objectPath","does not satisfy required maxLength constraint: 1000")}return"status"!==t||void 0!==this.status&&null!==this.status?"$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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("status","undefined or null")}}_t.prototype.directoryServiceReference=void 0,_t.prototype.objectIdentifier=void 0,_t.prototype.objectPath=void 0,_t.prototype.status=void 0,_t.prototype.$reserved=void 0,_t.prototype.$objectType=void 0,_t.prototype.$unknownFields=void 0;var Wt=new WeakSet;class qt extends nt{constructor(e,t,n,s){var i,r;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(i=this,r=Wt),r.add(i),this.name=e,this.categoryName=t,this.categoryValue=n,this.adInfo=s,this.$objectType="microseg.v4.config.CategoryMapping",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new qt,nt.constructFromObject(e,t,!0),e.hasOwnProperty("name")&&null!==e.name&&void 0!==e.name&&t.setName(e.name),e.hasOwnProperty("categoryName")&&null!==e.categoryName&&void 0!==e.categoryName&&t.setCategoryName(e.categoryName),e.hasOwnProperty("categoryValue")&&null!==e.categoryValue&&void 0!==e.categoryValue&&t.setCategoryValue(e.categoryValue),e.hasOwnProperty("adInfo")&&null!==e.adInfo&&void 0!==e.adInfo&&t.setAdInfo(_t.constructFromObject(e.adInfo)),!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}getCategoryName(){return this.categoryName}setCategoryName(e){this.categoryName=e}getCategoryValue(){return this.categoryValue}setCategoryValue(e){this.categoryValue=e}getAdInfo(){return this.adInfo}setAdInfo(e){this.adInfo=e}toJson(e){return!1===e?{...void 0!==this.getName()&&null!==this.getName()?{name:this.getName()}:{},...void 0!==this.getCategoryName()&&null!==this.getCategoryName()?{categoryName:this.getCategoryName()}:{},...void 0!==this.getCategoryValue()&&null!==this.getCategoryValue()?{categoryValue:this.getCategoryValue()}:{},...void 0!==this.getAdInfo()&&null!==this.getAdInfo()?{adInfo:this.getAdInfo().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.getName()&&null!==this.getName()?{name:this.getName()}:{},...void 0!==this.getCategoryName()&&null!==this.getCategoryName()?{categoryName:this.getCategoryName()}:{},...void 0!==this.getCategoryValue()&&null!==this.getCategoryValue()?{categoryValue:this.getCategoryValue()}:{},...void 0!==this.getAdInfo()&&null!==this.getAdInfo()?{adInfo:this.getAdInfo().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 T?n=["name","categoryName","categoryValue","adInfo"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("name"===t){if(void 0===this.name||null===this.name)return new j("name","undefined or null");if(!F.validateMaxLength(this.name,1e3))return new j("name","does not satisfy required maxLength constraint: 1000")}if("categoryName"===t){if(void 0===this.categoryName||null===this.categoryName)return new j("categoryName","undefined or null");if(!F.validateMaxLength(this.categoryName,200))return new j("categoryName","does not satisfy required maxLength constraint: 200")}if("categoryValue"===t){if(void 0===this.categoryValue||null===this.categoryValue)return new j("categoryValue","undefined or null");if(!F.validateMaxLength(this.categoryValue,1e3))return new j("categoryValue","does not satisfy required maxLength constraint: 1000")}return"adInfo"!==t||void 0!==this.adInfo&&null!==this.adInfo?new j(t,"no such property exists"):new j("adInfo","undefined or null")}}function Vt(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")}qt.prototype.name=void 0,qt.prototype.categoryName=void 0,qt.prototype.categoryValue=void 0,qt.prototype.adInfo=void 0,nt.prototype.extId=void 0,nt.prototype.links=void 0,et.prototype.tenantId=void 0;var Bt=new WeakSet;class zt 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=Bt),t.add(e),this.$objectType="microseg.v4.config.ListDsCategoryMappingsApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,o,a,d;if(e){if(t=t||new zt,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(q.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=[],s=e.data,d=s[0].hasOwnProperty("$objectType")?s[0].$objectType:typeof s[0],o=0;o<s.length;o++){if("microseg.v4.config.CategoryMapping"!==d)throw"Unknown list of type "+d+" in data";i=qt.constructFromObject(s[o],void 0),a.push(i)}t.setData(a)}else{if(d=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,"microseg.v4.error.ErrorResponse"!==d)throw"Unknown datatype "+d+" in data";t.setData(Le.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):Vt(Bt,this,Kt).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):Vt(Bt,this,Kt).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("metadata","undefined or null")}}function Kt(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 Ht(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")}zt.prototype.metadata=void 0,zt.prototype.data=void 0,zt.prototype.$reserved=void 0,zt.prototype.$objectType=void 0,zt.prototype.$unknownFields=void 0;var Zt=new WeakSet;class Xt 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=Zt),t.add(e),this.$objectType="microseg.v4.config.DeleteDirectoryServerConfigApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s;if(e){if(t=t||new Xt,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(q.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(s=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,s){case"prism.v4.config.TaskReference":t.setData(qe.constructFromObject(e.data,void 0));break;case"microseg.v4.error.ErrorResponse":t.setData(Le.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+s+" 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):Ht(Zt,this,Qt).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):Ht(Zt,this,Qt).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("metadata","undefined or null")}}function Qt(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}Xt.prototype.metadata=void 0,Xt.prototype.data=void 0,Xt.prototype.$reserved=void 0,Xt.prototype.$objectType=void 0,Xt.prototype.$unknownFields=void 0;var Yt=new WeakSet;class en{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=Yt),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 en,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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("value"===t){if(void 0===this.value||null===this.value)return new j("value","undefined or null");if(!F.validatePattern(this.value,/^([a-zA-Z0-9À-ÿ]+(?:-[a-zA-Z0-9À-ÿ]+)*\\.)+[a-zA-ZÀ-ÿ]{2,63}$/))return new j("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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null")}}en.prototype.value=void 0,en.prototype.$reserved=void 0,en.prototype.$objectType=void 0,en.prototype.$unknownFields=void 0;var tn=new WeakSet;class nn{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=tn),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 nn,e.hasOwnProperty("ipv4")&&null!==e.ipv4&&void 0!==e.ipv4&&t.setIpv4(Ze.constructFromObject(e.ipv4)),e.hasOwnProperty("ipv6")&&null!==e.ipv6&&void 0!==e.ipv6&&t.setIpv6(Qe.constructFromObject(e.ipv6)),e.hasOwnProperty("fqdn")&&null!==e.fqdn&&void 0!==e.fqdn&&t.setFqdn(en.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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("fqdn","undefined or null"):new j("ipv6","undefined or null"):new j("ipv4","undefined or null")}}nn.prototype.ipv4=void 0,nn.prototype.ipv6=void 0,nn.prototype.fqdn=void 0,nn.prototype.$reserved=void 0,nn.prototype.$objectType=void 0,nn.prototype.$unknownFields=void 0;const sn={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",VM:"VM",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(sn).find(t=>sn[t]===e);return null==t?sn.$UNKNOWN:sn[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case sn.$UNKNOWN:case sn.$REDACTED:case sn.VM:return;default:throw new Error("Invalid : must be MatchEntity.{ $UNKNOWN|$REDACTED|VM }")}}};Object.freeze(sn);const rn=sn,on={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",NAME:"NAME",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.NAME:return;default:throw new Error("Invalid : must be MatchField.{ $UNKNOWN|$REDACTED|NAME }")}}};Object.freeze(on);const an=on,dn={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",CONTAINS:"CONTAINS",ALL:"ALL",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(dn).find(t=>dn[t]===e);return null==t?dn.$UNKNOWN:dn[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case dn.$UNKNOWN:case dn.$REDACTED:case dn.CONTAINS:case dn.ALL:return;default:throw new Error("Invalid : must be MatchType.{ $UNKNOWN|$REDACTED|CONTAINS|ALL }")}}};Object.freeze(dn);const ln=dn;var un=new WeakSet;class cn{constructor(e,t,n){var s,i;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(s=this,i=un),i.add(s),this.matchEntity=e,this.matchField=t,this.matchType=n,this.$objectType="microseg.v4.config.MatchingCriteria",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new cn,e.hasOwnProperty("matchEntity")&&null!==e.matchEntity&&void 0!==e.matchEntity&&t.setMatchEntity(rn.constructFromObject(e.matchEntity)),e.hasOwnProperty("matchField")&&null!==e.matchField&&void 0!==e.matchField&&t.setMatchField(an.constructFromObject(e.matchField)),e.hasOwnProperty("matchType")&&null!==e.matchType&&void 0!==e.matchType&&t.setMatchType(ln.constructFromObject(e.matchType)),e.hasOwnProperty("criteria")&&null!==e.criteria&&void 0!==e.criteria&&t.setCriteria(e.criteria),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())}getMatchEntity(){return this.matchEntity}setMatchEntity(e){this.matchEntity=e}getMatchField(){return this.matchField}setMatchField(e){this.matchField=e}getMatchType(){return this.matchType}setMatchType(e){this.matchType=e}getCriteria(){return this.criteria}setCriteria(e){this.criteria=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getMatchEntity()&&null!==this.getMatchEntity()?{matchEntity:this.getMatchEntity()}:{},...void 0!==this.getMatchField()&&null!==this.getMatchField()?{matchField:this.getMatchField()}:{},...void 0!==this.getMatchType()&&null!==this.getMatchType()?{matchType:this.getMatchType()}:{},...void 0!==this.getCriteria()&&null!==this.getCriteria()?{criteria:this.getCriteria()}:{},$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 T?n=["matchEntity","matchField","matchType"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("matchEntity"===t&&(void 0===this.matchEntity||null===this.matchEntity))return new j("matchEntity","undefined or null");if("matchField"===t&&(void 0===this.matchField||null===this.matchField))return new j("matchField","undefined or null");if("matchType"===t&&(void 0===this.matchType||null===this.matchType))return new j("matchType","undefined or null");if("criteria"===t){if(void 0===this.criteria||null===this.criteria)return new j("criteria","undefined or null");if(!F.validateMaxLength(this.criteria,200))return new j("criteria","does not satisfy required maxLength constraint: 200")}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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null")}}cn.prototype.matchEntity=void 0,cn.prototype.matchField=void 0,cn.prototype.matchType=void 0,cn.prototype.criteria=void 0,cn.prototype.$reserved=void 0,cn.prototype.$objectType=void 0,cn.prototype.$unknownFields=void 0;var hn=new WeakSet;class pn extends nt{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="microseg.v4.config.DirectoryServerConfig",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,r,o;if(e){if(t=t||new pn,nt.constructFromObject(e,t,!0),e.hasOwnProperty("isDefaultCategoryEnabled")&&null!==e.isDefaultCategoryEnabled&&void 0!==e.isDefaultCategoryEnabled&&t.setIsDefaultCategoryEnabled(e.isDefaultCategoryEnabled),e.hasOwnProperty("shouldKeepDefaultCategoryOnLogin")&&null!==e.shouldKeepDefaultCategoryOnLogin&&void 0!==e.shouldKeepDefaultCategoryOnLogin&&t.setShouldKeepDefaultCategoryOnLogin(e.shouldKeepDefaultCategoryOnLogin),e.hasOwnProperty("matchingCriterias")&&null!==e.matchingCriterias&&void 0!==e.matchingCriterias){for(o=[],s=e.matchingCriterias,r=0;r<s.length;r++)i=cn.constructFromObject(s[r],void 0),o.push(i);t.setMatchingCriterias(o)}if(e.hasOwnProperty("directoryServiceReference")&&null!==e.directoryServiceReference&&void 0!==e.directoryServiceReference&&t.setDirectoryServiceReference(e.directoryServiceReference),e.hasOwnProperty("domainControllers")&&null!==e.domainControllers&&void 0!==e.domainControllers){for(o=[],s=e.domainControllers,r=0;r<s.length;r++)i=nn.constructFromObject(s[r],void 0),o.push(i);t.setDomainControllers(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())}getIsDefaultCategoryEnabled(){return this.isDefaultCategoryEnabled}setIsDefaultCategoryEnabled(e){this.isDefaultCategoryEnabled=e}getShouldKeepDefaultCategoryOnLogin(){return this.shouldKeepDefaultCategoryOnLogin}setShouldKeepDefaultCategoryOnLogin(e){this.shouldKeepDefaultCategoryOnLogin=e}getMatchingCriterias(){return this.matchingCriterias}setMatchingCriterias(e){this.matchingCriterias=e}getDirectoryServiceReference(){return this.directoryServiceReference}setDirectoryServiceReference(e){this.directoryServiceReference=e}getDomainControllers(){return this.domainControllers}setDomainControllers(e){this.domainControllers=e}toJson(e){return!1===e?{...void 0!==this.getIsDefaultCategoryEnabled()&&null!==this.getIsDefaultCategoryEnabled()?{isDefaultCategoryEnabled:this.getIsDefaultCategoryEnabled()}:{},...void 0!==this.getShouldKeepDefaultCategoryOnLogin()&&null!==this.getShouldKeepDefaultCategoryOnLogin()?{shouldKeepDefaultCategoryOnLogin:this.getShouldKeepDefaultCategoryOnLogin()}:{},...void 0!==this.getMatchingCriterias()&&null!==this.getMatchingCriterias()?{matchingCriterias:this.getMatchingCriterias().map(e=>e.toJson(!1))}:{},...void 0!==this.getDirectoryServiceReference()&&null!==this.getDirectoryServiceReference()?{directoryServiceReference:this.getDirectoryServiceReference()}:{},...void 0!==this.getDomainControllers()&&null!==this.getDomainControllers()?{domainControllers:this.getDomainControllers().map(e=>e.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.getIsDefaultCategoryEnabled()&&null!==this.getIsDefaultCategoryEnabled()?{isDefaultCategoryEnabled:this.getIsDefaultCategoryEnabled()}:{},...void 0!==this.getShouldKeepDefaultCategoryOnLogin()&&null!==this.getShouldKeepDefaultCategoryOnLogin()?{shouldKeepDefaultCategoryOnLogin:this.getShouldKeepDefaultCategoryOnLogin()}:{},...void 0!==this.getMatchingCriterias()&&null!==this.getMatchingCriterias()?{matchingCriterias:this.getMatchingCriterias().map(e=>e.toJson(!1))}:{},...void 0!==this.getDirectoryServiceReference()&&null!==this.getDirectoryServiceReference()?{directoryServiceReference:this.getDirectoryServiceReference()}:{},...void 0!==this.getDomainControllers()&&null!==this.getDomainControllers()?{domainControllers:this.getDomainControllers().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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("isDefaultCategoryEnabled"===t&&(void 0===this.isDefaultCategoryEnabled||null===this.isDefaultCategoryEnabled))return new j("isDefaultCategoryEnabled","undefined or null");if("shouldKeepDefaultCategoryOnLogin"===t&&(void 0===this.shouldKeepDefaultCategoryOnLogin||null===this.shouldKeepDefaultCategoryOnLogin))return new j("shouldKeepDefaultCategoryOnLogin","undefined or null");if("matchingCriterias"===t){if(void 0===this.matchingCriterias||null===this.matchingCriterias)return new j("matchingCriterias","undefined or null");if(!F.validateMaxItems(this.matchingCriterias,100))return new j("matchingCriterias","does not satisfy required maxItems constraint: 100");if(!F.validateMinItems(this.matchingCriterias,1))return new j("matchingCriterias","does not satisfy required minItems constraint: 1")}if("directoryServiceReference"===t){if(void 0===this.directoryServiceReference||null===this.directoryServiceReference)return new j("directoryServiceReference","undefined or null");if(!F.validatePattern(this.directoryServiceReference,/^[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 j("directoryServiceReference","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("domainControllers"===t){if(void 0===this.domainControllers||null===this.domainControllers)return new j("domainControllers","undefined or null");if(!F.validateMaxItems(this.domainControllers,100))return new j("domainControllers","does not satisfy required maxItems constraint: 100");if(!F.validateMinItems(this.domainControllers,1))return new j("domainControllers","does not satisfy required minItems constraint: 1")}return new j(t,"no such property exists")}}function yn(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.isDefaultCategoryEnabled=void 0,pn.prototype.shouldKeepDefaultCategoryOnLogin=void 0,pn.prototype.matchingCriterias=void 0,pn.prototype.directoryServiceReference=void 0,pn.prototype.domainControllers=void 0,nt.prototype.extId=void 0,nt.prototype.links=void 0,et.prototype.tenantId=void 0;var vn=new WeakSet;class gn 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="microseg.v4.config.GetDsCategoryMappingApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s;if(e){if(t=t||new gn,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(q.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(s=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,s){case"microseg.v4.config.CategoryMapping":t.setData(qt.constructFromObject(e.data,void 0));break;case"microseg.v4.error.ErrorResponse":t.setData(Le.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+s+" 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):yn(vn,this,fn).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):yn(vn,this,fn).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("metadata","undefined or null")}}function fn(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 wn(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")}gn.prototype.metadata=void 0,gn.prototype.data=void 0,gn.prototype.$reserved=void 0,gn.prototype.$objectType=void 0,gn.prototype.$unknownFields=void 0;var $n=new WeakSet;class mn 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=$n),t.add(e),this.$objectType="microseg.v4.config.GetDirectoryServerConfigApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s;if(e){if(t=t||new mn,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(q.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(s=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,s){case"microseg.v4.config.DirectoryServerConfig":t.setData(pn.constructFromObject(e.data,void 0));break;case"microseg.v4.error.ErrorResponse":t.setData(Le.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+s+" 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):wn($n,this,bn).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):wn($n,this,bn).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("metadata","undefined or null")}}function bn(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")}mn.prototype.metadata=void 0,mn.prototype.data=void 0,mn.prototype.$reserved=void 0,mn.prototype.$objectType=void 0,mn.prototype.$unknownFields=void 0;var Tn=new WeakSet;class Fn 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=Tn),t.add(e),this.$objectType="microseg.v4.config.ListDirectoryServerConfigsApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,o,a,d;if(e){if(t=t||new Fn,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(q.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=[],s=e.data,d=s[0].hasOwnProperty("$objectType")?s[0].$objectType:typeof s[0],o=0;o<s.length;o++){if("microseg.v4.config.DirectoryServerConfig"!==d)throw"Unknown list of type "+d+" in data";i=pn.constructFromObject(s[o],void 0),a.push(i)}t.setData(a)}else{if(d=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,"microseg.v4.error.ErrorResponse"!==d)throw"Unknown datatype "+d+" in data";t.setData(Le.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(Tn,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):kn(Tn,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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("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}function On(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")}Fn.prototype.metadata=void 0,Fn.prototype.data=void 0,Fn.prototype.$reserved=void 0,Fn.prototype.$objectType=void 0,Fn.prototype.$unknownFields=void 0;var Sn=new WeakSet;class An 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=Sn),t.add(e),this.$objectType="microseg.v4.config.CreateDsCategoryMappingApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s;if(e){if(t=t||new An,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(q.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(s=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,s){case"prism.v4.config.TaskReference":t.setData(qe.constructFromObject(e.data,void 0));break;case"microseg.v4.error.ErrorResponse":t.setData(Le.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+s+" 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):On(Sn,this,En).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):On(Sn,this,En).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("metadata","undefined or null")}}function En(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 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")}An.prototype.metadata=void 0,An.prototype.data=void 0,An.prototype.$reserved=void 0,An.prototype.$objectType=void 0,An.prototype.$unknownFields=void 0;var In=new WeakSet;class Rn 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=In),t.add(e),this.$objectType="microseg.v4.config.UpdateDirectoryServerConfigApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s;if(e){if(t=t||new Rn,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(q.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(s=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,s){case"prism.v4.config.TaskReference":t.setData(qe.constructFromObject(e.data,void 0));break;case"microseg.v4.error.ErrorResponse":t.setData(Le.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+s+" 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):Pn(In,this,Cn).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):Pn(In,this,Cn).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("metadata","undefined or null")}}function Cn(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 Dn(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")}Rn.prototype.metadata=void 0,Rn.prototype.data=void 0,Rn.prototype.$reserved=void 0,Rn.prototype.$objectType=void 0,Rn.prototype.$unknownFields=void 0;var Un=new WeakSet;class xn 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=Un),t.add(e),this.$objectType="microseg.v4.config.DeleteEntityGroupApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s;if(e){if(t=t||new xn,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(q.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(s=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,s){case"prism.v4.config.TaskReference":t.setData(qe.constructFromObject(e.data,void 0));break;case"microseg.v4.error.ErrorResponse":t.setData(Le.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+s+" 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):Dn(Un,this,Mn).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):Dn(Un,this,Mn).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("metadata","undefined or null")}}function Mn(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}xn.prototype.metadata=void 0,xn.prototype.data=void 0,xn.prototype.$reserved=void 0,xn.prototype.$objectType=void 0,xn.prototype.$unknownFields=void 0;var Jn=new WeakSet;class Nn{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=Jn),t.add(e),this.$objectType="microseg.v4.config.Addresses",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,r,o;if(e){if(t=t||new Nn,e.hasOwnProperty("ipv4Addresses")&&null!==e.ipv4Addresses&&void 0!==e.ipv4Addresses){for(o=[],s=e.ipv4Addresses,r=0;r<s.length;r++)i=Ze.constructFromObject(s[r],void 0),o.push(i);t.setIpv4Addresses(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())}getIpv4Addresses(){return this.ipv4Addresses}setIpv4Addresses(e){this.ipv4Addresses=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getIpv4Addresses()&&null!==this.getIpv4Addresses()?{ipv4Addresses:this.getIpv4Addresses().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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("ipv4Addresses"===t){if(void 0===this.ipv4Addresses||null===this.ipv4Addresses)return new j("ipv4Addresses","undefined or null");if(!F.validateMaxItems(this.ipv4Addresses,4e3))return new j("ipv4Addresses","does not satisfy required maxItems constraint: 4000");if(!F.validateMinItems(this.ipv4Addresses,1))return new j("ipv4Addresses","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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null")}}Nn.prototype.ipv4Addresses=void 0,Nn.prototype.$reserved=void 0,Nn.prototype.$objectType=void 0,Nn.prototype.$unknownFields=void 0;const Gn={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",CATEGORY_EXT_ID:"CATEGORY_EXT_ID",EXT_ID:"EXT_ID",NAME:"NAME",LABELS:"LABELS",IP_VALUES:"IP_VALUES",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(Gn).find(t=>Gn[t]===e);return null==t?Gn.$UNKNOWN:Gn[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case Gn.$UNKNOWN:case Gn.$REDACTED:case Gn.CATEGORY_EXT_ID:case Gn.EXT_ID:case Gn.NAME:case Gn.LABELS:case Gn.IP_VALUES:return;default:throw new Error("Invalid : must be AllowedSelectBy.{ $UNKNOWN|$REDACTED|CATEGORY_EXT_ID|EXT_ID|NAME|LABELS|IP_VALUES }")}}};Object.freeze(Gn);const Ln=Gn,_n={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",VM:"VM",SUBNET:"SUBNET",VPC:"VPC",KUBE_CLUSTER:"KUBE_CLUSTER",KUBE_NAMESPACE:"KUBE_NAMESPACE",KUBE_PODS:"KUBE_PODS",KUBE_SERVICE:"KUBE_SERVICE",ADDRESS_GROUP:"ADDRESS_GROUP",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.VM:case _n.SUBNET:case _n.VPC:case _n.KUBE_CLUSTER:case _n.KUBE_NAMESPACE:case _n.KUBE_PODS:case _n.KUBE_SERVICE:case _n.ADDRESS_GROUP:return;default:throw new Error("Invalid : must be AllowedType.{ $UNKNOWN|$REDACTED|VM|SUBNET|VPC|KUBE_CLUSTER|KUBE_NAMESPACE|KUBE_PODS|KUBE_SERVICE|ADDRESS_GROUP }")}}};Object.freeze(_n);const Wn=_n;var qn=new WeakSet;class Vn{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="microseg.v4.config.IpRange",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,r,o;if(e){if(t=t||new Vn,e.hasOwnProperty("ipv4Ranges")&&null!==e.ipv4Ranges&&void 0!==e.ipv4Ranges){for(o=[],s=e.ipv4Ranges,r=0;r<s.length;r++)i=it.constructFromObject(s[r],void 0),o.push(i);t.setIpv4Ranges(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())}getIpv4Ranges(){return this.ipv4Ranges}setIpv4Ranges(e){this.ipv4Ranges=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getIpv4Ranges()&&null!==this.getIpv4Ranges()?{ipv4Ranges:this.getIpv4Ranges().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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("ipv4Ranges"===t){if(void 0===this.ipv4Ranges||null===this.ipv4Ranges)return new j("ipv4Ranges","undefined or null");if(!F.validateMaxItems(this.ipv4Ranges,4e3))return new j("ipv4Ranges","does not satisfy required maxItems constraint: 4000");if(!F.validateMinItems(this.ipv4Ranges,1))return new j("ipv4Ranges","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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null")}}Vn.prototype.ipv4Ranges=void 0,Vn.prototype.$reserved=void 0,Vn.prototype.$objectType=void 0,Vn.prototype.$unknownFields=void 0;var Bn=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=Bn),t.add(e),this.$objectType="microseg.v4.config.AllowedEntity",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,r;if(e){if(t=t||new zn,e.hasOwnProperty("selectBy")&&null!==e.selectBy&&void 0!==e.selectBy&&t.setSelectBy(Ln.constructFromObject(e.selectBy)),e.hasOwnProperty("type")&&null!==e.type&&void 0!==e.type&&t.setType(Wn.constructFromObject(e.type)),e.hasOwnProperty("referenceExtIds")&&null!==e.referenceExtIds&&void 0!==e.referenceExtIds){for(r=[],s=e.referenceExtIds,i=0;i<s.length;i++)r.push(s[i]);t.setReferenceExtIds(r)}if(e.hasOwnProperty("kubeEntities")&&null!==e.kubeEntities&&void 0!==e.kubeEntities){for(r=[],s=e.kubeEntities,i=0;i<s.length;i++)r.push(s[i]);t.setKubeEntities(r)}if(e.hasOwnProperty("addresses")&&null!==e.addresses&&void 0!==e.addresses&&t.setAddresses(Nn.constructFromObject(e.addresses)),e.hasOwnProperty("ipRanges")&&null!==e.ipRanges&&void 0!==e.ipRanges&&t.setIpRanges(Vn.constructFromObject(e.ipRanges)),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())}getSelectBy(){return this.selectBy}setSelectBy(e){this.selectBy=e}getType(){return this.type}setType(e){this.type=e}getReferenceExtIds(){return this.referenceExtIds}setReferenceExtIds(e){this.referenceExtIds=e}getKubeEntities(){return this.kubeEntities}setKubeEntities(e){this.kubeEntities=e}getAddresses(){return this.addresses}setAddresses(e){this.addresses=e}getIpRanges(){return this.ipRanges}setIpRanges(e){this.ipRanges=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getSelectBy()&&null!==this.getSelectBy()?{selectBy:this.getSelectBy()}:{},...void 0!==this.getType()&&null!==this.getType()?{type:this.getType()}:{},...void 0!==this.getReferenceExtIds()&&null!==this.getReferenceExtIds()?{referenceExtIds:this.getReferenceExtIds()}:{},...void 0!==this.getKubeEntities()&&null!==this.getKubeEntities()?{kubeEntities:this.getKubeEntities()}:{},...void 0!==this.getAddresses()&&null!==this.getAddresses()?{addresses:this.getAddresses().toJson(!1)}:{},...void 0!==this.getIpRanges()&&null!==this.getIpRanges()?{ipRanges:this.getIpRanges().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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("selectBy"===t&&(void 0===this.selectBy||null===this.selectBy))return new j("selectBy","undefined or null");if("type"===t&&(void 0===this.type||null===this.type))return new j("type","undefined or null");if("referenceExtIds"===t){if(void 0===this.referenceExtIds||null===this.referenceExtIds)return new j("referenceExtIds","undefined or null");if(!F.validateMaxItems(this.referenceExtIds,10))return new j("referenceExtIds","does not satisfy required maxItems constraint: 10");if(!F.validateMinItems(this.referenceExtIds,1))return new j("referenceExtIds","does not satisfy required minItems constraint: 1")}if("kubeEntities"===t){if(void 0===this.kubeEntities||null===this.kubeEntities)return new j("kubeEntities","undefined or null");if(!F.validateMaxItems(this.kubeEntities,5))return new j("kubeEntities","does not satisfy required maxItems constraint: 5");if(!F.validateMinItems(this.kubeEntities,1))return new j("kubeEntities","does not satisfy required minItems constraint: 1")}return"addresses"!==t||void 0!==this.addresses&&null!==this.addresses?"ipRanges"!==t||void 0!==this.ipRanges&&null!==this.ipRanges?"$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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("ipRanges","undefined or null"):new j("addresses","undefined or null")}}zn.prototype.selectBy=void 0,zn.prototype.type=void 0,zn.prototype.referenceExtIds=void 0,zn.prototype.kubeEntities=void 0,zn.prototype.addresses=void 0,zn.prototype.ipRanges=void 0,zn.prototype.$reserved=void 0,zn.prototype.$objectType=void 0,zn.prototype.$unknownFields=void 0;var Kn=new WeakSet;class Hn{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=Kn),t.add(e),this.$objectType="microseg.v4.config.AllowedConfig",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,r,o;if(e){if(t=t||new Hn,e.hasOwnProperty("entities")&&null!==e.entities&&void 0!==e.entities){for(o=[],s=e.entities,r=0;r<s.length;r++)i=zn.constructFromObject(s[r],void 0),o.push(i);t.setEntities(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())}getEntities(){return this.entities}setEntities(e){this.entities=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getEntities()&&null!==this.getEntities()?{entities:this.getEntities().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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("entities"===t){if(void 0===this.entities||null===this.entities)return new j("entities","undefined or null");if(!F.validateMaxItems(this.entities,3))return new j("entities","does not satisfy required maxItems constraint: 3");if(!F.validateMinItems(this.entities,1))return new j("entities","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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null")}}Hn.prototype.entities=void 0,Hn.prototype.$reserved=void 0,Hn.prototype.$objectType=void 0,Hn.prototype.$unknownFields=void 0;const Zn={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",EXT_ID:"EXT_ID",IP_VALUES:"IP_VALUES",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(Zn).find(t=>Zn[t]===e);return null==t?Zn.$UNKNOWN:Zn[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case Zn.$UNKNOWN:case Zn.$REDACTED:case Zn.EXT_ID:case Zn.IP_VALUES:return;default:throw new Error("Invalid : must be ExceptSelectBy.{ $UNKNOWN|$REDACTED|EXT_ID|IP_VALUES }")}}};Object.freeze(Zn);const Xn=Zn,Qn={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",ADDRESS_GROUP:"ADDRESS_GROUP",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(Qn).find(t=>Qn[t]===e);return null==t?Qn.$UNKNOWN:Qn[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case Qn.$UNKNOWN:case Qn.$REDACTED:case Qn.ADDRESS_GROUP:return;default:throw new Error("Invalid : must be ExceptType.{ $UNKNOWN|$REDACTED|ADDRESS_GROUP }")}}};Object.freeze(Qn);const Yn=Qn;var es=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=es),t.add(e),this.$objectType="microseg.v4.config.ExceptEntity",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,r;if(e){if(t=t||new ts,e.hasOwnProperty("selectBy")&&null!==e.selectBy&&void 0!==e.selectBy&&t.setSelectBy(Xn.constructFromObject(e.selectBy)),e.hasOwnProperty("type")&&null!==e.type&&void 0!==e.type&&t.setType(Yn.constructFromObject(e.type)),e.hasOwnProperty("referenceExtIds")&&null!==e.referenceExtIds&&void 0!==e.referenceExtIds){for(r=[],s=e.referenceExtIds,i=0;i<s.length;i++)r.push(s[i]);t.setReferenceExtIds(r)}if(e.hasOwnProperty("addresses")&&null!==e.addresses&&void 0!==e.addresses&&t.setAddresses(Nn.constructFromObject(e.addresses)),e.hasOwnProperty("ipRanges")&&null!==e.ipRanges&&void 0!==e.ipRanges&&t.setIpRanges(Vn.constructFromObject(e.ipRanges)),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())}getSelectBy(){return this.selectBy}setSelectBy(e){this.selectBy=e}getType(){return this.type}setType(e){this.type=e}getReferenceExtIds(){return this.referenceExtIds}setReferenceExtIds(e){this.referenceExtIds=e}getAddresses(){return this.addresses}setAddresses(e){this.addresses=e}getIpRanges(){return this.ipRanges}setIpRanges(e){this.ipRanges=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getSelectBy()&&null!==this.getSelectBy()?{selectBy:this.getSelectBy()}:{},...void 0!==this.getType()&&null!==this.getType()?{type:this.getType()}:{},...void 0!==this.getReferenceExtIds()&&null!==this.getReferenceExtIds()?{referenceExtIds:this.getReferenceExtIds()}:{},...void 0!==this.getAddresses()&&null!==this.getAddresses()?{addresses:this.getAddresses().toJson(!1)}:{},...void 0!==this.getIpRanges()&&null!==this.getIpRanges()?{ipRanges:this.getIpRanges().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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("selectBy"===t&&(void 0===this.selectBy||null===this.selectBy))return new j("selectBy","undefined or null");if("type"===t&&(void 0===this.type||null===this.type))return new j("type","undefined or null");if("referenceExtIds"===t){if(void 0===this.referenceExtIds||null===this.referenceExtIds)return new j("referenceExtIds","undefined or null");if(!F.validateMaxItems(this.referenceExtIds,10))return new j("referenceExtIds","does not satisfy required maxItems constraint: 10");if(!F.validateMinItems(this.referenceExtIds,1))return new j("referenceExtIds","does not satisfy required minItems constraint: 1")}return"addresses"!==t||void 0!==this.addresses&&null!==this.addresses?"ipRanges"!==t||void 0!==this.ipRanges&&null!==this.ipRanges?"$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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("ipRanges","undefined or null"):new j("addresses","undefined or null")}}ts.prototype.selectBy=void 0,ts.prototype.type=void 0,ts.prototype.referenceExtIds=void 0,ts.prototype.addresses=void 0,ts.prototype.ipRanges=void 0,ts.prototype.$reserved=void 0,ts.prototype.$objectType=void 0,ts.prototype.$unknownFields=void 0;var ns=new WeakSet;class ss{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=ns),t.add(e),this.$objectType="microseg.v4.config.ExceptConfig",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,r,o;if(e){if(t=t||new ss,e.hasOwnProperty("entities")&&null!==e.entities&&void 0!==e.entities){for(o=[],s=e.entities,r=0;r<s.length;r++)i=ts.constructFromObject(s[r],void 0),o.push(i);t.setEntities(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())}getEntities(){return this.entities}setEntities(e){this.entities=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getEntities()&&null!==this.getEntities()?{entities:this.getEntities().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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("entities"===t){if(void 0===this.entities||null===this.entities)return new j("entities","undefined or null");if(!F.validateMaxItems(this.entities,3))return new j("entities","does not satisfy required maxItems constraint: 3");if(!F.validateMinItems(this.entities,1))return new j("entities","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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null")}}function is(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")}ss.prototype.entities=void 0,ss.prototype.$reserved=void 0,ss.prototype.$objectType=void 0,ss.prototype.$unknownFields=void 0;var rs=new WeakSet;class os extends nt{constructor(e){var t,n;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t=this,n=rs),n.add(t),this.name=e,this.$objectType="microseg.v4.config.EntityGroup",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,r;if(e){if(t=t||new os,nt.constructFromObject(e,t,!0),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("allowedConfig")&&null!==e.allowedConfig&&void 0!==e.allowedConfig&&t.setAllowedConfig(Hn.constructFromObject(e.allowedConfig)),e.hasOwnProperty("exceptConfig")&&null!==e.exceptConfig&&void 0!==e.exceptConfig&&t.setExceptConfig(ss.constructFromObject(e.exceptConfig)),e.hasOwnProperty("policyExtIds")&&null!==e.policyExtIds&&void 0!==e.policyExtIds){for(r=[],s=e.policyExtIds,i=0;i<s.length;i++)r.push(s[i]);t.setPolicyExtIds(r)}if(e.hasOwnProperty("ownerExtId")&&null!==e.ownerExtId&&void 0!==e.ownerExtId&&t.setOwnerExtId(e.ownerExtId),e.hasOwnProperty("creationTime")&&null!==e.creationTime&&void 0!==e.creationTime&&t.setCreationTime(e.creationTime),e.hasOwnProperty("lastUpdateTime")&&null!==e.lastUpdateTime&&void 0!==e.lastUpdateTime&&t.setLastUpdateTime(e.lastUpdateTime),!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}getDescription(){return this.description}setDescription(e){this.description=e}getAllowedConfig(){return this.allowedConfig}setAllowedConfig(e){this.allowedConfig=e}getExceptConfig(){return this.exceptConfig}setExceptConfig(e){this.exceptConfig=e}getPolicyExtIds(){return this.policyExtIds}setPolicyExtIds(e){this.policyExtIds=e}getOwnerExtId(){return this.ownerExtId}setOwnerExtId(e){this.ownerExtId=e}getCreationTime(){return this.creationTime}setCreationTime(e){this.creationTime=e}getLastUpdateTime(){return this.lastUpdateTime}setLastUpdateTime(e){this.lastUpdateTime=e}toJson(e){return!1===e?{...void 0!==this.getName()&&null!==this.getName()?{name:this.getName()}:{},...void 0!==this.getDescription()&&null!==this.getDescription()?{description:this.getDescription()}:{},...void 0!==this.getAllowedConfig()&&null!==this.getAllowedConfig()?{allowedConfig:this.getAllowedConfig().toJson(!1)}:{},...void 0!==this.getExceptConfig()&&null!==this.getExceptConfig()?{exceptConfig:this.getExceptConfig().toJson(!1)}:{},...void 0!==this.getPolicyExtIds()&&null!==this.getPolicyExtIds()?{policyExtIds:this.getPolicyExtIds()}:{},...void 0!==this.getOwnerExtId()&&null!==this.getOwnerExtId()?{ownerExtId:this.getOwnerExtId()}:{},...void 0!==this.getCreationTime()&&null!==this.getCreationTime()?{creationTime:is(rs,this,as).call(this,this.getCreationTime(),!1)}:{},...void 0!==this.getLastUpdateTime()&&null!==this.getLastUpdateTime()?{lastUpdateTime:is(rs,this,as).call(this,this.getLastUpdateTime(),!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.getName()&&null!==this.getName()?{name:this.getName()}:{},...void 0!==this.getDescription()&&null!==this.getDescription()?{description:this.getDescription()}:{},...void 0!==this.getAllowedConfig()&&null!==this.getAllowedConfig()?{allowedConfig:this.getAllowedConfig().toJson(!1)}:{},...void 0!==this.getExceptConfig()&&null!==this.getExceptConfig()?{exceptConfig:this.getExceptConfig().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 T?n=["name"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("name"===t){if(void 0===this.name||null===this.name)return new j("name","undefined or null");if(!F.validateMaxLength(this.name,64))return new j("name","does not satisfy required maxLength constraint: 64");if(!F.validatePattern(this.name,/^\\s*[a-zA-Z0-9]([a-zA-Z0-9-_ \\\\.]*[a-zA-Z0-9])?\\s*$/))return new j("name","does not satisfy required pattern: /^\\s*[a-zA-Z0-9]([a-zA-Z0-9-_ \\\\.]*[a-zA-Z0-9])?\\s*$/")}if("description"===t){if(void 0===this.description||null===this.description)return new j("description","undefined or null");if(!F.validateMaxLength(this.description,1e3))return new j("description","does not satisfy required maxLength constraint: 1000");if(!F.validatePattern(this.description,/^\\s*([a-zA-Z0-9 _:.()-]*)\\s*$/))return new j("description","does not satisfy required pattern: /^\\s*([a-zA-Z0-9 _:.()-]*)\\s*$/")}if("allowedConfig"===t&&(void 0===this.allowedConfig||null===this.allowedConfig))return new j("allowedConfig","undefined or null");if("exceptConfig"===t&&(void 0===this.exceptConfig||null===this.exceptConfig))return new j("exceptConfig","undefined or null");if("policyExtIds"===t){if(void 0===this.policyExtIds||null===this.policyExtIds)return new j("policyExtIds","undefined or null");if(!F.validateMaxItems(this.policyExtIds,1e3))return new j("policyExtIds","does not satisfy required maxItems constraint: 1000");if(!F.validateMinItems(this.policyExtIds,1))return new j("policyExtIds","does not satisfy required minItems constraint: 1")}if("ownerExtId"===t){if(void 0===this.ownerExtId||null===this.ownerExtId)return new j("ownerExtId","undefined or null");if(!F.validatePattern(this.ownerExtId,/^[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 j("ownerExtId","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"creationTime"!==t||void 0!==this.creationTime&&null!==this.creationTime?"lastUpdateTime"!==t||void 0!==this.lastUpdateTime&&null!==this.lastUpdateTime?new j(t,"no such property exists"):new j("lastUpdateTime","undefined or null"):new j("creationTime","undefined or null")}}function as(e,t){return e instanceof Date&&void 0!==t?t?e.toISOString().slice(0,10):e.toISOString():e}function ds(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")}os.prototype.name=void 0,os.prototype.description=void 0,os.prototype.allowedConfig=void 0,os.prototype.exceptConfig=void 0,os.prototype.policyExtIds=void 0,os.prototype.ownerExtId=void 0,os.prototype.creationTime=void 0,os.prototype.lastUpdateTime=void 0,nt.prototype.extId=void 0,nt.prototype.links=void 0,et.prototype.tenantId=void 0;var ls=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=ls),t.add(e),this.$objectType="microseg.v4.config.UpdateEntityGroupApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s;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(q.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(s=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,s){case"prism.v4.config.TaskReference":t.setData(qe.constructFromObject(e.data,void 0));break;case"microseg.v4.error.ErrorResponse":t.setData(Le.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+s+" 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):ds(ls,this,cs).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):ds(ls,this,cs).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("metadata","undefined or null")}}function cs(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 hs(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 ps=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=ps),t.add(e),this.$objectType="microseg.v4.config.GetEntityGroupApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s;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(q.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(s=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,s){case"microseg.v4.config.EntityGroup":t.setData(os.constructFromObject(e.data,void 0));break;case"microseg.v4.error.ErrorResponse":t.setData(Le.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+s+" 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):hs(ps,this,vs).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):hs(ps,this,vs).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("metadata","undefined or null")}}function vs(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 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.metadata=void 0,ys.prototype.data=void 0,ys.prototype.$reserved=void 0,ys.prototype.$objectType=void 0,ys.prototype.$unknownFields=void 0;var fs=new WeakSet;class ws 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=fs),t.add(e),this.$objectType="microseg.v4.config.CreateEntityGroupApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s;if(e){if(t=t||new ws,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(q.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(s=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,s){case"prism.v4.config.TaskReference":t.setData(qe.constructFromObject(e.data,void 0));break;case"microseg.v4.error.ErrorResponse":t.setData(Le.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+s+" 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):gs(fs,this,$s).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):gs(fs,this,$s).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("metadata","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}function ms(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")}ws.prototype.metadata=void 0,ws.prototype.data=void 0,ws.prototype.$reserved=void 0,ws.prototype.$objectType=void 0,ws.prototype.$unknownFields=void 0;var bs=new WeakSet;class ks 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=bs),t.add(e),this.$objectType="microseg.v4.config.ListEntityGroupsApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,o,a,d;if(e){if(t=t||new ks,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(q.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=[],s=e.data,d=s[0].hasOwnProperty("$objectType")?s[0].$objectType:typeof s[0],o=0;o<s.length;o++){if("microseg.v4.config.EntityGroup"!==d)throw"Unknown list of type "+d+" in data";i=os.constructFromObject(s[o],void 0),a.push(i)}t.setData(a)}else{if(d=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,"microseg.v4.error.ErrorResponse"!==d)throw"Unknown datatype "+d+" in data";t.setData(Le.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):ms(bs,this,Ts).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):ms(bs,this,Ts).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("metadata","undefined or null")}}function Ts(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}ks.prototype.metadata=void 0,ks.prototype.data=void 0,ks.prototype.$reserved=void 0,ks.prototype.$objectType=void 0,ks.prototype.$unknownFields=void 0;const Fs={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",ALL:"ALL",NONE:"NONE",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(Fs).find(t=>Fs[t]===e);return null==t?Fs.$UNKNOWN:Fs[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case Fs.$UNKNOWN:case Fs.$REDACTED:case Fs.ALL:case Fs.NONE:return;default:throw new Error("Invalid : must be AllowType.{ $UNKNOWN|$REDACTED|ALL|NONE }")}}};Object.freeze(Fs);const js=Fs,Os={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",VM:"VM",VPC:"VPC",SUBNET:"SUBNET",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.VM:case Os.VPC:case Os.SUBNET:return;default:throw new Error("Invalid : must be CategoryAssociatedEntityType.{ $UNKNOWN|$REDACTED|VM|VPC|SUBNET }")}}};Object.freeze(Os);const Ss=Os;var As=new WeakSet;class Es{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=As),t.add(e),this.$objectType="microseg.v4.config.IcmpTypeCodeSpec",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new Es,e.hasOwnProperty("isAllAllowed")&&null!==e.isAllAllowed&&void 0!==e.isAllAllowed&&t.setIsAllAllowed(e.isAllAllowed),e.hasOwnProperty("type")&&null!==e.type&&void 0!==e.type&&t.setType(e.type),e.hasOwnProperty("code")&&null!==e.code&&void 0!==e.code&&t.setCode(e.code),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())}getIsAllAllowed(){return this.isAllAllowed}setIsAllAllowed(e){this.isAllAllowed=e}getType(){return this.type}setType(e){this.type=e}getCode(){return this.code}setCode(e){this.code=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getIsAllAllowed()&&null!==this.getIsAllAllowed()?{isAllAllowed:this.getIsAllAllowed()}:{},...void 0!==this.getType()&&null!==this.getType()?{type:this.getType()}:{},...void 0!==this.getCode()&&null!==this.getCode()?{code:this.getCode()}:{},$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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("isAllAllowed"===t&&(void 0===this.isAllAllowed||null===this.isAllAllowed))return new j("isAllAllowed","undefined or null");if("type"===t){if(void 0===this.type||null===this.type)return new j("type","undefined or null");if(!F.validateMaximum(this.type,43))return new j("type","does not satisfy required maximum constraint: 43");if(!F.validateMinimum(this.type,0))return new j("type","does not satisfy required minimum constraint: 0")}if("code"===t){if(void 0===this.code||null===this.code)return new j("code","undefined or null");if(!F.validateMaximum(this.code,15))return new j("code","does not satisfy required maximum constraint: 15");if(!F.validateMinimum(this.code,0))return new j("code","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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null")}}Es.prototype.isAllAllowed=!1,Es.prototype.type=void 0,Es.prototype.code=void 0,Es.prototype.$reserved=void 0,Es.prototype.$objectType=void 0,Es.prototype.$unknownFields=void 0;var Ps=new WeakSet;class Is{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=Ps),t.add(e),this.$objectType="microseg.v4.config.IcmpV6TypeCodeSpec",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new Is,e.hasOwnProperty("isAllAllowed")&&null!==e.isAllAllowed&&void 0!==e.isAllAllowed&&t.setIsAllAllowed(e.isAllAllowed),e.hasOwnProperty("type")&&null!==e.type&&void 0!==e.type&&t.setType(e.type),e.hasOwnProperty("code")&&null!==e.code&&void 0!==e.code&&t.setCode(e.code),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())}getIsAllAllowed(){return this.isAllAllowed}setIsAllAllowed(e){this.isAllAllowed=e}getType(){return this.type}setType(e){this.type=e}getCode(){return this.code}setCode(e){this.code=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getIsAllAllowed()&&null!==this.getIsAllAllowed()?{isAllAllowed:this.getIsAllAllowed()}:{},...void 0!==this.getType()&&null!==this.getType()?{type:this.getType()}:{},...void 0!==this.getCode()&&null!==this.getCode()?{code:this.getCode()}:{},$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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("isAllAllowed"===t&&(void 0===this.isAllAllowed||null===this.isAllAllowed))return new j("isAllAllowed","undefined or null");if("type"===t){if(void 0===this.type||null===this.type)return new j("type","undefined or null");if(!F.validateMaximum(this.type,201))return new j("type","does not satisfy required maximum constraint: 201");if(!F.validateMinimum(this.type,0))return new j("type","does not satisfy required minimum constraint: 0")}if("code"===t){if(void 0===this.code||null===this.code)return new j("code","undefined or null");if(!F.validateMaximum(this.code,10))return new j("code","does not satisfy required maximum constraint: 10");if(!F.validateMinimum(this.code,0))return new j("code","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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null")}}Is.prototype.isAllAllowed=!1,Is.prototype.type=void 0,Is.prototype.code=void 0,Is.prototype.$reserved=void 0,Is.prototype.$objectType=void 0,Is.prototype.$unknownFields=void 0;var Rs=new WeakSet;class Cs{constructor(e,t){var n,s;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(n=this,s=Rs),s.add(n),this.startPort=e,this.endPort=t,this.$objectType="microseg.v4.config.TcpPortRangeSpec",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new Cs,e.hasOwnProperty("startPort")&&null!==e.startPort&&void 0!==e.startPort&&t.setStartPort(e.startPort),e.hasOwnProperty("endPort")&&null!==e.endPort&&void 0!==e.endPort&&t.setEndPort(e.endPort),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())}getStartPort(){return this.startPort}setStartPort(e){this.startPort=e}getEndPort(){return this.endPort}setEndPort(e){this.endPort=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getStartPort()&&null!==this.getStartPort()?{startPort:this.getStartPort()}:{},...void 0!==this.getEndPort()&&null!==this.getEndPort()?{endPort:this.getEndPort()}:{},$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 T?n=["startPort","endPort"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("startPort"===t){if(void 0===this.startPort||null===this.startPort)return new j("startPort","undefined or null");if(!F.validateMaximum(this.startPort,65535))return new j("startPort","does not satisfy required maximum constraint: 65535");if(!F.validateMinimum(this.startPort,0))return new j("startPort","does not satisfy required minimum constraint: 0")}if("endPort"===t){if(void 0===this.endPort||null===this.endPort)return new j("endPort","undefined or null");if(!F.validateMaximum(this.endPort,65535))return new j("endPort","does not satisfy required maximum constraint: 65535");if(!F.validateMinimum(this.endPort,0))return new j("endPort","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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null")}}Cs.prototype.startPort=void 0,Cs.prototype.endPort=void 0,Cs.prototype.$reserved=void 0,Cs.prototype.$objectType=void 0,Cs.prototype.$unknownFields=void 0;var Ds=new WeakSet;class Us{constructor(e,t){var n,s;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(n=this,s=Ds),s.add(n),this.startPort=e,this.endPort=t,this.$objectType="microseg.v4.config.UdpPortRangeSpec",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new Us,e.hasOwnProperty("startPort")&&null!==e.startPort&&void 0!==e.startPort&&t.setStartPort(e.startPort),e.hasOwnProperty("endPort")&&null!==e.endPort&&void 0!==e.endPort&&t.setEndPort(e.endPort),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())}getStartPort(){return this.startPort}setStartPort(e){this.startPort=e}getEndPort(){return this.endPort}setEndPort(e){this.endPort=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getStartPort()&&null!==this.getStartPort()?{startPort:this.getStartPort()}:{},...void 0!==this.getEndPort()&&null!==this.getEndPort()?{endPort:this.getEndPort()}:{},$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 T?n=["startPort","endPort"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("startPort"===t){if(void 0===this.startPort||null===this.startPort)return new j("startPort","undefined or null");if(!F.validateMaximum(this.startPort,65535))return new j("startPort","does not satisfy required maximum constraint: 65535");if(!F.validateMinimum(this.startPort,0))return new j("startPort","does not satisfy required minimum constraint: 0")}if("endPort"===t){if(void 0===this.endPort||null===this.endPort)return new j("endPort","undefined or null");if(!F.validateMaximum(this.endPort,65535))return new j("endPort","does not satisfy required maximum constraint: 65535");if(!F.validateMinimum(this.endPort,0))return new j("endPort","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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null")}}Us.prototype.startPort=void 0,Us.prototype.endPort=void 0,Us.prototype.$reserved=void 0,Us.prototype.$objectType=void 0,Us.prototype.$unknownFields=void 0;var xs=new WeakSet;class Ms{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=xs),t.add(e),this.$objectType="microseg.v4.config.ApplicationRuleSpec",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,r,o;if(e){if(t=t||new Ms,e.hasOwnProperty("securedGroupCategoryAssociatedEntityType")&&null!==e.securedGroupCategoryAssociatedEntityType&&void 0!==e.securedGroupCategoryAssociatedEntityType&&t.setSecuredGroupCategoryAssociatedEntityType(Ss.constructFromObject(e.securedGroupCategoryAssociatedEntityType)),e.hasOwnProperty("securedGroupCategoryReferences")&&null!==e.securedGroupCategoryReferences&&void 0!==e.securedGroupCategoryReferences){for(o=[],s=e.securedGroupCategoryReferences,r=0;r<s.length;r++)o.push(s[r]);t.setSecuredGroupCategoryReferences(o)}if(e.hasOwnProperty("securedGroupEntityGroupReference")&&null!==e.securedGroupEntityGroupReference&&void 0!==e.securedGroupEntityGroupReference&&t.setSecuredGroupEntityGroupReference(e.securedGroupEntityGroupReference),e.hasOwnProperty("srcAllowSpec")&&null!==e.srcAllowSpec&&void 0!==e.srcAllowSpec&&t.setSrcAllowSpec(js.constructFromObject(e.srcAllowSpec)),e.hasOwnProperty("destAllowSpec")&&null!==e.destAllowSpec&&void 0!==e.destAllowSpec&&t.setDestAllowSpec(js.constructFromObject(e.destAllowSpec)),e.hasOwnProperty("srcCategoryAssociatedEntityType")&&null!==e.srcCategoryAssociatedEntityType&&void 0!==e.srcCategoryAssociatedEntityType&&t.setSrcCategoryAssociatedEntityType(Ss.constructFromObject(e.srcCategoryAssociatedEntityType)),e.hasOwnProperty("srcCategoryReferences")&&null!==e.srcCategoryReferences&&void 0!==e.srcCategoryReferences){for(o=[],s=e.srcCategoryReferences,r=0;r<s.length;r++)o.push(s[r]);t.setSrcCategoryReferences(o)}if(e.hasOwnProperty("srcEntityGroupReference")&&null!==e.srcEntityGroupReference&&void 0!==e.srcEntityGroupReference&&t.setSrcEntityGroupReference(e.srcEntityGroupReference),e.hasOwnProperty("destCategoryAssociatedEntityType")&&null!==e.destCategoryAssociatedEntityType&&void 0!==e.destCategoryAssociatedEntityType&&t.setDestCategoryAssociatedEntityType(Ss.constructFromObject(e.destCategoryAssociatedEntityType)),e.hasOwnProperty("destCategoryReferences")&&null!==e.destCategoryReferences&&void 0!==e.destCategoryReferences){for(o=[],s=e.destCategoryReferences,r=0;r<s.length;r++)o.push(s[r]);t.setDestCategoryReferences(o)}if(e.hasOwnProperty("destEntityGroupReference")&&null!==e.destEntityGroupReference&&void 0!==e.destEntityGroupReference&&t.setDestEntityGroupReference(e.destEntityGroupReference),e.hasOwnProperty("srcSubnet")&&null!==e.srcSubnet&&void 0!==e.srcSubnet&&t.setSrcSubnet(Ze.constructFromObject(e.srcSubnet)),e.hasOwnProperty("srcIpv6Subnet")&&null!==e.srcIpv6Subnet&&void 0!==e.srcIpv6Subnet&&t.setSrcIpv6Subnet(Qe.constructFromObject(e.srcIpv6Subnet)),e.hasOwnProperty("destSubnet")&&null!==e.destSubnet&&void 0!==e.destSubnet&&t.setDestSubnet(Ze.constructFromObject(e.destSubnet)),e.hasOwnProperty("destIpv6Subnet")&&null!==e.destIpv6Subnet&&void 0!==e.destIpv6Subnet&&t.setDestIpv6Subnet(Qe.constructFromObject(e.destIpv6Subnet)),e.hasOwnProperty("srcAddressGroupReferences")&&null!==e.srcAddressGroupReferences&&void 0!==e.srcAddressGroupReferences){for(o=[],s=e.srcAddressGroupReferences,r=0;r<s.length;r++)o.push(s[r]);t.setSrcAddressGroupReferences(o)}if(e.hasOwnProperty("destAddressGroupReferences")&&null!==e.destAddressGroupReferences&&void 0!==e.destAddressGroupReferences){for(o=[],s=e.destAddressGroupReferences,r=0;r<s.length;r++)o.push(s[r]);t.setDestAddressGroupReferences(o)}if(e.hasOwnProperty("serviceGroupReferences")&&null!==e.serviceGroupReferences&&void 0!==e.serviceGroupReferences){for(o=[],s=e.serviceGroupReferences,r=0;r<s.length;r++)o.push(s[r]);t.setServiceGroupReferences(o)}if(e.hasOwnProperty("isAllProtocolAllowed")&&null!==e.isAllProtocolAllowed&&void 0!==e.isAllProtocolAllowed&&t.setIsAllProtocolAllowed(e.isAllProtocolAllowed),e.hasOwnProperty("tcpServices")&&null!==e.tcpServices&&void 0!==e.tcpServices){for(o=[],s=e.tcpServices,r=0;r<s.length;r++)i=Cs.constructFromObject(s[r],void 0),o.push(i);t.setTcpServices(o)}if(e.hasOwnProperty("udpServices")&&null!==e.udpServices&&void 0!==e.udpServices){for(o=[],s=e.udpServices,r=0;r<s.length;r++)i=Us.constructFromObject(s[r],void 0),o.push(i);t.setUdpServices(o)}if(e.hasOwnProperty("icmpServices")&&null!==e.icmpServices&&void 0!==e.icmpServices){for(o=[],s=e.icmpServices,r=0;r<s.length;r++)i=Es.constructFromObject(s[r],void 0),o.push(i);t.setIcmpServices(o)}if(e.hasOwnProperty("icmpV6Services")&&null!==e.icmpV6Services&&void 0!==e.icmpV6Services){for(o=[],s=e.icmpV6Services,r=0;r<s.length;r++)i=Is.constructFromObject(s[r],void 0),o.push(i);t.setIcmpV6Services(o)}if(e.hasOwnProperty("networkFunctionChainReference")&&null!==e.networkFunctionChainReference&&void 0!==e.networkFunctionChainReference&&t.setNetworkFunctionChainReference(e.networkFunctionChainReference),e.hasOwnProperty("networkFunctionReference")&&null!==e.networkFunctionReference&&void 0!==e.networkFunctionReference&&t.setNetworkFunctionReference(e.networkFunctionReference),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())}getSecuredGroupCategoryAssociatedEntityType(){return this.securedGroupCategoryAssociatedEntityType}setSecuredGroupCategoryAssociatedEntityType(e){this.securedGroupCategoryAssociatedEntityType=e}getSecuredGroupCategoryReferences(){return this.securedGroupCategoryReferences}setSecuredGroupCategoryReferences(e){this.securedGroupCategoryReferences=e}getSecuredGroupEntityGroupReference(){return this.securedGroupEntityGroupReference}setSecuredGroupEntityGroupReference(e){this.securedGroupEntityGroupReference=e}getSrcAllowSpec(){return this.srcAllowSpec}setSrcAllowSpec(e){this.srcAllowSpec=e}getDestAllowSpec(){return this.destAllowSpec}setDestAllowSpec(e){this.destAllowSpec=e}getSrcCategoryAssociatedEntityType(){return this.srcCategoryAssociatedEntityType}setSrcCategoryAssociatedEntityType(e){this.srcCategoryAssociatedEntityType=e}getSrcCategoryReferences(){return this.srcCategoryReferences}setSrcCategoryReferences(e){this.srcCategoryReferences=e}getSrcEntityGroupReference(){return this.srcEntityGroupReference}setSrcEntityGroupReference(e){this.srcEntityGroupReference=e}getDestCategoryAssociatedEntityType(){return this.destCategoryAssociatedEntityType}setDestCategoryAssociatedEntityType(e){this.destCategoryAssociatedEntityType=e}getDestCategoryReferences(){return this.destCategoryReferences}setDestCategoryReferences(e){this.destCategoryReferences=e}getDestEntityGroupReference(){return this.destEntityGroupReference}setDestEntityGroupReference(e){this.destEntityGroupReference=e}getSrcSubnet(){return this.srcSubnet}setSrcSubnet(e){this.srcSubnet=e}getSrcIpv6Subnet(){return this.srcIpv6Subnet}setSrcIpv6Subnet(e){this.srcIpv6Subnet=e}getDestSubnet(){return this.destSubnet}setDestSubnet(e){this.destSubnet=e}getDestIpv6Subnet(){return this.destIpv6Subnet}setDestIpv6Subnet(e){this.destIpv6Subnet=e}getSrcAddressGroupReferences(){return this.srcAddressGroupReferences}setSrcAddressGroupReferences(e){this.srcAddressGroupReferences=e}getDestAddressGroupReferences(){return this.destAddressGroupReferences}setDestAddressGroupReferences(e){this.destAddressGroupReferences=e}getServiceGroupReferences(){return this.serviceGroupReferences}setServiceGroupReferences(e){this.serviceGroupReferences=e}getIsAllProtocolAllowed(){return this.isAllProtocolAllowed}setIsAllProtocolAllowed(e){this.isAllProtocolAllowed=e}getTcpServices(){return this.tcpServices}setTcpServices(e){this.tcpServices=e}getUdpServices(){return this.udpServices}setUdpServices(e){this.udpServices=e}getIcmpServices(){return this.icmpServices}setIcmpServices(e){this.icmpServices=e}getIcmpV6Services(){return this.icmpV6Services}setIcmpV6Services(e){this.icmpV6Services=e}getNetworkFunctionChainReference(){return this.networkFunctionChainReference}setNetworkFunctionChainReference(e){this.networkFunctionChainReference=e}getNetworkFunctionReference(){return this.networkFunctionReference}setNetworkFunctionReference(e){this.networkFunctionReference=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getSecuredGroupCategoryAssociatedEntityType()&&null!==this.getSecuredGroupCategoryAssociatedEntityType()?{securedGroupCategoryAssociatedEntityType:this.getSecuredGroupCategoryAssociatedEntityType()}:{},...void 0!==this.getSecuredGroupCategoryReferences()&&null!==this.getSecuredGroupCategoryReferences()?{securedGroupCategoryReferences:this.getSecuredGroupCategoryReferences()}:{},...void 0!==this.getSecuredGroupEntityGroupReference()&&null!==this.getSecuredGroupEntityGroupReference()?{securedGroupEntityGroupReference:this.getSecuredGroupEntityGroupReference()}:{},...void 0!==this.getSrcAllowSpec()&&null!==this.getSrcAllowSpec()?{srcAllowSpec:this.getSrcAllowSpec()}:{},...void 0!==this.getDestAllowSpec()&&null!==this.getDestAllowSpec()?{destAllowSpec:this.getDestAllowSpec()}:{},...void 0!==this.getSrcCategoryAssociatedEntityType()&&null!==this.getSrcCategoryAssociatedEntityType()?{srcCategoryAssociatedEntityType:this.getSrcCategoryAssociatedEntityType()}:{},...void 0!==this.getSrcCategoryReferences()&&null!==this.getSrcCategoryReferences()?{srcCategoryReferences:this.getSrcCategoryReferences()}:{},...void 0!==this.getSrcEntityGroupReference()&&null!==this.getSrcEntityGroupReference()?{srcEntityGroupReference:this.getSrcEntityGroupReference()}:{},...void 0!==this.getDestCategoryAssociatedEntityType()&&null!==this.getDestCategoryAssociatedEntityType()?{destCategoryAssociatedEntityType:this.getDestCategoryAssociatedEntityType()}:{},...void 0!==this.getDestCategoryReferences()&&null!==this.getDestCategoryReferences()?{destCategoryReferences:this.getDestCategoryReferences()}:{},...void 0!==this.getDestEntityGroupReference()&&null!==this.getDestEntityGroupReference()?{destEntityGroupReference:this.getDestEntityGroupReference()}:{},...void 0!==this.getSrcSubnet()&&null!==this.getSrcSubnet()?{srcSubnet:this.getSrcSubnet().toJson(!1)}:{},...void 0!==this.getSrcIpv6Subnet()&&null!==this.getSrcIpv6Subnet()?{srcIpv6Subnet:this.getSrcIpv6Subnet().toJson(!1)}:{},...void 0!==this.getDestSubnet()&&null!==this.getDestSubnet()?{destSubnet:this.getDestSubnet().toJson(!1)}:{},...void 0!==this.getDestIpv6Subnet()&&null!==this.getDestIpv6Subnet()?{destIpv6Subnet:this.getDestIpv6Subnet().toJson(!1)}:{},...void 0!==this.getSrcAddressGroupReferences()&&null!==this.getSrcAddressGroupReferences()?{srcAddressGroupReferences:this.getSrcAddressGroupReferences()}:{},...void 0!==this.getDestAddressGroupReferences()&&null!==this.getDestAddressGroupReferences()?{destAddressGroupReferences:this.getDestAddressGroupReferences()}:{},...void 0!==this.getServiceGroupReferences()&&null!==this.getServiceGroupReferences()?{serviceGroupReferences:this.getServiceGroupReferences()}:{},...void 0!==this.getIsAllProtocolAllowed()&&null!==this.getIsAllProtocolAllowed()?{isAllProtocolAllowed:this.getIsAllProtocolAllowed()}:{},...void 0!==this.getTcpServices()&&null!==this.getTcpServices()?{tcpServices:this.getTcpServices().map(e=>e.toJson(!1))}:{},...void 0!==this.getUdpServices()&&null!==this.getUdpServices()?{udpServices:this.getUdpServices().map(e=>e.toJson(!1))}:{},...void 0!==this.getIcmpServices()&&null!==this.getIcmpServices()?{icmpServices:this.getIcmpServices().map(e=>e.toJson(!1))}:{},...void 0!==this.getIcmpV6Services()&&null!==this.getIcmpV6Services()?{icmpV6Services:this.getIcmpV6Services().map(e=>e.toJson(!1))}:{},...void 0!==this.getNetworkFunctionChainReference()&&null!==this.getNetworkFunctionChainReference()?{networkFunctionChainReference:this.getNetworkFunctionChainReference()}:{},...void 0!==this.getNetworkFunctionReference()&&null!==this.getNetworkFunctionReference()?{networkFunctionReference:this.getNetworkFunctionReference()}:{},$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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("securedGroupCategoryAssociatedEntityType"===t&&(void 0===this.securedGroupCategoryAssociatedEntityType||null===this.securedGroupCategoryAssociatedEntityType))return new j("securedGroupCategoryAssociatedEntityType","undefined or null");if("securedGroupCategoryReferences"===t){if(void 0===this.securedGroupCategoryReferences||null===this.securedGroupCategoryReferences)return new j("securedGroupCategoryReferences","undefined or null");if(!F.validateMaxItems(this.securedGroupCategoryReferences,10))return new j("securedGroupCategoryReferences","does not satisfy required maxItems constraint: 10");if(!F.validateMinItems(this.securedGroupCategoryReferences,1))return new j("securedGroupCategoryReferences","does not satisfy required minItems constraint: 1")}if("securedGroupEntityGroupReference"===t){if(void 0===this.securedGroupEntityGroupReference||null===this.securedGroupEntityGroupReference)return new j("securedGroupEntityGroupReference","undefined or null");if(!F.validatePattern(this.securedGroupEntityGroupReference,/^[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 j("securedGroupEntityGroupReference","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("srcAllowSpec"===t&&(void 0===this.srcAllowSpec||null===this.srcAllowSpec))return new j("srcAllowSpec","undefined or null");if("destAllowSpec"===t&&(void 0===this.destAllowSpec||null===this.destAllowSpec))return new j("destAllowSpec","undefined or null");if("srcCategoryAssociatedEntityType"===t&&(void 0===this.srcCategoryAssociatedEntityType||null===this.srcCategoryAssociatedEntityType))return new j("srcCategoryAssociatedEntityType","undefined or null");if("srcCategoryReferences"===t){if(void 0===this.srcCategoryReferences||null===this.srcCategoryReferences)return new j("srcCategoryReferences","undefined or null");if(!F.validateMaxItems(this.srcCategoryReferences,10))return new j("srcCategoryReferences","does not satisfy required maxItems constraint: 10");if(!F.validateMinItems(this.srcCategoryReferences,1))return new j("srcCategoryReferences","does not satisfy required minItems constraint: 1")}if("srcEntityGroupReference"===t){if(void 0===this.srcEntityGroupReference||null===this.srcEntityGroupReference)return new j("srcEntityGroupReference","undefined or null");if(!F.validatePattern(this.srcEntityGroupReference,/^[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 j("srcEntityGroupReference","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("destCategoryAssociatedEntityType"===t&&(void 0===this.destCategoryAssociatedEntityType||null===this.destCategoryAssociatedEntityType))return new j("destCategoryAssociatedEntityType","undefined or null");if("destCategoryReferences"===t){if(void 0===this.destCategoryReferences||null===this.destCategoryReferences)return new j("destCategoryReferences","undefined or null");if(!F.validateMaxItems(this.destCategoryReferences,10))return new j("destCategoryReferences","does not satisfy required maxItems constraint: 10");if(!F.validateMinItems(this.destCategoryReferences,1))return new j("destCategoryReferences","does not satisfy required minItems constraint: 1")}if("destEntityGroupReference"===t){if(void 0===this.destEntityGroupReference||null===this.destEntityGroupReference)return new j("destEntityGroupReference","undefined or null");if(!F.validatePattern(this.destEntityGroupReference,/^[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 j("destEntityGroupReference","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("srcSubnet"===t&&(void 0===this.srcSubnet||null===this.srcSubnet))return new j("srcSubnet","undefined or null");if("srcIpv6Subnet"===t&&(void 0===this.srcIpv6Subnet||null===this.srcIpv6Subnet))return new j("srcIpv6Subnet","undefined or null");if("destSubnet"===t&&(void 0===this.destSubnet||null===this.destSubnet))return new j("destSubnet","undefined or null");if("destIpv6Subnet"===t&&(void 0===this.destIpv6Subnet||null===this.destIpv6Subnet))return new j("destIpv6Subnet","undefined or null");if("srcAddressGroupReferences"===t){if(void 0===this.srcAddressGroupReferences||null===this.srcAddressGroupReferences)return new j("srcAddressGroupReferences","undefined or null");if(!F.validateMaxItems(this.srcAddressGroupReferences,1))return new j("srcAddressGroupReferences","does not satisfy required maxItems constraint: 1");if(!F.validateMinItems(this.srcAddressGroupReferences,1))return new j("srcAddressGroupReferences","does not satisfy required minItems constraint: 1")}if("destAddressGroupReferences"===t){if(void 0===this.destAddressGroupReferences||null===this.destAddressGroupReferences)return new j("destAddressGroupReferences","undefined or null");if(!F.validateMaxItems(this.destAddressGroupReferences,1))return new j("destAddressGroupReferences","does not satisfy required maxItems constraint: 1");if(!F.validateMinItems(this.destAddressGroupReferences,1))return new j("destAddressGroupReferences","does not satisfy required minItems constraint: 1")}if("serviceGroupReferences"===t){if(void 0===this.serviceGroupReferences||null===this.serviceGroupReferences)return new j("serviceGroupReferences","undefined or null");if(!F.validateMaxItems(this.serviceGroupReferences,160))return new j("serviceGroupReferences","does not satisfy required maxItems constraint: 160")}if("isAllProtocolAllowed"===t&&(void 0===this.isAllProtocolAllowed||null===this.isAllProtocolAllowed))return new j("isAllProtocolAllowed","undefined or null");if("tcpServices"===t){if(void 0===this.tcpServices||null===this.tcpServices)return new j("tcpServices","undefined or null");if(!F.validateMaxItems(this.tcpServices,160))return new j("tcpServices","does not satisfy required maxItems constraint: 160")}if("udpServices"===t){if(void 0===this.udpServices||null===this.udpServices)return new j("udpServices","undefined or null");if(!F.validateMaxItems(this.udpServices,160))return new j("udpServices","does not satisfy required maxItems constraint: 160")}if("icmpServices"===t){if(void 0===this.icmpServices||null===this.icmpServices)return new j("icmpServices","undefined or null");if(!F.validateMaxItems(this.icmpServices,160))return new j("icmpServices","does not satisfy required maxItems constraint: 160")}if("icmpV6Services"===t){if(void 0===this.icmpV6Services||null===this.icmpV6Services)return new j("icmpV6Services","undefined or null");if(!F.validateMaxItems(this.icmpV6Services,160))return new j("icmpV6Services","does not satisfy required maxItems constraint: 160")}if("networkFunctionChainReference"===t){if(void 0===this.networkFunctionChainReference||null===this.networkFunctionChainReference)return new j("networkFunctionChainReference","undefined or null");if(!F.validatePattern(this.networkFunctionChainReference,/^[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 j("networkFunctionChainReference","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("networkFunctionReference"===t){if(void 0===this.networkFunctionReference||null===this.networkFunctionReference)return new j("networkFunctionReference","undefined or null");if(!F.validatePattern(this.networkFunctionReference,/^[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 j("networkFunctionReference","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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null")}}Ms.prototype.securedGroupCategoryAssociatedEntityType=void 0,Ms.prototype.securedGroupCategoryReferences=void 0,Ms.prototype.securedGroupEntityGroupReference=void 0,Ms.prototype.srcAllowSpec=void 0,Ms.prototype.destAllowSpec=void 0,Ms.prototype.srcCategoryAssociatedEntityType=void 0,Ms.prototype.srcCategoryReferences=void 0,Ms.prototype.srcEntityGroupReference=void 0,Ms.prototype.destCategoryAssociatedEntityType=void 0,Ms.prototype.destCategoryReferences=void 0,Ms.prototype.destEntityGroupReference=void 0,Ms.prototype.srcSubnet=void 0,Ms.prototype.srcIpv6Subnet=void 0,Ms.prototype.destSubnet=void 0,Ms.prototype.destIpv6Subnet=void 0,Ms.prototype.srcAddressGroupReferences=void 0,Ms.prototype.destAddressGroupReferences=void 0,Ms.prototype.serviceGroupReferences=void 0,Ms.prototype.isAllProtocolAllowed=void 0,Ms.prototype.tcpServices=void 0,Ms.prototype.udpServices=void 0,Ms.prototype.icmpServices=void 0,Ms.prototype.icmpV6Services=void 0,Ms.prototype.networkFunctionChainReference=void 0,Ms.prototype.networkFunctionReference=void 0,Ms.prototype.$reserved=void 0,Ms.prototype.$objectType=void 0,Ms.prototype.$unknownFields=void 0;const Js={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",ALLOW:"ALLOW",DENY:"DENY",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(Js).find(t=>Js[t]===e);return null==t?Js.$UNKNOWN:Js[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case Js.$UNKNOWN:case Js.$REDACTED:case Js.ALLOW:case Js.DENY:return;default:throw new Error("Invalid : must be IntraEntityGroupRuleAction.{ $UNKNOWN|$REDACTED|ALLOW|DENY }")}}};Object.freeze(Js);const Ns=Js;var Gs=new WeakSet;class Ls{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=Gs),n.add(t),this.securedGroupAction=e,this.$objectType="microseg.v4.config.IntraEntityGroupRuleSpec",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,r,o;if(e){if(t=t||new Ls,e.hasOwnProperty("securedGroupCategoryAssociatedEntityType")&&null!==e.securedGroupCategoryAssociatedEntityType&&void 0!==e.securedGroupCategoryAssociatedEntityType&&t.setSecuredGroupCategoryAssociatedEntityType(Ss.constructFromObject(e.securedGroupCategoryAssociatedEntityType)),e.hasOwnProperty("securedGroupCategoryReferences")&&null!==e.securedGroupCategoryReferences&&void 0!==e.securedGroupCategoryReferences){for(o=[],s=e.securedGroupCategoryReferences,r=0;r<s.length;r++)o.push(s[r]);t.setSecuredGroupCategoryReferences(o)}if(e.hasOwnProperty("securedGroupEntityGroupReference")&&null!==e.securedGroupEntityGroupReference&&void 0!==e.securedGroupEntityGroupReference&&t.setSecuredGroupEntityGroupReference(e.securedGroupEntityGroupReference),e.hasOwnProperty("securedGroupAction")&&null!==e.securedGroupAction&&void 0!==e.securedGroupAction&&t.setSecuredGroupAction(Ns.constructFromObject(e.securedGroupAction)),e.hasOwnProperty("securedGroupServiceReferences")&&null!==e.securedGroupServiceReferences&&void 0!==e.securedGroupServiceReferences){for(o=[],s=e.securedGroupServiceReferences,r=0;r<s.length;r++)o.push(s[r]);t.setSecuredGroupServiceReferences(o)}if(e.hasOwnProperty("tcpServices")&&null!==e.tcpServices&&void 0!==e.tcpServices){for(o=[],s=e.tcpServices,r=0;r<s.length;r++)i=Cs.constructFromObject(s[r],void 0),o.push(i);t.setTcpServices(o)}if(e.hasOwnProperty("udpServices")&&null!==e.udpServices&&void 0!==e.udpServices){for(o=[],s=e.udpServices,r=0;r<s.length;r++)i=Us.constructFromObject(s[r],void 0),o.push(i);t.setUdpServices(o)}if(e.hasOwnProperty("icmpServices")&&null!==e.icmpServices&&void 0!==e.icmpServices){for(o=[],s=e.icmpServices,r=0;r<s.length;r++)i=Es.constructFromObject(s[r],void 0),o.push(i);t.setIcmpServices(o)}if(e.hasOwnProperty("icmpV6Services")&&null!==e.icmpV6Services&&void 0!==e.icmpV6Services){for(o=[],s=e.icmpV6Services,r=0;r<s.length;r++)i=Is.constructFromObject(s[r],void 0),o.push(i);t.setIcmpV6Services(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())}getSecuredGroupCategoryAssociatedEntityType(){return this.securedGroupCategoryAssociatedEntityType}setSecuredGroupCategoryAssociatedEntityType(e){this.securedGroupCategoryAssociatedEntityType=e}getSecuredGroupCategoryReferences(){return this.securedGroupCategoryReferences}setSecuredGroupCategoryReferences(e){this.securedGroupCategoryReferences=e}getSecuredGroupEntityGroupReference(){return this.securedGroupEntityGroupReference}setSecuredGroupEntityGroupReference(e){this.securedGroupEntityGroupReference=e}getSecuredGroupAction(){return this.securedGroupAction}setSecuredGroupAction(e){this.securedGroupAction=e}getSecuredGroupServiceReferences(){return this.securedGroupServiceReferences}setSecuredGroupServiceReferences(e){this.securedGroupServiceReferences=e}getTcpServices(){return this.tcpServices}setTcpServices(e){this.tcpServices=e}getUdpServices(){return this.udpServices}setUdpServices(e){this.udpServices=e}getIcmpServices(){return this.icmpServices}setIcmpServices(e){this.icmpServices=e}getIcmpV6Services(){return this.icmpV6Services}setIcmpV6Services(e){this.icmpV6Services=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getSecuredGroupCategoryAssociatedEntityType()&&null!==this.getSecuredGroupCategoryAssociatedEntityType()?{securedGroupCategoryAssociatedEntityType:this.getSecuredGroupCategoryAssociatedEntityType()}:{},...void 0!==this.getSecuredGroupCategoryReferences()&&null!==this.getSecuredGroupCategoryReferences()?{securedGroupCategoryReferences:this.getSecuredGroupCategoryReferences()}:{},...void 0!==this.getSecuredGroupEntityGroupReference()&&null!==this.getSecuredGroupEntityGroupReference()?{securedGroupEntityGroupReference:this.getSecuredGroupEntityGroupReference()}:{},...void 0!==this.getSecuredGroupAction()&&null!==this.getSecuredGroupAction()?{securedGroupAction:this.getSecuredGroupAction()}:{},...void 0!==this.getSecuredGroupServiceReferences()&&null!==this.getSecuredGroupServiceReferences()?{securedGroupServiceReferences:this.getSecuredGroupServiceReferences()}:{},...void 0!==this.getTcpServices()&&null!==this.getTcpServices()?{tcpServices:this.getTcpServices().map(e=>e.toJson(!1))}:{},...void 0!==this.getUdpServices()&&null!==this.getUdpServices()?{udpServices:this.getUdpServices().map(e=>e.toJson(!1))}:{},...void 0!==this.getIcmpServices()&&null!==this.getIcmpServices()?{icmpServices:this.getIcmpServices().map(e=>e.toJson(!1))}:{},...void 0!==this.getIcmpV6Services()&&null!==this.getIcmpV6Services()?{icmpV6Services:this.getIcmpV6Services().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 T?n=["securedGroupAction"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("securedGroupCategoryAssociatedEntityType"===t&&(void 0===this.securedGroupCategoryAssociatedEntityType||null===this.securedGroupCategoryAssociatedEntityType))return new j("securedGroupCategoryAssociatedEntityType","undefined or null");if("securedGroupCategoryReferences"===t){if(void 0===this.securedGroupCategoryReferences||null===this.securedGroupCategoryReferences)return new j("securedGroupCategoryReferences","undefined or null");if(!F.validateMaxItems(this.securedGroupCategoryReferences,10))return new j("securedGroupCategoryReferences","does not satisfy required maxItems constraint: 10");if(!F.validateMinItems(this.securedGroupCategoryReferences,1))return new j("securedGroupCategoryReferences","does not satisfy required minItems constraint: 1")}if("securedGroupEntityGroupReference"===t){if(void 0===this.securedGroupEntityGroupReference||null===this.securedGroupEntityGroupReference)return new j("securedGroupEntityGroupReference","undefined or null");if(!F.validatePattern(this.securedGroupEntityGroupReference,/^[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 j("securedGroupEntityGroupReference","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("securedGroupAction"===t&&(void 0===this.securedGroupAction||null===this.securedGroupAction))return new j("securedGroupAction","undefined or null");if("securedGroupServiceReferences"===t){if(void 0===this.securedGroupServiceReferences||null===this.securedGroupServiceReferences)return new j("securedGroupServiceReferences","undefined or null");if(!F.validateMaxItems(this.securedGroupServiceReferences,160))return new j("securedGroupServiceReferences","does not satisfy required maxItems constraint: 160")}if("tcpServices"===t){if(void 0===this.tcpServices||null===this.tcpServices)return new j("tcpServices","undefined or null");if(!F.validateMaxItems(this.tcpServices,160))return new j("tcpServices","does not satisfy required maxItems constraint: 160")}if("udpServices"===t){if(void 0===this.udpServices||null===this.udpServices)return new j("udpServices","undefined or null");if(!F.validateMaxItems(this.udpServices,160))return new j("udpServices","does not satisfy required maxItems constraint: 160")}if("icmpServices"===t){if(void 0===this.icmpServices||null===this.icmpServices)return new j("icmpServices","undefined or null");if(!F.validateMaxItems(this.icmpServices,160))return new j("icmpServices","does not satisfy required maxItems constraint: 160")}if("icmpV6Services"===t){if(void 0===this.icmpV6Services||null===this.icmpV6Services)return new j("icmpV6Services","undefined or null");if(!F.validateMaxItems(this.icmpV6Services,160))return new j("icmpV6Services","does not satisfy required maxItems constraint: 160")}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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null")}}Ls.prototype.securedGroupCategoryAssociatedEntityType=void 0,Ls.prototype.securedGroupCategoryReferences=void 0,Ls.prototype.securedGroupEntityGroupReference=void 0,Ls.prototype.securedGroupAction=void 0,Ls.prototype.securedGroupServiceReferences=void 0,Ls.prototype.tcpServices=void 0,Ls.prototype.udpServices=void 0,Ls.prototype.icmpServices=void 0,Ls.prototype.icmpV6Services=void 0,Ls.prototype.$reserved=void 0,Ls.prototype.$objectType=void 0,Ls.prototype.$unknownFields=void 0;var _s=new WeakSet;class Ws{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=_s),t.add(e),this.$objectType="microseg.v4.config.IsolationGroup",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,r;if(e){if(t=t||new Ws,e.hasOwnProperty("groupCategoryAssociatedEntityType")&&null!==e.groupCategoryAssociatedEntityType&&void 0!==e.groupCategoryAssociatedEntityType&&t.setGroupCategoryAssociatedEntityType(Ss.constructFromObject(e.groupCategoryAssociatedEntityType)),e.hasOwnProperty("groupCategoryReferences")&&null!==e.groupCategoryReferences&&void 0!==e.groupCategoryReferences){for(r=[],s=e.groupCategoryReferences,i=0;i<s.length;i++)r.push(s[i]);t.setGroupCategoryReferences(r)}if(e.hasOwnProperty("groupEntityGroupReference")&&null!==e.groupEntityGroupReference&&void 0!==e.groupEntityGroupReference&&t.setGroupEntityGroupReference(e.groupEntityGroupReference),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())}getGroupCategoryAssociatedEntityType(){return this.groupCategoryAssociatedEntityType}setGroupCategoryAssociatedEntityType(e){this.groupCategoryAssociatedEntityType=e}getGroupCategoryReferences(){return this.groupCategoryReferences}setGroupCategoryReferences(e){this.groupCategoryReferences=e}getGroupEntityGroupReference(){return this.groupEntityGroupReference}setGroupEntityGroupReference(e){this.groupEntityGroupReference=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getGroupCategoryAssociatedEntityType()&&null!==this.getGroupCategoryAssociatedEntityType()?{groupCategoryAssociatedEntityType:this.getGroupCategoryAssociatedEntityType()}:{},...void 0!==this.getGroupCategoryReferences()&&null!==this.getGroupCategoryReferences()?{groupCategoryReferences:this.getGroupCategoryReferences()}:{},...void 0!==this.getGroupEntityGroupReference()&&null!==this.getGroupEntityGroupReference()?{groupEntityGroupReference:this.getGroupEntityGroupReference()}:{},$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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("groupCategoryAssociatedEntityType"===t&&(void 0===this.groupCategoryAssociatedEntityType||null===this.groupCategoryAssociatedEntityType))return new j("groupCategoryAssociatedEntityType","undefined or null");if("groupCategoryReferences"===t){if(void 0===this.groupCategoryReferences||null===this.groupCategoryReferences)return new j("groupCategoryReferences","undefined or null");if(!F.validateMaxItems(this.groupCategoryReferences,10))return new j("groupCategoryReferences","does not satisfy required maxItems constraint: 10");if(!F.validateMinItems(this.groupCategoryReferences,1))return new j("groupCategoryReferences","does not satisfy required minItems constraint: 1")}if("groupEntityGroupReference"===t){if(void 0===this.groupEntityGroupReference||null===this.groupEntityGroupReference)return new j("groupEntityGroupReference","undefined or null");if(!F.validatePattern(this.groupEntityGroupReference,/^[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 j("groupEntityGroupReference","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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null")}}Ws.prototype.groupCategoryAssociatedEntityType=void 0,Ws.prototype.groupCategoryReferences=void 0,Ws.prototype.groupEntityGroupReference=void 0,Ws.prototype.$reserved=void 0,Ws.prototype.$objectType=void 0,Ws.prototype.$unknownFields=void 0;var qs=new WeakSet;class Vs{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=qs),n.add(t),this.isolationGroups=e,this.$objectType="microseg.v4.config.AllToAllIsolationGroup",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,r,o;if(e){if(t=t||new Vs,e.hasOwnProperty("isolationGroups")&&null!==e.isolationGroups&&void 0!==e.isolationGroups){for(o=[],s=e.isolationGroups,r=0;r<s.length;r++)i=Ws.constructFromObject(s[r],void 0),o.push(i);t.setIsolationGroups(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())}getIsolationGroups(){return this.isolationGroups}setIsolationGroups(e){this.isolationGroups=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getIsolationGroups()&&null!==this.getIsolationGroups()?{isolationGroups:this.getIsolationGroups().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 T?n=["isolationGroups"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("isolationGroups"===t){if(void 0===this.isolationGroups||null===this.isolationGroups)return new j("isolationGroups","undefined or null");if(!F.validateMaxItems(this.isolationGroups,32))return new j("isolationGroups","does not satisfy required maxItems constraint: 32");if(!F.validateMinItems(this.isolationGroups,2))return new j("isolationGroups","does not satisfy required minItems constraint: 2")}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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null")}}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")}Vs.prototype.isolationGroups=void 0,Vs.prototype.$reserved=void 0,Vs.prototype.$objectType=void 0,Vs.prototype.$unknownFields=void 0;var zs=new WeakSet;class Ks{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=zs),n.add(t),this.spec=e,this.$objectType="microseg.v4.config.MultiEnvIsolationRuleSpec",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s;if(e){if(t=t||new Ks,e.hasOwnProperty("spec")&&null!==e.spec&&void 0!==e.spec){if(s=e.spec.hasOwnProperty("$objectType")?e.spec.$objectType:typeof e.spec,"microseg.v4.config.AllToAllIsolationGroup"!==s)throw"Unknown datatype "+s+" in data";t.setSpec(Vs.constructFromObject(e.spec,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())}getSpec(){return this.spec}setSpec(e){this.spec=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getSpec()&&null!==this.getSpec()?{spec:void 0!==this.getSpec().toJson?this.getSpec().toJson(!1):Array.isArray(this.getSpec())?this.getSpec().map(e=>void 0!==e.toJson?e.toJson(!1):e):Bs(zs,this,Hs).call(this,this.getSpec(),!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.getSpec()&&null!==this.getSpec()?{spec:void 0!==this.getSpec().toJson?this.getSpec().toJson():Array.isArray(this.getSpec())?this.getSpec().map(e=>void 0!==e.toJson?e.toJson():e):Bs(zs,this,Hs).call(this,this.getSpec())}:{},$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 T?n=["spec"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){return"spec"!==t||void 0!==this.spec&&null!==this.spec?"$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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("spec","undefined or null")}}function Hs(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}Ks.prototype.spec=void 0,Ks.prototype.$reserved=void 0,Ks.prototype.$objectType=void 0,Ks.prototype.$unknownFields=void 0;const Zs={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",QUARANTINE:"QUARANTINE",TWO_ENV_ISOLATION:"TWO_ENV_ISOLATION",APPLICATION:"APPLICATION",INTRA_GROUP:"INTRA_GROUP",MULTI_ENV_ISOLATION:"MULTI_ENV_ISOLATION",SHARED_SERVICE:"SHARED_SERVICE",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(Zs).find(t=>Zs[t]===e);return null==t?Zs.$UNKNOWN:Zs[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case Zs.$UNKNOWN:case Zs.$REDACTED:case Zs.QUARANTINE:case Zs.TWO_ENV_ISOLATION:case Zs.APPLICATION:case Zs.INTRA_GROUP:case Zs.MULTI_ENV_ISOLATION:case Zs.SHARED_SERVICE:return;default:throw new Error("Invalid : must be RuleType.{ $UNKNOWN|$REDACTED|QUARANTINE|TWO_ENV_ISOLATION|APPLICATION|INTRA_GROUP|MULTI_ENV_ISOLATION|SHARED_SERVICE }")}}};Object.freeze(Zs);const Xs=Zs;var Qs=new WeakSet;class Ys{constructor(e,t){var n,s;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(n=this,s=Qs),s.add(n),this.firstIsolationGroup=e,this.secondIsolationGroup=t,this.$objectType="microseg.v4.config.TwoEnvIsolationRuleSpec",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,r;if(e){if(t=t||new Ys,e.hasOwnProperty("firstIsolationGroup")&&null!==e.firstIsolationGroup&&void 0!==e.firstIsolationGroup){for(r=[],s=e.firstIsolationGroup,i=0;i<s.length;i++)r.push(s[i]);t.setFirstIsolationGroup(r)}if(e.hasOwnProperty("secondIsolationGroup")&&null!==e.secondIsolationGroup&&void 0!==e.secondIsolationGroup){for(r=[],s=e.secondIsolationGroup,i=0;i<s.length;i++)r.push(s[i]);t.setSecondIsolationGroup(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())}getFirstIsolationGroup(){return this.firstIsolationGroup}setFirstIsolationGroup(e){this.firstIsolationGroup=e}getSecondIsolationGroup(){return this.secondIsolationGroup}setSecondIsolationGroup(e){this.secondIsolationGroup=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getFirstIsolationGroup()&&null!==this.getFirstIsolationGroup()?{firstIsolationGroup:this.getFirstIsolationGroup()}:{},...void 0!==this.getSecondIsolationGroup()&&null!==this.getSecondIsolationGroup()?{secondIsolationGroup:this.getSecondIsolationGroup()}:{},$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 T?n=["firstIsolationGroup","secondIsolationGroup"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("firstIsolationGroup"===t){if(void 0===this.firstIsolationGroup||null===this.firstIsolationGroup)return new j("firstIsolationGroup","undefined or null");if(!F.validateMaxItems(this.firstIsolationGroup,10))return new j("firstIsolationGroup","does not satisfy required maxItems constraint: 10");if(!F.validateMinItems(this.firstIsolationGroup,1))return new j("firstIsolationGroup","does not satisfy required minItems constraint: 1")}if("secondIsolationGroup"===t){if(void 0===this.secondIsolationGroup||null===this.secondIsolationGroup)return new j("secondIsolationGroup","undefined or null");if(!F.validateMaxItems(this.secondIsolationGroup,10))return new j("secondIsolationGroup","does not satisfy required maxItems constraint: 10");if(!F.validateMinItems(this.secondIsolationGroup,1))return new j("secondIsolationGroup","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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null")}}function ei(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.firstIsolationGroup=void 0,Ys.prototype.secondIsolationGroup=void 0,Ys.prototype.$reserved=void 0,Ys.prototype.$objectType=void 0,Ys.prototype.$unknownFields=void 0;var ti=new WeakSet;class ni extends nt{constructor(e,t){var n,s;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(n=this,s=ti),s.add(n),this.type=e,this.spec=t,this.$objectType="microseg.v4.config.NetworkSecurityPolicyRule",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s;if(e){if(t=t||new ni,nt.constructFromObject(e,t,!0),e.hasOwnProperty("description")&&null!==e.description&&void 0!==e.description&&t.setDescription(e.description),e.hasOwnProperty("type")&&null!==e.type&&void 0!==e.type&&t.setType(Xs.constructFromObject(e.type)),e.hasOwnProperty("spec")&&null!==e.spec&&void 0!==e.spec)switch(s=e.spec.hasOwnProperty("$objectType")?e.spec.$objectType:typeof e.spec,s){case"microseg.v4.config.TwoEnvIsolationRuleSpec":t.setSpec(Ys.constructFromObject(e.spec,void 0));break;case"microseg.v4.config.ApplicationRuleSpec":t.setSpec(Ms.constructFromObject(e.spec,void 0));break;case"microseg.v4.config.IntraEntityGroupRuleSpec":t.setSpec(Ls.constructFromObject(e.spec,void 0));break;case"microseg.v4.config.MultiEnvIsolationRuleSpec":t.setSpec(Ks.constructFromObject(e.spec,void 0));break;default:throw"Unknown datatype "+s+" in data"}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())}getDescription(){return this.description}setDescription(e){this.description=e}getType(){return this.type}setType(e){this.type=e}getSpec(){return this.spec}setSpec(e){this.spec=e}toJson(e){return!1===e?{...void 0!==this.getDescription()&&null!==this.getDescription()?{description:this.getDescription()}:{},...void 0!==this.getType()&&null!==this.getType()?{type:this.getType()}:{},...void 0!==this.getSpec()&&null!==this.getSpec()?{spec:void 0!==this.getSpec().toJson?this.getSpec().toJson(!1):Array.isArray(this.getSpec())?this.getSpec().map(e=>void 0!==e.toJson?e.toJson(!1):e):ei(ti,this,si).call(this,this.getSpec(),!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.getDescription()&&null!==this.getDescription()?{description:this.getDescription()}:{},...void 0!==this.getType()&&null!==this.getType()?{type:this.getType()}:{},...void 0!==this.getSpec()&&null!==this.getSpec()?{spec:void 0!==this.getSpec().toJson?this.getSpec().toJson():Array.isArray(this.getSpec())?this.getSpec().map(e=>void 0!==e.toJson?e.toJson():e):ei(ti,this,si).call(this,this.getSpec())}:{},$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 T?n=["type","spec"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("description"===t){if(void 0===this.description||null===this.description)return new j("description","undefined or null");if(!F.validateMaxLength(this.description,64))return new j("description","does not satisfy required maxLength constraint: 64")}return"type"!==t||void 0!==this.type&&null!==this.type?"spec"!==t||void 0!==this.spec&&null!==this.spec?new j(t,"no such property exists"):new j("spec","undefined or null"):new j("type","undefined or null")}}function si(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.description=void 0,ni.prototype.type=void 0,ni.prototype.spec=void 0,nt.prototype.extId=void 0,nt.prototype.links=void 0,et.prototype.tenantId=void 0;const ii={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",ALL_VLAN:"ALL_VLAN",ALL_VPC:"ALL_VPC",VPC_LIST:"VPC_LIST",GLOBAL:"GLOBAL",VPC_AS_CATEGORY:"VPC_AS_CATEGORY",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(ii).find(t=>ii[t]===e);return null==t?ii.$UNKNOWN:ii[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case ii.$UNKNOWN:case ii.$REDACTED:case ii.ALL_VLAN:case ii.ALL_VPC:case ii.VPC_LIST:case ii.GLOBAL:case ii.VPC_AS_CATEGORY:return;default:throw new Error("Invalid : must be SecurityPolicyScope.{ $UNKNOWN|$REDACTED|ALL_VLAN|ALL_VPC|VPC_LIST|GLOBAL|VPC_AS_CATEGORY }")}}};Object.freeze(ii);const ri=ii,oi={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",SAVE:"SAVE",MONITOR:"MONITOR",ENFORCE:"ENFORCE",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(oi).find(t=>oi[t]===e);return null==t?oi.$UNKNOWN:oi[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case oi.$UNKNOWN:case oi.$REDACTED:case oi.SAVE:case oi.MONITOR:case oi.ENFORCE:return;default:throw new Error("Invalid : must be SecurityPolicyState.{ $UNKNOWN|$REDACTED|SAVE|MONITOR|ENFORCE }")}}};Object.freeze(oi);const ai=oi,di={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",QUARANTINE:"QUARANTINE",ISOLATION:"ISOLATION",APPLICATION:"APPLICATION",SHAREDSERVICE:"SHAREDSERVICE",constructFromObject:function(e){if("string"==typeof e||e instanceof String){let t=Object.keys(di).find(t=>di[t]===e);return null==t?di.$UNKNOWN:di[t]}throw new Error("Received object name is not an instance of String")},validate:function(e){switch(e){case di.$UNKNOWN:case di.$REDACTED:case di.QUARANTINE:case di.ISOLATION:case di.APPLICATION:case di.SHAREDSERVICE:return;default:throw new Error("Invalid : must be SecurityPolicyType.{ $UNKNOWN|$REDACTED|QUARANTINE|ISOLATION|APPLICATION|SHAREDSERVICE }")}}};Object.freeze(di);const li=di;function ui(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 ci=new WeakSet;class hi extends nt{constructor(e,t){var n,s;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(n=this,s=ci),s.add(n),this.name=e,this.type=t,this.$objectType="microseg.v4.config.NetworkSecurityPolicy",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,r,o;if(e){if(t=t||new hi,nt.constructFromObject(e,t,!0),e.hasOwnProperty("name")&&null!==e.name&&void 0!==e.name&&t.setName(e.name),e.hasOwnProperty("type")&&null!==e.type&&void 0!==e.type&&t.setType(li.constructFromObject(e.type)),e.hasOwnProperty("description")&&null!==e.description&&void 0!==e.description&&t.setDescription(e.description),e.hasOwnProperty("state")&&null!==e.state&&void 0!==e.state&&t.setState(ai.constructFromObject(e.state)),e.hasOwnProperty("rules")&&null!==e.rules&&void 0!==e.rules){for(o=[],s=e.rules,r=0;r<s.length;r++)i=ni.constructFromObject(s[r],void 0),o.push(i);t.setRules(o)}if(e.hasOwnProperty("networkFunctionReferences")&&null!==e.networkFunctionReferences&&void 0!==e.networkFunctionReferences){for(o=[],s=e.networkFunctionReferences,r=0;r<s.length;r++)o.push(s[r]);t.setNetworkFunctionReferences(o)}if(e.hasOwnProperty("isIpv6TrafficAllowed")&&null!==e.isIpv6TrafficAllowed&&void 0!==e.isIpv6TrafficAllowed&&t.setIsIpv6TrafficAllowed(e.isIpv6TrafficAllowed),e.hasOwnProperty("isIpv4AddressScope")&&null!==e.isIpv4AddressScope&&void 0!==e.isIpv4AddressScope&&t.setIsIpv4AddressScope(e.isIpv4AddressScope),e.hasOwnProperty("isIpv6AddressScope")&&null!==e.isIpv6AddressScope&&void 0!==e.isIpv6AddressScope&&t.setIsIpv6AddressScope(e.isIpv6AddressScope),e.hasOwnProperty("isHitlogEnabled")&&null!==e.isHitlogEnabled&&void 0!==e.isHitlogEnabled&&t.setIsHitlogEnabled(e.isHitlogEnabled),e.hasOwnProperty("scope")&&null!==e.scope&&void 0!==e.scope&&t.setScope(ri.constructFromObject(e.scope)),e.hasOwnProperty("vpcReferences")&&null!==e.vpcReferences&&void 0!==e.vpcReferences){for(o=[],s=e.vpcReferences,r=0;r<s.length;r++)o.push(s[r]);t.setVpcReferences(o)}if(e.hasOwnProperty("scopeReferences")&&null!==e.scopeReferences&&void 0!==e.scopeReferences){for(o=[],s=e.scopeReferences,r=0;r<s.length;r++)o.push(s[r]);t.setScopeReferences(o)}if(e.hasOwnProperty("securedGroups")&&null!==e.securedGroups&&void 0!==e.securedGroups){for(o=[],s=e.securedGroups,r=0;r<s.length;r++)o.push(s[r]);t.setSecuredGroups(o)}if(e.hasOwnProperty("securedEntityGroupReferences")&&null!==e.securedEntityGroupReferences&&void 0!==e.securedEntityGroupReferences){for(o=[],s=e.securedEntityGroupReferences,r=0;r<s.length;r++)o.push(s[r]);t.setSecuredEntityGroupReferences(o)}if(e.hasOwnProperty("lastUpdateTime")&&null!==e.lastUpdateTime&&void 0!==e.lastUpdateTime&&t.setLastUpdateTime(e.lastUpdateTime),e.hasOwnProperty("creationTime")&&null!==e.creationTime&&void 0!==e.creationTime&&t.setCreationTime(e.creationTime),e.hasOwnProperty("isSystemDefined")&&null!==e.isSystemDefined&&void 0!==e.isSystemDefined&&t.setIsSystemDefined(e.isSystemDefined),e.hasOwnProperty("createdBy")&&null!==e.createdBy&&void 0!==e.createdBy&&t.setCreatedBy(e.createdBy),!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}getType(){return this.type}setType(e){this.type=e}getDescription(){return this.description}setDescription(e){this.description=e}getState(){return this.state}setState(e){this.state=e}getRules(){return this.rules}setRules(e){this.rules=e}getNetworkFunctionReferences(){return this.networkFunctionReferences}setNetworkFunctionReferences(e){this.networkFunctionReferences=e}getIsIpv6TrafficAllowed(){return this.isIpv6TrafficAllowed}setIsIpv6TrafficAllowed(e){this.isIpv6TrafficAllowed=e}getIsIpv4AddressScope(){return this.isIpv4AddressScope}setIsIpv4AddressScope(e){this.isIpv4AddressScope=e}getIsIpv6AddressScope(){return this.isIpv6AddressScope}setIsIpv6AddressScope(e){this.isIpv6AddressScope=e}getIsHitlogEnabled(){return this.isHitlogEnabled}setIsHitlogEnabled(e){this.isHitlogEnabled=e}getScope(){return this.scope}setScope(e){this.scope=e}getVpcReferences(){return this.vpcReferences}setVpcReferences(e){this.vpcReferences=e}getScopeReferences(){return this.scopeReferences}setScopeReferences(e){this.scopeReferences=e}getSecuredGroups(){return this.securedGroups}setSecuredGroups(e){this.securedGroups=e}getSecuredEntityGroupReferences(){return this.securedEntityGroupReferences}setSecuredEntityGroupReferences(e){this.securedEntityGroupReferences=e}getLastUpdateTime(){return this.lastUpdateTime}setLastUpdateTime(e){this.lastUpdateTime=e}getCreationTime(){return this.creationTime}setCreationTime(e){this.creationTime=e}getIsSystemDefined(){return this.isSystemDefined}setIsSystemDefined(e){this.isSystemDefined=e}getCreatedBy(){return this.createdBy}setCreatedBy(e){this.createdBy=e}toJson(e){return!1===e?{...void 0!==this.getName()&&null!==this.getName()?{name:this.getName()}:{},...void 0!==this.getType()&&null!==this.getType()?{type:this.getType()}:{},...void 0!==this.getDescription()&&null!==this.getDescription()?{description:this.getDescription()}:{},...void 0!==this.getState()&&null!==this.getState()?{state:this.getState()}:{},...void 0!==this.getRules()&&null!==this.getRules()?{rules:this.getRules().map(e=>e.toJson(!1))}:{},...void 0!==this.getNetworkFunctionReferences()&&null!==this.getNetworkFunctionReferences()?{networkFunctionReferences:this.getNetworkFunctionReferences()}:{},...void 0!==this.getIsIpv6TrafficAllowed()&&null!==this.getIsIpv6TrafficAllowed()?{isIpv6TrafficAllowed:this.getIsIpv6TrafficAllowed()}:{},...void 0!==this.getIsIpv4AddressScope()&&null!==this.getIsIpv4AddressScope()?{isIpv4AddressScope:this.getIsIpv4AddressScope()}:{},...void 0!==this.getIsIpv6AddressScope()&&null!==this.getIsIpv6AddressScope()?{isIpv6AddressScope:this.getIsIpv6AddressScope()}:{},...void 0!==this.getIsHitlogEnabled()&&null!==this.getIsHitlogEnabled()?{isHitlogEnabled:this.getIsHitlogEnabled()}:{},...void 0!==this.getScope()&&null!==this.getScope()?{scope:this.getScope()}:{},...void 0!==this.getVpcReferences()&&null!==this.getVpcReferences()?{vpcReferences:this.getVpcReferences()}:{},...void 0!==this.getScopeReferences()&&null!==this.getScopeReferences()?{scopeReferences:this.getScopeReferences()}:{},...void 0!==this.getSecuredGroups()&&null!==this.getSecuredGroups()?{securedGroups:this.getSecuredGroups()}:{},...void 0!==this.getSecuredEntityGroupReferences()&&null!==this.getSecuredEntityGroupReferences()?{securedEntityGroupReferences:this.getSecuredEntityGroupReferences()}:{},...void 0!==this.getLastUpdateTime()&&null!==this.getLastUpdateTime()?{lastUpdateTime:ui(ci,this,pi).call(this,this.getLastUpdateTime(),!1)}:{},...void 0!==this.getCreationTime()&&null!==this.getCreationTime()?{creationTime:ui(ci,this,pi).call(this,this.getCreationTime(),!1)}:{},...void 0!==this.getIsSystemDefined()&&null!==this.getIsSystemDefined()?{isSystemDefined:this.getIsSystemDefined()}:{},...void 0!==this.getCreatedBy()&&null!==this.getCreatedBy()?{createdBy:this.getCreatedBy()}:{},...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.getName()&&null!==this.getName()?{name:this.getName()}:{},...void 0!==this.getType()&&null!==this.getType()?{type:this.getType()}:{},...void 0!==this.getDescription()&&null!==this.getDescription()?{description:this.getDescription()}:{},...void 0!==this.getState()&&null!==this.getState()?{state:this.getState()}:{},...void 0!==this.getRules()&&null!==this.getRules()?{rules:this.getRules().map(e=>e.toJson(!1))}:{},...void 0!==this.getIsIpv6TrafficAllowed()&&null!==this.getIsIpv6TrafficAllowed()?{isIpv6TrafficAllowed:this.getIsIpv6TrafficAllowed()}:{},...void 0!==this.getIsIpv4AddressScope()&&null!==this.getIsIpv4AddressScope()?{isIpv4AddressScope:this.getIsIpv4AddressScope()}:{},...void 0!==this.getIsIpv6AddressScope()&&null!==this.getIsIpv6AddressScope()?{isIpv6AddressScope:this.getIsIpv6AddressScope()}:{},...void 0!==this.getIsHitlogEnabled()&&null!==this.getIsHitlogEnabled()?{isHitlogEnabled:this.getIsHitlogEnabled()}:{},...void 0!==this.getScope()&&null!==this.getScope()?{scope:this.getScope()}:{},...void 0!==this.getVpcReferences()&&null!==this.getVpcReferences()?{vpcReferences:this.getVpcReferences()}:{},...void 0!==this.getScopeReferences()&&null!==this.getScopeReferences()?{scopeReferences:this.getScopeReferences()}:{},$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 T?n=["name","type"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("name"===t){if(void 0===this.name||null===this.name)return new j("name","undefined or null");if(!F.validateMaxLength(this.name,63))return new j("name","does not satisfy required maxLength constraint: 63");if(!F.validatePattern(this.name,/^\\s*[a-zA-Z0-9]([a-zA-Z0-9-_ \\\\.]*[a-zA-Z0-9])?\\s*$/))return new j("name","does not satisfy required pattern: /^\\s*[a-zA-Z0-9]([a-zA-Z0-9-_ \\\\.]*[a-zA-Z0-9])?\\s*$/")}if("type"===t&&(void 0===this.type||null===this.type))return new j("type","undefined or null");if("description"===t){if(void 0===this.description||null===this.description)return new j("description","undefined or null");if(!F.validateMaxLength(this.description,512))return new j("description","does not satisfy required maxLength constraint: 512");if(!F.validatePattern(this.description,/^\\s*([a-zA-Z0-9 _:.()-]*)\\s*$/))return new j("description","does not satisfy required pattern: /^\\s*([a-zA-Z0-9 _:.()-]*)\\s*$/")}if("state"===t&&(void 0===this.state||null===this.state))return new j("state","undefined or null");if("rules"===t){if(void 0===this.rules||null===this.rules)return new j("rules","undefined or null");if(!F.validateMaxItems(this.rules,500))return new j("rules","does not satisfy required maxItems constraint: 500");if(!F.validateMinItems(this.rules,1))return new j("rules","does not satisfy required minItems constraint: 1")}if("networkFunctionReferences"===t){if(void 0===this.networkFunctionReferences||null===this.networkFunctionReferences)return new j("networkFunctionReferences","undefined or null");if(!F.validateMaxItems(this.networkFunctionReferences,2))return new j("networkFunctionReferences","does not satisfy required maxItems constraint: 2")}if("isIpv6TrafficAllowed"===t&&(void 0===this.isIpv6TrafficAllowed||null===this.isIpv6TrafficAllowed))return new j("isIpv6TrafficAllowed","undefined or null");if("isIpv4AddressScope"===t&&(void 0===this.isIpv4AddressScope||null===this.isIpv4AddressScope))return new j("isIpv4AddressScope","undefined or null");if("isIpv6AddressScope"===t&&(void 0===this.isIpv6AddressScope||null===this.isIpv6AddressScope))return new j("isIpv6AddressScope","undefined or null");if("isHitlogEnabled"===t&&(void 0===this.isHitlogEnabled||null===this.isHitlogEnabled))return new j("isHitlogEnabled","undefined or null");if("scope"===t&&(void 0===this.scope||null===this.scope))return new j("scope","undefined or null");if("vpcReferences"===t){if(void 0===this.vpcReferences||null===this.vpcReferences)return new j("vpcReferences","undefined or null");if(!F.validateMaxItems(this.vpcReferences,1))return new j("vpcReferences","does not satisfy required maxItems constraint: 1");if(!F.validateMinItems(this.vpcReferences,1))return new j("vpcReferences","does not satisfy required minItems constraint: 1")}if("scopeReferences"===t){if(void 0===this.scopeReferences||null===this.scopeReferences)return new j("scopeReferences","undefined or null");if(!F.validateMaxItems(this.scopeReferences,3))return new j("scopeReferences","does not satisfy required maxItems constraint: 3");if(!F.validateMinItems(this.scopeReferences,1))return new j("scopeReferences","does not satisfy required minItems constraint: 1")}if("securedGroups"===t){if(void 0===this.securedGroups||null===this.securedGroups)return new j("securedGroups","undefined or null");if(!F.validateMaxItems(this.securedGroups,1e3))return new j("securedGroups","does not satisfy required maxItems constraint: 1000");if(!F.validateMinItems(this.securedGroups,1))return new j("securedGroups","does not satisfy required minItems constraint: 1")}if("securedEntityGroupReferences"===t){if(void 0===this.securedEntityGroupReferences||null===this.securedEntityGroupReferences)return new j("securedEntityGroupReferences","undefined or null");if(!F.validateMaxItems(this.securedEntityGroupReferences,1e3))return new j("securedEntityGroupReferences","does not satisfy required maxItems constraint: 1000");if(!F.validateMinItems(this.securedEntityGroupReferences,1))return new j("securedEntityGroupReferences","does not satisfy required minItems constraint: 1")}if("lastUpdateTime"===t&&(void 0===this.lastUpdateTime||null===this.lastUpdateTime))return new j("lastUpdateTime","undefined or null");if("creationTime"===t&&(void 0===this.creationTime||null===this.creationTime))return new j("creationTime","undefined or null");if("isSystemDefined"===t&&(void 0===this.isSystemDefined||null===this.isSystemDefined))return new j("isSystemDefined","undefined or null");if("createdBy"===t){if(void 0===this.createdBy||null===this.createdBy)return new j("createdBy","undefined or null");if(!F.validatePattern(this.createdBy,/^[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 j("createdBy","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 new j(t,"no such property exists")}}function pi(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")}hi.prototype.name=void 0,hi.prototype.type=void 0,hi.prototype.description=void 0,hi.prototype.state=void 0,hi.prototype.rules=void 0,hi.prototype.networkFunctionReferences=void 0,hi.prototype.isIpv6TrafficAllowed=void 0,hi.prototype.isIpv4AddressScope=void 0,hi.prototype.isIpv6AddressScope=void 0,hi.prototype.isHitlogEnabled=void 0,hi.prototype.scope=void 0,hi.prototype.vpcReferences=void 0,hi.prototype.scopeReferences=void 0,hi.prototype.securedGroups=void 0,hi.prototype.securedEntityGroupReferences=void 0,hi.prototype.lastUpdateTime=void 0,hi.prototype.creationTime=void 0,hi.prototype.isSystemDefined=void 0,hi.prototype.createdBy=void 0,nt.prototype.extId=void 0,nt.prototype.links=void 0,et.prototype.tenantId=void 0;var vi=new WeakSet;class gi 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=vi),t.add(e),this.$objectType="microseg.v4.config.ListNetworkSecurityPoliciesApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,o,a,d;if(e){if(t=t||new gi,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(q.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=[],s=e.data,d=s[0].hasOwnProperty("$objectType")?s[0].$objectType:typeof s[0],o=0;o<s.length;o++){if("microseg.v4.config.NetworkSecurityPolicy"!==d)throw"Unknown list of type "+d+" in data";i=hi.constructFromObject(s[o],void 0),a.push(i)}t.setData(a)}else switch(d=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,d){case"Map":t.setData(e.data);break;case"microseg.v4.error.ErrorResponse":t.setData(Le.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+d+" 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(vi,this,fi).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(vi,this,fi).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("metadata","undefined or null")}}function fi(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 wi(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.metadata=void 0,gi.prototype.data=void 0,gi.prototype.$reserved=void 0,gi.prototype.$objectType=void 0,gi.prototype.$unknownFields=void 0;var $i=new WeakSet;class mi 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=$i),t.add(e),this.$objectType="microseg.v4.config.UpdateNetworkSecurityPolicyApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s;if(e){if(t=t||new mi,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(q.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(s=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,s){case"prism.v4.config.TaskReference":t.setData(qe.constructFromObject(e.data,void 0));break;case"microseg.v4.error.ErrorResponse":t.setData(Le.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+s+" 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):wi($i,this,bi).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):wi($i,this,bi).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("metadata","undefined or null")}}function bi(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 ki(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")}mi.prototype.metadata=void 0,mi.prototype.data=void 0,mi.prototype.$reserved=void 0,mi.prototype.$objectType=void 0,mi.prototype.$unknownFields=void 0;var Ti=new WeakSet;class Fi 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=Ti),t.add(e),this.$objectType="microseg.v4.config.GetNetworkSecurityPolicyApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s;if(e){if(t=t||new Fi,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(q.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(s=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,s){case"microseg.v4.config.NetworkSecurityPolicy":t.setData(hi.constructFromObject(e.data,void 0));break;case"microseg.v4.error.ErrorResponse":t.setData(Le.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+s+" 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):ki(Ti,this,ji).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):ki(Ti,this,ji).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("metadata","undefined or null")}}function ji(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 Oi(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")}Fi.prototype.metadata=void 0,Fi.prototype.data=void 0,Fi.prototype.$reserved=void 0,Fi.prototype.$objectType=void 0,Fi.prototype.$unknownFields=void 0;var Si=new WeakSet;class Ai 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=Si),t.add(e),this.$objectType="microseg.v4.config.CreateNetworkSecurityPolicyExportApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s;if(e){if(t=t||new Ai,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(q.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(s=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,s){case"prism.v4.config.TaskReference":t.setData(qe.constructFromObject(e.data,void 0));break;case"microseg.v4.error.ErrorResponse":t.setData(Le.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+s+" 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):Oi(Si,this,Ei).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):Oi(Si,this,Ei).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("metadata","undefined or null")}}function Ei(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 Pi(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.metadata=void 0,Ai.prototype.data=void 0,Ai.prototype.$reserved=void 0,Ai.prototype.$objectType=void 0,Ai.prototype.$unknownFields=void 0;var Ii=new WeakSet;class Ri 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="microseg.v4.config.CreateNetworkSecurityPolicyApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s;if(e){if(t=t||new Ri,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(q.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(s=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,s){case"prism.v4.config.TaskReference":t.setData(qe.constructFromObject(e.data,void 0));break;case"microseg.v4.error.ErrorResponse":t.setData(Le.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+s+" 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):Pi(Ii,this,Ci).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):Pi(Ii,this,Ci).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("metadata","undefined or null")}}function Ci(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}Ri.prototype.metadata=void 0,Ri.prototype.data=void 0,Ri.prototype.$reserved=void 0,Ri.prototype.$objectType=void 0,Ri.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="microseg.v4.config.NetworkSecurityPolicyExportSpec",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,r;if(e){if(t=t||new Ui,e.hasOwnProperty("policyReferences")&&null!==e.policyReferences&&void 0!==e.policyReferences){for(r=[],s=e.policyReferences,i=0;i<s.length;i++)r.push(s[i]);t.setPolicyReferences(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())}getPolicyReferences(){return this.policyReferences}setPolicyReferences(e){this.policyReferences=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getPolicyReferences()&&null!==this.getPolicyReferences()?{policyReferences:this.getPolicyReferences()}:{},$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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("policyReferences"===t){if(void 0===this.policyReferences||null===this.policyReferences)return new j("policyReferences","undefined or null");if(!F.validateMaxItems(this.policyReferences,1e3))return new j("policyReferences","does not satisfy required maxItems constraint: 1000");if(!F.validateMinItems(this.policyReferences,1))return new j("policyReferences","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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null")}}function xi(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.policyReferences=void 0,Ui.prototype.$reserved=void 0,Ui.prototype.$objectType=void 0,Ui.prototype.$unknownFields=void 0;var Mi=new WeakSet;class Ji 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=Mi),t.add(e),this.$objectType="microseg.v4.config.DeleteNetworkSecurityPolicyApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s;if(e){if(t=t||new Ji,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(q.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(s=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,s){case"prism.v4.config.TaskReference":t.setData(qe.constructFromObject(e.data,void 0));break;case"microseg.v4.error.ErrorResponse":t.setData(Le.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+s+" 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):xi(Mi,this,Ni).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):xi(Mi,this,Ni).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("metadata","undefined or null")}}function Ni(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 Gi(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")}Ji.prototype.metadata=void 0,Ji.prototype.data=void 0,Ji.prototype.$reserved=void 0,Ji.prototype.$objectType=void 0,Ji.prototype.$unknownFields=void 0;var Li=new WeakSet;class _i 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=Li),t.add(e),this.$objectType="microseg.v4.config.ListNetworkSecurityPolicyRulesApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,o,a,d;if(e){if(t=t||new _i,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(q.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=[],s=e.data,d=s[0].hasOwnProperty("$objectType")?s[0].$objectType:typeof s[0],o=0;o<s.length;o++){if("microseg.v4.config.NetworkSecurityPolicyRule"!==d)throw"Unknown list of type "+d+" in data";i=ni.constructFromObject(s[o],void 0),a.push(i)}t.setData(a)}else{if(d=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,"microseg.v4.error.ErrorResponse"!==d)throw"Unknown datatype "+d+" in data";t.setData(Le.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):Gi(Li,this,Wi).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):Gi(Li,this,Wi).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("metadata","undefined or null")}}function Wi(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 qi(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")}_i.prototype.metadata=void 0,_i.prototype.data=void 0,_i.prototype.$reserved=void 0,_i.prototype.$objectType=void 0,_i.prototype.$unknownFields=void 0;var Vi=new WeakSet;class Bi 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=Vi),t.add(e),this.$objectType="microseg.v4.config.CreateNetworkSecurityPolicyImportApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s;if(e){if(t=t||new Bi,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(q.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(s=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,s){case"prism.v4.config.TaskReference":t.setData(qe.constructFromObject(e.data,void 0));break;case"microseg.v4.error.ErrorResponse":t.setData(Le.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+s+" 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):qi(Vi,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):qi(Vi,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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("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 Ki(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")}Bi.prototype.metadata=void 0,Bi.prototype.data=void 0,Bi.prototype.$reserved=void 0,Bi.prototype.$objectType=void 0,Bi.prototype.$unknownFields=void 0;var Hi=new WeakSet;class Zi 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=Hi),t.add(e),this.$objectType="microseg.v4.config.UpdateServiceGroupApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s;if(e){if(t=t||new Zi,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(q.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(s=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,s){case"prism.v4.config.TaskReference":t.setData(qe.constructFromObject(e.data,void 0));break;case"microseg.v4.error.ErrorResponse":t.setData(Le.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+s+" 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):Ki(Hi,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):Ki(Hi,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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("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}function Qi(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")}Zi.prototype.metadata=void 0,Zi.prototype.data=void 0,Zi.prototype.$reserved=void 0,Zi.prototype.$objectType=void 0,Zi.prototype.$unknownFields=void 0;var Yi=new WeakSet;class er extends nt{constructor(e){var t,n;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t=this,n=Yi),n.add(t),this.name=e,this.$objectType="microseg.v4.config.ServiceGroup",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,r,o;if(e){if(t=t||new er,nt.constructFromObject(e,t,!0),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("isSystemDefined")&&null!==e.isSystemDefined&&void 0!==e.isSystemDefined&&t.setIsSystemDefined(e.isSystemDefined),e.hasOwnProperty("tcpServices")&&null!==e.tcpServices&&void 0!==e.tcpServices){for(o=[],s=e.tcpServices,r=0;r<s.length;r++)i=Cs.constructFromObject(s[r],void 0),o.push(i);t.setTcpServices(o)}if(e.hasOwnProperty("udpServices")&&null!==e.udpServices&&void 0!==e.udpServices){for(o=[],s=e.udpServices,r=0;r<s.length;r++)i=Us.constructFromObject(s[r],void 0),o.push(i);t.setUdpServices(o)}if(e.hasOwnProperty("icmpServices")&&null!==e.icmpServices&&void 0!==e.icmpServices){for(o=[],s=e.icmpServices,r=0;r<s.length;r++)i=Es.constructFromObject(s[r],void 0),o.push(i);t.setIcmpServices(o)}if(e.hasOwnProperty("icmpV6Services")&&null!==e.icmpV6Services&&void 0!==e.icmpV6Services){for(o=[],s=e.icmpV6Services,r=0;r<s.length;r++)i=Is.constructFromObject(s[r],void 0),o.push(i);t.setIcmpV6Services(o)}if(e.hasOwnProperty("policyReferences")&&null!==e.policyReferences&&void 0!==e.policyReferences){for(o=[],s=e.policyReferences,r=0;r<s.length;r++)o.push(s[r]);t.setPolicyReferences(o)}if(e.hasOwnProperty("createdBy")&&null!==e.createdBy&&void 0!==e.createdBy&&t.setCreatedBy(e.createdBy),e.hasOwnProperty("creationTime")&&null!==e.creationTime&&void 0!==e.creationTime&&t.setCreationTime(e.creationTime),e.hasOwnProperty("lastUpdateTime")&&null!==e.lastUpdateTime&&void 0!==e.lastUpdateTime&&t.setLastUpdateTime(e.lastUpdateTime),!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}getDescription(){return this.description}setDescription(e){this.description=e}getIsSystemDefined(){return this.isSystemDefined}setIsSystemDefined(e){this.isSystemDefined=e}getTcpServices(){return this.tcpServices}setTcpServices(e){this.tcpServices=e}getUdpServices(){return this.udpServices}setUdpServices(e){this.udpServices=e}getIcmpServices(){return this.icmpServices}setIcmpServices(e){this.icmpServices=e}getIcmpV6Services(){return this.icmpV6Services}setIcmpV6Services(e){this.icmpV6Services=e}getPolicyReferences(){return this.policyReferences}setPolicyReferences(e){this.policyReferences=e}getCreatedBy(){return this.createdBy}setCreatedBy(e){this.createdBy=e}getCreationTime(){return this.creationTime}setCreationTime(e){this.creationTime=e}getLastUpdateTime(){return this.lastUpdateTime}setLastUpdateTime(e){this.lastUpdateTime=e}toJson(e){return!1===e?{...void 0!==this.getName()&&null!==this.getName()?{name:this.getName()}:{},...void 0!==this.getDescription()&&null!==this.getDescription()?{description:this.getDescription()}:{},...void 0!==this.getIsSystemDefined()&&null!==this.getIsSystemDefined()?{isSystemDefined:this.getIsSystemDefined()}:{},...void 0!==this.getTcpServices()&&null!==this.getTcpServices()?{tcpServices:this.getTcpServices().map(e=>e.toJson(!1))}:{},...void 0!==this.getUdpServices()&&null!==this.getUdpServices()?{udpServices:this.getUdpServices().map(e=>e.toJson(!1))}:{},...void 0!==this.getIcmpServices()&&null!==this.getIcmpServices()?{icmpServices:this.getIcmpServices().map(e=>e.toJson(!1))}:{},...void 0!==this.getIcmpV6Services()&&null!==this.getIcmpV6Services()?{icmpV6Services:this.getIcmpV6Services().map(e=>e.toJson(!1))}:{},...void 0!==this.getPolicyReferences()&&null!==this.getPolicyReferences()?{policyReferences:this.getPolicyReferences()}:{},...void 0!==this.getCreatedBy()&&null!==this.getCreatedBy()?{createdBy:this.getCreatedBy()}:{},...void 0!==this.getCreationTime()&&null!==this.getCreationTime()?{creationTime:Qi(Yi,this,tr).call(this,this.getCreationTime(),!1)}:{},...void 0!==this.getLastUpdateTime()&&null!==this.getLastUpdateTime()?{lastUpdateTime:Qi(Yi,this,tr).call(this,this.getLastUpdateTime(),!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.getName()&&null!==this.getName()?{name:this.getName()}:{},...void 0!==this.getDescription()&&null!==this.getDescription()?{description:this.getDescription()}:{},...void 0!==this.getTcpServices()&&null!==this.getTcpServices()?{tcpServices:this.getTcpServices().map(e=>e.toJson(!1))}:{},...void 0!==this.getUdpServices()&&null!==this.getUdpServices()?{udpServices:this.getUdpServices().map(e=>e.toJson(!1))}:{},...void 0!==this.getIcmpServices()&&null!==this.getIcmpServices()?{icmpServices:this.getIcmpServices().map(e=>e.toJson(!1))}:{},...void 0!==this.getIcmpV6Services()&&null!==this.getIcmpV6Services()?{icmpV6Services:this.getIcmpV6Services().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 T?n=["name"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("name"===t){if(void 0===this.name||null===this.name)return new j("name","undefined or null");if(!F.validateMaxLength(this.name,64))return new j("name","does not satisfy required maxLength constraint: 64");if(!F.validatePattern(this.name,/^\\s*[a-zA-Z0-9]([a-zA-Z0-9-_ \\\\.]*[a-zA-Z0-9])?\\s*$/))return new j("name","does not satisfy required pattern: /^\\s*[a-zA-Z0-9]([a-zA-Z0-9-_ \\\\.]*[a-zA-Z0-9])?\\s*$/")}if("description"===t){if(void 0===this.description||null===this.description)return new j("description","undefined or null");if(!F.validateMaxLength(this.description,1e3))return new j("description","does not satisfy required maxLength constraint: 1000");if(!F.validatePattern(this.description,/^\\s*([a-zA-Z0-9 _:.()-]*)\\s*$/))return new j("description","does not satisfy required pattern: /^\\s*([a-zA-Z0-9 _:.()-]*)\\s*$/")}if("isSystemDefined"===t&&(void 0===this.isSystemDefined||null===this.isSystemDefined))return new j("isSystemDefined","undefined or null");if("tcpServices"===t){if(void 0===this.tcpServices||null===this.tcpServices)return new j("tcpServices","undefined or null");if(!F.validateMaxItems(this.tcpServices,250))return new j("tcpServices","does not satisfy required maxItems constraint: 250");if(!F.validateMinItems(this.tcpServices,1))return new j("tcpServices","does not satisfy required minItems constraint: 1")}if("udpServices"===t){if(void 0===this.udpServices||null===this.udpServices)return new j("udpServices","undefined or null");if(!F.validateMaxItems(this.udpServices,250))return new j("udpServices","does not satisfy required maxItems constraint: 250");if(!F.validateMinItems(this.udpServices,1))return new j("udpServices","does not satisfy required minItems constraint: 1")}if("icmpServices"===t){if(void 0===this.icmpServices||null===this.icmpServices)return new j("icmpServices","undefined or null");if(!F.validateMaxItems(this.icmpServices,250))return new j("icmpServices","does not satisfy required maxItems constraint: 250");if(!F.validateMinItems(this.icmpServices,1))return new j("icmpServices","does not satisfy required minItems constraint: 1")}if("icmpV6Services"===t){if(void 0===this.icmpV6Services||null===this.icmpV6Services)return new j("icmpV6Services","undefined or null");if(!F.validateMaxItems(this.icmpV6Services,250))return new j("icmpV6Services","does not satisfy required maxItems constraint: 250");if(!F.validateMinItems(this.icmpV6Services,1))return new j("icmpV6Services","does not satisfy required minItems constraint: 1")}if("policyReferences"===t){if(void 0===this.policyReferences||null===this.policyReferences)return new j("policyReferences","undefined or null");if(!F.validateMaxItems(this.policyReferences,1e3))return new j("policyReferences","does not satisfy required maxItems constraint: 1000");if(!F.validateMinItems(this.policyReferences,1))return new j("policyReferences","does not satisfy required minItems constraint: 1")}if("createdBy"===t){if(void 0===this.createdBy||null===this.createdBy)return new j("createdBy","undefined or null");if(!F.validatePattern(this.createdBy,/^[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 j("createdBy","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"creationTime"!==t||void 0!==this.creationTime&&null!==this.creationTime?"lastUpdateTime"!==t||void 0!==this.lastUpdateTime&&null!==this.lastUpdateTime?new j(t,"no such property exists"):new j("lastUpdateTime","undefined or null"):new j("creationTime","undefined or null")}}function tr(e,t){return e instanceof Date&&void 0!==t?t?e.toISOString().slice(0,10):e.toISOString():e}function nr(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.name=void 0,er.prototype.description=void 0,er.prototype.isSystemDefined=void 0,er.prototype.tcpServices=void 0,er.prototype.udpServices=void 0,er.prototype.icmpServices=void 0,er.prototype.icmpV6Services=void 0,er.prototype.policyReferences=void 0,er.prototype.createdBy=void 0,er.prototype.creationTime=void 0,er.prototype.lastUpdateTime=void 0,nt.prototype.extId=void 0,nt.prototype.links=void 0,et.prototype.tenantId=void 0;var sr=new WeakSet;class ir 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="microseg.v4.config.GetServiceGroupApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s;if(e){if(t=t||new ir,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(q.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(s=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,s){case"microseg.v4.config.ServiceGroup":t.setData(er.constructFromObject(e.data,void 0));break;case"microseg.v4.error.ErrorResponse":t.setData(Le.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+s+" 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):nr(sr,this,rr).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):nr(sr,this,rr).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("metadata","undefined or null")}}function rr(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 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")}ir.prototype.metadata=void 0,ir.prototype.data=void 0,ir.prototype.$reserved=void 0,ir.prototype.$objectType=void 0,ir.prototype.$unknownFields=void 0;var ar=new WeakSet;class dr 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="microseg.v4.config.ListServiceGroupsApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,o,a,d;if(e){if(t=t||new dr,e.hasOwnProperty("metadata")&&r.constructFromObject(e.metadata,t),e.hasOwnProperty("metadata")&&null!==e.metadata&&void 0!==e.metadata&&t.setMetadata(q.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=[],s=e.data,d=s[0].hasOwnProperty("$objectType")?s[0].$objectType:typeof s[0],o=0;o<s.length;o++){if("microseg.v4.config.ServiceGroup"!==d)throw"Unknown list of type "+d+" in data";i=er.constructFromObject(s[o],void 0),a.push(i)}t.setData(a)}else{if(d=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,"microseg.v4.error.ErrorResponse"!==d)throw"Unknown datatype "+d+" in data";t.setData(Le.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):or(ar,this,lr).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,lr).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("metadata","undefined or null")}}function lr(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,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")}dr.prototype.metadata=void 0,dr.prototype.data=void 0,dr.prototype.$reserved=void 0,dr.prototype.$objectType=void 0,dr.prototype.$unknownFields=void 0;var cr=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=cr),t.add(e),this.$objectType="microseg.v4.config.DeleteServiceGroupApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s;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(q.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(s=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,s){case"prism.v4.config.TaskReference":t.setData(qe.constructFromObject(e.data,void 0));break;case"microseg.v4.error.ErrorResponse":t.setData(Le.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+s+" 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):ur(cr,this,pr).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):ur(cr,this,pr).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("metadata","undefined or null")}}function pr(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 yr(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 vr=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=vr),t.add(e),this.$objectType="microseg.v4.config.CreateServiceGroupApiResponse",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s;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(q.constructFromObject(e.metadata)),e.hasOwnProperty("data")&&null!==e.data&&void 0!==e.data)switch(s=e.data.hasOwnProperty("$objectType")?e.data.$objectType:typeof e.data,s){case"prism.v4.config.TaskReference":t.setData(qe.constructFromObject(e.data,void 0));break;case"microseg.v4.error.ErrorResponse":t.setData(Le.constructFromObject(e.data,void 0));break;default:throw"Unknown datatype "+s+" 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):yr(vr,this,fr).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):yr(vr,this,fr).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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("data","undefined or null"):new j("metadata","undefined or null")}}function fr(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}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 wr=new WeakSet;class $r extends nt{constructor(e,t){var n,s;super(),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(n=this,s=wr),s.add(n),this.sourceDomainManagerExtId=e,this.targetDomainManagerExtId=t,this.$objectType="microseg.v4.config.SyncPolicy",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,r;if(e){if(t=t||new $r,nt.constructFromObject(e,t,!0),e.hasOwnProperty("sourceDomainManagerExtId")&&null!==e.sourceDomainManagerExtId&&void 0!==e.sourceDomainManagerExtId&&t.setSourceDomainManagerExtId(e.sourceDomainManagerExtId),e.hasOwnProperty("targetDomainManagerExtId")&&null!==e.targetDomainManagerExtId&&void 0!==e.targetDomainManagerExtId&&t.setTargetDomainManagerExtId(e.targetDomainManagerExtId),e.hasOwnProperty("policyExtIds")&&null!==e.policyExtIds&&void 0!==e.policyExtIds){for(r=[],s=e.policyExtIds,i=0;i<s.length;i++)r.push(s[i]);t.setPolicyExtIds(r)}if(e.hasOwnProperty("hasSyncCompatibility")&&null!==e.hasSyncCompatibility&&void 0!==e.hasSyncCompatibility&&t.setHasSyncCompatibility(e.hasSyncCompatibility),!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())}getSourceDomainManagerExtId(){return this.sourceDomainManagerExtId}setSourceDomainManagerExtId(e){this.sourceDomainManagerExtId=e}getTargetDomainManagerExtId(){return this.targetDomainManagerExtId}setTargetDomainManagerExtId(e){this.targetDomainManagerExtId=e}getPolicyExtIds(){return this.policyExtIds}setPolicyExtIds(e){this.policyExtIds=e}getHasSyncCompatibility(){return this.hasSyncCompatibility}setHasSyncCompatibility(e){this.hasSyncCompatibility=e}toJson(e){return!1===e?{...void 0!==this.getSourceDomainManagerExtId()&&null!==this.getSourceDomainManagerExtId()?{sourceDomainManagerExtId:this.getSourceDomainManagerExtId()}:{},...void 0!==this.getTargetDomainManagerExtId()&&null!==this.getTargetDomainManagerExtId()?{targetDomainManagerExtId:this.getTargetDomainManagerExtId()}:{},...void 0!==this.getPolicyExtIds()&&null!==this.getPolicyExtIds()?{policyExtIds:this.getPolicyExtIds()}:{},...void 0!==this.getHasSyncCompatibility()&&null!==this.getHasSyncCompatibility()?{hasSyncCompatibility:this.getHasSyncCompatibility()}:{},...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.getSourceDomainManagerExtId()&&null!==this.getSourceDomainManagerExtId()?{sourceDomainManagerExtId:this.getSourceDomainManagerExtId()}:{},...void 0!==this.getTargetDomainManagerExtId()&&null!==this.getTargetDomainManagerExtId()?{targetDomainManagerExtId:this.getTargetDomainManagerExtId()}:{},...void 0!==this.getPolicyExtIds()&&null!==this.getPolicyExtIds()?{policyExtIds:this.getPolicyExtIds()}:{},...void 0!==this.getHasSyncCompatibility()&&null!==this.getHasSyncCompatibility()?{hasSyncCompatibility:this.getHasSyncCompatibility()}:{},$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 T?n=["sourceDomainManagerExtId","targetDomainManagerExtId"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("sourceDomainManagerExtId"===t){if(void 0===this.sourceDomainManagerExtId||null===this.sourceDomainManagerExtId)return new j("sourceDomainManagerExtId","undefined or null");if(!F.validatePattern(this.sourceDomainManagerExtId,/^[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 j("sourceDomainManagerExtId","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("targetDomainManagerExtId"===t){if(void 0===this.targetDomainManagerExtId||null===this.targetDomainManagerExtId)return new j("targetDomainManagerExtId","undefined or null");if(!F.validatePattern(this.targetDomainManagerExtId,/^[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 j("targetDomainManagerExtId","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("policyExtIds"===t){if(void 0===this.policyExtIds||null===this.policyExtIds)return new j("policyExtIds","undefined or null");if(!F.validateMaxItems(this.policyExtIds,1e3))return new j("policyExtIds","does not satisfy required maxItems constraint: 1000")}return"hasSyncCompatibility"!==t||void 0!==this.hasSyncCompatibility&&null!==this.hasSyncCompatibility?new j(t,"no such property exists"):new j("hasSyncCompatibility","undefined or null")}}$r.prototype.sourceDomainManagerExtId=void 0,$r.prototype.targetDomainManagerExtId=void 0,$r.prototype.policyExtIds=void 0,$r.prototype.hasSyncCompatibility=void 0,nt.prototype.extId=void 0,nt.prototype.links=void 0,et.prototype.tenantId=void 0;var mr=new WeakSet;class br{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=mr),t.add(e),this.$objectType="microseg.v4.operation.DryRunSpec",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,r;if(e){if(t=t||new br,e.hasOwnProperty("policyNames")&&null!==e.policyNames&&void 0!==e.policyNames){for(r=[],s=e.policyNames,i=0;i<s.length;i++)r.push(s[i]);t.setPolicyNames(r)}if(e.hasOwnProperty("shouldIncludeSecureSubnetsInfo")&&null!==e.shouldIncludeSecureSubnetsInfo&&void 0!==e.shouldIncludeSecureSubnetsInfo&&t.setShouldIncludeSecureSubnetsInfo(e.shouldIncludeSecureSubnetsInfo),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())}getPolicyNames(){return this.policyNames}setPolicyNames(e){this.policyNames=e}getShouldIncludeSecureSubnetsInfo(){return this.shouldIncludeSecureSubnetsInfo}setShouldIncludeSecureSubnetsInfo(e){this.shouldIncludeSecureSubnetsInfo=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getPolicyNames()&&null!==this.getPolicyNames()?{policyNames:this.getPolicyNames()}:{},...void 0!==this.getShouldIncludeSecureSubnetsInfo()&&null!==this.getShouldIncludeSecureSubnetsInfo()?{shouldIncludeSecureSubnetsInfo:this.getShouldIncludeSecureSubnetsInfo()}:{},$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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("policyNames"===t){if(void 0===this.policyNames||null===this.policyNames)return new j("policyNames","undefined or null");if(!F.validateMaxItems(this.policyNames,20))return new j("policyNames","does not satisfy required maxItems constraint: 20")}return"shouldIncludeSecureSubnetsInfo"!==t||void 0!==this.shouldIncludeSecureSubnetsInfo&&null!==this.shouldIncludeSecureSubnetsInfo?"$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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("shouldIncludeSecureSubnetsInfo","undefined or null")}}br.prototype.policyNames=void 0,br.prototype.shouldIncludeSecureSubnetsInfo=void 0,br.prototype.$reserved=void 0,br.prototype.$objectType=void 0,br.prototype.$unknownFields=void 0;var kr=new WeakSet;class Tr{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=kr),t.add(e),this.$objectType="microseg.v4.operation.SecurityPolicyOptions",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new Tr,e.hasOwnProperty("isIpv6TrafficAllowed")&&null!==e.isIpv6TrafficAllowed&&void 0!==e.isIpv6TrafficAllowed&&t.setIsIpv6TrafficAllowed(e.isIpv6TrafficAllowed),e.hasOwnProperty("isHitlogEnabled")&&null!==e.isHitlogEnabled&&void 0!==e.isHitlogEnabled&&t.setIsHitlogEnabled(e.isHitlogEnabled),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())}getIsIpv6TrafficAllowed(){return this.isIpv6TrafficAllowed}setIsIpv6TrafficAllowed(e){this.isIpv6TrafficAllowed=e}getIsHitlogEnabled(){return this.isHitlogEnabled}setIsHitlogEnabled(e){this.isHitlogEnabled=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getIsIpv6TrafficAllowed()&&null!==this.getIsIpv6TrafficAllowed()?{isIpv6TrafficAllowed:this.getIsIpv6TrafficAllowed()}:{},...void 0!==this.getIsHitlogEnabled()&&null!==this.getIsHitlogEnabled()?{isHitlogEnabled:this.getIsHitlogEnabled()}:{},$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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){return"isIpv6TrafficAllowed"!==t||void 0!==this.isIpv6TrafficAllowed&&null!==this.isIpv6TrafficAllowed?"isHitlogEnabled"!==t||void 0!==this.isHitlogEnabled&&null!==this.isHitlogEnabled?"$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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("isHitlogEnabled","undefined or null"):new j("isIpv6TrafficAllowed","undefined or null")}}Tr.prototype.isIpv6TrafficAllowed=!1,Tr.prototype.isHitlogEnabled=!1,Tr.prototype.$reserved=void 0,Tr.prototype.$objectType=void 0,Tr.prototype.$unknownFields=void 0;const Fr={$UNKNOWN:"$UNKNOWN",$REDACTED:"$REDACTED",QUARANTINE:"QUARANTINE",ISOLATION:"ISOLATION",APPLICATION:"APPLICATION",AD:"AD",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.QUARANTINE:case Fr.ISOLATION:case Fr.APPLICATION:case Fr.AD:return;default:throw new Error("Invalid : must be SecurityPolicyType.{ $UNKNOWN|$REDACTED|QUARANTINE|ISOLATION|APPLICATION|AD }")}}};Object.freeze(Fr);const jr=Fr;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")}var Sr=new WeakSet;class Ar{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.state=e,this.$objectType="microseg.v4.operation.PolicyMetadata",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,r;if(e){if(t=t||new Ar,e.hasOwnProperty("description")&&null!==e.description&&void 0!==e.description&&t.setDescription(e.description),e.hasOwnProperty("securedGroupCategoryReferences")&&null!==e.securedGroupCategoryReferences&&void 0!==e.securedGroupCategoryReferences){for(r=[],s=e.securedGroupCategoryReferences,i=0;i<s.length;i++)r.push(s[i]);t.setSecuredGroupCategoryReferences(r)}if(e.hasOwnProperty("state")&&null!==e.state&&void 0!==e.state&&t.setState(ai.constructFromObject(e.state)),e.hasOwnProperty("lastUpdateTime")&&null!==e.lastUpdateTime&&void 0!==e.lastUpdateTime&&t.setLastUpdateTime(e.lastUpdateTime),e.hasOwnProperty("type")&&null!==e.type&&void 0!==e.type&&t.setType(jr.constructFromObject(e.type)),e.hasOwnProperty("previewReference")&&null!==e.previewReference&&void 0!==e.previewReference&&t.setPreviewReference(e.previewReference),e.hasOwnProperty("options")&&null!==e.options&&void 0!==e.options&&t.setOptions(Tr.constructFromObject(e.options)),e.hasOwnProperty("name")&&null!==e.name&&void 0!==e.name&&t.setName(e.name),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())}getDescription(){return this.description}setDescription(e){this.description=e}getSecuredGroupCategoryReferences(){return this.securedGroupCategoryReferences}setSecuredGroupCategoryReferences(e){this.securedGroupCategoryReferences=e}getState(){return this.state}setState(e){this.state=e}getLastUpdateTime(){return this.lastUpdateTime}setLastUpdateTime(e){this.lastUpdateTime=e}getType(){return this.type}setType(e){this.type=e}getPreviewReference(){return this.previewReference}setPreviewReference(e){this.previewReference=e}getOptions(){return this.options}setOptions(e){this.options=e}getName(){return this.name}setName(e){this.name=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getDescription()&&null!==this.getDescription()?{description:this.getDescription()}:{},...void 0!==this.getSecuredGroupCategoryReferences()&&null!==this.getSecuredGroupCategoryReferences()?{securedGroupCategoryReferences:this.getSecuredGroupCategoryReferences()}:{},...void 0!==this.getState()&&null!==this.getState()?{state:this.getState()}:{},...void 0!==this.getLastUpdateTime()&&null!==this.getLastUpdateTime()?{lastUpdateTime:Or(Sr,this,Er).call(this,this.getLastUpdateTime(),!1)}:{},...void 0!==this.getType()&&null!==this.getType()?{type:this.getType()}:{},...void 0!==this.getPreviewReference()&&null!==this.getPreviewReference()?{previewReference:this.getPreviewReference()}:{},...void 0!==this.getOptions()&&null!==this.getOptions()?{options:this.getOptions().toJson(!1)}:{},...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:{}}:{...void 0!==this.getDescription()&&null!==this.getDescription()?{description:this.getDescription()}:{},...void 0!==this.getSecuredGroupCategoryReferences()&&null!==this.getSecuredGroupCategoryReferences()?{securedGroupCategoryReferences:this.getSecuredGroupCategoryReferences()}:{},...void 0!==this.getState()&&null!==this.getState()?{state:this.getState()}:{},...void 0!==this.getType()&&null!==this.getType()?{type:this.getType()}:{},...void 0!==this.getPreviewReference()&&null!==this.getPreviewReference()?{previewReference:this.getPreviewReference()}:{},...void 0!==this.getOptions()&&null!==this.getOptions()?{options:this.getOptions().toJson(!1)}:{},...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 T?n=["state"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("description"===t){if(void 0===this.description||null===this.description)return new j("description","undefined or null");if(!F.validateMaxLength(this.description,512))return new j("description","does not satisfy required maxLength constraint: 512")}if("securedGroupCategoryReferences"===t){if(void 0===this.securedGroupCategoryReferences||null===this.securedGroupCategoryReferences)return new j("securedGroupCategoryReferences","undefined or null");if(!F.validateMaxItems(this.securedGroupCategoryReferences,64))return new j("securedGroupCategoryReferences","does not satisfy required maxItems constraint: 64");if(!F.validateMinItems(this.securedGroupCategoryReferences,1))return new j("securedGroupCategoryReferences","does not satisfy required minItems constraint: 1")}if("state"===t&&(void 0===this.state||null===this.state))return new j("state","undefined or null");if("lastUpdateTime"===t&&(void 0===this.lastUpdateTime||null===this.lastUpdateTime))return new j("lastUpdateTime","undefined or null");if("type"===t&&(void 0===this.type||null===this.type))return new j("type","undefined or null");if("previewReference"===t){if(void 0===this.previewReference||null===this.previewReference)return new j("previewReference","undefined or null");if(!F.validatePattern(this.previewReference,/^[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 j("previewReference","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("options"===t&&(void 0===this.options||null===this.options))return new j("options","undefined or null");if("name"===t){if(void 0===this.name||null===this.name)return new j("name","undefined or null");if(!F.validateMaxLength(this.name,63))return new j("name","does not satisfy required maxLength constraint: 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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null")}}function Er(e,t){return e instanceof Date&&void 0!==t?t?e.toISOString().slice(0,10):e.toISOString():e}Ar.prototype.description=void 0,Ar.prototype.securedGroupCategoryReferences=void 0,Ar.prototype.state=void 0,Ar.prototype.lastUpdateTime=void 0,Ar.prototype.type=void 0,Ar.prototype.previewReference=void 0,Ar.prototype.options=void 0,Ar.prototype.name=void 0,Ar.prototype.$reserved=void 0,Ar.prototype.$objectType=void 0,Ar.prototype.$unknownFields=void 0;var Pr=new WeakSet;class Ir{constructor(e,t){var n,s;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(n=this,s=Pr),s.add(n),this.policyName=e,this.policyMetadata=t,this.$objectType="microseg.v4.operation.PolicyUpgradeSummary",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,r,o;if(e){if(t=t||new Ir,e.hasOwnProperty("policyName")&&null!==e.policyName&&void 0!==e.policyName&&t.setPolicyName(e.policyName),e.hasOwnProperty("policyMetadata")&&null!==e.policyMetadata&&void 0!==e.policyMetadata&&t.setPolicyMetadata(Ar.constructFromObject(e.policyMetadata)),e.hasOwnProperty("systemGenPolicyMetadata")&&null!==e.systemGenPolicyMetadata&&void 0!==e.systemGenPolicyMetadata){for(o=[],s=e.systemGenPolicyMetadata,r=0;r<s.length;r++)i=Ar.constructFromObject(s[r],void 0),o.push(i);t.setSystemGenPolicyMetadata(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())}getPolicyName(){return this.policyName}setPolicyName(e){this.policyName=e}getPolicyMetadata(){return this.policyMetadata}setPolicyMetadata(e){this.policyMetadata=e}getSystemGenPolicyMetadata(){return this.systemGenPolicyMetadata}setSystemGenPolicyMetadata(e){this.systemGenPolicyMetadata=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getPolicyName()&&null!==this.getPolicyName()?{policyName:this.getPolicyName()}:{},...void 0!==this.getPolicyMetadata()&&null!==this.getPolicyMetadata()?{policyMetadata:this.getPolicyMetadata().toJson(!1)}:{},...void 0!==this.getSystemGenPolicyMetadata()&&null!==this.getSystemGenPolicyMetadata()?{systemGenPolicyMetadata:this.getSystemGenPolicyMetadata().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 T?n=["policyName","policyMetadata"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("policyName"===t){if(void 0===this.policyName||null===this.policyName)return new j("policyName","undefined or null");if(!F.validateMaxLength(this.policyName,63))return new j("policyName","does not satisfy required maxLength constraint: 63")}if("policyMetadata"===t&&(void 0===this.policyMetadata||null===this.policyMetadata))return new j("policyMetadata","undefined or null");if("systemGenPolicyMetadata"===t){if(void 0===this.systemGenPolicyMetadata||null===this.systemGenPolicyMetadata)return new j("systemGenPolicyMetadata","undefined or null");if(!F.validateMaxItems(this.systemGenPolicyMetadata,9999))return new j("systemGenPolicyMetadata","does not satisfy required maxItems constraint: 9999")}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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null")}}Ir.prototype.policyName=void 0,Ir.prototype.policyMetadata=void 0,Ir.prototype.systemGenPolicyMetadata=void 0,Ir.prototype.$reserved=void 0,Ir.prototype.$objectType=void 0,Ir.prototype.$unknownFields=void 0;var Rr=new WeakSet;class Cr{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=Rr),n.add(t),this.vlanID=e,this.$objectType="microseg.v4.operation.SubnetUpgradeSummary",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new Cr,e.hasOwnProperty("vlanName")&&null!==e.vlanName&&void 0!==e.vlanName&&t.setVlanName(e.vlanName),e.hasOwnProperty("vlanID")&&null!==e.vlanID&&void 0!==e.vlanID&&t.setVlanID(e.vlanID),e.hasOwnProperty("subnetReference")&&null!==e.subnetReference&&void 0!==e.subnetReference&&t.setSubnetReference(e.subnetReference),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())}getVlanName(){return this.vlanName}setVlanName(e){this.vlanName=e}getVlanID(){return this.vlanID}setVlanID(e){this.vlanID=e}getSubnetReference(){return this.subnetReference}setSubnetReference(e){this.subnetReference=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getVlanName()&&null!==this.getVlanName()?{vlanName:this.getVlanName()}:{},...void 0!==this.getVlanID()&&null!==this.getVlanID()?{vlanID:this.getVlanID()}:{},...void 0!==this.getSubnetReference()&&null!==this.getSubnetReference()?{subnetReference:this.getSubnetReference()}:{},$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 T?n=["vlanID"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("vlanName"===t){if(void 0===this.vlanName||null===this.vlanName)return new j("vlanName","undefined or null");if(!F.validateMaxLength(this.vlanName,64))return new j("vlanName","does not satisfy required maxLength constraint: 64")}if("vlanID"===t&&(void 0===this.vlanID||null===this.vlanID))return new j("vlanID","undefined or null");if("subnetReference"===t){if(void 0===this.subnetReference||null===this.subnetReference)return new j("subnetReference","undefined or null");if(!F.validatePattern(this.subnetReference,/^[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 j("subnetReference","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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null")}}Cr.prototype.vlanName=void 0,Cr.prototype.vlanID=void 0,Cr.prototype.subnetReference=void 0,Cr.prototype.$reserved=void 0,Cr.prototype.$objectType=void 0,Cr.prototype.$unknownFields=void 0;var Dr=new WeakSet;class Ur{constructor(e,t,n){var s,i;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(s=this,i=Dr),i.add(s),this.newPoliciesCount=e,this.oldPoliciesCount=t,this.systemDefinedPoliciesCount=n,this.$objectType="microseg.v4.operation.PolicyCount",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new Ur,e.hasOwnProperty("newPoliciesCount")&&null!==e.newPoliciesCount&&void 0!==e.newPoliciesCount&&t.setNewPoliciesCount(e.newPoliciesCount),e.hasOwnProperty("oldPoliciesCount")&&null!==e.oldPoliciesCount&&void 0!==e.oldPoliciesCount&&t.setOldPoliciesCount(e.oldPoliciesCount),e.hasOwnProperty("systemDefinedPoliciesCount")&&null!==e.systemDefinedPoliciesCount&&void 0!==e.systemDefinedPoliciesCount&&t.setSystemDefinedPoliciesCount(e.systemDefinedPoliciesCount),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())}getNewPoliciesCount(){return this.newPoliciesCount}setNewPoliciesCount(e){this.newPoliciesCount=e}getOldPoliciesCount(){return this.oldPoliciesCount}setOldPoliciesCount(e){this.oldPoliciesCount=e}getSystemDefinedPoliciesCount(){return this.systemDefinedPoliciesCount}setSystemDefinedPoliciesCount(e){this.systemDefinedPoliciesCount=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getNewPoliciesCount()&&null!==this.getNewPoliciesCount()?{newPoliciesCount:this.getNewPoliciesCount()}:{},...void 0!==this.getOldPoliciesCount()&&null!==this.getOldPoliciesCount()?{oldPoliciesCount:this.getOldPoliciesCount()}:{},...void 0!==this.getSystemDefinedPoliciesCount()&&null!==this.getSystemDefinedPoliciesCount()?{systemDefinedPoliciesCount:this.getSystemDefinedPoliciesCount()}:{},$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 T?n=["newPoliciesCount","oldPoliciesCount","systemDefinedPoliciesCount"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){return"newPoliciesCount"!==t||void 0!==this.newPoliciesCount&&null!==this.newPoliciesCount?"oldPoliciesCount"!==t||void 0!==this.oldPoliciesCount&&null!==this.oldPoliciesCount?"systemDefinedPoliciesCount"!==t||void 0!==this.systemDefinedPoliciesCount&&null!==this.systemDefinedPoliciesCount?"$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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("systemDefinedPoliciesCount","undefined or null"):new j("oldPoliciesCount","undefined or null"):new j("newPoliciesCount","undefined or null")}}Ur.prototype.newPoliciesCount=void 0,Ur.prototype.oldPoliciesCount=void 0,Ur.prototype.systemDefinedPoliciesCount=void 0,Ur.prototype.$reserved=void 0,Ur.prototype.$objectType=void 0,Ur.prototype.$unknownFields=void 0;var xr=new WeakSet;class Mr{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=xr),t.add(e),this.$objectType="microseg.v4.operation.PolicyCountByType",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new Mr,e.hasOwnProperty("type")&&null!==e.type&&void 0!==e.type&&t.setType(jr.constructFromObject(e.type)),e.hasOwnProperty("countSummary")&&null!==e.countSummary&&void 0!==e.countSummary&&t.setCountSummary(Ur.constructFromObject(e.countSummary)),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}getCountSummary(){return this.countSummary}setCountSummary(e){this.countSummary=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.getCountSummary()&&null!==this.getCountSummary()?{countSummary:this.getCountSummary().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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){return"type"!==t||void 0!==this.type&&null!==this.type?"countSummary"!==t||void 0!==this.countSummary&&null!==this.countSummary?"$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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("countSummary","undefined or null"):new j("type","undefined or null")}}Mr.prototype.type=void 0,Mr.prototype.countSummary=void 0,Mr.prototype.$reserved=void 0,Mr.prototype.$objectType=void 0,Mr.prototype.$unknownFields=void 0;var Jr=new WeakSet;class Nr{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=Jr),n.add(t),this.totalCountsSummary=e,this.$objectType="microseg.v4.operation.TotalPolicyCount",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,r,o;if(e){if(t=t||new Nr,e.hasOwnProperty("totalCountsSummary")&&null!==e.totalCountsSummary&&void 0!==e.totalCountsSummary&&t.setTotalCountsSummary(Ur.constructFromObject(e.totalCountsSummary)),e.hasOwnProperty("policyTypeCountsSummary")&&null!==e.policyTypeCountsSummary&&void 0!==e.policyTypeCountsSummary){for(o=[],s=e.policyTypeCountsSummary,r=0;r<s.length;r++)i=Mr.constructFromObject(s[r],void 0),o.push(i);t.setPolicyTypeCountsSummary(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())}getTotalCountsSummary(){return this.totalCountsSummary}setTotalCountsSummary(e){this.totalCountsSummary=e}getPolicyTypeCountsSummary(){return this.policyTypeCountsSummary}setPolicyTypeCountsSummary(e){this.policyTypeCountsSummary=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getTotalCountsSummary()&&null!==this.getTotalCountsSummary()?{totalCountsSummary:this.getTotalCountsSummary().toJson(!1)}:{},...void 0!==this.getPolicyTypeCountsSummary()&&null!==this.getPolicyTypeCountsSummary()?{policyTypeCountsSummary:this.getPolicyTypeCountsSummary().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 T?n=["totalCountsSummary"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("totalCountsSummary"===t&&(void 0===this.totalCountsSummary||null===this.totalCountsSummary))return new j("totalCountsSummary","undefined or null");if("policyTypeCountsSummary"===t){if(void 0===this.policyTypeCountsSummary||null===this.policyTypeCountsSummary)return new j("policyTypeCountsSummary","undefined or null");if(!F.validateMaxItems(this.policyTypeCountsSummary,4))return new j("policyTypeCountsSummary","does not satisfy required maxItems constraint: 4")}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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null")}}Nr.prototype.totalCountsSummary=void 0,Nr.prototype.policyTypeCountsSummary=void 0,Nr.prototype.$reserved=void 0,Nr.prototype.$objectType=void 0,Nr.prototype.$unknownFields=void 0;var Gr=new WeakSet;class Lr extends nt{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=Gr),t.add(e),this.$objectType="microseg.v4.operation.DryRunSummary",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,r,o;if(e){if(t=t||new Lr,nt.constructFromObject(e,t,!0),e.hasOwnProperty("policySummaries")&&null!==e.policySummaries&&void 0!==e.policySummaries){for(o=[],s=e.policySummaries,r=0;r<s.length;r++)i=Ir.constructFromObject(s[r],void 0),o.push(i);t.setPolicySummaries(o)}if(e.hasOwnProperty("countSummary")&&null!==e.countSummary&&void 0!==e.countSummary&&t.setCountSummary(Nr.constructFromObject(e.countSummary)),e.hasOwnProperty("subnetSummaries")&&null!==e.subnetSummaries&&void 0!==e.subnetSummaries){for(o=[],s=e.subnetSummaries,r=0;r<s.length;r++)i=Cr.constructFromObject(s[r],void 0),o.push(i);t.setSubnetSummaries(o)}if(e.hasOwnProperty("summaryFailures")&&null!==e.summaryFailures&&void 0!==e.summaryFailures){for(o=[],s=e.summaryFailures,r=0;r<s.length;r++)i=N.constructFromObject(s[r],void 0),o.push(i);t.setSummaryFailures(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())}getPolicySummaries(){return this.policySummaries}setPolicySummaries(e){this.policySummaries=e}getCountSummary(){return this.countSummary}setCountSummary(e){this.countSummary=e}getSubnetSummaries(){return this.subnetSummaries}setSubnetSummaries(e){this.subnetSummaries=e}getSummaryFailures(){return this.summaryFailures}setSummaryFailures(e){this.summaryFailures=e}toJson(e){return!1===e?{...void 0!==this.getPolicySummaries()&&null!==this.getPolicySummaries()?{policySummaries:this.getPolicySummaries().map(e=>e.toJson(!1))}:{},...void 0!==this.getCountSummary()&&null!==this.getCountSummary()?{countSummary:this.getCountSummary().toJson(!1)}:{},...void 0!==this.getSubnetSummaries()&&null!==this.getSubnetSummaries()?{subnetSummaries:this.getSubnetSummaries().map(e=>e.toJson(!1))}:{},...void 0!==this.getSummaryFailures()&&null!==this.getSummaryFailures()?{summaryFailures:this.getSummaryFailures().map(e=>e.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.getPolicySummaries()&&null!==this.getPolicySummaries()?{policySummaries:this.getPolicySummaries().map(e=>e.toJson(!1))}:{},...void 0!==this.getCountSummary()&&null!==this.getCountSummary()?{countSummary:this.getCountSummary().toJson(!1)}:{},...void 0!==this.getSubnetSummaries()&&null!==this.getSubnetSummaries()?{subnetSummaries:this.getSubnetSummaries().map(e=>e.toJson(!1))}:{},...void 0!==this.getSummaryFailures()&&null!==this.getSummaryFailures()?{summaryFailures:this.getSummaryFailures().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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("policySummaries"===t){if(void 0===this.policySummaries||null===this.policySummaries)return new j("policySummaries","undefined or null");if(!F.validateMaxItems(this.policySummaries,5e3))return new j("policySummaries","does not satisfy required maxItems constraint: 5000")}if("countSummary"===t&&(void 0===this.countSummary||null===this.countSummary))return new j("countSummary","undefined or null");if("subnetSummaries"===t){if(void 0===this.subnetSummaries||null===this.subnetSummaries)return new j("subnetSummaries","undefined or null");if(!F.validateMaxItems(this.subnetSummaries,9999))return new j("subnetSummaries","does not satisfy required maxItems constraint: 9999")}if("summaryFailures"===t){if(void 0===this.summaryFailures||null===this.summaryFailures)return new j("summaryFailures","undefined or null");if(!F.validateMaxItems(this.summaryFailures,20))return new j("summaryFailures","does not satisfy required maxItems constraint: 20")}return new j(t,"no such property exists")}}Lr.prototype.policySummaries=void 0,Lr.prototype.countSummary=void 0,Lr.prototype.subnetSummaries=void 0,Lr.prototype.summaryFailures=void 0,nt.prototype.extId=void 0,nt.prototype.links=void 0,et.prototype.tenantId=void 0;var _r=new WeakSet;class Wr extends nt{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=_r),t.add(e),this.$objectType="microseg.v4.operation.PolicyPreview",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s,i,r,o;if(e){if(t=t||new Wr,nt.constructFromObject(e,t,!0),e.hasOwnProperty("newPolicySpec")&&null!==e.newPolicySpec&&void 0!==e.newPolicySpec&&t.setNewPolicySpec(hi.constructFromObject(e.newPolicySpec)),e.hasOwnProperty("systemGeneratedPolicies")&&null!==e.systemGeneratedPolicies&&void 0!==e.systemGeneratedPolicies){for(o=[],s=e.systemGeneratedPolicies,r=0;r<s.length;r++)i=hi.constructFromObject(s[r],void 0),o.push(i);t.setSystemGeneratedPolicies(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())}getNewPolicySpec(){return this.newPolicySpec}setNewPolicySpec(e){this.newPolicySpec=e}getSystemGeneratedPolicies(){return this.systemGeneratedPolicies}setSystemGeneratedPolicies(e){this.systemGeneratedPolicies=e}toJson(e){return!1===e?{...void 0!==this.getNewPolicySpec()&&null!==this.getNewPolicySpec()?{newPolicySpec:this.getNewPolicySpec().toJson(!1)}:{},...void 0!==this.getSystemGeneratedPolicies()&&null!==this.getSystemGeneratedPolicies()?{systemGeneratedPolicies:this.getSystemGeneratedPolicies().map(e=>e.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.getNewPolicySpec()&&null!==this.getNewPolicySpec()?{newPolicySpec:this.getNewPolicySpec().toJson(!1)}:{},...void 0!==this.getSystemGeneratedPolicies()&&null!==this.getSystemGeneratedPolicies()?{systemGeneratedPolicies:this.getSystemGeneratedPolicies().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 T?n=[]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){if("newPolicySpec"===t&&(void 0===this.newPolicySpec||null===this.newPolicySpec))return new j("newPolicySpec","undefined or null");if("systemGeneratedPolicies"===t){if(void 0===this.systemGeneratedPolicies||null===this.systemGeneratedPolicies)return new j("systemGeneratedPolicies","undefined or null");if(!F.validateMaxItems(this.systemGeneratedPolicies,9999))return new j("systemGeneratedPolicies","does not satisfy required maxItems constraint: 9999")}return new j(t,"no such property exists")}}Wr.prototype.newPolicySpec=void 0,Wr.prototype.systemGeneratedPolicies=void 0,nt.prototype.extId=void 0,nt.prototype.links=void 0,et.prototype.tenantId=void 0;var qr=new WeakSet;class Vr{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=qr),n.add(t),this.shouldSetMonitorMode=e,this.$objectType="microseg.v4.operation.UpgradeSpec",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){if(e&&(t=t||new Vr,e.hasOwnProperty("shouldSetMonitorMode")&&null!==e.shouldSetMonitorMode&&void 0!==e.shouldSetMonitorMode&&t.setShouldSetMonitorMode(e.shouldSetMonitorMode),e.hasOwnProperty("shouldUpgradeSecuredSubnetsOnly")&&null!==e.shouldUpgradeSecuredSubnetsOnly&&void 0!==e.shouldUpgradeSecuredSubnetsOnly&&t.setShouldUpgradeSecuredSubnetsOnly(e.shouldUpgradeSecuredSubnetsOnly),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())}getShouldSetMonitorMode(){return this.shouldSetMonitorMode}setShouldSetMonitorMode(e){this.shouldSetMonitorMode=e}getShouldUpgradeSecuredSubnetsOnly(){return this.shouldUpgradeSecuredSubnetsOnly}setShouldUpgradeSecuredSubnetsOnly(e){this.shouldUpgradeSecuredSubnetsOnly=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return{...void 0!==this.getShouldSetMonitorMode()&&null!==this.getShouldSetMonitorMode()?{shouldSetMonitorMode:this.getShouldSetMonitorMode()}:{},...void 0!==this.getShouldUpgradeSecuredSubnetsOnly()&&null!==this.getShouldUpgradeSecuredSubnetsOnly()?{shouldUpgradeSecuredSubnetsOnly:this.getShouldUpgradeSecuredSubnetsOnly()}:{},$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 T?n=["shouldSetMonitorMode"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){return"shouldSetMonitorMode"!==t||void 0!==this.shouldSetMonitorMode&&null!==this.shouldSetMonitorMode?"shouldUpgradeSecuredSubnetsOnly"!==t||void 0!==this.shouldUpgradeSecuredSubnetsOnly&&null!==this.shouldUpgradeSecuredSubnetsOnly?"$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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("shouldUpgradeSecuredSubnetsOnly","undefined or null"):new j("shouldSetMonitorMode","undefined or null")}}function Br(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")}Vr.prototype.shouldSetMonitorMode=void 0,Vr.prototype.shouldUpgradeSecuredSubnetsOnly=void 0,Vr.prototype.$reserved=void 0,Vr.prototype.$objectType=void 0,Vr.prototype.$unknownFields=void 0;var zr=new WeakSet;class Kr{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=zr),n.add(t),this.spec=e,this.$objectType="microseg.v4.operation.UpgradeJob",this.$reserved={$fv:"v4.r2"},this.$unknownFields={}}static constructFromObject(e,t=null,n=!1){let s;if(e){if(t=t||new Kr,e.hasOwnProperty("spec")&&null!==e.spec&&void 0!==e.spec)switch(s=e.spec.hasOwnProperty("$objectType")?e.spec.$objectType:typeof e.spec,s){case"microseg.v4.operation.UpgradeSpec":t.setSpec(Vr.constructFromObject(e.spec,void 0));break;case"microseg.v4.operation.DryRunSpec":t.setSpec(br.constructFromObject(e.spec,void 0));break;default:throw"Unknown datatype "+s+" 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())}getSpec(){return this.spec}setSpec(e){this.spec=e}get$Reserved(){return this.$reserved}get$ObjectType(){return this.$objectType}get$UnknownFields(){return this.$unknownFields}toJson(e){return!1===e?{...void 0!==this.getSpec()&&null!==this.getSpec()?{spec:void 0!==this.getSpec().toJson?this.getSpec().toJson(!1):Array.isArray(this.getSpec())?this.getSpec().map(e=>void 0!==e.toJson?e.toJson(!1):e):Br(zr,this,Hr).call(this,this.getSpec(),!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.getSpec()&&null!==this.getSpec()?{spec:void 0!==this.getSpec().toJson?this.getSpec().toJson():Array.isArray(this.getSpec())?this.getSpec().map(e=>void 0!==e.toJson?e.toJson():e):Br(zr,this,Hr).call(this,this.getSpec())}:{},$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 T?n=["spec"]:1===arguments.length?(n=arguments[0],e=null):n=arguments[1];let s=[],i=null;return n.forEach(t=>{i=this.validateProperty(t,e),i&&s.push(i)}),new Promise(function(e,t){0!==s.length?t(i):e()})}validateProperty(e,t){return"spec"!==t||void 0!==this.spec&&null!==this.spec?"$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 j(t,"no such property exists"):new j("$unknownFields","undefined or null"):new j("$objectType","undefined or null"):new j("$reserved","undefined or null"):new j("spec","undefined or null")}}function Hr(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}Kr.prototype.spec=void 0,Kr.prototype.$reserved=void 0,Kr.prototype.$objectType=void 0,Kr.prototype.$unknownFields=void 0;const Zr={ApiClient:de,AddressGroupsApi:class{#e;static get ApiClient(){return de}constructor(e){this.apiClient=e||de.instance,this.#e=new Set,this.#e.add("authorization"),this.#e.add("cookie"),this.#e.add("host"),this.#e.add("user-agent")}createAddressGroup(e,...t){let n=t.length>0?t[0]:{},s=null;if(s=e instanceof lt&&"function"==typeof e.toJson?e.toJson():e,null==s)throw new Error("Invalid body when calling createAddressGroup");let i={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(i[e]=n[e])});const r={...i};de.addEtagReferenceToHeader(e,r);const o=ze;return this.apiClient.callApi("/api/microseg/v4.2/config/address-groups","POST",{},{},r,{},s,["apiKeyAuthScheme","basicAuthScheme"],["application/json"],["application/json"],o)}deleteAddressGroupById(e,...t){let n=t.length>0?t[0]:{};if(null==e)throw new Error("Missing the required parameter 'extId' when calling deleteAddressGroupById");const s={extId:e};let i={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(i[e]=n[e])});const r={...i},o=ft;return this.apiClient.callApi("/api/microseg/v4.2/config/address-groups/{extId}","DELETE",s,{},r,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],o)}getAddressGroupById(e,...t){let n=t.length>0?t[0]:{};if(null==e)throw new Error("Missing the required parameter 'extId' when calling getAddressGroupById");const s={extId:e};let i={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(i[e]=n[e])});const r={...i},o=bt;return this.apiClient.callApi("/api/microseg/v4.2/config/address-groups/{extId}","GET",s,{},r,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],o)}listAddressGroups(e,...t){let n=t.length>0?t[0]:{};const s={...(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 i={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(i[e]=n[e])});const r={...i},o=pt;return this.apiClient.callApi("/api/microseg/v4.2/config/address-groups","GET",{},s,r,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],o)}updateAddressGroupById(e,t,...n){let s=n.length>0?n[0]:{},i=null;if(i=t instanceof lt&&"function"==typeof t.toJson?t.toJson():t,null==e)throw new Error("Missing the required parameter 'extId' when calling updateAddressGroupById");if(null==i)throw new Error("Invalid body when calling updateAddressGroupById");const r={extId:e};let o={};Object.keys(s).forEach(e=>{this.#e.has(e.toLowerCase())||(o[e]=s[e])});const a={...o};de.addEtagReferenceToHeader(t,a);const d=jt;return this.apiClient.callApi("/api/microseg/v4.2/config/address-groups/{extId}","PUT",r,{},a,{},i,["apiKeyAuthScheme","basicAuthScheme"],["application/json"],["application/json"],d)}},DirectoryServerConfigsApi:class{#e;static get ApiClient(){return de}constructor(e){this.apiClient=e||de.instance,this.#e=new Set,this.#e.add("authorization"),this.#e.add("cookie"),this.#e.add("host"),this.#e.add("user-agent")}createCategoryMapping(e,...t){let n=t.length>0?t[0]:{},s=null;if(s=e instanceof qt&&"function"==typeof e.toJson?e.toJson():e,null==s)throw new Error("Invalid body when calling createCategoryMapping");let i={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(i[e]=n[e])});const r={...i};de.addEtagReferenceToHeader(e,r);const o=An;return this.apiClient.callApi("/api/microseg/v4.2/config/category-mappings","POST",{},{},r,{},s,["apiKeyAuthScheme","basicAuthScheme"],["application/json"],["application/json"],o)}createDirectoryServerConfig(e,...t){let n=t.length>0?t[0]:{},s=null;if(s=e instanceof pn&&"function"==typeof e.toJson?e.toJson():e,null==s)throw new Error("Invalid body when calling createDirectoryServerConfig");let i={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(i[e]=n[e])});const r={...i};de.addEtagReferenceToHeader(e,r);const o=Ct;return this.apiClient.callApi("/api/microseg/v4.2/config/directory-server-configs","POST",{},{},r,{},s,["apiKeyAuthScheme","basicAuthScheme"],["application/json"],["application/json"],o)}deleteDirectoryServerConfigById(e,...t){let n=t.length>0?t[0]:{};if(null==e)throw new Error("Missing the required parameter 'extId' when calling deleteDirectoryServerConfigById");const s={extId:e};let i={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(i[e]=n[e])});const r={...i},o=Xt;return this.apiClient.callApi("/api/microseg/v4.2/config/directory-server-configs/{extId}","DELETE",s,{},r,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],o)}deleteDsCategoryMappingById(e,...t){let n=t.length>0?t[0]:{};if(null==e)throw new Error("Missing the required parameter 'extId' when calling deleteDsCategoryMappingById");const s={extId:e};let i={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(i[e]=n[e])});const r={...i},o=Et;return this.apiClient.callApi("/api/microseg/v4.2/config/category-mappings/{extId}","DELETE",s,{},r,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],o)}getDirectoryServerConfigById(e,...t){let n=t.length>0?t[0]:{};if(null==e)throw new Error("Missing the required parameter 'extId' when calling getDirectoryServerConfigById");const s={extId:e};let i={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(i[e]=n[e])});const r={...i},o=mn;return this.apiClient.callApi("/api/microseg/v4.2/config/directory-server-configs/{extId}","GET",s,{},r,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],o)}getDsCategoryMappingById(e,...t){let n=t.length>0?t[0]:{};if(null==e)throw new Error("Missing the required parameter 'extId' when calling getDsCategoryMappingById");const s={extId:e};let i={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(i[e]=n[e])});const r={...i},o=gn;return this.apiClient.callApi("/api/microseg/v4.2/config/category-mappings/{extId}","GET",s,{},r,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],o)}listCategoryMappings(e,...t){let n=t.length>0?t[0]:{};const s={...(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 i={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(i[e]=n[e])});const r={...i},o=zt;return this.apiClient.callApi("/api/microseg/v4.2/config/category-mappings","GET",{},s,r,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],o)}listDirectoryServerConfigs(e,...t){let n=t.length>0?t[0]:{};const s={...(e=e||{}).hasOwnProperty("$select")?{$select:e.$select}:{}};let i={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(i[e]=n[e])});const r={...i},o=Fn;return this.apiClient.callApi("/api/microseg/v4.2/config/directory-server-configs","GET",{},s,r,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],o)}updateDirectoryServerConfigById(e,t,...n){let s=n.length>0?n[0]:{},i=null;if(i=t instanceof pn&&"function"==typeof t.toJson?t.toJson():t,null==e)throw new Error("Missing the required parameter 'extId' when calling updateDirectoryServerConfigById");if(null==i)throw new Error("Invalid body when calling updateDirectoryServerConfigById");const r={extId:e};let o={};Object.keys(s).forEach(e=>{this.#e.has(e.toLowerCase())||(o[e]=s[e])});const a={...o};de.addEtagReferenceToHeader(t,a);const d=Rn;return this.apiClient.callApi("/api/microseg/v4.2/config/directory-server-configs/{extId}","PUT",r,{},a,{},i,["apiKeyAuthScheme","basicAuthScheme"],["application/json"],["application/json"],d)}updateDsCategoryMappingById(e,t,...n){let s=n.length>0?n[0]:{},i=null;if(i=t instanceof qt&&"function"==typeof t.toJson?t.toJson():t,null==e)throw new Error("Missing the required parameter 'extId' when calling updateDsCategoryMappingById");if(null==i)throw new Error("Invalid body when calling updateDsCategoryMappingById");const r={extId:e};let o={};Object.keys(s).forEach(e=>{this.#e.has(e.toLowerCase())||(o[e]=s[e])});const a={...o};de.addEtagReferenceToHeader(t,a);const d=Mt;return this.apiClient.callApi("/api/microseg/v4.2/config/category-mappings/{extId}","PUT",r,{},a,{},i,["apiKeyAuthScheme","basicAuthScheme"],["application/json"],["application/json"],d)}},EntityGroupsApi:class{#e;static get ApiClient(){return de}constructor(e){this.apiClient=e||de.instance,this.#e=new Set,this.#e.add("authorization"),this.#e.add("cookie"),this.#e.add("host"),this.#e.add("user-agent")}createEntityGroup(e,...t){let n=t.length>0?t[0]:{},s=null;if(s=e instanceof os&&"function"==typeof e.toJson?e.toJson():e,null==s)throw new Error("Invalid body when calling createEntityGroup");let i={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(i[e]=n[e])});const r={...i};de.addEtagReferenceToHeader(e,r);const o=ws;return this.apiClient.callApi("/api/microseg/v4.2/config/entity-groups","POST",{},{},r,{},s,["apiKeyAuthScheme","basicAuthScheme"],["application/json"],["application/json"],o)}deleteEntityGroupById(e,...t){let n=t.length>0?t[0]:{};if(null==e)throw new Error("Missing the required parameter 'extId' when calling deleteEntityGroupById");const s={extId:e};let i={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(i[e]=n[e])});const r={...i},o=xn;return this.apiClient.callApi("/api/microseg/v4.2/config/entity-groups/{extId}","DELETE",s,{},r,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],o)}getEntityGroupById(e,...t){let n=t.length>0?t[0]:{};if(null==e)throw new Error("Missing the required parameter 'extId' when calling getEntityGroupById");const s={extId:e};let i={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(i[e]=n[e])});const r={...i},o=ys;return this.apiClient.callApi("/api/microseg/v4.2/config/entity-groups/{extId}","GET",s,{},r,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],o)}listEntityGroups(e,...t){let n=t.length>0?t[0]:{};const s={...(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 i={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(i[e]=n[e])});const r={...i},o=ks;return this.apiClient.callApi("/api/microseg/v4.2/config/entity-groups","GET",{},s,r,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],o)}updateEntityGroupById(e,t,...n){let s=n.length>0?n[0]:{},i=null;if(i=t instanceof os&&"function"==typeof t.toJson?t.toJson():t,null==e)throw new Error("Missing the required parameter 'extId' when calling updateEntityGroupById");if(null==i)throw new Error("Invalid body when calling updateEntityGroupById");const r={extId:e};let o={};Object.keys(s).forEach(e=>{this.#e.has(e.toLowerCase())||(o[e]=s[e])});const a={...o};de.addEtagReferenceToHeader(t,a);const d=us;return this.apiClient.callApi("/api/microseg/v4.2/config/entity-groups/{extId}","PUT",r,{},a,{},i,["apiKeyAuthScheme","basicAuthScheme"],["application/json"],["application/json"],d)}},NetworkSecurityPoliciesApi:class{#e;static get ApiClient(){return de}constructor(e){this.apiClient=e||de.instance,this.#e=new Set,this.#e.add("authorization"),this.#e.add("cookie"),this.#e.add("host"),this.#e.add("user-agent")}applyNetworkSecurityPolicyImport(e,t,...s){let i=s.length>0?s[0]:{};t=t||{};let r,o=null;try{r=n(975)}catch(e){}if("function"==typeof e.pipe)o=e,i["Content-Length"]=r.statSync(e.path).size,i.hasOwnProperty("Content-Disposition")||(i["Content-Disposition"]='attachment; filename="'+m().parse(e.path).base+'"');else if("string"==typeof e){let t;try{t=n(784)}catch(e){throw new Error("Cannot find module 'path'. Ensure you are using a Node.js environment. If not, use ReadableStream for body parameter.")}try{o=r.createReadStream(e),i["Content-Length"]=r.statSync(e).size,i.hasOwnProperty("Content-Disposition")||(i["Content-Disposition"]='attachment; filename="'+t.basename(e)+'"')}catch(t){throw new Error("Cannot read file: "+e+". Error: "+t.message)}}else o=e;if(null==o)throw new Error("Invalid body when calling applyNetworkSecurityPolicyImport");const a={...t.hasOwnProperty("$dryrun")?{$dryrun:t.$dryrun}:{}};let d={};Object.keys(i).forEach(e=>{this.#e.has(e.toLowerCase())||(d[e]=i[e])});const l={"NTNX-Purge-Policies":t.nTNXPurgePolicies,...d};de.addEtagReferenceToHeader(e,l);const u=Bi;return this.apiClient.callApi("/api/microseg/v4.2/config/policies/$actions/import","POST",{},a,l,{},o,["apiKeyAuthScheme","basicAuthScheme"],["application/octet-stream"],["application/json"],u)}createNetworkSecurityPolicy(e,...t){let n=t.length>0?t[0]:{},s=null;if(s=e instanceof hi&&"function"==typeof e.toJson?e.toJson():e,null==s)throw new Error("Invalid body when calling createNetworkSecurityPolicy");let i={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(i[e]=n[e])});const r={...i};de.addEtagReferenceToHeader(e,r);const o=Ri;return this.apiClient.callApi("/api/microseg/v4.2/config/policies","POST",{},{},r,{},s,["apiKeyAuthScheme","basicAuthScheme"],["application/json"],["application/json"],o)}deleteNetworkSecurityPolicyById(e,...t){let n=t.length>0?t[0]:{};if(null==e)throw new Error("Missing the required parameter 'extId' when calling deleteNetworkSecurityPolicyById");const s={extId:e};let i={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(i[e]=n[e])});const r={...i},o=Ji;return this.apiClient.callApi("/api/microseg/v4.2/config/policies/{extId}","DELETE",s,{},r,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],o)}exportNetworkSecurityPolicy(e,...t){let n=t.length>0?t[0]:{},s=null;s=e instanceof Ui&&"function"==typeof e.toJson?e.toJson():e;let i={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(i[e]=n[e])});const r={...i};de.addEtagReferenceToHeader(e,r);const o=Ai;return this.apiClient.callApi("/api/microseg/v4.2/config/policies/$actions/prepare-export","POST",{},{},r,{},s,["apiKeyAuthScheme","basicAuthScheme"],["application/json"],["application/json"],o)}getNetworkSecurityPolicyById(e,...t){let n=t.length>0?t[0]:{};if(null==e)throw new Error("Missing the required parameter 'extId' when calling getNetworkSecurityPolicyById");const s={extId:e};let i={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(i[e]=n[e])});const r={...i},o=Fi;return this.apiClient.callApi("/api/microseg/v4.2/config/policies/{extId}","GET",s,{},r,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],o)}listNetworkSecurityPolicies(e,...t){let n=t.length>0?t[0]:{};const s={...(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 i={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(i[e]=n[e])});const r={...i},o=gi;return this.apiClient.callApi("/api/microseg/v4.2/config/policies","GET",{},s,r,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json","application/octet-stream"],o)}listNetworkSecurityPolicyRules(e,t,...n){let s=n.length>0?n[0]:{};if(t=t||{},null==e)throw new Error("Missing the required parameter 'policyExtId' when calling listNetworkSecurityPolicyRules");const i={policyExtId: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(s).forEach(e=>{this.#e.has(e.toLowerCase())||(o[e]=s[e])});const a={...o},d=_i;return this.apiClient.callApi("/api/microseg/v4.2/config/policies/{policyExtId}/rules","GET",i,r,a,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],d)}updateNetworkSecurityPolicyById(e,t,...n){let s=n.length>0?n[0]:{},i=null;if(i=t instanceof hi&&"function"==typeof t.toJson?t.toJson():t,null==e)throw new Error("Missing the required parameter 'extId' when calling updateNetworkSecurityPolicyById");if(null==i)throw new Error("Invalid body when calling updateNetworkSecurityPolicyById");const r={extId:e};let o={};Object.keys(s).forEach(e=>{this.#e.has(e.toLowerCase())||(o[e]=s[e])});const a={...o};de.addEtagReferenceToHeader(t,a);const d=mi;return this.apiClient.callApi("/api/microseg/v4.2/config/policies/{extId}","PUT",r,{},a,{},i,["apiKeyAuthScheme","basicAuthScheme"],["application/json"],["application/json"],d)}},ServiceGroupsApi:class{#e;static get ApiClient(){return de}constructor(e){this.apiClient=e||de.instance,this.#e=new Set,this.#e.add("authorization"),this.#e.add("cookie"),this.#e.add("host"),this.#e.add("user-agent")}createServiceGroup(e,...t){let n=t.length>0?t[0]:{},s=null;if(s=e instanceof er&&"function"==typeof e.toJson?e.toJson():e,null==s)throw new Error("Invalid body when calling createServiceGroup");let i={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(i[e]=n[e])});const r={...i};de.addEtagReferenceToHeader(e,r);const o=gr;return this.apiClient.callApi("/api/microseg/v4.2/config/service-groups","POST",{},{},r,{},s,["apiKeyAuthScheme","basicAuthScheme"],["application/json"],["application/json"],o)}deleteServiceGroupById(e,...t){let n=t.length>0?t[0]:{};if(null==e)throw new Error("Missing the required parameter 'extId' when calling deleteServiceGroupById");const s={extId:e};let i={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(i[e]=n[e])});const r={...i},o=hr;return this.apiClient.callApi("/api/microseg/v4.2/config/service-groups/{extId}","DELETE",s,{},r,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],o)}getServiceGroupById(e,...t){let n=t.length>0?t[0]:{};if(null==e)throw new Error("Missing the required parameter 'extId' when calling getServiceGroupById");const s={extId:e};let i={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(i[e]=n[e])});const r={...i},o=ir;return this.apiClient.callApi("/api/microseg/v4.2/config/service-groups/{extId}","GET",s,{},r,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],o)}listServiceGroups(e,...t){let n=t.length>0?t[0]:{};const s={...(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 i={};Object.keys(n).forEach(e=>{this.#e.has(e.toLowerCase())||(i[e]=n[e])});const r={...i},o=dr;return this.apiClient.callApi("/api/microseg/v4.2/config/service-groups","GET",{},s,r,{},null,["apiKeyAuthScheme","basicAuthScheme"],[],["application/json"],o)}updateServiceGroupById(e,t,...n){let s=n.length>0?n[0]:{},i=null;if(i=t instanceof er&&"function"==typeof t.toJson?t.toJson():t,null==e)throw new Error("Missing the required parameter 'extId' when calling updateServiceGroupById");if(null==i)throw new Error("Invalid body when calling updateServiceGroupById");const r={extId:e};let o={};Object.keys(s).forEach(e=>{this.#e.has(e.toLowerCase())||(o[e]=s[e])});const a={...o};de.addEtagReferenceToHeader(t,a);const d=Zi;return this.apiClient.callApi("/api/microseg/v4.2/config/service-groups/{extId}","PUT",r,{},a,{},i,["apiKeyAuthScheme","basicAuthScheme"],["application/json"],["application/json"],d)}},FQDN:en,Flag:S,IPAddressOrFQDN:nn,IPv4Address:Ze,IPv6Address:Qe,KVPair:D,MapOfStringWrapper:P,Message:N,MessageSeverity:M,TenantAwareModel:et,ApiLink:L,ApiResponseMetadata:q,ExternalizableAbstractModel:nt,AdInfo:_t,AdStatus:Gt,AddressGroup:lt,Addresses:Nn,AllToAllIsolationGroup:Vs,AllowType:js,AllowedConfig:Hn,AllowedEntity:zn,AllowedSelectBy:Ln,AllowedType:Wn,ApplicationRuleSpec:Ms,CategoryAssociatedEntityType:Ss,CategoryMapping:qt,CreateAddressGroupApiResponse:ze,CreateDirectoryServerConfigApiResponse:Ct,CreateDsCategoryMappingApiResponse:An,CreateEntityGroupApiResponse:ws,CreateNetworkSecurityPolicyApiResponse:Ri,CreateNetworkSecurityPolicyExportApiResponse:Ai,CreateNetworkSecurityPolicyImportApiResponse:Bi,CreateServiceGroupApiResponse:gr,DeleteAddressGroupApiResponse:ft,DeleteDirectoryServerConfigApiResponse:Xt,DeleteDsCategoryMappingApiResponse:Et,DeleteEntityGroupApiResponse:xn,DeleteNetworkSecurityPolicyApiResponse:Ji,DeleteServiceGroupApiResponse:hr,DirectoryServerConfig:pn,EntityGroup:os,ExceptConfig:ss,ExceptEntity:ts,ExceptSelectBy:Xn,ExceptType:Yn,GetAddressGroupApiResponse:bt,GetDirectoryServerConfigApiResponse:mn,GetDsCategoryMappingApiResponse:gn,GetEntityGroupApiResponse:ys,GetNetworkSecurityPolicyApiResponse:Fi,GetServiceGroupApiResponse:ir,IPv4Range:it,IPv6Range:ot,IcmpTypeCodeSpec:Es,IcmpV6TypeCodeSpec:Is,IntraEntityGroupRuleAction:Ns,IntraEntityGroupRuleSpec:Ls,IpRange:Vn,IsolationGroup:Ws,ListAddressGroupsApiResponse:pt,ListDirectoryServerConfigsApiResponse:Fn,ListDsCategoryMappingsApiResponse:zt,ListEntityGroupsApiResponse:ks,ListNetworkSecurityPoliciesApiResponse:gi,ListNetworkSecurityPolicyRulesApiResponse:_i,ListServiceGroupsApiResponse:dr,MatchEntity:rn,MatchField:an,MatchType:ln,MatchingCriteria:cn,MultiEnvIsolationRuleSpec:Ks,NetworkSecurityPolicy:hi,NetworkSecurityPolicyExportSpec:Ui,NetworkSecurityPolicyRule:ni,RuleType:Xs,SecurityPolicyScope:ri,SecurityPolicyState:ai,ConfigSecurityPolicyType:li,ServiceGroup:er,SyncPolicy:$r,TcpPortRangeSpec:Cs,TwoEnvIsolationRuleSpec:Ys,UdpPortRangeSpec:Us,UpdateAddressGroupApiResponse:jt,UpdateDirectoryServerConfigApiResponse:Rn,UpdateDsCategoryMappingApiResponse:Mt,UpdateEntityGroupApiResponse:us,UpdateNetworkSecurityPolicyApiResponse:mi,UpdateServiceGroupApiResponse:Zi,AppMessage:Ie,ErrorResponse:Le,SchemaValidationError:Me,SchemaValidationErrorMessage:De,DryRunSpec:br,DryRunSummary:Lr,PolicyCount:Ur,PolicyCountByType:Mr,PolicyMetadata:Ar,PolicyPreview:Wr,PolicyUpgradeSummary:Ir,SecurityPolicyOptions:Tr,OperationSecurityPolicyType:jr,SubnetUpgradeSummary:Cr,TotalPolicyCount:Nr,UpgradeJob:Kr,UpgradeSpec:Vr,TaskReference:qe}})(),s.default})());
|