From f0716d18dafd3a3163df1f680e38e90688f61384 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 27 Nov 2020 03:15:53 +0000 Subject: [PATCH] CodeGen from PR 11826 in Azure/azure-rest-api-specs Fix errors in various of readme files encountered in the recent go SDK release (#11826) * Fix an issue on windows * Fix cdn * Fix cognitiveservices/customVision * Fix cognitiveservices/personalizer * Fix cognitiveservices/translatorText * Fix data plane digitaltwins * Remove problematic tag from release - no impact on sdk, this has never been released * amend Fix cognitiveservices/translatorText * Fix imds * Fix migrate readme that are mistakenly damaged in #10305 * add one api-version back * Fix digtaltwins data plane again * Fix hybridnetwork * Fix streamanlytics * Revert some changes of digitaltwins * Revert imds * Fix migrate * Fix migrate again --- .../mgmt/adhybridhealthservice/__init__.py | 19 + .../_ad_hybrid_health_service.py | 127 + .../adhybridhealthservice/_configuration.py | 43 + .../adhybridhealthservice/models/__init__.py | 288 ++ .../models/_ad_hybrid_health_service_enums.py | 115 + .../adhybridhealthservice/models/_models.py | 3088 +++++++++++++++++ .../models/_models_py3.py | 3088 +++++++++++++++++ .../models/_paged_models.py | 261 ++ .../operations/__init__.py | 48 + .../_ad_domain_service_members_operations.py | 132 + .../_adds_service_members_operations.py | 312 ++ .../operations/_adds_service_operations.py | 116 + .../operations/_adds_services_operations.py | 1134 ++++++ ..._services_replication_status_operations.py | 98 + ...dds_services_service_members_operations.py | 188 + ...dds_services_user_preference_operations.py | 212 ++ .../operations/_alerts_operations.py | 124 + .../operations/_configuration_operations.py | 273 ++ .../operations/_dimensions_operations.py | 111 + .../operations/_list_operations.py | 171 + .../operations/_operations.py | 102 + .../operations/_reports_operations.py | 91 + .../operations/_service_members_operations.py | 1013 ++++++ .../operations/_service_operations.py | 116 + .../operations/_services_operations.py | 1697 +++++++++ .../operations/_update_operations.py | 106 + .../mgmt/adhybridhealthservice/version.py | 13 + 27 files changed, 13086 insertions(+) create mode 100644 sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/__init__.py create mode 100644 sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/_ad_hybrid_health_service.py create mode 100644 sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/_configuration.py create mode 100644 sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/models/__init__.py create mode 100644 sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/models/_ad_hybrid_health_service_enums.py create mode 100644 sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/models/_models.py create mode 100644 sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/models/_models_py3.py create mode 100644 sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/models/_paged_models.py create mode 100644 sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/__init__.py create mode 100644 sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_ad_domain_service_members_operations.py create mode 100644 sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_adds_service_members_operations.py create mode 100644 sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_adds_service_operations.py create mode 100644 sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_adds_services_operations.py create mode 100644 sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_adds_services_replication_status_operations.py create mode 100644 sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_adds_services_service_members_operations.py create mode 100644 sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_adds_services_user_preference_operations.py create mode 100644 sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_alerts_operations.py create mode 100644 sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_configuration_operations.py create mode 100644 sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_dimensions_operations.py create mode 100644 sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_list_operations.py create mode 100644 sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_operations.py create mode 100644 sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_reports_operations.py create mode 100644 sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_service_members_operations.py create mode 100644 sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_service_operations.py create mode 100644 sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_services_operations.py create mode 100644 sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_update_operations.py create mode 100644 sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/version.py diff --git a/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/__init__.py b/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/__init__.py new file mode 100644 index 000000000000..1b6afc915597 --- /dev/null +++ b/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/__init__.py @@ -0,0 +1,19 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from ._configuration import ADHybridHealthServiceConfiguration +from ._ad_hybrid_health_service import ADHybridHealthService +__all__ = ['ADHybridHealthService', 'ADHybridHealthServiceConfiguration'] + +from .version import VERSION + +__version__ = VERSION + diff --git a/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/_ad_hybrid_health_service.py b/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/_ad_hybrid_health_service.py new file mode 100644 index 000000000000..22a3d4eeaff2 --- /dev/null +++ b/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/_ad_hybrid_health_service.py @@ -0,0 +1,127 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import SDKClient +from msrest import Serializer, Deserializer + +from ._configuration import ADHybridHealthServiceConfiguration +from .operations import AddsServicesOperations +from .operations import AlertsOperations +from .operations import ConfigurationOperations +from .operations import DimensionsOperations +from .operations import AddsServiceMembersOperations +from .operations import AdDomainServiceMembersOperations +from .operations import AddsServicesUserPreferenceOperations +from .operations import AddsServiceOperations +from .operations import AddsServicesReplicationStatusOperations +from .operations import AddsServicesServiceMembersOperations +from .operations import Operations +from .operations import ReportsOperations +from .operations import ServicesOperations +from .operations import ServiceOperations +from .operations import ServiceMembersOperations +from .operations import ListOperations +from .operations import UpdateOperations +from . import models + + +class ADHybridHealthService(SDKClient): + """REST APIs for Azure Active Directory Connect Health + + :ivar config: Configuration for client. + :vartype config: ADHybridHealthServiceConfiguration + + :ivar adds_services: AddsServices operations + :vartype adds_services: azure.mgmt.adhybridhealthservice.operations.AddsServicesOperations + :ivar alerts: Alerts operations + :vartype alerts: azure.mgmt.adhybridhealthservice.operations.AlertsOperations + :ivar configuration: Configuration operations + :vartype configuration: azure.mgmt.adhybridhealthservice.operations.ConfigurationOperations + :ivar dimensions: Dimensions operations + :vartype dimensions: azure.mgmt.adhybridhealthservice.operations.DimensionsOperations + :ivar adds_service_members: AddsServiceMembers operations + :vartype adds_service_members: azure.mgmt.adhybridhealthservice.operations.AddsServiceMembersOperations + :ivar ad_domain_service_members: AdDomainServiceMembers operations + :vartype ad_domain_service_members: azure.mgmt.adhybridhealthservice.operations.AdDomainServiceMembersOperations + :ivar adds_services_user_preference: AddsServicesUserPreference operations + :vartype adds_services_user_preference: azure.mgmt.adhybridhealthservice.operations.AddsServicesUserPreferenceOperations + :ivar adds_service: AddsService operations + :vartype adds_service: azure.mgmt.adhybridhealthservice.operations.AddsServiceOperations + :ivar adds_services_replication_status: AddsServicesReplicationStatus operations + :vartype adds_services_replication_status: azure.mgmt.adhybridhealthservice.operations.AddsServicesReplicationStatusOperations + :ivar adds_services_service_members: AddsServicesServiceMembers operations + :vartype adds_services_service_members: azure.mgmt.adhybridhealthservice.operations.AddsServicesServiceMembersOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.adhybridhealthservice.operations.Operations + :ivar reports: Reports operations + :vartype reports: azure.mgmt.adhybridhealthservice.operations.ReportsOperations + :ivar services: Services operations + :vartype services: azure.mgmt.adhybridhealthservice.operations.ServicesOperations + :ivar service: Service operations + :vartype service: azure.mgmt.adhybridhealthservice.operations.ServiceOperations + :ivar service_members: ServiceMembers operations + :vartype service_members: azure.mgmt.adhybridhealthservice.operations.ServiceMembersOperations + :ivar list: List operations + :vartype list: azure.mgmt.adhybridhealthservice.operations.ListOperations + :ivar update: Update operations + :vartype update: azure.mgmt.adhybridhealthservice.operations.UpdateOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param str base_url: Service URL + """ + + def __init__( + self, credentials, base_url=None): + + self.config = ADHybridHealthServiceConfiguration(credentials, base_url) + super(ADHybridHealthService, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2014-01-01' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.adds_services = AddsServicesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.alerts = AlertsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.configuration = ConfigurationOperations( + self._client, self.config, self._serialize, self._deserialize) + self.dimensions = DimensionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.adds_service_members = AddsServiceMembersOperations( + self._client, self.config, self._serialize, self._deserialize) + self.ad_domain_service_members = AdDomainServiceMembersOperations( + self._client, self.config, self._serialize, self._deserialize) + self.adds_services_user_preference = AddsServicesUserPreferenceOperations( + self._client, self.config, self._serialize, self._deserialize) + self.adds_service = AddsServiceOperations( + self._client, self.config, self._serialize, self._deserialize) + self.adds_services_replication_status = AddsServicesReplicationStatusOperations( + self._client, self.config, self._serialize, self._deserialize) + self.adds_services_service_members = AddsServicesServiceMembersOperations( + self._client, self.config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) + self.reports = ReportsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.services = ServicesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.service = ServiceOperations( + self._client, self.config, self._serialize, self._deserialize) + self.service_members = ServiceMembersOperations( + self._client, self.config, self._serialize, self._deserialize) + self.list = ListOperations( + self._client, self.config, self._serialize, self._deserialize) + self.update = UpdateOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/_configuration.py b/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/_configuration.py new file mode 100644 index 000000000000..384267a75218 --- /dev/null +++ b/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/_configuration.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class ADHybridHealthServiceConfiguration(AzureConfiguration): + """Configuration for ADHybridHealthService + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param str base_url: Service URL + """ + + def __init__( + self, credentials, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(ADHybridHealthServiceConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-adhybridhealthservice/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials diff --git a/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/models/__init__.py b/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/models/__init__.py new file mode 100644 index 000000000000..37e050cfef24 --- /dev/null +++ b/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/models/__init__.py @@ -0,0 +1,288 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +try: + from ._models_py3 import AdditionalInformation + from ._models_py3 import AddsServiceMember + from ._models_py3 import Agent + from ._models_py3 import Alert + from ._models_py3 import AlertFeedback + from ._models_py3 import AssociatedObject + from ._models_py3 import AttributeDelta + from ._models_py3 import AttributeMapping + from ._models_py3 import AttributeMppingSource + from ._models_py3 import ChangeNotReimported + from ._models_py3 import ChangeNotReimportedDelta + from ._models_py3 import ChangeNotReimportedEntry + from ._models_py3 import Connector + from ._models_py3 import ConnectorConnectionError + from ._models_py3 import ConnectorConnectionErrors + from ._models_py3 import ConnectorMetadata + from ._models_py3 import ConnectorMetadataDetails + from ._models_py3 import ConnectorObjectError + from ._models_py3 import ConnectorObjectErrors + from ._models_py3 import Credential + from ._models_py3 import Dimension + from ._models_py3 import Display + from ._models_py3 import ErrorCount + from ._models_py3 import ErrorDetail + from ._models_py3 import ErrorReportUsersEntry + from ._models_py3 import ExportError + from ._models_py3 import ExportErrors + from ._models_py3 import ExportStatus + from ._models_py3 import ExtensionErrorInfo + from ._models_py3 import ForestSummary + from ._models_py3 import GlobalConfiguration + from ._models_py3 import HelpLink + from ._models_py3 import Hotfix + from ._models_py3 import Hotfixes + from ._models_py3 import ImportError + from ._models_py3 import ImportErrors + from ._models_py3 import InboundReplicationNeighbor + from ._models_py3 import InboundReplicationNeighbors + from ._models_py3 import IPAddressAggregate + from ._models_py3 import IPAddressAggregateSetting + from ._models_py3 import Item + from ._models_py3 import MergedExportError + from ._models_py3 import MetricGroup + from ._models_py3 import MetricMetadata + from ._models_py3 import MetricSet + from ._models_py3 import MetricSets + from ._models_py3 import ModuleConfiguration + from ._models_py3 import ModuleConfigurations + from ._models_py3 import ObjectWithSyncError + from ._models_py3 import Operation + from ._models_py3 import Partition + from ._models_py3 import PartitionScope + from ._models_py3 import PasswordHashSyncConfiguration + from ._models_py3 import PasswordManagementSettings + from ._models_py3 import ReplicationStatus + from ._models_py3 import ReplicationSummary + from ._models_py3 import Result + from ._models_py3 import RiskyIPBlobUri + from ._models_py3 import RuleErrorInfo + from ._models_py3 import RunProfile + from ._models_py3 import RunProfiles + from ._models_py3 import RunStep + from ._models_py3 import ServiceConfiguration + from ._models_py3 import ServiceMember + from ._models_py3 import ServiceProperties + from ._models_py3 import TabularExportError + from ._models_py3 import Tenant + from ._models_py3 import TenantOnboardingDetails + from ._models_py3 import UserPreference + from ._models_py3 import ValueDelta +except (SyntaxError, ImportError): + from ._models import AdditionalInformation + from ._models import AddsServiceMember + from ._models import Agent + from ._models import Alert + from ._models import AlertFeedback + from ._models import AssociatedObject + from ._models import AttributeDelta + from ._models import AttributeMapping + from ._models import AttributeMppingSource + from ._models import ChangeNotReimported + from ._models import ChangeNotReimportedDelta + from ._models import ChangeNotReimportedEntry + from ._models import Connector + from ._models import ConnectorConnectionError + from ._models import ConnectorConnectionErrors + from ._models import ConnectorMetadata + from ._models import ConnectorMetadataDetails + from ._models import ConnectorObjectError + from ._models import ConnectorObjectErrors + from ._models import Credential + from ._models import Dimension + from ._models import Display + from ._models import ErrorCount + from ._models import ErrorDetail + from ._models import ErrorReportUsersEntry + from ._models import ExportError + from ._models import ExportErrors + from ._models import ExportStatus + from ._models import ExtensionErrorInfo + from ._models import ForestSummary + from ._models import GlobalConfiguration + from ._models import HelpLink + from ._models import Hotfix + from ._models import Hotfixes + from ._models import ImportError + from ._models import ImportErrors + from ._models import InboundReplicationNeighbor + from ._models import InboundReplicationNeighbors + from ._models import IPAddressAggregate + from ._models import IPAddressAggregateSetting + from ._models import Item + from ._models import MergedExportError + from ._models import MetricGroup + from ._models import MetricMetadata + from ._models import MetricSet + from ._models import MetricSets + from ._models import ModuleConfiguration + from ._models import ModuleConfigurations + from ._models import ObjectWithSyncError + from ._models import Operation + from ._models import Partition + from ._models import PartitionScope + from ._models import PasswordHashSyncConfiguration + from ._models import PasswordManagementSettings + from ._models import ReplicationStatus + from ._models import ReplicationSummary + from ._models import Result + from ._models import RiskyIPBlobUri + from ._models import RuleErrorInfo + from ._models import RunProfile + from ._models import RunProfiles + from ._models import RunStep + from ._models import ServiceConfiguration + from ._models import ServiceMember + from ._models import ServiceProperties + from ._models import TabularExportError + from ._models import Tenant + from ._models import TenantOnboardingDetails + from ._models import UserPreference + from ._models import ValueDelta +from ._paged_models import AddsServiceMemberPaged +from ._paged_models import AlertFeedbackPaged +from ._paged_models import AlertPaged +from ._paged_models import ConnectorPaged +from ._paged_models import CredentialPaged +from ._paged_models import DimensionPaged +from ._paged_models import ErrorCountPaged +from ._paged_models import ErrorReportUsersEntryPaged +from ._paged_models import ExportStatusPaged +from ._paged_models import GlobalConfigurationPaged +from ._paged_models import IPAddressAggregatePaged +from ._paged_models import ItemPaged +from ._paged_models import MergedExportErrorPaged +from ._paged_models import MetricMetadataPaged +from ._paged_models import OperationPaged +from ._paged_models import ReplicationSummaryPaged +from ._paged_models import RiskyIPBlobUriPaged +from ._paged_models import ServiceMemberPaged +from ._paged_models import ServicePropertiesPaged +from ._ad_hybrid_health_service_enums import ( + MonitoringLevel, + Level, + State, + ValueDeltaOperationType, + AttributeDeltaOperationType, + ValueType, + AttributeMappingType, + DeltaOperationType, + HealthStatus, + AlgorithmStepType, + PasswordOperationTypes, +) + +__all__ = [ + 'AdditionalInformation', + 'AddsServiceMember', + 'Agent', + 'Alert', + 'AlertFeedback', + 'AssociatedObject', + 'AttributeDelta', + 'AttributeMapping', + 'AttributeMppingSource', + 'ChangeNotReimported', + 'ChangeNotReimportedDelta', + 'ChangeNotReimportedEntry', + 'Connector', + 'ConnectorConnectionError', + 'ConnectorConnectionErrors', + 'ConnectorMetadata', + 'ConnectorMetadataDetails', + 'ConnectorObjectError', + 'ConnectorObjectErrors', + 'Credential', + 'Dimension', + 'Display', + 'ErrorCount', + 'ErrorDetail', + 'ErrorReportUsersEntry', + 'ExportError', + 'ExportErrors', + 'ExportStatus', + 'ExtensionErrorInfo', + 'ForestSummary', + 'GlobalConfiguration', + 'HelpLink', + 'Hotfix', + 'Hotfixes', + 'ImportError', + 'ImportErrors', + 'InboundReplicationNeighbor', + 'InboundReplicationNeighbors', + 'IPAddressAggregate', + 'IPAddressAggregateSetting', + 'Item', + 'MergedExportError', + 'MetricGroup', + 'MetricMetadata', + 'MetricSet', + 'MetricSets', + 'ModuleConfiguration', + 'ModuleConfigurations', + 'ObjectWithSyncError', + 'Operation', + 'Partition', + 'PartitionScope', + 'PasswordHashSyncConfiguration', + 'PasswordManagementSettings', + 'ReplicationStatus', + 'ReplicationSummary', + 'Result', + 'RiskyIPBlobUri', + 'RuleErrorInfo', + 'RunProfile', + 'RunProfiles', + 'RunStep', + 'ServiceConfiguration', + 'ServiceMember', + 'ServiceProperties', + 'TabularExportError', + 'Tenant', + 'TenantOnboardingDetails', + 'UserPreference', + 'ValueDelta', + 'ServicePropertiesPaged', + 'ItemPaged', + 'MetricMetadataPaged', + 'ReplicationSummaryPaged', + 'AlertPaged', + 'DimensionPaged', + 'AddsServiceMemberPaged', + 'CredentialPaged', + 'ServiceMemberPaged', + 'OperationPaged', + 'ErrorCountPaged', + 'MergedExportErrorPaged', + 'ExportStatusPaged', + 'AlertFeedbackPaged', + 'ErrorReportUsersEntryPaged', + 'RiskyIPBlobUriPaged', + 'ConnectorPaged', + 'GlobalConfigurationPaged', + 'IPAddressAggregatePaged', + 'MonitoringLevel', + 'Level', + 'State', + 'ValueDeltaOperationType', + 'AttributeDeltaOperationType', + 'ValueType', + 'AttributeMappingType', + 'DeltaOperationType', + 'HealthStatus', + 'AlgorithmStepType', + 'PasswordOperationTypes', +] diff --git a/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/models/_ad_hybrid_health_service_enums.py b/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/models/_ad_hybrid_health_service_enums.py new file mode 100644 index 000000000000..62a72ce2bf9a --- /dev/null +++ b/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/models/_ad_hybrid_health_service_enums.py @@ -0,0 +1,115 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum + + +class MonitoringLevel(str, Enum): + + partial = "Partial" + full = "Full" + off = "Off" + + +class Level(str, Enum): + + warning = "Warning" + error = "Error" + pre_warning = "PreWarning" + + +class State(str, Enum): + + active = "Active" + resolved_by_positive_result = "ResolvedByPositiveResult" + resolved_manually = "ResolvedManually" + resolved_by_timer = "ResolvedByTimer" + resolved_by_state_change = "ResolvedByStateChange" + + +class ValueDeltaOperationType(str, Enum): + + undefined = "Undefined" + add = "Add" + update = "Update" + delete = "Delete" + + +class AttributeDeltaOperationType(str, Enum): + + undefined = "Undefined" + add = "Add" + replace = "Replace" + update = "Update" + delete = "Delete" + + +class ValueType(str, Enum): + + undefined = "Undefined" + dn = "Dn" + binary = "Binary" + string = "String" + integer = "Integer" + boolean = "Boolean" + + +class AttributeMappingType(str, Enum): + + constant = "Constant" + direct = "Direct" + dn_part = "DnPart" + script = "Script" + + +class DeltaOperationType(str, Enum): + + undefined = "Undefined" + none = "None" + add = "Add" + replace = "Replace" + update = "Update" + delete = "Delete" + obsolete = "Obsolete" + delete_add = "DeleteAdd" + + +class HealthStatus(str, Enum): + + healthy = "Healthy" + warning = "Warning" + error = "Error" + not_monitored = "NotMonitored" + missing = "Missing" + + +class AlgorithmStepType(str, Enum): + + undefined = "Undefined" + staging = "Staging" + connector_filter = "ConnectorFilter" + join = "Join" + projection = "Projection" + import_flow = "ImportFlow" + provisioning = "Provisioning" + validate_connector_filter = "ValidateConnectorFilter" + deprovisioning = "Deprovisioning" + export_flow = "ExportFlow" + mv_deletion = "MvDeletion" + recall = "Recall" + mv_object_type_change = "MvObjectTypeChange" + + +class PasswordOperationTypes(str, Enum): + + undefined = "Undefined" + set = "Set" + change = "Change" diff --git a/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/models/_models.py b/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/models/_models.py new file mode 100644 index 000000000000..ab965cfa50da --- /dev/null +++ b/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/models/_models.py @@ -0,0 +1,3088 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AdditionalInformation(Model): + """The additional information for a property. + + :param title_name: The title name for the property. + :type title_name: str + :param title_value: The title value for the property. + :type title_value: str + :param properties: The list of properties which are included in the + additional information. + :type properties: object + :param has_properties: Indicates if properties are present or not. + :type has_properties: bool + """ + + _attribute_map = { + 'title_name': {'key': 'titleName', 'type': 'str'}, + 'title_value': {'key': 'titleValue', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'has_properties': {'key': 'hasProperties', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(AdditionalInformation, self).__init__(**kwargs) + self.title_name = kwargs.get('title_name', None) + self.title_value = kwargs.get('title_value', None) + self.properties = kwargs.get('properties', None) + self.has_properties = kwargs.get('has_properties', None) + + +class AddsServiceMember(Model): + """The server details for ADDS service. + + :param domain_name: The domain name. + :type domain_name: str + :param site_name: The site name. + :type site_name: str + :param adds_roles: The list of ADDS roles. + :type adds_roles: list[str] + :param gc_reachable: Indicates if the global catalog for this domain is + reachable or not. + :type gc_reachable: bool + :param is_advertising: Indicates if the Dc is advertising or not. + :type is_advertising: bool + :param pdc_reachable: Indicates if the primary domain controller is + reachable or not. + :type pdc_reachable: bool + :param sysvol_state: Indicates if the SYSVOL state is healthy or not. + :type sysvol_state: bool + :param dc_types: The list of domain controller types. + :type dc_types: list[str] + :param service_member_id: The id of the server. + :type service_member_id: str + :param service_id: The service id to whom this server belongs. + :type service_id: str + :param tenant_id: The tenant id to whom this server belongs. + :type tenant_id: str + :param active_alerts: The total number of alerts that are currently active + for the server. + :type active_alerts: int + :param additional_information: The additional information, if any, for the + server. + :type additional_information: str + :param created_date: The date time , in UTC, when the server was onboarded + to Azure Active Directory Connect Health. + :type created_date: datetime + :param dimensions: The server specific configuration related dimensions. + :type dimensions: list[~azure.mgmt.adhybridhealthservice.models.Item] + :param disabled: Indicates if the server is disabled or not. + :type disabled: bool + :param disabled_reason: The reason for disabling the server. + :type disabled_reason: int + :param installed_qfes: The list of installed QFEs for the server. + :type installed_qfes: + list[~azure.mgmt.adhybridhealthservice.models.Hotfix] + :param last_disabled: The date and time , in UTC, when the server was last + disabled. + :type last_disabled: datetime + :param last_reboot: The date and time, in UTC, when the server was last + rebooted. + :type last_reboot: datetime + :param last_server_reported_monitoring_level_change: The date and time, in + UTC, when the server's data monitoring configuration was last changed. + :type last_server_reported_monitoring_level_change: datetime + :param last_updated: The date and time, in UTC, when the server properties + were last updated. + :type last_updated: datetime + :param machine_id: The id of the machine. + :type machine_id: str + :param machine_name: The name of the server. + :type machine_name: str + :param monitoring_configurations_computed: The monitoring configuration of + the server which determines what activities are monitored by Azure Active + Directory Connect Health. + :type monitoring_configurations_computed: + list[~azure.mgmt.adhybridhealthservice.models.Item] + :param monitoring_configurations_customized: The customized monitoring + configuration of the server which determines what activities are monitored + by Azure Active Directory Connect Health. + :type monitoring_configurations_customized: + list[~azure.mgmt.adhybridhealthservice.models.Item] + :param os_name: The name of the operating system installed in the machine. + :type os_name: str + :param os_version: The version of the operating system installed in the + machine. + :type os_version: str + :param properties: Server specific properties. + :type properties: list[~azure.mgmt.adhybridhealthservice.models.Item] + :param recommended_qfes: The list of recommended hotfixes for the server. + :type recommended_qfes: + list[~azure.mgmt.adhybridhealthservice.models.Hotfix] + :param resolved_alerts: The total count of alerts that are resolved for + this server. + :type resolved_alerts: int + :param role: The service role that is being monitored in the server. + :type role: str + :param server_reported_monitoring_level: The monitoring level reported by + the server. Possible values include: 'Partial', 'Full', 'Off' + :type server_reported_monitoring_level: str or + ~azure.mgmt.adhybridhealthservice.models.MonitoringLevel + :param status: The health status of the server. + :type status: str + """ + + _attribute_map = { + 'domain_name': {'key': 'domainName', 'type': 'str'}, + 'site_name': {'key': 'siteName', 'type': 'str'}, + 'adds_roles': {'key': 'addsRoles', 'type': '[str]'}, + 'gc_reachable': {'key': 'gcReachable', 'type': 'bool'}, + 'is_advertising': {'key': 'isAdvertising', 'type': 'bool'}, + 'pdc_reachable': {'key': 'pdcReachable', 'type': 'bool'}, + 'sysvol_state': {'key': 'sysvolState', 'type': 'bool'}, + 'dc_types': {'key': 'dcTypes', 'type': '[str]'}, + 'service_member_id': {'key': 'serviceMemberId', 'type': 'str'}, + 'service_id': {'key': 'serviceId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'active_alerts': {'key': 'activeAlerts', 'type': 'int'}, + 'additional_information': {'key': 'additionalInformation', 'type': 'str'}, + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'dimensions': {'key': 'dimensions', 'type': '[Item]'}, + 'disabled': {'key': 'disabled', 'type': 'bool'}, + 'disabled_reason': {'key': 'disabledReason', 'type': 'int'}, + 'installed_qfes': {'key': 'installedQfes', 'type': '[Hotfix]'}, + 'last_disabled': {'key': 'lastDisabled', 'type': 'iso-8601'}, + 'last_reboot': {'key': 'lastReboot', 'type': 'iso-8601'}, + 'last_server_reported_monitoring_level_change': {'key': 'lastServerReportedMonitoringLevelChange', 'type': 'iso-8601'}, + 'last_updated': {'key': 'lastUpdated', 'type': 'iso-8601'}, + 'machine_id': {'key': 'machineId', 'type': 'str'}, + 'machine_name': {'key': 'machineName', 'type': 'str'}, + 'monitoring_configurations_computed': {'key': 'monitoringConfigurationsComputed', 'type': '[Item]'}, + 'monitoring_configurations_customized': {'key': 'monitoringConfigurationsCustomized', 'type': '[Item]'}, + 'os_name': {'key': 'osName', 'type': 'str'}, + 'os_version': {'key': 'osVersion', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '[Item]'}, + 'recommended_qfes': {'key': 'recommendedQfes', 'type': '[Hotfix]'}, + 'resolved_alerts': {'key': 'resolvedAlerts', 'type': 'int'}, + 'role': {'key': 'role', 'type': 'str'}, + 'server_reported_monitoring_level': {'key': 'serverReportedMonitoringLevel', 'type': 'MonitoringLevel'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AddsServiceMember, self).__init__(**kwargs) + self.domain_name = kwargs.get('domain_name', None) + self.site_name = kwargs.get('site_name', None) + self.adds_roles = kwargs.get('adds_roles', None) + self.gc_reachable = kwargs.get('gc_reachable', None) + self.is_advertising = kwargs.get('is_advertising', None) + self.pdc_reachable = kwargs.get('pdc_reachable', None) + self.sysvol_state = kwargs.get('sysvol_state', None) + self.dc_types = kwargs.get('dc_types', None) + self.service_member_id = kwargs.get('service_member_id', None) + self.service_id = kwargs.get('service_id', None) + self.tenant_id = kwargs.get('tenant_id', None) + self.active_alerts = kwargs.get('active_alerts', None) + self.additional_information = kwargs.get('additional_information', None) + self.created_date = kwargs.get('created_date', None) + self.dimensions = kwargs.get('dimensions', None) + self.disabled = kwargs.get('disabled', None) + self.disabled_reason = kwargs.get('disabled_reason', None) + self.installed_qfes = kwargs.get('installed_qfes', None) + self.last_disabled = kwargs.get('last_disabled', None) + self.last_reboot = kwargs.get('last_reboot', None) + self.last_server_reported_monitoring_level_change = kwargs.get('last_server_reported_monitoring_level_change', None) + self.last_updated = kwargs.get('last_updated', None) + self.machine_id = kwargs.get('machine_id', None) + self.machine_name = kwargs.get('machine_name', None) + self.monitoring_configurations_computed = kwargs.get('monitoring_configurations_computed', None) + self.monitoring_configurations_customized = kwargs.get('monitoring_configurations_customized', None) + self.os_name = kwargs.get('os_name', None) + self.os_version = kwargs.get('os_version', None) + self.properties = kwargs.get('properties', None) + self.recommended_qfes = kwargs.get('recommended_qfes', None) + self.resolved_alerts = kwargs.get('resolved_alerts', None) + self.role = kwargs.get('role', None) + self.server_reported_monitoring_level = kwargs.get('server_reported_monitoring_level', None) + self.status = kwargs.get('status', None) + + +class Agent(Model): + """The agent details. + + :param tenant_id: The tenant Id. + :type tenant_id: str + :param machine_id: The machine Id. + :type machine_id: str + :param credential: The agent credential details. + :type credential: object + :param machine_name: The machine name. + :type machine_name: str + :param agent_version: The agent version. + :type agent_version: str + :param created_date: The date and time, in UTC, when the agent was + created. + :type created_date: datetime + :param key: The connector hash key. + :type key: str + """ + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'machine_id': {'key': 'machineId', 'type': 'str'}, + 'credential': {'key': 'credential', 'type': 'object'}, + 'machine_name': {'key': 'machineName', 'type': 'str'}, + 'agent_version': {'key': 'agentVersion', 'type': 'str'}, + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'key': {'key': 'key', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Agent, self).__init__(**kwargs) + self.tenant_id = kwargs.get('tenant_id', None) + self.machine_id = kwargs.get('machine_id', None) + self.credential = kwargs.get('credential', None) + self.machine_name = kwargs.get('machine_name', None) + self.agent_version = kwargs.get('agent_version', None) + self.created_date = kwargs.get('created_date', None) + self.key = kwargs.get('key', None) + + +class Alert(Model): + """The alert details indicating an issue with service or server. + + :param alert_id: The alert Id. + :type alert_id: str + :param level: The alert level which indicates the severity of the alert. + Possible values include: 'Warning', 'Error', 'PreWarning' + :type level: str or ~azure.mgmt.adhybridhealthservice.models.Level + :param state: The alert state which can be either active or resolved with + multiple resolution types. Possible values include: 'Active', + 'ResolvedByPositiveResult', 'ResolvedManually', 'ResolvedByTimer', + 'ResolvedByStateChange' + :type state: str or ~azure.mgmt.adhybridhealthservice.models.State + :param short_name: The alert short name. + :type short_name: str + :param display_name: The display name for the alert. + :type display_name: str + :param description: The alert description. + :type description: str + :param remediation: The alert remediation. + :type remediation: str + :param related_links: The help links to get more information related to + the alert. + :type related_links: + list[~azure.mgmt.adhybridhealthservice.models.HelpLink] + :param scope: The scope of the alert. Indicates if it is a service or a + server related alert. + :type scope: str + :param additional_information: Additional information related to the + alert. + :type additional_information: + list[~azure.mgmt.adhybridhealthservice.models.AdditionalInformation] + :param created_date: The date and time,in UTC,when the alert was created. + :type created_date: datetime + :param resolved_date: The date and time, in UTC, when the alert was + resolved. + :type resolved_date: datetime + :param last_updated: The date and time, in UTC, when the alert was last + updated. + :type last_updated: datetime + :param monitor_role_type: The monitoring role type for which the alert was + raised. + :type monitor_role_type: str + :param active_alert_properties: The active alert properties. + :type active_alert_properties: + list[~azure.mgmt.adhybridhealthservice.models.Item] + :param resolved_alert_properties: The resolved alert properties. + :type resolved_alert_properties: + list[~azure.mgmt.adhybridhealthservice.models.Item] + :param tenant_id: The tenant Id. + :type tenant_id: str + :param service_id: The service Id. + :type service_id: str + :param service_member_id: The server Id. + :type service_member_id: str + """ + + _attribute_map = { + 'alert_id': {'key': 'alertId', 'type': 'str'}, + 'level': {'key': 'level', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'short_name': {'key': 'shortName', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'remediation': {'key': 'remediation', 'type': 'str'}, + 'related_links': {'key': 'relatedLinks', 'type': '[HelpLink]'}, + 'scope': {'key': 'scope', 'type': 'str'}, + 'additional_information': {'key': 'additionalInformation', 'type': '[AdditionalInformation]'}, + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'resolved_date': {'key': 'resolvedDate', 'type': 'iso-8601'}, + 'last_updated': {'key': 'lastUpdated', 'type': 'iso-8601'}, + 'monitor_role_type': {'key': 'monitorRoleType', 'type': 'str'}, + 'active_alert_properties': {'key': 'activeAlertProperties', 'type': '[Item]'}, + 'resolved_alert_properties': {'key': 'resolvedAlertProperties', 'type': '[Item]'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'service_id': {'key': 'serviceId', 'type': 'str'}, + 'service_member_id': {'key': 'serviceMemberId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Alert, self).__init__(**kwargs) + self.alert_id = kwargs.get('alert_id', None) + self.level = kwargs.get('level', None) + self.state = kwargs.get('state', None) + self.short_name = kwargs.get('short_name', None) + self.display_name = kwargs.get('display_name', None) + self.description = kwargs.get('description', None) + self.remediation = kwargs.get('remediation', None) + self.related_links = kwargs.get('related_links', None) + self.scope = kwargs.get('scope', None) + self.additional_information = kwargs.get('additional_information', None) + self.created_date = kwargs.get('created_date', None) + self.resolved_date = kwargs.get('resolved_date', None) + self.last_updated = kwargs.get('last_updated', None) + self.monitor_role_type = kwargs.get('monitor_role_type', None) + self.active_alert_properties = kwargs.get('active_alert_properties', None) + self.resolved_alert_properties = kwargs.get('resolved_alert_properties', None) + self.tenant_id = kwargs.get('tenant_id', None) + self.service_id = kwargs.get('service_id', None) + self.service_member_id = kwargs.get('service_member_id', None) + + +class AlertFeedback(Model): + """The alert feedback details. + + :param level: The alert level which indicates the severity of the alert. + :type level: str + :param state: The alert state which can be either active or resolved with + multiple resolution types. + :type state: str + :param short_name: The alert short name. + :type short_name: str + :param feedback: The feedback for the alert which indicates if the + customer likes or dislikes the alert. + :type feedback: str + :param comment: Additional comments related to the alert. + :type comment: str + :param consented_to_share: Indicates if the alert feedback can be shared + from product team. + :type consented_to_share: bool + :param service_member_id: The server Id of the alert. + :type service_member_id: str + :param created_date: The date and time,in UTC,when the alert was created. + :type created_date: datetime + """ + + _attribute_map = { + 'level': {'key': 'level', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'short_name': {'key': 'shortName', 'type': 'str'}, + 'feedback': {'key': 'feedback', 'type': 'str'}, + 'comment': {'key': 'comment', 'type': 'str'}, + 'consented_to_share': {'key': 'consentedToShare', 'type': 'bool'}, + 'service_member_id': {'key': 'serviceMemberId', 'type': 'str'}, + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(AlertFeedback, self).__init__(**kwargs) + self.level = kwargs.get('level', None) + self.state = kwargs.get('state', None) + self.short_name = kwargs.get('short_name', None) + self.feedback = kwargs.get('feedback', None) + self.comment = kwargs.get('comment', None) + self.consented_to_share = kwargs.get('consented_to_share', None) + self.service_member_id = kwargs.get('service_member_id', None) + self.created_date = kwargs.get('created_date', None) + + +class AssociatedObject(Model): + """Object that hold sync object details. + + :param display_name: The display name of the object. + :type display_name: str + :param distinguished_name: The distinguished name of the object. + :type distinguished_name: str + :param last_dir_sync_time: The last dirSync time. + :type last_dir_sync_time: datetime + :param mail: The email of the object. + :type mail: str + :param object_guid: The object guid. + :type object_guid: str + :param object_type: The object type. + :type object_type: str + :param onpremises_user_principal_name: The On-premises UPN. + :type onpremises_user_principal_name: str + :param proxy_addresses: The proxy addresses. + :type proxy_addresses: str + :param source_anchor: The source anchor. + :type source_anchor: str + :param source_of_authority: The source of authority. + :type source_of_authority: str + :param time_occurred: The time of the error. + :type time_occurred: datetime + :param user_principal_name: The UPN. + :type user_principal_name: str + """ + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'distinguished_name': {'key': 'distinguishedName', 'type': 'str'}, + 'last_dir_sync_time': {'key': 'lastDirSyncTime', 'type': 'iso-8601'}, + 'mail': {'key': 'mail', 'type': 'str'}, + 'object_guid': {'key': 'objectGuid', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'onpremises_user_principal_name': {'key': 'onpremisesUserPrincipalName', 'type': 'str'}, + 'proxy_addresses': {'key': 'proxyAddresses', 'type': 'str'}, + 'source_anchor': {'key': 'sourceAnchor', 'type': 'str'}, + 'source_of_authority': {'key': 'sourceOfAuthority', 'type': 'str'}, + 'time_occurred': {'key': 'timeOccurred', 'type': 'iso-8601'}, + 'user_principal_name': {'key': 'userPrincipalName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AssociatedObject, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + self.distinguished_name = kwargs.get('distinguished_name', None) + self.last_dir_sync_time = kwargs.get('last_dir_sync_time', None) + self.mail = kwargs.get('mail', None) + self.object_guid = kwargs.get('object_guid', None) + self.object_type = kwargs.get('object_type', None) + self.onpremises_user_principal_name = kwargs.get('onpremises_user_principal_name', None) + self.proxy_addresses = kwargs.get('proxy_addresses', None) + self.source_anchor = kwargs.get('source_anchor', None) + self.source_of_authority = kwargs.get('source_of_authority', None) + self.time_occurred = kwargs.get('time_occurred', None) + self.user_principal_name = kwargs.get('user_principal_name', None) + + +class AttributeDelta(Model): + """The delta attributes. + + :param values: The delta values. + :type values: list[~azure.mgmt.adhybridhealthservice.models.ValueDelta] + :param name: The name of the attribute delta. + :type name: str + :param operation_type: The attribute delta operation type. Possible values + include: 'Undefined', 'Add', 'Replace', 'Update', 'Delete' + :type operation_type: str or + ~azure.mgmt.adhybridhealthservice.models.AttributeDeltaOperationType + :param value_type: The value type. Possible values include: 'Undefined', + 'Dn', 'Binary', 'String', 'Integer', 'Boolean' + :type value_type: str or + ~azure.mgmt.adhybridhealthservice.models.ValueType + :param multi_valued: Indicates if the attribute delta is multivalued or + not. + :type multi_valued: bool + """ + + _attribute_map = { + 'values': {'key': 'values', 'type': '[ValueDelta]'}, + 'name': {'key': 'name', 'type': 'str'}, + 'operation_type': {'key': 'operationType', 'type': 'str'}, + 'value_type': {'key': 'valueType', 'type': 'str'}, + 'multi_valued': {'key': 'multiValued', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(AttributeDelta, self).__init__(**kwargs) + self.values = kwargs.get('values', None) + self.name = kwargs.get('name', None) + self.operation_type = kwargs.get('operation_type', None) + self.value_type = kwargs.get('value_type', None) + self.multi_valued = kwargs.get('multi_valued', None) + + +class AttributeMapping(Model): + """The attribute mapping details. + + :param mapping_source: The mapping source. + :type mapping_source: + ~azure.mgmt.adhybridhealthservice.models.AttributeMppingSource + :param type: The attribute mapping type. Possible values include: + 'Constant', 'Direct', 'DnPart', 'Script' + :type type: str or + ~azure.mgmt.adhybridhealthservice.models.AttributeMappingType + :param destination_attribute: The destination attribute. + :type destination_attribute: str + :param context_id: The context Id. + :type context_id: str + """ + + _attribute_map = { + 'mapping_source': {'key': 'mappingSource', 'type': 'AttributeMppingSource'}, + 'type': {'key': 'type', 'type': 'str'}, + 'destination_attribute': {'key': 'destinationAttribute', 'type': 'str'}, + 'context_id': {'key': 'contextId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AttributeMapping, self).__init__(**kwargs) + self.mapping_source = kwargs.get('mapping_source', None) + self.type = kwargs.get('type', None) + self.destination_attribute = kwargs.get('destination_attribute', None) + self.context_id = kwargs.get('context_id', None) + + +class AttributeMppingSource(Model): + """The attribute mapping source. + + :param source_attribute: The source attribute. + :type source_attribute: list[str] + :param dn_part: The value for dn part. + :type dn_part: int + :param script_context: The script context. + :type script_context: str + :param constant_value: The constant value. + :type constant_value: str + """ + + _attribute_map = { + 'source_attribute': {'key': 'sourceAttribute', 'type': '[str]'}, + 'dn_part': {'key': 'dnPart', 'type': 'int'}, + 'script_context': {'key': 'scriptContext', 'type': 'str'}, + 'constant_value': {'key': 'constantValue', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AttributeMppingSource, self).__init__(**kwargs) + self.source_attribute = kwargs.get('source_attribute', None) + self.dn_part = kwargs.get('dn_part', None) + self.script_context = kwargs.get('script_context', None) + self.constant_value = kwargs.get('constant_value', None) + + +class ChangeNotReimported(Model): + """The changes which are not re-imported. + + :param delta: The delta changes that is not re-imported. + :type delta: + ~azure.mgmt.adhybridhealthservice.models.ChangeNotReimportedDelta + :param entry: The object entry in a change that is not re-imported. + :type entry: + ~azure.mgmt.adhybridhealthservice.models.ChangeNotReimportedEntry + """ + + _attribute_map = { + 'delta': {'key': 'delta', 'type': 'ChangeNotReimportedDelta'}, + 'entry': {'key': 'entry', 'type': 'ChangeNotReimportedEntry'}, + } + + def __init__(self, **kwargs): + super(ChangeNotReimported, self).__init__(**kwargs) + self.delta = kwargs.get('delta', None) + self.entry = kwargs.get('entry', None) + + +class ChangeNotReimportedDelta(Model): + """The delta in a change that is not re-imported. + + :param anchor: The anchor. + :type anchor: str + :param dn_attributes: The delta attributes for distinguished names. + :type dn_attributes: + list[~azure.mgmt.adhybridhealthservice.models.AttributeDelta] + :param attributes: The attributes. + :type attributes: + list[~azure.mgmt.adhybridhealthservice.models.AttributeDelta] + :param operation_type: The operation type. Possible values include: + 'Undefined', 'None', 'Add', 'Replace', 'Update', 'Delete', 'Obsolete', + 'DeleteAdd' + :type operation_type: str or + ~azure.mgmt.adhybridhealthservice.models.DeltaOperationType + """ + + _attribute_map = { + 'anchor': {'key': 'anchor', 'type': 'str'}, + 'dn_attributes': {'key': 'dnAttributes', 'type': '[AttributeDelta]'}, + 'attributes': {'key': 'attributes', 'type': '[AttributeDelta]'}, + 'operation_type': {'key': 'operationType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ChangeNotReimportedDelta, self).__init__(**kwargs) + self.anchor = kwargs.get('anchor', None) + self.dn_attributes = kwargs.get('dn_attributes', None) + self.attributes = kwargs.get('attributes', None) + self.operation_type = kwargs.get('operation_type', None) + + +class ChangeNotReimportedEntry(Model): + """The object entry in a change that is not re-imported. + + :param anchor: The anchor. + :type anchor: str + :param parent_anchor: The parent anchor. + :type parent_anchor: str + :param primary_object_class: The primary object class. + :type primary_object_class: str + :param object_classes: The list of object classes. + :type object_classes: list[str] + :param dn_attributes: The delta attributes for distinguished names. + :type dn_attributes: + list[~azure.mgmt.adhybridhealthservice.models.AttributeDelta] + :param attributes: The attributes. + :type attributes: + list[~azure.mgmt.adhybridhealthservice.models.AttributeDelta] + :param dn: The distinguished name. + :type dn: str + """ + + _attribute_map = { + 'anchor': {'key': 'anchor', 'type': 'str'}, + 'parent_anchor': {'key': 'parentAnchor', 'type': 'str'}, + 'primary_object_class': {'key': 'primaryObjectClass', 'type': 'str'}, + 'object_classes': {'key': 'objectClasses', 'type': '[str]'}, + 'dn_attributes': {'key': 'dnAttributes', 'type': '[AttributeDelta]'}, + 'attributes': {'key': 'attributes', 'type': '[AttributeDelta]'}, + 'dn': {'key': 'dn', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ChangeNotReimportedEntry, self).__init__(**kwargs) + self.anchor = kwargs.get('anchor', None) + self.parent_anchor = kwargs.get('parent_anchor', None) + self.primary_object_class = kwargs.get('primary_object_class', None) + self.object_classes = kwargs.get('object_classes', None) + self.dn_attributes = kwargs.get('dn_attributes', None) + self.attributes = kwargs.get('attributes', None) + self.dn = kwargs.get('dn', None) + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class Connector(Model): + """The connect details. + + :param connector_id: The connector Id. + :type connector_id: str + :param id: The connector Id. + :type id: str + :param name: The connector name. + :type name: str + :param version: The connector version + :type version: int + :param type: The connector type. + :type type: str + :param description: The connector description. + :type description: str + :param schema_xml: The schema xml for the connector. + :type schema_xml: str + :param password_management_settings: The password management settings of + the connector. + :type password_management_settings: object + :param password_hash_sync_configuration: The password hash synchronization + configuration of the connector. + :type password_hash_sync_configuration: object + :param time_created: The date and time when this connector was created. + :type time_created: datetime + :param time_last_modified: The date and time when this connector was last + modified. + :type time_last_modified: datetime + :param partitions: The partitions of the connector. + :type partitions: list[~azure.mgmt.adhybridhealthservice.models.Partition] + :param run_profiles: The run profiles of the connector. + :type run_profiles: + list[~azure.mgmt.adhybridhealthservice.models.RunProfile] + :param classes_included: The class inclusion list of the connector. + :type classes_included: list[str] + :param attributes_included: The attribute inclusion list of the connector. + :type attributes_included: list[str] + """ + + _attribute_map = { + 'connector_id': {'key': 'connectorId', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'int'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'schema_xml': {'key': 'schemaXml', 'type': 'str'}, + 'password_management_settings': {'key': 'passwordManagementSettings', 'type': 'object'}, + 'password_hash_sync_configuration': {'key': 'passwordHashSyncConfiguration', 'type': 'object'}, + 'time_created': {'key': 'timeCreated', 'type': 'iso-8601'}, + 'time_last_modified': {'key': 'timeLastModified', 'type': 'iso-8601'}, + 'partitions': {'key': 'partitions', 'type': '[Partition]'}, + 'run_profiles': {'key': 'runProfiles', 'type': '[RunProfile]'}, + 'classes_included': {'key': 'classesIncluded', 'type': '[str]'}, + 'attributes_included': {'key': 'attributesIncluded', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(Connector, self).__init__(**kwargs) + self.connector_id = kwargs.get('connector_id', None) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.version = kwargs.get('version', None) + self.type = kwargs.get('type', None) + self.description = kwargs.get('description', None) + self.schema_xml = kwargs.get('schema_xml', None) + self.password_management_settings = kwargs.get('password_management_settings', None) + self.password_hash_sync_configuration = kwargs.get('password_hash_sync_configuration', None) + self.time_created = kwargs.get('time_created', None) + self.time_last_modified = kwargs.get('time_last_modified', None) + self.partitions = kwargs.get('partitions', None) + self.run_profiles = kwargs.get('run_profiles', None) + self.classes_included = kwargs.get('classes_included', None) + self.attributes_included = kwargs.get('attributes_included', None) + + +class ConnectorConnectionError(Model): + """The connector connection error. + + :param id: The error Id. + :type id: str + :param run_step_result_id: The run step result Id. + :type run_step_result_id: str + :param connector_id: The connector Id. + :type connector_id: str + :param type: The type of error. + :type type: str + :param error_code: The error code. + :type error_code: str + :param message: The message for the connection error. + :type message: str + :param time_occured: The time when the connection error occurred. + :type time_occured: datetime + :param server: The server where the connection error happened. + :type server: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'run_step_result_id': {'key': 'runStepResultId', 'type': 'str'}, + 'connector_id': {'key': 'connectorId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'error_code': {'key': 'errorCode', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'time_occured': {'key': 'timeOccured', 'type': 'iso-8601'}, + 'server': {'key': 'server', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ConnectorConnectionError, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.run_step_result_id = kwargs.get('run_step_result_id', None) + self.connector_id = kwargs.get('connector_id', None) + self.type = kwargs.get('type', None) + self.error_code = kwargs.get('error_code', None) + self.message = kwargs.get('message', None) + self.time_occured = kwargs.get('time_occured', None) + self.server = kwargs.get('server', None) + + +class ConnectorConnectionErrors(Model): + """The list of connector connection errors. + + :param value: The value returned by the operation. + :type value: + list[~azure.mgmt.adhybridhealthservice.models.ConnectorConnectionError] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ConnectorConnectionError]'}, + } + + def __init__(self, **kwargs): + super(ConnectorConnectionErrors, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class ConnectorMetadata(Model): + """Gets the list of connectors and run profile names. + + :param connectors: The list of connectors. + :type connectors: + list[~azure.mgmt.adhybridhealthservice.models.ConnectorMetadataDetails] + :param run_profile_names: The list of run profile names. + :type run_profile_names: list[str] + """ + + _attribute_map = { + 'connectors': {'key': 'connectors', 'type': '[ConnectorMetadataDetails]'}, + 'run_profile_names': {'key': 'runProfileNames', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(ConnectorMetadata, self).__init__(**kwargs) + self.connectors = kwargs.get('connectors', None) + self.run_profile_names = kwargs.get('run_profile_names', None) + + +class ConnectorMetadataDetails(Model): + """Details of the connector. + + :param connector_id: The Connector Id. + :type connector_id: str + :param connector_display_name: The Connector Display Name + :type connector_display_name: str + """ + + _attribute_map = { + 'connector_id': {'key': 'connectorId', 'type': 'str'}, + 'connector_display_name': {'key': 'connectorDisplayName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ConnectorMetadataDetails, self).__init__(**kwargs) + self.connector_id = kwargs.get('connector_id', None) + self.connector_display_name = kwargs.get('connector_display_name', None) + + +class ConnectorObjectError(Model): + """The connector object error. + + :param id: The error Id. + :type id: str + :param run_step_result_id: The run step result Id. + :type run_step_result_id: str + :param connector_id: The connector Id. + :type connector_id: str + :param type: The type of error. + :type type: str + :param error_code: The error code. + :type error_code: str + :param message: The message for the object error. + :type message: str + :param entry_number: The entry number for object error occurred. + :type entry_number: int + :param line_number: The line number for the object error. + :type line_number: int + :param column_number: The column number for the object error. + :type column_number: int + :param dn: The distinguished name of the object. + :type dn: str + :param anchor: The name for the anchor of the object. + :type anchor: str + :param attribute_name: The attribute name of the object. + :type attribute_name: str + :param server_error_detail: The server side error details. + :type server_error_detail: str + :param values: The value corresponding to attribute name. + :type values: list[str] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'run_step_result_id': {'key': 'runStepResultId', 'type': 'str'}, + 'connector_id': {'key': 'connectorId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'error_code': {'key': 'errorCode', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'entry_number': {'key': 'entryNumber', 'type': 'int'}, + 'line_number': {'key': 'lineNumber', 'type': 'int'}, + 'column_number': {'key': 'columnNumber', 'type': 'int'}, + 'dn': {'key': 'dn', 'type': 'str'}, + 'anchor': {'key': 'anchor', 'type': 'str'}, + 'attribute_name': {'key': 'attributeName', 'type': 'str'}, + 'server_error_detail': {'key': 'serverErrorDetail', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(ConnectorObjectError, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.run_step_result_id = kwargs.get('run_step_result_id', None) + self.connector_id = kwargs.get('connector_id', None) + self.type = kwargs.get('type', None) + self.error_code = kwargs.get('error_code', None) + self.message = kwargs.get('message', None) + self.entry_number = kwargs.get('entry_number', None) + self.line_number = kwargs.get('line_number', None) + self.column_number = kwargs.get('column_number', None) + self.dn = kwargs.get('dn', None) + self.anchor = kwargs.get('anchor', None) + self.attribute_name = kwargs.get('attribute_name', None) + self.server_error_detail = kwargs.get('server_error_detail', None) + self.values = kwargs.get('values', None) + + +class ConnectorObjectErrors(Model): + """The list of connector object errors. + + :param value: The value returned by the operation. + :type value: + list[~azure.mgmt.adhybridhealthservice.models.ConnectorObjectError] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ConnectorObjectError]'}, + } + + def __init__(self, **kwargs): + super(ConnectorObjectErrors, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class Credential(Model): + """The credential for a given server. + + :param identifier: The credential identifier. + :type identifier: str + :param type: The type of credential. + :type type: str + :param credential_data: The credential data. + :type credential_data: list[str] + """ + + _attribute_map = { + 'identifier': {'key': 'identifier', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'credential_data': {'key': 'credentialData', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(Credential, self).__init__(**kwargs) + self.identifier = kwargs.get('identifier', None) + self.type = kwargs.get('type', None) + self.credential_data = kwargs.get('credential_data', None) + + +class Dimension(Model): + """The connector object error. + + :param health: The health status for the domain controller. Possible + values include: 'Healthy', 'Warning', 'Error', 'NotMonitored', 'Missing' + :type health: str or ~azure.mgmt.adhybridhealthservice.models.HealthStatus + :param simple_properties: List of service specific configuration + properties. + :type simple_properties: object + :param active_alerts: The count of alerts that are currently active for + the service. + :type active_alerts: int + :param additional_information: The additional information related to the + service. + :type additional_information: str + :param last_updated: The date or time , in UTC, when the service + properties were last updated. + :type last_updated: datetime + :param display_name: The display name of the service. + :type display_name: str + :param resolved_alerts: The total count of alerts that has been resolved + for the service. + :type resolved_alerts: int + :param signature: The signature of the service. + :type signature: str + :param type: The service type for the services onboarded to Azure Active + Directory Connect Health. Depending on whether the service is monitoring, + ADFS, Sync or ADDS roles, the service type can either be + AdFederationService or AadSyncService or AdDomainService. + :type type: str + """ + + _attribute_map = { + 'health': {'key': 'health', 'type': 'str'}, + 'simple_properties': {'key': 'simpleProperties', 'type': 'object'}, + 'active_alerts': {'key': 'activeAlerts', 'type': 'int'}, + 'additional_information': {'key': 'additionalInformation', 'type': 'str'}, + 'last_updated': {'key': 'lastUpdated', 'type': 'iso-8601'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'resolved_alerts': {'key': 'resolvedAlerts', 'type': 'int'}, + 'signature': {'key': 'signature', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Dimension, self).__init__(**kwargs) + self.health = kwargs.get('health', None) + self.simple_properties = kwargs.get('simple_properties', None) + self.active_alerts = kwargs.get('active_alerts', None) + self.additional_information = kwargs.get('additional_information', None) + self.last_updated = kwargs.get('last_updated', None) + self.display_name = kwargs.get('display_name', None) + self.resolved_alerts = kwargs.get('resolved_alerts', None) + self.signature = kwargs.get('signature', None) + self.type = kwargs.get('type', None) + + +class Display(Model): + """Displays the details related to operations supported by Azure Active + Directory Connect Health. + + :param description: The description for the operation. + :type description: str + :param operation: The details of the operation. + :type operation: str + :param provider: The provider name. + :type provider: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'provider': {'key': 'provider', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Display, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.operation = kwargs.get('operation', None) + self.provider = kwargs.get('provider', None) + + +class ErrorCount(Model): + """The error count details. + + :param error_bucket: The error bucket. + :type error_bucket: str + :param count: The error count. + :type count: int + :param truncated: Indicates if the error count is truncated or not. + :type truncated: bool + """ + + _attribute_map = { + 'error_bucket': {'key': 'errorBucket', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + 'truncated': {'key': 'truncated', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ErrorCount, self).__init__(**kwargs) + self.error_bucket = kwargs.get('error_bucket', None) + self.count = kwargs.get('count', None) + self.truncated = kwargs.get('truncated', None) + + +class ErrorDetail(Model): + """The error details. + + :param description: The error description. + :type description: str + :param kb_url: The knowledge base article url which contains more + information about the error. + :type kb_url: str + :param detail: Additional details related to the error. + :type detail: str + :param objects_with_sync_error: The list of objects with sync errors. + :type objects_with_sync_error: + ~azure.mgmt.adhybridhealthservice.models.ObjectWithSyncError + :param object_with_sync_error: The object with sync error. + :type object_with_sync_error: + ~azure.mgmt.adhybridhealthservice.models.MergedExportError + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'kb_url': {'key': 'kbUrl', 'type': 'str'}, + 'detail': {'key': 'detail', 'type': 'str'}, + 'objects_with_sync_error': {'key': 'objectsWithSyncError', 'type': 'ObjectWithSyncError'}, + 'object_with_sync_error': {'key': 'objectWithSyncError', 'type': 'MergedExportError'}, + } + + def __init__(self, **kwargs): + super(ErrorDetail, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.kb_url = kwargs.get('kb_url', None) + self.detail = kwargs.get('detail', None) + self.objects_with_sync_error = kwargs.get('objects_with_sync_error', None) + self.object_with_sync_error = kwargs.get('object_with_sync_error', None) + + +class ErrorReportUsersEntry(Model): + """The bad password login attempt details. + + :param user_id: The user ID value. + :type user_id: str + :param ip_address: The IP address corresponding to the last error event. + :type ip_address: str + :param last_updated: The date and time when the last error event was + logged. + :type last_updated: datetime + :param unique_ip_addresses: The list of unique IP addresses. + :type unique_ip_addresses: str + :param total_error_attempts: The total count of specific error events. + :type total_error_attempts: int + """ + + _attribute_map = { + 'user_id': {'key': 'userId', 'type': 'str'}, + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + 'last_updated': {'key': 'lastUpdated', 'type': 'iso-8601'}, + 'unique_ip_addresses': {'key': 'uniqueIpAddresses', 'type': 'str'}, + 'total_error_attempts': {'key': 'totalErrorAttempts', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ErrorReportUsersEntry, self).__init__(**kwargs) + self.user_id = kwargs.get('user_id', None) + self.ip_address = kwargs.get('ip_address', None) + self.last_updated = kwargs.get('last_updated', None) + self.unique_ip_addresses = kwargs.get('unique_ip_addresses', None) + self.total_error_attempts = kwargs.get('total_error_attempts', None) + + +class ExportError(Model): + """The export error details. + + :param id: The error Id. + :type id: str + :param run_step_result_id: The run step result Id. + :type run_step_result_id: str + :param connector_id: The connector Id. + :type connector_id: str + :param type: The type of error. + :type type: str + :param error_code: The error code. + :type error_code: str + :param message: The export error message. + :type message: str + :param server_error_detail: The server error detail. + :type server_error_detail: str + :param time_first_occured: The date and time when the export error first + occurred. + :type time_first_occured: datetime + :param retry_count: The retry count. + :type retry_count: int + :param cs_object_id: The cloud object Id. + :type cs_object_id: str + :param dn: The distinguished name. + :type dn: str + :param min_limit: The minimum limit. + :type min_limit: str + :param max_limit: The maximum limit. + :type max_limit: str + :param cloud_anchor: The name of the cloud anchor. + :type cloud_anchor: str + :param attribute_name: The attribute name. + :type attribute_name: str + :param attribute_value: The attribute value. + :type attribute_value: str + :param attribute_multi_value: Indicates if the attribute is multi valued + or not. + :type attribute_multi_value: bool + :param object_id_conflict: The object Id with which there was an attribute + conflict. + :type object_id_conflict: str + :param sam_account_name: The SAM account name. + :type sam_account_name: str + :param ad_object_type: The AD object type + :type ad_object_type: str + :param ad_object_guid: The AD object guid. + :type ad_object_guid: str + :param ad_display_name: The display name for the AD object. + :type ad_display_name: str + :param ad_source_of_authority: The source of authority for the AD object. + :type ad_source_of_authority: str + :param ad_source_anchor: The AD source anchor. + :type ad_source_anchor: str + :param ad_user_principal_name: The user principal name for the AD object. + :type ad_user_principal_name: str + :param ad_distinguished_name: The distinguished name for the AD object. + :type ad_distinguished_name: str + :param ad_mail: The email for the AD object. + :type ad_mail: str + :param time_occured: The date and time of occurrence. + :type time_occured: datetime + :param aad_object_type: The AAD side object type. + :type aad_object_type: str + :param aad_object_guid: The AAD side object guid. + :type aad_object_guid: str + :param aad_display_name: The AAD side display name + :type aad_display_name: str + :param aad_source_of_authority: The AAD side source of authority for the + object. + :type aad_source_of_authority: str + :param aad_user_principal_name: The AAD side user principal name. + :type aad_user_principal_name: str + :param aad_distinguished_name: The AAD side distinguished name for the + object. + :type aad_distinguished_name: str + :param aad_mail: The AAD side email for the object. + :type aad_mail: str + :param last_dir_sync_time: The date and time of last sync run. + :type last_dir_sync_time: datetime + :param modified_attribute_value: The modified attribute value. + :type modified_attribute_value: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'run_step_result_id': {'key': 'runStepResultId', 'type': 'str'}, + 'connector_id': {'key': 'connectorId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'error_code': {'key': 'errorCode', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'server_error_detail': {'key': 'serverErrorDetail', 'type': 'str'}, + 'time_first_occured': {'key': 'timeFirstOccured', 'type': 'iso-8601'}, + 'retry_count': {'key': 'retryCount', 'type': 'int'}, + 'cs_object_id': {'key': 'csObjectId', 'type': 'str'}, + 'dn': {'key': 'dn', 'type': 'str'}, + 'min_limit': {'key': 'minLimit', 'type': 'str'}, + 'max_limit': {'key': 'maxLimit', 'type': 'str'}, + 'cloud_anchor': {'key': 'cloudAnchor', 'type': 'str'}, + 'attribute_name': {'key': 'attributeName', 'type': 'str'}, + 'attribute_value': {'key': 'attributeValue', 'type': 'str'}, + 'attribute_multi_value': {'key': 'attributeMultiValue', 'type': 'bool'}, + 'object_id_conflict': {'key': 'objectIdConflict', 'type': 'str'}, + 'sam_account_name': {'key': 'samAccountName', 'type': 'str'}, + 'ad_object_type': {'key': 'adObjectType', 'type': 'str'}, + 'ad_object_guid': {'key': 'adObjectGuid', 'type': 'str'}, + 'ad_display_name': {'key': 'adDisplayName', 'type': 'str'}, + 'ad_source_of_authority': {'key': 'adSourceOfAuthority', 'type': 'str'}, + 'ad_source_anchor': {'key': 'adSourceAnchor', 'type': 'str'}, + 'ad_user_principal_name': {'key': 'adUserPrincipalName', 'type': 'str'}, + 'ad_distinguished_name': {'key': 'adDistinguishedName', 'type': 'str'}, + 'ad_mail': {'key': 'adMail', 'type': 'str'}, + 'time_occured': {'key': 'timeOccured', 'type': 'iso-8601'}, + 'aad_object_type': {'key': 'aadObjectType', 'type': 'str'}, + 'aad_object_guid': {'key': 'aadObjectGuid', 'type': 'str'}, + 'aad_display_name': {'key': 'aadDisplayName', 'type': 'str'}, + 'aad_source_of_authority': {'key': 'aadSourceOfAuthority', 'type': 'str'}, + 'aad_user_principal_name': {'key': 'aadUserPrincipalName', 'type': 'str'}, + 'aad_distinguished_name': {'key': 'aadDistinguishedName', 'type': 'str'}, + 'aad_mail': {'key': 'aadMail', 'type': 'str'}, + 'last_dir_sync_time': {'key': 'lastDirSyncTime', 'type': 'iso-8601'}, + 'modified_attribute_value': {'key': 'modifiedAttributeValue', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ExportError, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.run_step_result_id = kwargs.get('run_step_result_id', None) + self.connector_id = kwargs.get('connector_id', None) + self.type = kwargs.get('type', None) + self.error_code = kwargs.get('error_code', None) + self.message = kwargs.get('message', None) + self.server_error_detail = kwargs.get('server_error_detail', None) + self.time_first_occured = kwargs.get('time_first_occured', None) + self.retry_count = kwargs.get('retry_count', None) + self.cs_object_id = kwargs.get('cs_object_id', None) + self.dn = kwargs.get('dn', None) + self.min_limit = kwargs.get('min_limit', None) + self.max_limit = kwargs.get('max_limit', None) + self.cloud_anchor = kwargs.get('cloud_anchor', None) + self.attribute_name = kwargs.get('attribute_name', None) + self.attribute_value = kwargs.get('attribute_value', None) + self.attribute_multi_value = kwargs.get('attribute_multi_value', None) + self.object_id_conflict = kwargs.get('object_id_conflict', None) + self.sam_account_name = kwargs.get('sam_account_name', None) + self.ad_object_type = kwargs.get('ad_object_type', None) + self.ad_object_guid = kwargs.get('ad_object_guid', None) + self.ad_display_name = kwargs.get('ad_display_name', None) + self.ad_source_of_authority = kwargs.get('ad_source_of_authority', None) + self.ad_source_anchor = kwargs.get('ad_source_anchor', None) + self.ad_user_principal_name = kwargs.get('ad_user_principal_name', None) + self.ad_distinguished_name = kwargs.get('ad_distinguished_name', None) + self.ad_mail = kwargs.get('ad_mail', None) + self.time_occured = kwargs.get('time_occured', None) + self.aad_object_type = kwargs.get('aad_object_type', None) + self.aad_object_guid = kwargs.get('aad_object_guid', None) + self.aad_display_name = kwargs.get('aad_display_name', None) + self.aad_source_of_authority = kwargs.get('aad_source_of_authority', None) + self.aad_user_principal_name = kwargs.get('aad_user_principal_name', None) + self.aad_distinguished_name = kwargs.get('aad_distinguished_name', None) + self.aad_mail = kwargs.get('aad_mail', None) + self.last_dir_sync_time = kwargs.get('last_dir_sync_time', None) + self.modified_attribute_value = kwargs.get('modified_attribute_value', None) + + +class ExportErrors(Model): + """The list of export errors. + + :param value: The value returned by the operation. + :type value: list[~azure.mgmt.adhybridhealthservice.models.ExportError] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExportError]'}, + } + + def __init__(self, **kwargs): + super(ExportErrors, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class ExportStatus(Model): + """The details of the export status. + + :param service_id: The id of the service for whom the export status is + being reported. + :type service_id: str + :param service_member_id: The server Id for whom the export status is + being reported. + :type service_member_id: str + :param end_time: The date and time when the export ended. + :type end_time: datetime + :param run_step_result_id: The run step result Id. + :type run_step_result_id: str + """ + + _attribute_map = { + 'service_id': {'key': 'serviceId', 'type': 'str'}, + 'service_member_id': {'key': 'serviceMemberId', 'type': 'str'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'run_step_result_id': {'key': 'runStepResultId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ExportStatus, self).__init__(**kwargs) + self.service_id = kwargs.get('service_id', None) + self.service_member_id = kwargs.get('service_member_id', None) + self.end_time = kwargs.get('end_time', None) + self.run_step_result_id = kwargs.get('run_step_result_id', None) + + +class ExtensionErrorInfo(Model): + """The extension error details. + + :param extension_name: The extension name. + :type extension_name: str + :param extension_context: The extension context. + :type extension_context: str + :param call_stack: The call stack for the error. + :type call_stack: str + """ + + _attribute_map = { + 'extension_name': {'key': 'extensionName', 'type': 'str'}, + 'extension_context': {'key': 'extensionContext', 'type': 'str'}, + 'call_stack': {'key': 'callStack', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ExtensionErrorInfo, self).__init__(**kwargs) + self.extension_name = kwargs.get('extension_name', None) + self.extension_context = kwargs.get('extension_context', None) + self.call_stack = kwargs.get('call_stack', None) + + +class ForestSummary(Model): + """The forest summary for an ADDS domain. + + :param forest_name: The forest name. + :type forest_name: str + :param domain_count: The domain count. + :type domain_count: int + :param site_count: The site count. + :type site_count: int + :param monitored_dc_count: The number of domain controllers that are + monitored by Azure Active Directory Connect Health. + :type monitored_dc_count: int + :param total_dc_count: The total domain controllers. + :type total_dc_count: int + :param domains: The list of domain controller names. + :type domains: list[str] + :param sites: The list of site names. + :type sites: list[str] + """ + + _attribute_map = { + 'forest_name': {'key': 'forestName', 'type': 'str'}, + 'domain_count': {'key': 'domainCount', 'type': 'int'}, + 'site_count': {'key': 'siteCount', 'type': 'int'}, + 'monitored_dc_count': {'key': 'monitoredDcCount', 'type': 'int'}, + 'total_dc_count': {'key': 'totalDcCount', 'type': 'int'}, + 'domains': {'key': 'domains', 'type': '[str]'}, + 'sites': {'key': 'sites', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(ForestSummary, self).__init__(**kwargs) + self.forest_name = kwargs.get('forest_name', None) + self.domain_count = kwargs.get('domain_count', None) + self.site_count = kwargs.get('site_count', None) + self.monitored_dc_count = kwargs.get('monitored_dc_count', None) + self.total_dc_count = kwargs.get('total_dc_count', None) + self.domains = kwargs.get('domains', None) + self.sites = kwargs.get('sites', None) + + +class GlobalConfiguration(Model): + """The global configuration settings. + + :param version: The version for the global configuration. + :type version: int + :param schema_xml: The schema for the configuration. + :type schema_xml: str + :param password_sync_enabled: Indicates if password sync is enabled or + not. + :type password_sync_enabled: bool + :param num_saved_pwd_event: The number of saved password events. + :type num_saved_pwd_event: int + :param feature_set: The list of additional feature sets. + :type feature_set: list[~azure.mgmt.adhybridhealthservice.models.Item] + """ + + _attribute_map = { + 'version': {'key': 'version', 'type': 'int'}, + 'schema_xml': {'key': 'schemaXml', 'type': 'str'}, + 'password_sync_enabled': {'key': 'passwordSyncEnabled', 'type': 'bool'}, + 'num_saved_pwd_event': {'key': 'numSavedPwdEvent', 'type': 'int'}, + 'feature_set': {'key': 'featureSet', 'type': '[Item]'}, + } + + def __init__(self, **kwargs): + super(GlobalConfiguration, self).__init__(**kwargs) + self.version = kwargs.get('version', None) + self.schema_xml = kwargs.get('schema_xml', None) + self.password_sync_enabled = kwargs.get('password_sync_enabled', None) + self.num_saved_pwd_event = kwargs.get('num_saved_pwd_event', None) + self.feature_set = kwargs.get('feature_set', None) + + +class HelpLink(Model): + """The help link which contains more information related to an alert. + + :param title: The title for the link. + :type title: str + :param url: The url for the help document. + :type url: str + """ + + _attribute_map = { + 'title': {'key': 'title', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(HelpLink, self).__init__(**kwargs) + self.title = kwargs.get('title', None) + self.url = kwargs.get('url', None) + + +class Hotfix(Model): + """The details of the hotfix installed in the server. + + :param kb_name: The name of the hotfix KB. + :type kb_name: str + :param link: The link to the KB Article. + :type link: str + :param installed_date: The date and time, in UTC, when the KB was + installed in the server. + :type installed_date: datetime + """ + + _attribute_map = { + 'kb_name': {'key': 'kbName', 'type': 'str'}, + 'link': {'key': 'link', 'type': 'str'}, + 'installed_date': {'key': 'installedDate', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(Hotfix, self).__init__(**kwargs) + self.kb_name = kwargs.get('kb_name', None) + self.link = kwargs.get('link', None) + self.installed_date = kwargs.get('installed_date', None) + + +class Hotfixes(Model): + """The list of hotfixes installed in the server. + + :param value: The value returned by the operation. + :type value: list[~azure.mgmt.adhybridhealthservice.models.Hotfix] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Hotfix]'}, + } + + def __init__(self, **kwargs): + super(Hotfixes, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class ImportError(Model): + """The import error details. + + :param id: The error Id. + :type id: str + :param run_step_result_id: The run step result Id. + :type run_step_result_id: str + :param connector_id: The connector Id. + :type connector_id: str + :param type: The type of error. + :type type: str + :param time_occurred: The time when the import error occurred. + :type time_occurred: datetime + :param time_first_occurred: The time when the import error first occurred. + :type time_first_occurred: datetime + :param retry_count: The retry count. + :type retry_count: int + :param algorithm_step_type: The operation type specific to error + reporting. Possible values include: 'Undefined', 'Staging', + 'ConnectorFilter', 'Join', 'Projection', 'ImportFlow', 'Provisioning', + 'ValidateConnectorFilter', 'Deprovisioning', 'ExportFlow', 'MvDeletion', + 'Recall', 'MvObjectTypeChange' + :type algorithm_step_type: str or + ~azure.mgmt.adhybridhealthservice.models.AlgorithmStepType + :param change_not_reimported: The change details that is not re-imported. + :type change_not_reimported: + ~azure.mgmt.adhybridhealthservice.models.ChangeNotReimported + :param extension_error_info: The extension error information. + :type extension_error_info: + ~azure.mgmt.adhybridhealthservice.models.ExtensionErrorInfo + :param rule_error_info: The error details in legacy rule processing. + :type rule_error_info: + ~azure.mgmt.adhybridhealthservice.models.RuleErrorInfo + :param cs_object_id: The object Id. + :type cs_object_id: str + :param dn: The distinguished name. + :type dn: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'run_step_result_id': {'key': 'runStepResultId', 'type': 'str'}, + 'connector_id': {'key': 'connectorId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'time_occurred': {'key': 'timeOccurred', 'type': 'iso-8601'}, + 'time_first_occurred': {'key': 'timeFirstOccurred', 'type': 'iso-8601'}, + 'retry_count': {'key': 'retryCount', 'type': 'int'}, + 'algorithm_step_type': {'key': 'algorithmStepType', 'type': 'str'}, + 'change_not_reimported': {'key': 'changeNotReimported', 'type': 'ChangeNotReimported'}, + 'extension_error_info': {'key': 'extensionErrorInfo', 'type': 'ExtensionErrorInfo'}, + 'rule_error_info': {'key': 'ruleErrorInfo', 'type': 'RuleErrorInfo'}, + 'cs_object_id': {'key': 'csObjectId', 'type': 'str'}, + 'dn': {'key': 'dn', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImportError, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.run_step_result_id = kwargs.get('run_step_result_id', None) + self.connector_id = kwargs.get('connector_id', None) + self.type = kwargs.get('type', None) + self.time_occurred = kwargs.get('time_occurred', None) + self.time_first_occurred = kwargs.get('time_first_occurred', None) + self.retry_count = kwargs.get('retry_count', None) + self.algorithm_step_type = kwargs.get('algorithm_step_type', None) + self.change_not_reimported = kwargs.get('change_not_reimported', None) + self.extension_error_info = kwargs.get('extension_error_info', None) + self.rule_error_info = kwargs.get('rule_error_info', None) + self.cs_object_id = kwargs.get('cs_object_id', None) + self.dn = kwargs.get('dn', None) + + +class ImportErrors(Model): + """The list of import errors. + + :param value: The value returned by the operation. + :type value: list[~azure.mgmt.adhybridhealthservice.models.ImportError] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ImportError]'}, + } + + def __init__(self, **kwargs): + super(ImportErrors, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class InboundReplicationNeighbor(Model): + """The replication summary for the domain controller inbound neighbor. + + :param source_domain_controller: The name of the source domain controller. + :type source_domain_controller: str + :param consecutive_failure_count: The number of consecutive failure + counts. + :type consecutive_failure_count: int + :param naming_context: The naming context. + :type naming_context: str + :param status: The health status for the domain controller + :type status: int + :param last_attempted_sync: The last time a sync was attempted on the + domain controller. + :type last_attempted_sync: datetime + :param last_successful_sync: The last time when a successful sync + happened. + :type last_successful_sync: datetime + :param last_error_code: The last error code. + :type last_error_code: int + :param last_error_message: The error message of the last error. + :type last_error_message: str + :param error_title: The error title. + :type error_title: str + :param error_description: The error description. + :type error_description: str + :param fix_link: The link for the fix of the error. + :type fix_link: str + :param fix_details: The details of the fix. + :type fix_details: str + :param additional_info: The additional details. + :type additional_info: str + """ + + _attribute_map = { + 'source_domain_controller': {'key': 'sourceDomainController', 'type': 'str'}, + 'consecutive_failure_count': {'key': 'consecutiveFailureCount', 'type': 'int'}, + 'naming_context': {'key': 'namingContext', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'int'}, + 'last_attempted_sync': {'key': 'lastAttemptedSync', 'type': 'iso-8601'}, + 'last_successful_sync': {'key': 'lastSuccessfulSync', 'type': 'iso-8601'}, + 'last_error_code': {'key': 'lastErrorCode', 'type': 'int'}, + 'last_error_message': {'key': 'lastErrorMessage', 'type': 'str'}, + 'error_title': {'key': 'errorTitle', 'type': 'str'}, + 'error_description': {'key': 'errorDescription', 'type': 'str'}, + 'fix_link': {'key': 'fixLink', 'type': 'str'}, + 'fix_details': {'key': 'fixDetails', 'type': 'str'}, + 'additional_info': {'key': 'additionalInfo', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(InboundReplicationNeighbor, self).__init__(**kwargs) + self.source_domain_controller = kwargs.get('source_domain_controller', None) + self.consecutive_failure_count = kwargs.get('consecutive_failure_count', None) + self.naming_context = kwargs.get('naming_context', None) + self.status = kwargs.get('status', None) + self.last_attempted_sync = kwargs.get('last_attempted_sync', None) + self.last_successful_sync = kwargs.get('last_successful_sync', None) + self.last_error_code = kwargs.get('last_error_code', None) + self.last_error_message = kwargs.get('last_error_message', None) + self.error_title = kwargs.get('error_title', None) + self.error_description = kwargs.get('error_description', None) + self.fix_link = kwargs.get('fix_link', None) + self.fix_details = kwargs.get('fix_details', None) + self.additional_info = kwargs.get('additional_info', None) + + +class InboundReplicationNeighbors(Model): + """The list of replication summary for the domain controller inbound neighbor. + + :param value: The details of inbound replication neighbors. + :type value: + list[~azure.mgmt.adhybridhealthservice.models.InboundReplicationNeighbor] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[InboundReplicationNeighbor]'}, + } + + def __init__(self, **kwargs): + super(InboundReplicationNeighbors, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class IPAddressAggregate(Model): + """The key value pair for properties. + + :param id: Unique ID for the entree + :type id: str + :param tenant_id: The tenant ID + :type tenant_id: str + :param service_id: The service ID + :type service_id: str + :param ip_address: The IP address from where the attempted login + originated from. + :type ip_address: str + :param timestamp: When the event occurred + :type timestamp: str + :param first_audit_timestamp: The first audit timestamp + :type first_audit_timestamp: str + :param last_audit_timestamp: The last audit timestamp + :type last_audit_timestamp: str + :param extranet_lockout_error_count: The extranet lockout error count + :type extranet_lockout_error_count: int + :param bad_password_error_count: The bad password error count + :type bad_password_error_count: int + :param unique_usernames_attempted_count: The unique usernames attempted + :type unique_usernames_attempted_count: int + :param attempt_count_threshold_is_exceeded: A value indicating whether the + attempt count threshold been exceeded + :type attempt_count_threshold_is_exceeded: bool + :param time_span: The duration of the event + :type time_span: str + :param is_whitelisted_ip_address: A value indicating whether the IP + address has been whitelisted. + :type is_whitelisted_ip_address: bool + :param network_location: The network location + :type network_location: str + :param attempt_count_threshold_on_trigger: The attempted count threshold + on trigger. + :type attempt_count_threshold_on_trigger: int + :param attempt_threshold_type_on_trigger: The attempted threshold type on + trigger. + :type attempt_threshold_type_on_trigger: str + :param geographic_location: The geographic location. + :type geographic_location: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'service_id': {'key': 'serviceId', 'type': 'str'}, + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'str'}, + 'first_audit_timestamp': {'key': 'firstAuditTimestamp', 'type': 'str'}, + 'last_audit_timestamp': {'key': 'lastAuditTimestamp', 'type': 'str'}, + 'extranet_lockout_error_count': {'key': 'extranetLockoutErrorCount', 'type': 'int'}, + 'bad_password_error_count': {'key': 'badPasswordErrorCount', 'type': 'int'}, + 'unique_usernames_attempted_count': {'key': 'uniqueUsernamesAttemptedCount', 'type': 'int'}, + 'attempt_count_threshold_is_exceeded': {'key': 'attemptCountThresholdIsExceeded', 'type': 'bool'}, + 'time_span': {'key': 'timeSpan', 'type': 'str'}, + 'is_whitelisted_ip_address': {'key': 'isWhitelistedIpAddress', 'type': 'bool'}, + 'network_location': {'key': 'networkLocation', 'type': 'str'}, + 'attempt_count_threshold_on_trigger': {'key': 'attemptCountThresholdOnTrigger', 'type': 'int'}, + 'attempt_threshold_type_on_trigger': {'key': 'attemptThresholdTypeOnTrigger', 'type': 'str'}, + 'geographic_location': {'key': 'geographicLocation', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IPAddressAggregate, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.tenant_id = kwargs.get('tenant_id', None) + self.service_id = kwargs.get('service_id', None) + self.ip_address = kwargs.get('ip_address', None) + self.timestamp = kwargs.get('timestamp', None) + self.first_audit_timestamp = kwargs.get('first_audit_timestamp', None) + self.last_audit_timestamp = kwargs.get('last_audit_timestamp', None) + self.extranet_lockout_error_count = kwargs.get('extranet_lockout_error_count', None) + self.bad_password_error_count = kwargs.get('bad_password_error_count', None) + self.unique_usernames_attempted_count = kwargs.get('unique_usernames_attempted_count', None) + self.attempt_count_threshold_is_exceeded = kwargs.get('attempt_count_threshold_is_exceeded', None) + self.time_span = kwargs.get('time_span', None) + self.is_whitelisted_ip_address = kwargs.get('is_whitelisted_ip_address', None) + self.network_location = kwargs.get('network_location', None) + self.attempt_count_threshold_on_trigger = kwargs.get('attempt_count_threshold_on_trigger', None) + self.attempt_threshold_type_on_trigger = kwargs.get('attempt_threshold_type_on_trigger', None) + self.geographic_location = kwargs.get('geographic_location', None) + + +class IPAddressAggregateSetting(Model): + """The key value pair for IP aggregate thresholds. + + :param id: Unique ID for the entree + :type id: str + :param bad_password_and_extranet_lockout_combined_daily_threshold: This + threshold setting defines the per day trigger for a new event to be + generated in the report. + :type bad_password_and_extranet_lockout_combined_daily_threshold: int + :param bad_password_and_extranet_lockout_combined_hourly_threshold: This + threshold setting defines the per hour trigger for a new event to be + generated in the report. + :type bad_password_and_extranet_lockout_combined_hourly_threshold: int + :param extranet_lockout_daily_threshold: This threshold setting defines + the per hour trigger for a new event to be generated in the report. + :type extranet_lockout_daily_threshold: int + :param extranet_lockout_hourly_threshold: This threshold setting defines + the per hour trigger for a new event to be generated in the report. + :type extranet_lockout_hourly_threshold: int + :param email_notification_enabled: A value indicating whether email + notification has been enabled. + :type email_notification_enabled: bool + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'bad_password_and_extranet_lockout_combined_daily_threshold': {'key': 'badPasswordAndExtranetLockoutCombinedDailyThreshold', 'type': 'int'}, + 'bad_password_and_extranet_lockout_combined_hourly_threshold': {'key': 'badPasswordAndExtranetLockoutCombinedHourlyThreshold', 'type': 'int'}, + 'extranet_lockout_daily_threshold': {'key': 'extranetLockoutDailyThreshold', 'type': 'int'}, + 'extranet_lockout_hourly_threshold': {'key': 'extranetLockoutHourlyThreshold', 'type': 'int'}, + 'email_notification_enabled': {'key': 'emailNotificationEnabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(IPAddressAggregateSetting, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.bad_password_and_extranet_lockout_combined_daily_threshold = kwargs.get('bad_password_and_extranet_lockout_combined_daily_threshold', None) + self.bad_password_and_extranet_lockout_combined_hourly_threshold = kwargs.get('bad_password_and_extranet_lockout_combined_hourly_threshold', None) + self.extranet_lockout_daily_threshold = kwargs.get('extranet_lockout_daily_threshold', None) + self.extranet_lockout_hourly_threshold = kwargs.get('extranet_lockout_hourly_threshold', None) + self.email_notification_enabled = kwargs.get('email_notification_enabled', None) + + +class Item(Model): + """The key value pair for properties. + + :param key: The key for the property. + :type key: str + :param value: The value for the key. + :type value: str + """ + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Item, self).__init__(**kwargs) + self.key = kwargs.get('key', None) + self.value = kwargs.get('value', None) + + +class MergedExportError(Model): + """The merged export error. + + :param id: The error Id. + :type id: str + :param incoming_object_display_name: The incoming object display name. + :type incoming_object_display_name: str + :param incoming_object_type: The incoming object type. + :type incoming_object_type: str + :param user_principal_name: The user principal name + :type user_principal_name: str + :param type: The type of the error. + :type type: str + :param attribute_name: The attribute name. + :type attribute_name: str + :param attribute_value: The attribute value. + :type attribute_value: str + :param time_occurred: The date and time when the error occurred. + :type time_occurred: datetime + :param time_first_occurred: The time when the error first occurred. + :type time_first_occurred: datetime + :param cs_object_id: the cs object Id. + :type cs_object_id: str + :param dn: the DN of the object. + :type dn: str + :param incoming_object: The incoming object details. + :type incoming_object: + ~azure.mgmt.adhybridhealthservice.models.AssociatedObject + :param existing_object: The existing object + :type existing_object: + ~azure.mgmt.adhybridhealthservice.models.AssociatedObject + :param modified_or_removed_attribute_value: The modified or removed + attribute value. + :type modified_or_removed_attribute_value: str + :param run_step_result_id: The run step result Id. + :type run_step_result_id: str + :param sam_account_name: The sam account name. + :type sam_account_name: str + :param server_error_detail: The server error details. + :type server_error_detail: str + :param service_id: The service Id. + :type service_id: str + :param service_member_id: The server Id. + :type service_member_id: str + :param merged_entity_id: The merged entity Id. + :type merged_entity_id: str + :param created_date: The date and time, in UTC, when the error was + created. + :type created_date: datetime + :param export_error_status: The export error status. + :type export_error_status: int + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'incoming_object_display_name': {'key': 'incomingObjectDisplayName', 'type': 'str'}, + 'incoming_object_type': {'key': 'incomingObjectType', 'type': 'str'}, + 'user_principal_name': {'key': 'userPrincipalName', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'attribute_name': {'key': 'attributeName', 'type': 'str'}, + 'attribute_value': {'key': 'attributeValue', 'type': 'str'}, + 'time_occurred': {'key': 'timeOccurred', 'type': 'iso-8601'}, + 'time_first_occurred': {'key': 'timeFirstOccurred', 'type': 'iso-8601'}, + 'cs_object_id': {'key': 'csObjectId', 'type': 'str'}, + 'dn': {'key': 'dn', 'type': 'str'}, + 'incoming_object': {'key': 'incomingObject', 'type': 'AssociatedObject'}, + 'existing_object': {'key': 'existingObject', 'type': 'AssociatedObject'}, + 'modified_or_removed_attribute_value': {'key': 'modifiedOrRemovedAttributeValue', 'type': 'str'}, + 'run_step_result_id': {'key': 'runStepResultId', 'type': 'str'}, + 'sam_account_name': {'key': 'samAccountName', 'type': 'str'}, + 'server_error_detail': {'key': 'serverErrorDetail', 'type': 'str'}, + 'service_id': {'key': 'serviceId', 'type': 'str'}, + 'service_member_id': {'key': 'serviceMemberId', 'type': 'str'}, + 'merged_entity_id': {'key': 'mergedEntityId', 'type': 'str'}, + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'export_error_status': {'key': 'exportErrorStatus', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(MergedExportError, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.incoming_object_display_name = kwargs.get('incoming_object_display_name', None) + self.incoming_object_type = kwargs.get('incoming_object_type', None) + self.user_principal_name = kwargs.get('user_principal_name', None) + self.type = kwargs.get('type', None) + self.attribute_name = kwargs.get('attribute_name', None) + self.attribute_value = kwargs.get('attribute_value', None) + self.time_occurred = kwargs.get('time_occurred', None) + self.time_first_occurred = kwargs.get('time_first_occurred', None) + self.cs_object_id = kwargs.get('cs_object_id', None) + self.dn = kwargs.get('dn', None) + self.incoming_object = kwargs.get('incoming_object', None) + self.existing_object = kwargs.get('existing_object', None) + self.modified_or_removed_attribute_value = kwargs.get('modified_or_removed_attribute_value', None) + self.run_step_result_id = kwargs.get('run_step_result_id', None) + self.sam_account_name = kwargs.get('sam_account_name', None) + self.server_error_detail = kwargs.get('server_error_detail', None) + self.service_id = kwargs.get('service_id', None) + self.service_member_id = kwargs.get('service_member_id', None) + self.merged_entity_id = kwargs.get('merged_entity_id', None) + self.created_date = kwargs.get('created_date', None) + self.export_error_status = kwargs.get('export_error_status', None) + + +class MetricGroup(Model): + """The metric group details. + + :param key: The key for the group. + :type key: str + :param display_name: The display name for the group. + :type display_name: str + :param invisible_for_ui: indicates if the metric group is displayed in + Azure Active Directory Connect Health UI. + :type invisible_for_ui: bool + """ + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'invisible_for_ui': {'key': 'invisibleForUi', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(MetricGroup, self).__init__(**kwargs) + self.key = kwargs.get('key', None) + self.display_name = kwargs.get('display_name', None) + self.invisible_for_ui = kwargs.get('invisible_for_ui', None) + + +class MetricMetadata(Model): + """The metric meta data. + + :param metrics_processor_class_name: The name of the class which retrieve + and process the metric. + :type metrics_processor_class_name: str + :param metric_name: The metric name + :type metric_name: str + :param groupings: The groupings for the metrics. + :type groupings: + list[~azure.mgmt.adhybridhealthservice.models.MetricGroup] + :param display_name: The display name for the metric. + :type display_name: str + :param value_kind: Indicates if the metrics is a rate,value, percent or + duration type. + :type value_kind: str + :param min_value: The minimum value. + :type min_value: int + :param max_value: The maximum value. + :type max_value: int + :param kind: Indicates whether the dashboard to represent the metric is a + line, bar,pie, area or donut chart. + :type kind: str + :param is_default: Indicates if the metric is a default metric or not. + :type is_default: bool + :param is_perf_counter: Indicates if the metric is a performance counter + metric or not. + :type is_perf_counter: bool + :param is_dev_ops: Indicates if the metric is visible to DevOps or not. + :type is_dev_ops: bool + """ + + _attribute_map = { + 'metrics_processor_class_name': {'key': 'metricsProcessorClassName', 'type': 'str'}, + 'metric_name': {'key': 'metricName', 'type': 'str'}, + 'groupings': {'key': 'groupings', 'type': '[MetricGroup]'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'value_kind': {'key': 'valueKind', 'type': 'str'}, + 'min_value': {'key': 'minValue', 'type': 'int'}, + 'max_value': {'key': 'maxValue', 'type': 'int'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'is_default': {'key': 'isDefault', 'type': 'bool'}, + 'is_perf_counter': {'key': 'isPerfCounter', 'type': 'bool'}, + 'is_dev_ops': {'key': 'isDevOps', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(MetricMetadata, self).__init__(**kwargs) + self.metrics_processor_class_name = kwargs.get('metrics_processor_class_name', None) + self.metric_name = kwargs.get('metric_name', None) + self.groupings = kwargs.get('groupings', None) + self.display_name = kwargs.get('display_name', None) + self.value_kind = kwargs.get('value_kind', None) + self.min_value = kwargs.get('min_value', None) + self.max_value = kwargs.get('max_value', None) + self.kind = kwargs.get('kind', None) + self.is_default = kwargs.get('is_default', None) + self.is_perf_counter = kwargs.get('is_perf_counter', None) + self.is_dev_ops = kwargs.get('is_dev_ops', None) + + +class MetricSet(Model): + """The set of metric values. Example of a MetricSet are Values of token + requests for a Server1 or RelyingParty1. + + :param set_name: The name of the set. + :type set_name: str + :param values: The list of the metric values. + :type values: list[int] + """ + + _attribute_map = { + 'set_name': {'key': 'setName', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[int]'}, + } + + def __init__(self, **kwargs): + super(MetricSet, self).__init__(**kwargs) + self.set_name = kwargs.get('set_name', None) + self.values = kwargs.get('values', None) + + +class MetricSets(Model): + """The metrics data represented set. + + :param sets: The list of metric set. + :type sets: list[~azure.mgmt.adhybridhealthservice.models.MetricSet] + :param time_stamps: The list of timestamps for each metric in the metric + set. + :type time_stamps: list[datetime] + """ + + _attribute_map = { + 'sets': {'key': 'sets', 'type': '[MetricSet]'}, + 'time_stamps': {'key': 'timeStamps', 'type': '[iso-8601]'}, + } + + def __init__(self, **kwargs): + super(MetricSets, self).__init__(**kwargs) + self.sets = kwargs.get('sets', None) + self.time_stamps = kwargs.get('time_stamps', None) + + +class ModuleConfiguration(Model): + """The module configuration as required by the Agent service. + + :param agent_service: The name of agent service. + :type agent_service: str + :param module_name: The name of the module for which the configuration is + applicable. + :type module_name: str + :param properties: The key value pairs of properties required for + configuration. + :type properties: dict[str, str] + """ + + _attribute_map = { + 'agent_service': {'key': 'agentService', 'type': 'str'}, + 'module_name': {'key': 'moduleName', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ModuleConfiguration, self).__init__(**kwargs) + self.agent_service = kwargs.get('agent_service', None) + self.module_name = kwargs.get('module_name', None) + self.properties = kwargs.get('properties', None) + + +class ModuleConfigurations(Model): + """The list of module configurations. + + :param value: The value returned by the operation. + :type value: + list[~azure.mgmt.adhybridhealthservice.models.ModuleConfiguration] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ModuleConfiguration]'}, + } + + def __init__(self, **kwargs): + super(ModuleConfigurations, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class ObjectWithSyncError(Model): + """The objects with sync errors. + + :param source_of_authority: The source of authority. + :type source_of_authority: str + :param display_name: The display name. + :type display_name: str + :param object_type: The object type. + :type object_type: str + :param attribute_name: The attribute name. + :type attribute_name: str + :param attribute_value: The attribute value. + :type attribute_value: str + :param modififed_value: The modified value. + :type modififed_value: str + :param user_principal_name: The user principal name. + :type user_principal_name: str + :param object_guid: The object guid. + :type object_guid: str + :param attribute_multi_values: Indicates if the attribute is multi-valued + or not. + :type attribute_multi_values: bool + :param min_limit: The minimum limit. + :type min_limit: str + :param max_limit: The maximum limit. + :type max_limit: str + :param distinguished_name: The distinguished name. + :type distinguished_name: str + :param mail: The email. + :type mail: str + :param time_occured: The date and time of occurrence. + :type time_occured: datetime + :param error_type: The error type. + :type error_type: str + :param source_anchor: The source anchor. + :type source_anchor: str + """ + + _attribute_map = { + 'source_of_authority': {'key': 'sourceOfAuthority', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'attribute_name': {'key': 'attributeName', 'type': 'str'}, + 'attribute_value': {'key': 'attributeValue', 'type': 'str'}, + 'modififed_value': {'key': 'modififedValue', 'type': 'str'}, + 'user_principal_name': {'key': 'userPrincipalName', 'type': 'str'}, + 'object_guid': {'key': 'objectGuid', 'type': 'str'}, + 'attribute_multi_values': {'key': 'attributeMultiValues', 'type': 'bool'}, + 'min_limit': {'key': 'minLimit', 'type': 'str'}, + 'max_limit': {'key': 'maxLimit', 'type': 'str'}, + 'distinguished_name': {'key': 'distinguishedName', 'type': 'str'}, + 'mail': {'key': 'mail', 'type': 'str'}, + 'time_occured': {'key': 'timeOccured', 'type': 'iso-8601'}, + 'error_type': {'key': 'errorType', 'type': 'str'}, + 'source_anchor': {'key': 'sourceAnchor', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ObjectWithSyncError, self).__init__(**kwargs) + self.source_of_authority = kwargs.get('source_of_authority', None) + self.display_name = kwargs.get('display_name', None) + self.object_type = kwargs.get('object_type', None) + self.attribute_name = kwargs.get('attribute_name', None) + self.attribute_value = kwargs.get('attribute_value', None) + self.modififed_value = kwargs.get('modififed_value', None) + self.user_principal_name = kwargs.get('user_principal_name', None) + self.object_guid = kwargs.get('object_guid', None) + self.attribute_multi_values = kwargs.get('attribute_multi_values', None) + self.min_limit = kwargs.get('min_limit', None) + self.max_limit = kwargs.get('max_limit', None) + self.distinguished_name = kwargs.get('distinguished_name', None) + self.mail = kwargs.get('mail', None) + self.time_occured = kwargs.get('time_occured', None) + self.error_type = kwargs.get('error_type', None) + self.source_anchor = kwargs.get('source_anchor', None) + + +class Operation(Model): + """The details of the operation. + + :param name: The name of the operation. + :type name: str + :param display: The display details for the operation. + :type display: object + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + + +class Partition(Model): + """Describes the partition in Synchronization service. + + :param id: The partition Id. + :type id: str + :param dn: The distinguished name for the partition. + :type dn: str + :param enabled: Indicates if the partition object is selected or not. + :type enabled: bool + :param time_created: The date and time when the partition is created. + :type time_created: datetime + :param time_last_modified: The time and date when the partition was last + modified. + :type time_last_modified: datetime + :param partition_scope: The scope of the partition. + :type partition_scope: + ~azure.mgmt.adhybridhealthservice.models.PartitionScope + :param name: The name of the partition. + :type name: str + :param is_domain: Indicates if the partition is a domain or not. + :type is_domain: bool + :param type: The partition type. + :type type: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'dn': {'key': 'dn', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'time_created': {'key': 'timeCreated', 'type': 'iso-8601'}, + 'time_last_modified': {'key': 'timeLastModified', 'type': 'iso-8601'}, + 'partition_scope': {'key': 'partitionScope', 'type': 'PartitionScope'}, + 'name': {'key': 'name', 'type': 'str'}, + 'is_domain': {'key': 'isDomain', 'type': 'bool'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Partition, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.dn = kwargs.get('dn', None) + self.enabled = kwargs.get('enabled', None) + self.time_created = kwargs.get('time_created', None) + self.time_last_modified = kwargs.get('time_last_modified', None) + self.partition_scope = kwargs.get('partition_scope', None) + self.name = kwargs.get('name', None) + self.is_domain = kwargs.get('is_domain', None) + self.type = kwargs.get('type', None) + + +class PartitionScope(Model): + """The connector partition scope. + + :param is_default: Indicates if the partition scope is default or not. + :type is_default: bool + :param object_classes: The in-scope object classes. + :type object_classes: list[str] + :param containers_included: The list of containers included. + :type containers_included: list[str] + :param containers_excluded: The list of containers excluded. + :type containers_excluded: list[str] + """ + + _attribute_map = { + 'is_default': {'key': 'isDefault', 'type': 'bool'}, + 'object_classes': {'key': 'objectClasses', 'type': '[str]'}, + 'containers_included': {'key': 'containersIncluded', 'type': '[str]'}, + 'containers_excluded': {'key': 'containersExcluded', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(PartitionScope, self).__init__(**kwargs) + self.is_default = kwargs.get('is_default', None) + self.object_classes = kwargs.get('object_classes', None) + self.containers_included = kwargs.get('containers_included', None) + self.containers_excluded = kwargs.get('containers_excluded', None) + + +class PasswordHashSyncConfiguration(Model): + """The password has synchronization configuration settings. + + :param enabled: Indicates if the password hash synchronization + configuration settings is enabled. + :type enabled: bool + :param target: The target. + :type target: str + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'target': {'key': 'target', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PasswordHashSyncConfiguration, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.target = kwargs.get('target', None) + + +class PasswordManagementSettings(Model): + """The password management settings. + + :param enabled: Indicates if the password extension is enabled. + :type enabled: bool + :param extension_file_path: The file path of the password management + extension. + :type extension_file_path: str + :param connect_to: Connection point of password management. + :type connect_to: str + :param connection_timeout: Connection timeout for password extension. + :type connection_timeout: int + :param user: User to execute password extension. + :type user: str + :param supported_password_operations: The supported password operations. + Possible values include: 'Undefined', 'Set', 'Change' + :type supported_password_operations: str or + ~azure.mgmt.adhybridhealthservice.models.PasswordOperationTypes + :param maximum_retry_count: The maximum number of retries. + :type maximum_retry_count: int + :param retry_interval_in_seconds: The time between retries. + :type retry_interval_in_seconds: int + :param requires_secure_connection: Indicates if a secure connection is + required for password management. + :type requires_secure_connection: bool + :param unlock_account: Indicates if accounts should be unlocked when + resetting password. + :type unlock_account: bool + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'extension_file_path': {'key': 'extensionFilePath', 'type': 'str'}, + 'connect_to': {'key': 'connectTo', 'type': 'str'}, + 'connection_timeout': {'key': 'connectionTimeout', 'type': 'int'}, + 'user': {'key': 'user', 'type': 'str'}, + 'supported_password_operations': {'key': 'supportedPasswordOperations', 'type': 'str'}, + 'maximum_retry_count': {'key': 'maximumRetryCount', 'type': 'int'}, + 'retry_interval_in_seconds': {'key': 'retryIntervalInSeconds', 'type': 'int'}, + 'requires_secure_connection': {'key': 'requiresSecureConnection', 'type': 'bool'}, + 'unlock_account': {'key': 'unlockAccount', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(PasswordManagementSettings, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.extension_file_path = kwargs.get('extension_file_path', None) + self.connect_to = kwargs.get('connect_to', None) + self.connection_timeout = kwargs.get('connection_timeout', None) + self.user = kwargs.get('user', None) + self.supported_password_operations = kwargs.get('supported_password_operations', None) + self.maximum_retry_count = kwargs.get('maximum_retry_count', None) + self.retry_interval_in_seconds = kwargs.get('retry_interval_in_seconds', None) + self.requires_secure_connection = kwargs.get('requires_secure_connection', None) + self.unlock_account = kwargs.get('unlock_account', None) + + +class ReplicationStatus(Model): + """Replication summary for a domain controller. + + :param forest_name: The forest name. + :type forest_name: str + :param total_dc_count: The total number of domain controllers for a given + forest. + :type total_dc_count: int + :param error_dc_count: The total number of domain controllers with error + in a given forest. + :type error_dc_count: int + """ + + _attribute_map = { + 'forest_name': {'key': 'forestName', 'type': 'str'}, + 'total_dc_count': {'key': 'totalDcCount', 'type': 'int'}, + 'error_dc_count': {'key': 'errorDcCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ReplicationStatus, self).__init__(**kwargs) + self.forest_name = kwargs.get('forest_name', None) + self.total_dc_count = kwargs.get('total_dc_count', None) + self.error_dc_count = kwargs.get('error_dc_count', None) + + +class ReplicationSummary(Model): + """The replication summary for a domain controller. + + :param target_server: The domain controller name. + :type target_server: str + :param site: The site name for a given domain controller. + :type site: str + :param domain: The domain name for a given domain controller. + :type domain: str + :param status: The health status for a domain controller. + :type status: int + :param last_attempted_sync: The last time when a sync was attempted for a + given domain controller. + :type last_attempted_sync: datetime + :param last_successful_sync: The time when the last successful sync + happened for a given domain controller. + :type last_successful_sync: datetime + :param inbound_neighbor_collection: List of individual domain controller + neighbor's inbound replication status. + :type inbound_neighbor_collection: + list[~azure.mgmt.adhybridhealthservice.models.InboundReplicationNeighbor] + """ + + _attribute_map = { + 'target_server': {'key': 'targetServer', 'type': 'str'}, + 'site': {'key': 'site', 'type': 'str'}, + 'domain': {'key': 'domain', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'int'}, + 'last_attempted_sync': {'key': 'lastAttemptedSync', 'type': 'iso-8601'}, + 'last_successful_sync': {'key': 'lastSuccessfulSync', 'type': 'iso-8601'}, + 'inbound_neighbor_collection': {'key': 'inboundNeighborCollection', 'type': '[InboundReplicationNeighbor]'}, + } + + def __init__(self, **kwargs): + super(ReplicationSummary, self).__init__(**kwargs) + self.target_server = kwargs.get('target_server', None) + self.site = kwargs.get('site', None) + self.domain = kwargs.get('domain', None) + self.status = kwargs.get('status', None) + self.last_attempted_sync = kwargs.get('last_attempted_sync', None) + self.last_successful_sync = kwargs.get('last_successful_sync', None) + self.inbound_neighbor_collection = kwargs.get('inbound_neighbor_collection', None) + + +class Result(Model): + """The result for an operation. + + :param value: The value. + :type value: bool + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(Result, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class RiskyIPBlobUri(Model): + """The blob uri pointing to Risky IP Report. + + :param tenant_id: The tenant id for whom the report belongs to. + :type tenant_id: str + :param service_id: The service id for whom the report belongs to. + :type service_id: str + :param result_sas_uri: The blob uri for the report. + :type result_sas_uri: str + :param blob_create_date_time: Time at which the new Risky IP report was + requested. + :type blob_create_date_time: datetime + :param job_completion_time: Time at which the blob creation job for the + new Risky IP report was completed. + :type job_completion_time: datetime + :param status: Status of the Risky IP report generation. + :type status: str + """ + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'service_id': {'key': 'serviceId', 'type': 'str'}, + 'result_sas_uri': {'key': 'resultSasUri', 'type': 'str'}, + 'blob_create_date_time': {'key': 'blobCreateDateTime', 'type': 'iso-8601'}, + 'job_completion_time': {'key': 'jobCompletionTime', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RiskyIPBlobUri, self).__init__(**kwargs) + self.tenant_id = kwargs.get('tenant_id', None) + self.service_id = kwargs.get('service_id', None) + self.result_sas_uri = kwargs.get('result_sas_uri', None) + self.blob_create_date_time = kwargs.get('blob_create_date_time', None) + self.job_completion_time = kwargs.get('job_completion_time', None) + self.status = kwargs.get('status', None) + + +class RuleErrorInfo(Model): + """The error details in legacy rule processing. + + :param attribute_mapping: The attribute mapping details. + :type attribute_mapping: + ~azure.mgmt.adhybridhealthservice.models.AttributeMapping + :param connector_id: The connector Id. + :type connector_id: str + :param connector_name: The connector name. + :type connector_name: str + :param cs_object_id: The object Id. + :type cs_object_id: str + :param dn: The distinguished name. + :type dn: str + """ + + _attribute_map = { + 'attribute_mapping': {'key': 'attributeMapping', 'type': 'AttributeMapping'}, + 'connector_id': {'key': 'connectorId', 'type': 'str'}, + 'connector_name': {'key': 'connectorName', 'type': 'str'}, + 'cs_object_id': {'key': 'csObjectId', 'type': 'str'}, + 'dn': {'key': 'dn', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RuleErrorInfo, self).__init__(**kwargs) + self.attribute_mapping = kwargs.get('attribute_mapping', None) + self.connector_id = kwargs.get('connector_id', None) + self.connector_name = kwargs.get('connector_name', None) + self.cs_object_id = kwargs.get('cs_object_id', None) + self.dn = kwargs.get('dn', None) + + +class RunProfile(Model): + """Describes the run profile. + + :param id: The run profile Id. + :type id: str + :param name: The run profile name + :type name: str + :param run_steps: The run steps of the run profile. + :type run_steps: list[~azure.mgmt.adhybridhealthservice.models.RunStep] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'run_steps': {'key': 'runSteps', 'type': '[RunStep]'}, + } + + def __init__(self, **kwargs): + super(RunProfile, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.run_steps = kwargs.get('run_steps', None) + + +class RunProfiles(Model): + """The list of run profiles. + + :param value: The value returned by the operation. + :type value: list[~azure.mgmt.adhybridhealthservice.models.RunProfile] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[RunProfile]'}, + } + + def __init__(self, **kwargs): + super(RunProfiles, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class RunStep(Model): + """The run step for a run profile. + + :param batch_size: The batch size used by the run step. + :type batch_size: int + :param object_process_limit: The object processing limit. + :type object_process_limit: int + :param object_delete_limit: The object deletion limit. + :type object_delete_limit: int + :param page_size: The page size of the run step. + :type page_size: int + :param partition_id: The Id of the partition that a current run step + operation is executing. + :type partition_id: str + :param operation_type: The run step operation types. + :type operation_type: int + :param timeout: The operation timeout. + :type timeout: int + """ + + _attribute_map = { + 'batch_size': {'key': 'batchSize', 'type': 'int'}, + 'object_process_limit': {'key': 'objectProcessLimit', 'type': 'int'}, + 'object_delete_limit': {'key': 'objectDeleteLimit', 'type': 'int'}, + 'page_size': {'key': 'pageSize', 'type': 'int'}, + 'partition_id': {'key': 'partitionId', 'type': 'str'}, + 'operation_type': {'key': 'operationType', 'type': 'int'}, + 'timeout': {'key': 'timeout', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(RunStep, self).__init__(**kwargs) + self.batch_size = kwargs.get('batch_size', None) + self.object_process_limit = kwargs.get('object_process_limit', None) + self.object_delete_limit = kwargs.get('object_delete_limit', None) + self.page_size = kwargs.get('page_size', None) + self.partition_id = kwargs.get('partition_id', None) + self.operation_type = kwargs.get('operation_type', None) + self.timeout = kwargs.get('timeout', None) + + +class ServiceConfiguration(Model): + """The service configuration. + + :param version: The version of the sync service. + :type version: str + :param service_type: The service type of the server. + :type service_type: int + :param service_account: The service account. + :type service_account: str + :param sql_server: The SQL server information. + :type sql_server: str + :param sql_version: The SQL version. + :type sql_version: str + :param sql_edition: The SQL edition + :type sql_edition: str + :param sql_instance: The SQL instance details. + :type sql_instance: str + :param sql_database_name: The SQL database. + :type sql_database_name: str + :param sql_database_size: The SQL database size. + :type sql_database_size: int + """ + + _attribute_map = { + 'version': {'key': 'version', 'type': 'str'}, + 'service_type': {'key': 'serviceType', 'type': 'int'}, + 'service_account': {'key': 'serviceAccount', 'type': 'str'}, + 'sql_server': {'key': 'sqlServer', 'type': 'str'}, + 'sql_version': {'key': 'sqlVersion', 'type': 'str'}, + 'sql_edition': {'key': 'sqlEdition', 'type': 'str'}, + 'sql_instance': {'key': 'sqlInstance', 'type': 'str'}, + 'sql_database_name': {'key': 'sqlDatabaseName', 'type': 'str'}, + 'sql_database_size': {'key': 'sqlDatabaseSize', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ServiceConfiguration, self).__init__(**kwargs) + self.version = kwargs.get('version', None) + self.service_type = kwargs.get('service_type', None) + self.service_account = kwargs.get('service_account', None) + self.sql_server = kwargs.get('sql_server', None) + self.sql_version = kwargs.get('sql_version', None) + self.sql_edition = kwargs.get('sql_edition', None) + self.sql_instance = kwargs.get('sql_instance', None) + self.sql_database_name = kwargs.get('sql_database_name', None) + self.sql_database_size = kwargs.get('sql_database_size', None) + + +class ServiceMember(Model): + """The server properties for a given service. + + :param service_member_id: The id of the server. + :type service_member_id: str + :param service_id: The service id to whom this server belongs. + :type service_id: str + :param tenant_id: The tenant id to whom this server belongs. + :type tenant_id: str + :param active_alerts: The total number of alerts that are currently active + for the server. + :type active_alerts: int + :param additional_information: The additional information, if any, for the + server. + :type additional_information: str + :param created_date: The date time , in UTC, when the server was onboarded + to Azure Active Directory Connect Health. + :type created_date: datetime + :param dimensions: The server specific configuration related dimensions. + :type dimensions: object + :param disabled: Indicates if the server is disabled or not. + :type disabled: bool + :param disabled_reason: The reason for disabling the server. + :type disabled_reason: int + :param installed_qfes: The list of installed QFEs for the server. + :type installed_qfes: object + :param last_disabled: The date and time , in UTC, when the server was last + disabled. + :type last_disabled: datetime + :param last_reboot: The date and time, in UTC, when the server was last + rebooted. + :type last_reboot: datetime + :param last_server_reported_monitoring_level_change: The date and time, in + UTC, when the server's data monitoring configuration was last changed. + :type last_server_reported_monitoring_level_change: datetime + :param last_updated: The date and time, in UTC, when the server properties + were last updated. + :type last_updated: datetime + :param machine_id: The id of the machine. + :type machine_id: str + :param machine_name: The name of the server. + :type machine_name: str + :param monitoring_configurations_computed: The monitoring configuration of + the server which determines what activities are monitored by Azure Active + Directory Connect Health. + :type monitoring_configurations_computed: object + :param monitoring_configurations_customized: The customized monitoring + configuration of the server which determines what activities are monitored + by Azure Active Directory Connect Health. + :type monitoring_configurations_customized: object + :param os_name: The name of the operating system installed in the machine. + :type os_name: str + :param os_version: The version of the operating system installed in the + machine. + :type os_version: str + :param properties: Server specific properties. + :type properties: object + :param recommended_qfes: The list of recommended hotfixes for the server. + :type recommended_qfes: object + :param resolved_alerts: The total count of alerts that are resolved for + this server. + :type resolved_alerts: int + :param role: The service role that is being monitored in the server. + :type role: str + :param server_reported_monitoring_level: The monitoring level reported by + the server. Possible values include: 'Partial', 'Full', 'Off' + :type server_reported_monitoring_level: str or + ~azure.mgmt.adhybridhealthservice.models.MonitoringLevel + :param status: The health status of the server. + :type status: str + """ + + _attribute_map = { + 'service_member_id': {'key': 'serviceMemberId', 'type': 'str'}, + 'service_id': {'key': 'serviceId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'active_alerts': {'key': 'activeAlerts', 'type': 'int'}, + 'additional_information': {'key': 'additionalInformation', 'type': 'str'}, + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'dimensions': {'key': 'dimensions', 'type': 'object'}, + 'disabled': {'key': 'disabled', 'type': 'bool'}, + 'disabled_reason': {'key': 'disabledReason', 'type': 'int'}, + 'installed_qfes': {'key': 'installedQfes', 'type': 'object'}, + 'last_disabled': {'key': 'lastDisabled', 'type': 'iso-8601'}, + 'last_reboot': {'key': 'lastReboot', 'type': 'iso-8601'}, + 'last_server_reported_monitoring_level_change': {'key': 'lastServerReportedMonitoringLevelChange', 'type': 'iso-8601'}, + 'last_updated': {'key': 'lastUpdated', 'type': 'iso-8601'}, + 'machine_id': {'key': 'machineId', 'type': 'str'}, + 'machine_name': {'key': 'machineName', 'type': 'str'}, + 'monitoring_configurations_computed': {'key': 'monitoringConfigurationsComputed', 'type': 'object'}, + 'monitoring_configurations_customized': {'key': 'monitoringConfigurationsCustomized', 'type': 'object'}, + 'os_name': {'key': 'osName', 'type': 'str'}, + 'os_version': {'key': 'osVersion', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'recommended_qfes': {'key': 'recommendedQfes', 'type': 'object'}, + 'resolved_alerts': {'key': 'resolvedAlerts', 'type': 'int'}, + 'role': {'key': 'role', 'type': 'str'}, + 'server_reported_monitoring_level': {'key': 'serverReportedMonitoringLevel', 'type': 'MonitoringLevel'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceMember, self).__init__(**kwargs) + self.service_member_id = kwargs.get('service_member_id', None) + self.service_id = kwargs.get('service_id', None) + self.tenant_id = kwargs.get('tenant_id', None) + self.active_alerts = kwargs.get('active_alerts', None) + self.additional_information = kwargs.get('additional_information', None) + self.created_date = kwargs.get('created_date', None) + self.dimensions = kwargs.get('dimensions', None) + self.disabled = kwargs.get('disabled', None) + self.disabled_reason = kwargs.get('disabled_reason', None) + self.installed_qfes = kwargs.get('installed_qfes', None) + self.last_disabled = kwargs.get('last_disabled', None) + self.last_reboot = kwargs.get('last_reboot', None) + self.last_server_reported_monitoring_level_change = kwargs.get('last_server_reported_monitoring_level_change', None) + self.last_updated = kwargs.get('last_updated', None) + self.machine_id = kwargs.get('machine_id', None) + self.machine_name = kwargs.get('machine_name', None) + self.monitoring_configurations_computed = kwargs.get('monitoring_configurations_computed', None) + self.monitoring_configurations_customized = kwargs.get('monitoring_configurations_customized', None) + self.os_name = kwargs.get('os_name', None) + self.os_version = kwargs.get('os_version', None) + self.properties = kwargs.get('properties', None) + self.recommended_qfes = kwargs.get('recommended_qfes', None) + self.resolved_alerts = kwargs.get('resolved_alerts', None) + self.role = kwargs.get('role', None) + self.server_reported_monitoring_level = kwargs.get('server_reported_monitoring_level', None) + self.status = kwargs.get('status', None) + + +class ServiceProperties(Model): + """The service properties for a given service. + + :param id: The id of the service. + :type id: str + :param active_alerts: The count of alerts that are currently active for + the service. + :type active_alerts: int + :param additional_information: The additional information related to the + service. + :type additional_information: str + :param created_date: The date and time, in UTC, when the service was + onboarded to Azure Active Directory Connect Health. + :type created_date: datetime + :param custom_notification_emails: The list of additional emails that are + configured to receive notifications about the service. + :type custom_notification_emails: list[str] + :param disabled: Indicates if the service is disabled or not. + :type disabled: bool + :param display_name: The display name of the service. + :type display_name: str + :param health: The health of the service. + :type health: str + :param last_disabled: The date and time, in UTC, when the service was last + disabled. + :type last_disabled: datetime + :param last_updated: The date or time , in UTC, when the service + properties were last updated. + :type last_updated: datetime + :param monitoring_configurations_computed: The monitoring configuration of + the service which determines what activities are monitored by Azure Active + Directory Connect Health. + :type monitoring_configurations_computed: object + :param monitoring_configurations_customized: The customized monitoring + configuration of the service which determines what activities are + monitored by Azure Active Directory Connect Health. + :type monitoring_configurations_customized: object + :param notification_email_enabled: Indicates if email notification is + enabled or not. + :type notification_email_enabled: bool + :param notification_email_enabled_for_global_admins: Indicates if email + notification is enabled for global administrators of the tenant. + :type notification_email_enabled_for_global_admins: bool + :param notification_emails_enabled_for_global_admins: Indicates if email + notification is enabled for global administrators of the tenant. + :type notification_emails_enabled_for_global_admins: bool + :param notification_emails: The list of emails to whom service + notifications will be sent. + :type notification_emails: list[str] + :param original_disabled_state: Gets the original disable state. + :type original_disabled_state: bool + :param resolved_alerts: The total count of alerts that has been resolved + for the service. + :type resolved_alerts: int + :param service_id: The id of the service. + :type service_id: str + :param service_name: The name of the service. + :type service_name: str + :param signature: The signature of the service. + :type signature: str + :param simple_properties: List of service specific configuration + properties. + :type simple_properties: object + :param tenant_id: The id of the tenant to which the service is registered + to. + :type tenant_id: str + :param type: The service type for the services onboarded to Azure Active + Directory Connect Health. Depending on whether the service is monitoring, + ADFS, Sync or ADDS roles, the service type can either be + AdFederationService or AadSyncService or AdDomainService. + :type type: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'active_alerts': {'key': 'activeAlerts', 'type': 'int'}, + 'additional_information': {'key': 'additionalInformation', 'type': 'str'}, + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'custom_notification_emails': {'key': 'customNotificationEmails', 'type': '[str]'}, + 'disabled': {'key': 'disabled', 'type': 'bool'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'health': {'key': 'health', 'type': 'str'}, + 'last_disabled': {'key': 'lastDisabled', 'type': 'iso-8601'}, + 'last_updated': {'key': 'lastUpdated', 'type': 'iso-8601'}, + 'monitoring_configurations_computed': {'key': 'monitoringConfigurationsComputed', 'type': 'object'}, + 'monitoring_configurations_customized': {'key': 'monitoringConfigurationsCustomized', 'type': 'object'}, + 'notification_email_enabled': {'key': 'notificationEmailEnabled', 'type': 'bool'}, + 'notification_email_enabled_for_global_admins': {'key': 'notificationEmailEnabledForGlobalAdmins', 'type': 'bool'}, + 'notification_emails_enabled_for_global_admins': {'key': 'notificationEmailsEnabledForGlobalAdmins', 'type': 'bool'}, + 'notification_emails': {'key': 'notificationEmails', 'type': '[str]'}, + 'original_disabled_state': {'key': 'originalDisabledState', 'type': 'bool'}, + 'resolved_alerts': {'key': 'resolvedAlerts', 'type': 'int'}, + 'service_id': {'key': 'serviceId', 'type': 'str'}, + 'service_name': {'key': 'serviceName', 'type': 'str'}, + 'signature': {'key': 'signature', 'type': 'str'}, + 'simple_properties': {'key': 'simpleProperties', 'type': 'object'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceProperties, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.active_alerts = kwargs.get('active_alerts', None) + self.additional_information = kwargs.get('additional_information', None) + self.created_date = kwargs.get('created_date', None) + self.custom_notification_emails = kwargs.get('custom_notification_emails', None) + self.disabled = kwargs.get('disabled', None) + self.display_name = kwargs.get('display_name', None) + self.health = kwargs.get('health', None) + self.last_disabled = kwargs.get('last_disabled', None) + self.last_updated = kwargs.get('last_updated', None) + self.monitoring_configurations_computed = kwargs.get('monitoring_configurations_computed', None) + self.monitoring_configurations_customized = kwargs.get('monitoring_configurations_customized', None) + self.notification_email_enabled = kwargs.get('notification_email_enabled', None) + self.notification_email_enabled_for_global_admins = kwargs.get('notification_email_enabled_for_global_admins', None) + self.notification_emails_enabled_for_global_admins = kwargs.get('notification_emails_enabled_for_global_admins', None) + self.notification_emails = kwargs.get('notification_emails', None) + self.original_disabled_state = kwargs.get('original_disabled_state', None) + self.resolved_alerts = kwargs.get('resolved_alerts', None) + self.service_id = kwargs.get('service_id', None) + self.service_name = kwargs.get('service_name', None) + self.signature = kwargs.get('signature', None) + self.simple_properties = kwargs.get('simple_properties', None) + self.tenant_id = kwargs.get('tenant_id', None) + self.type = kwargs.get('type', None) + + +class TabularExportError(Model): + """The details for export error. + + :param service_id: The service Id. + :type service_id: str + :param service_member_id: The server Id. + :type service_member_id: str + :param merged_entity_id: The merged entity Id. + :type merged_entity_id: str + :param tabular_export_error_data: The export error data. + :type tabular_export_error_data: str + """ + + _attribute_map = { + 'service_id': {'key': 'serviceId', 'type': 'str'}, + 'service_member_id': {'key': 'serviceMemberId', 'type': 'str'}, + 'merged_entity_id': {'key': 'mergedEntityId', 'type': 'str'}, + 'tabular_export_error_data': {'key': 'tabularExportErrorData', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TabularExportError, self).__init__(**kwargs) + self.service_id = kwargs.get('service_id', None) + self.service_member_id = kwargs.get('service_member_id', None) + self.merged_entity_id = kwargs.get('merged_entity_id', None) + self.tabular_export_error_data = kwargs.get('tabular_export_error_data', None) + + +class Tenant(Model): + """The details of the onboarded tenant. + + :param tenant_id: The Id of the tenant. + :type tenant_id: str + :param aad_license: The Azure Active Directory license of the tenant. + :type aad_license: str + :param aad_premium: Indicate if the tenant has Azure Active Directory + Premium license or not. + :type aad_premium: bool + :param agent_auto_update: Indicates if the tenant is configured to + automatically receive updates for Azure Active Directory Connect Health + client side features. + :type agent_auto_update: bool + :param alert_suppression_time_in_mins: The time in minutes after which an + alert will be auto-suppressed. + :type alert_suppression_time_in_mins: int + :param consented_to_microsoft_dev_ops: Indicates if the tenant data can be + seen by Microsoft through Azure portal. + :type consented_to_microsoft_dev_ops: bool + :param country_letter_code: The country letter code of the tenant. + :type country_letter_code: str + :param created_date: The date, in UTC, when the tenant was onboarded to + Azure Active Directory Connect Health. + :type created_date: datetime + :param dev_ops_ttl: The date and time, in UTC, till when the tenant data + can be seen by Microsoft through Azure portal. + :type dev_ops_ttl: datetime + :param disabled: Indicates if the tenant is disabled in Azure Active + Directory Connect Health. + :type disabled: bool + :param disabled_reason: The reason due to which the tenant was disabled in + Azure Active Directory Connect Health. + :type disabled_reason: int + :param global_admins_email: The list of global administrators for the + tenant. + :type global_admins_email: list[str] + :param initial_domain: The initial domain of the tenant. + :type initial_domain: str + :param last_disabled: The date and time, in UTC, when the tenant was last + disabled in Azure Active Directory Connect Health. + :type last_disabled: datetime + :param last_verified: The date and time, in UTC, when the tenant + onboarding status in Azure Active Directory Connect Health was last + verified. + :type last_verified: datetime + :param onboarding_allowed: Indicates if the tenant is allowed to onboard + to Azure Active Directory Connect Health. + :type onboarding_allowed: bool + :param onboarded: Indicates if the tenant is already onboarded to Azure + Active Directory Connect Health. + :type onboarded: bool + :param pks_certificate: The certificate associated with the tenant to + onboard data to Azure Active Directory Connect Health. + :type pks_certificate: object + :param private_preview_tenant: Indicates if the tenant has signed up for + private preview of Azure Active Directory Connect Health features. + :type private_preview_tenant: bool + :param tenant_in_quarantine: Indicates if data collection for this tenant + is disabled or not. + :type tenant_in_quarantine: bool + :param tenant_name: The name of the tenant. + :type tenant_name: str + """ + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'aad_license': {'key': 'aadLicense', 'type': 'str'}, + 'aad_premium': {'key': 'aadPremium', 'type': 'bool'}, + 'agent_auto_update': {'key': 'agentAutoUpdate', 'type': 'bool'}, + 'alert_suppression_time_in_mins': {'key': 'alertSuppressionTimeInMins', 'type': 'int'}, + 'consented_to_microsoft_dev_ops': {'key': 'consentedToMicrosoftDevOps', 'type': 'bool'}, + 'country_letter_code': {'key': 'countryLetterCode', 'type': 'str'}, + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'dev_ops_ttl': {'key': 'devOpsTtl', 'type': 'iso-8601'}, + 'disabled': {'key': 'disabled', 'type': 'bool'}, + 'disabled_reason': {'key': 'disabledReason', 'type': 'int'}, + 'global_admins_email': {'key': 'globalAdminsEmail', 'type': '[str]'}, + 'initial_domain': {'key': 'initialDomain', 'type': 'str'}, + 'last_disabled': {'key': 'lastDisabled', 'type': 'iso-8601'}, + 'last_verified': {'key': 'lastVerified', 'type': 'iso-8601'}, + 'onboarding_allowed': {'key': 'onboardingAllowed', 'type': 'bool'}, + 'onboarded': {'key': 'onboarded', 'type': 'bool'}, + 'pks_certificate': {'key': 'pksCertificate', 'type': 'object'}, + 'private_preview_tenant': {'key': 'privatePreviewTenant', 'type': 'bool'}, + 'tenant_in_quarantine': {'key': 'tenantInQuarantine', 'type': 'bool'}, + 'tenant_name': {'key': 'tenantName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Tenant, self).__init__(**kwargs) + self.tenant_id = kwargs.get('tenant_id', None) + self.aad_license = kwargs.get('aad_license', None) + self.aad_premium = kwargs.get('aad_premium', None) + self.agent_auto_update = kwargs.get('agent_auto_update', None) + self.alert_suppression_time_in_mins = kwargs.get('alert_suppression_time_in_mins', None) + self.consented_to_microsoft_dev_ops = kwargs.get('consented_to_microsoft_dev_ops', None) + self.country_letter_code = kwargs.get('country_letter_code', None) + self.created_date = kwargs.get('created_date', None) + self.dev_ops_ttl = kwargs.get('dev_ops_ttl', None) + self.disabled = kwargs.get('disabled', None) + self.disabled_reason = kwargs.get('disabled_reason', None) + self.global_admins_email = kwargs.get('global_admins_email', None) + self.initial_domain = kwargs.get('initial_domain', None) + self.last_disabled = kwargs.get('last_disabled', None) + self.last_verified = kwargs.get('last_verified', None) + self.onboarding_allowed = kwargs.get('onboarding_allowed', None) + self.onboarded = kwargs.get('onboarded', None) + self.pks_certificate = kwargs.get('pks_certificate', None) + self.private_preview_tenant = kwargs.get('private_preview_tenant', None) + self.tenant_in_quarantine = kwargs.get('tenant_in_quarantine', None) + self.tenant_name = kwargs.get('tenant_name', None) + + +class TenantOnboardingDetails(Model): + """The tenant onboarding details. + + :param tenant_onboarded: Indicates if the tenant is onboarded to Azure + Active Directory Connect Health or not. + :type tenant_onboarded: bool + :param onboarding_display_url: The display url, to help tenant navigate or + onboard to Azure Active Directory Connect Health blade, based on tenant + onboarding status. + :type onboarding_display_url: str + """ + + _attribute_map = { + 'tenant_onboarded': {'key': 'tenantOnboarded', 'type': 'bool'}, + 'onboarding_display_url': {'key': 'onboardingDisplayUrl', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TenantOnboardingDetails, self).__init__(**kwargs) + self.tenant_onboarded = kwargs.get('tenant_onboarded', None) + self.onboarding_display_url = kwargs.get('onboarding_display_url', None) + + +class UserPreference(Model): + """The user preference for a given feature. + + :param metric_names: The name of the metric. + :type metric_names: list[str] + """ + + _attribute_map = { + 'metric_names': {'key': 'metricNames', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(UserPreference, self).__init__(**kwargs) + self.metric_names = kwargs.get('metric_names', None) + + +class ValueDelta(Model): + """The value of the delta. + + :param operation_type: The operation type. Possible values include: + 'Undefined', 'Add', 'Update', 'Delete' + :type operation_type: str or + ~azure.mgmt.adhybridhealthservice.models.ValueDeltaOperationType + :param value: The value of the delta. + :type value: str + """ + + _attribute_map = { + 'operation_type': {'key': 'operationType', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ValueDelta, self).__init__(**kwargs) + self.operation_type = kwargs.get('operation_type', None) + self.value = kwargs.get('value', None) diff --git a/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/models/_models_py3.py b/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/models/_models_py3.py new file mode 100644 index 000000000000..9d22887dd7c4 --- /dev/null +++ b/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/models/_models_py3.py @@ -0,0 +1,3088 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AdditionalInformation(Model): + """The additional information for a property. + + :param title_name: The title name for the property. + :type title_name: str + :param title_value: The title value for the property. + :type title_value: str + :param properties: The list of properties which are included in the + additional information. + :type properties: object + :param has_properties: Indicates if properties are present or not. + :type has_properties: bool + """ + + _attribute_map = { + 'title_name': {'key': 'titleName', 'type': 'str'}, + 'title_value': {'key': 'titleValue', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'has_properties': {'key': 'hasProperties', 'type': 'bool'}, + } + + def __init__(self, *, title_name: str=None, title_value: str=None, properties=None, has_properties: bool=None, **kwargs) -> None: + super(AdditionalInformation, self).__init__(**kwargs) + self.title_name = title_name + self.title_value = title_value + self.properties = properties + self.has_properties = has_properties + + +class AddsServiceMember(Model): + """The server details for ADDS service. + + :param domain_name: The domain name. + :type domain_name: str + :param site_name: The site name. + :type site_name: str + :param adds_roles: The list of ADDS roles. + :type adds_roles: list[str] + :param gc_reachable: Indicates if the global catalog for this domain is + reachable or not. + :type gc_reachable: bool + :param is_advertising: Indicates if the Dc is advertising or not. + :type is_advertising: bool + :param pdc_reachable: Indicates if the primary domain controller is + reachable or not. + :type pdc_reachable: bool + :param sysvol_state: Indicates if the SYSVOL state is healthy or not. + :type sysvol_state: bool + :param dc_types: The list of domain controller types. + :type dc_types: list[str] + :param service_member_id: The id of the server. + :type service_member_id: str + :param service_id: The service id to whom this server belongs. + :type service_id: str + :param tenant_id: The tenant id to whom this server belongs. + :type tenant_id: str + :param active_alerts: The total number of alerts that are currently active + for the server. + :type active_alerts: int + :param additional_information: The additional information, if any, for the + server. + :type additional_information: str + :param created_date: The date time , in UTC, when the server was onboarded + to Azure Active Directory Connect Health. + :type created_date: datetime + :param dimensions: The server specific configuration related dimensions. + :type dimensions: list[~azure.mgmt.adhybridhealthservice.models.Item] + :param disabled: Indicates if the server is disabled or not. + :type disabled: bool + :param disabled_reason: The reason for disabling the server. + :type disabled_reason: int + :param installed_qfes: The list of installed QFEs for the server. + :type installed_qfes: + list[~azure.mgmt.adhybridhealthservice.models.Hotfix] + :param last_disabled: The date and time , in UTC, when the server was last + disabled. + :type last_disabled: datetime + :param last_reboot: The date and time, in UTC, when the server was last + rebooted. + :type last_reboot: datetime + :param last_server_reported_monitoring_level_change: The date and time, in + UTC, when the server's data monitoring configuration was last changed. + :type last_server_reported_monitoring_level_change: datetime + :param last_updated: The date and time, in UTC, when the server properties + were last updated. + :type last_updated: datetime + :param machine_id: The id of the machine. + :type machine_id: str + :param machine_name: The name of the server. + :type machine_name: str + :param monitoring_configurations_computed: The monitoring configuration of + the server which determines what activities are monitored by Azure Active + Directory Connect Health. + :type monitoring_configurations_computed: + list[~azure.mgmt.adhybridhealthservice.models.Item] + :param monitoring_configurations_customized: The customized monitoring + configuration of the server which determines what activities are monitored + by Azure Active Directory Connect Health. + :type monitoring_configurations_customized: + list[~azure.mgmt.adhybridhealthservice.models.Item] + :param os_name: The name of the operating system installed in the machine. + :type os_name: str + :param os_version: The version of the operating system installed in the + machine. + :type os_version: str + :param properties: Server specific properties. + :type properties: list[~azure.mgmt.adhybridhealthservice.models.Item] + :param recommended_qfes: The list of recommended hotfixes for the server. + :type recommended_qfes: + list[~azure.mgmt.adhybridhealthservice.models.Hotfix] + :param resolved_alerts: The total count of alerts that are resolved for + this server. + :type resolved_alerts: int + :param role: The service role that is being monitored in the server. + :type role: str + :param server_reported_monitoring_level: The monitoring level reported by + the server. Possible values include: 'Partial', 'Full', 'Off' + :type server_reported_monitoring_level: str or + ~azure.mgmt.adhybridhealthservice.models.MonitoringLevel + :param status: The health status of the server. + :type status: str + """ + + _attribute_map = { + 'domain_name': {'key': 'domainName', 'type': 'str'}, + 'site_name': {'key': 'siteName', 'type': 'str'}, + 'adds_roles': {'key': 'addsRoles', 'type': '[str]'}, + 'gc_reachable': {'key': 'gcReachable', 'type': 'bool'}, + 'is_advertising': {'key': 'isAdvertising', 'type': 'bool'}, + 'pdc_reachable': {'key': 'pdcReachable', 'type': 'bool'}, + 'sysvol_state': {'key': 'sysvolState', 'type': 'bool'}, + 'dc_types': {'key': 'dcTypes', 'type': '[str]'}, + 'service_member_id': {'key': 'serviceMemberId', 'type': 'str'}, + 'service_id': {'key': 'serviceId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'active_alerts': {'key': 'activeAlerts', 'type': 'int'}, + 'additional_information': {'key': 'additionalInformation', 'type': 'str'}, + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'dimensions': {'key': 'dimensions', 'type': '[Item]'}, + 'disabled': {'key': 'disabled', 'type': 'bool'}, + 'disabled_reason': {'key': 'disabledReason', 'type': 'int'}, + 'installed_qfes': {'key': 'installedQfes', 'type': '[Hotfix]'}, + 'last_disabled': {'key': 'lastDisabled', 'type': 'iso-8601'}, + 'last_reboot': {'key': 'lastReboot', 'type': 'iso-8601'}, + 'last_server_reported_monitoring_level_change': {'key': 'lastServerReportedMonitoringLevelChange', 'type': 'iso-8601'}, + 'last_updated': {'key': 'lastUpdated', 'type': 'iso-8601'}, + 'machine_id': {'key': 'machineId', 'type': 'str'}, + 'machine_name': {'key': 'machineName', 'type': 'str'}, + 'monitoring_configurations_computed': {'key': 'monitoringConfigurationsComputed', 'type': '[Item]'}, + 'monitoring_configurations_customized': {'key': 'monitoringConfigurationsCustomized', 'type': '[Item]'}, + 'os_name': {'key': 'osName', 'type': 'str'}, + 'os_version': {'key': 'osVersion', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '[Item]'}, + 'recommended_qfes': {'key': 'recommendedQfes', 'type': '[Hotfix]'}, + 'resolved_alerts': {'key': 'resolvedAlerts', 'type': 'int'}, + 'role': {'key': 'role', 'type': 'str'}, + 'server_reported_monitoring_level': {'key': 'serverReportedMonitoringLevel', 'type': 'MonitoringLevel'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, *, domain_name: str=None, site_name: str=None, adds_roles=None, gc_reachable: bool=None, is_advertising: bool=None, pdc_reachable: bool=None, sysvol_state: bool=None, dc_types=None, service_member_id: str=None, service_id: str=None, tenant_id: str=None, active_alerts: int=None, additional_information: str=None, created_date=None, dimensions=None, disabled: bool=None, disabled_reason: int=None, installed_qfes=None, last_disabled=None, last_reboot=None, last_server_reported_monitoring_level_change=None, last_updated=None, machine_id: str=None, machine_name: str=None, monitoring_configurations_computed=None, monitoring_configurations_customized=None, os_name: str=None, os_version: str=None, properties=None, recommended_qfes=None, resolved_alerts: int=None, role: str=None, server_reported_monitoring_level=None, status: str=None, **kwargs) -> None: + super(AddsServiceMember, self).__init__(**kwargs) + self.domain_name = domain_name + self.site_name = site_name + self.adds_roles = adds_roles + self.gc_reachable = gc_reachable + self.is_advertising = is_advertising + self.pdc_reachable = pdc_reachable + self.sysvol_state = sysvol_state + self.dc_types = dc_types + self.service_member_id = service_member_id + self.service_id = service_id + self.tenant_id = tenant_id + self.active_alerts = active_alerts + self.additional_information = additional_information + self.created_date = created_date + self.dimensions = dimensions + self.disabled = disabled + self.disabled_reason = disabled_reason + self.installed_qfes = installed_qfes + self.last_disabled = last_disabled + self.last_reboot = last_reboot + self.last_server_reported_monitoring_level_change = last_server_reported_monitoring_level_change + self.last_updated = last_updated + self.machine_id = machine_id + self.machine_name = machine_name + self.monitoring_configurations_computed = monitoring_configurations_computed + self.monitoring_configurations_customized = monitoring_configurations_customized + self.os_name = os_name + self.os_version = os_version + self.properties = properties + self.recommended_qfes = recommended_qfes + self.resolved_alerts = resolved_alerts + self.role = role + self.server_reported_monitoring_level = server_reported_monitoring_level + self.status = status + + +class Agent(Model): + """The agent details. + + :param tenant_id: The tenant Id. + :type tenant_id: str + :param machine_id: The machine Id. + :type machine_id: str + :param credential: The agent credential details. + :type credential: object + :param machine_name: The machine name. + :type machine_name: str + :param agent_version: The agent version. + :type agent_version: str + :param created_date: The date and time, in UTC, when the agent was + created. + :type created_date: datetime + :param key: The connector hash key. + :type key: str + """ + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'machine_id': {'key': 'machineId', 'type': 'str'}, + 'credential': {'key': 'credential', 'type': 'object'}, + 'machine_name': {'key': 'machineName', 'type': 'str'}, + 'agent_version': {'key': 'agentVersion', 'type': 'str'}, + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'key': {'key': 'key', 'type': 'str'}, + } + + def __init__(self, *, tenant_id: str=None, machine_id: str=None, credential=None, machine_name: str=None, agent_version: str=None, created_date=None, key: str=None, **kwargs) -> None: + super(Agent, self).__init__(**kwargs) + self.tenant_id = tenant_id + self.machine_id = machine_id + self.credential = credential + self.machine_name = machine_name + self.agent_version = agent_version + self.created_date = created_date + self.key = key + + +class Alert(Model): + """The alert details indicating an issue with service or server. + + :param alert_id: The alert Id. + :type alert_id: str + :param level: The alert level which indicates the severity of the alert. + Possible values include: 'Warning', 'Error', 'PreWarning' + :type level: str or ~azure.mgmt.adhybridhealthservice.models.Level + :param state: The alert state which can be either active or resolved with + multiple resolution types. Possible values include: 'Active', + 'ResolvedByPositiveResult', 'ResolvedManually', 'ResolvedByTimer', + 'ResolvedByStateChange' + :type state: str or ~azure.mgmt.adhybridhealthservice.models.State + :param short_name: The alert short name. + :type short_name: str + :param display_name: The display name for the alert. + :type display_name: str + :param description: The alert description. + :type description: str + :param remediation: The alert remediation. + :type remediation: str + :param related_links: The help links to get more information related to + the alert. + :type related_links: + list[~azure.mgmt.adhybridhealthservice.models.HelpLink] + :param scope: The scope of the alert. Indicates if it is a service or a + server related alert. + :type scope: str + :param additional_information: Additional information related to the + alert. + :type additional_information: + list[~azure.mgmt.adhybridhealthservice.models.AdditionalInformation] + :param created_date: The date and time,in UTC,when the alert was created. + :type created_date: datetime + :param resolved_date: The date and time, in UTC, when the alert was + resolved. + :type resolved_date: datetime + :param last_updated: The date and time, in UTC, when the alert was last + updated. + :type last_updated: datetime + :param monitor_role_type: The monitoring role type for which the alert was + raised. + :type monitor_role_type: str + :param active_alert_properties: The active alert properties. + :type active_alert_properties: + list[~azure.mgmt.adhybridhealthservice.models.Item] + :param resolved_alert_properties: The resolved alert properties. + :type resolved_alert_properties: + list[~azure.mgmt.adhybridhealthservice.models.Item] + :param tenant_id: The tenant Id. + :type tenant_id: str + :param service_id: The service Id. + :type service_id: str + :param service_member_id: The server Id. + :type service_member_id: str + """ + + _attribute_map = { + 'alert_id': {'key': 'alertId', 'type': 'str'}, + 'level': {'key': 'level', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'short_name': {'key': 'shortName', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'remediation': {'key': 'remediation', 'type': 'str'}, + 'related_links': {'key': 'relatedLinks', 'type': '[HelpLink]'}, + 'scope': {'key': 'scope', 'type': 'str'}, + 'additional_information': {'key': 'additionalInformation', 'type': '[AdditionalInformation]'}, + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'resolved_date': {'key': 'resolvedDate', 'type': 'iso-8601'}, + 'last_updated': {'key': 'lastUpdated', 'type': 'iso-8601'}, + 'monitor_role_type': {'key': 'monitorRoleType', 'type': 'str'}, + 'active_alert_properties': {'key': 'activeAlertProperties', 'type': '[Item]'}, + 'resolved_alert_properties': {'key': 'resolvedAlertProperties', 'type': '[Item]'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'service_id': {'key': 'serviceId', 'type': 'str'}, + 'service_member_id': {'key': 'serviceMemberId', 'type': 'str'}, + } + + def __init__(self, *, alert_id: str=None, level=None, state=None, short_name: str=None, display_name: str=None, description: str=None, remediation: str=None, related_links=None, scope: str=None, additional_information=None, created_date=None, resolved_date=None, last_updated=None, monitor_role_type: str=None, active_alert_properties=None, resolved_alert_properties=None, tenant_id: str=None, service_id: str=None, service_member_id: str=None, **kwargs) -> None: + super(Alert, self).__init__(**kwargs) + self.alert_id = alert_id + self.level = level + self.state = state + self.short_name = short_name + self.display_name = display_name + self.description = description + self.remediation = remediation + self.related_links = related_links + self.scope = scope + self.additional_information = additional_information + self.created_date = created_date + self.resolved_date = resolved_date + self.last_updated = last_updated + self.monitor_role_type = monitor_role_type + self.active_alert_properties = active_alert_properties + self.resolved_alert_properties = resolved_alert_properties + self.tenant_id = tenant_id + self.service_id = service_id + self.service_member_id = service_member_id + + +class AlertFeedback(Model): + """The alert feedback details. + + :param level: The alert level which indicates the severity of the alert. + :type level: str + :param state: The alert state which can be either active or resolved with + multiple resolution types. + :type state: str + :param short_name: The alert short name. + :type short_name: str + :param feedback: The feedback for the alert which indicates if the + customer likes or dislikes the alert. + :type feedback: str + :param comment: Additional comments related to the alert. + :type comment: str + :param consented_to_share: Indicates if the alert feedback can be shared + from product team. + :type consented_to_share: bool + :param service_member_id: The server Id of the alert. + :type service_member_id: str + :param created_date: The date and time,in UTC,when the alert was created. + :type created_date: datetime + """ + + _attribute_map = { + 'level': {'key': 'level', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'short_name': {'key': 'shortName', 'type': 'str'}, + 'feedback': {'key': 'feedback', 'type': 'str'}, + 'comment': {'key': 'comment', 'type': 'str'}, + 'consented_to_share': {'key': 'consentedToShare', 'type': 'bool'}, + 'service_member_id': {'key': 'serviceMemberId', 'type': 'str'}, + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + } + + def __init__(self, *, level: str=None, state: str=None, short_name: str=None, feedback: str=None, comment: str=None, consented_to_share: bool=None, service_member_id: str=None, created_date=None, **kwargs) -> None: + super(AlertFeedback, self).__init__(**kwargs) + self.level = level + self.state = state + self.short_name = short_name + self.feedback = feedback + self.comment = comment + self.consented_to_share = consented_to_share + self.service_member_id = service_member_id + self.created_date = created_date + + +class AssociatedObject(Model): + """Object that hold sync object details. + + :param display_name: The display name of the object. + :type display_name: str + :param distinguished_name: The distinguished name of the object. + :type distinguished_name: str + :param last_dir_sync_time: The last dirSync time. + :type last_dir_sync_time: datetime + :param mail: The email of the object. + :type mail: str + :param object_guid: The object guid. + :type object_guid: str + :param object_type: The object type. + :type object_type: str + :param onpremises_user_principal_name: The On-premises UPN. + :type onpremises_user_principal_name: str + :param proxy_addresses: The proxy addresses. + :type proxy_addresses: str + :param source_anchor: The source anchor. + :type source_anchor: str + :param source_of_authority: The source of authority. + :type source_of_authority: str + :param time_occurred: The time of the error. + :type time_occurred: datetime + :param user_principal_name: The UPN. + :type user_principal_name: str + """ + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'distinguished_name': {'key': 'distinguishedName', 'type': 'str'}, + 'last_dir_sync_time': {'key': 'lastDirSyncTime', 'type': 'iso-8601'}, + 'mail': {'key': 'mail', 'type': 'str'}, + 'object_guid': {'key': 'objectGuid', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'onpremises_user_principal_name': {'key': 'onpremisesUserPrincipalName', 'type': 'str'}, + 'proxy_addresses': {'key': 'proxyAddresses', 'type': 'str'}, + 'source_anchor': {'key': 'sourceAnchor', 'type': 'str'}, + 'source_of_authority': {'key': 'sourceOfAuthority', 'type': 'str'}, + 'time_occurred': {'key': 'timeOccurred', 'type': 'iso-8601'}, + 'user_principal_name': {'key': 'userPrincipalName', 'type': 'str'}, + } + + def __init__(self, *, display_name: str=None, distinguished_name: str=None, last_dir_sync_time=None, mail: str=None, object_guid: str=None, object_type: str=None, onpremises_user_principal_name: str=None, proxy_addresses: str=None, source_anchor: str=None, source_of_authority: str=None, time_occurred=None, user_principal_name: str=None, **kwargs) -> None: + super(AssociatedObject, self).__init__(**kwargs) + self.display_name = display_name + self.distinguished_name = distinguished_name + self.last_dir_sync_time = last_dir_sync_time + self.mail = mail + self.object_guid = object_guid + self.object_type = object_type + self.onpremises_user_principal_name = onpremises_user_principal_name + self.proxy_addresses = proxy_addresses + self.source_anchor = source_anchor + self.source_of_authority = source_of_authority + self.time_occurred = time_occurred + self.user_principal_name = user_principal_name + + +class AttributeDelta(Model): + """The delta attributes. + + :param values: The delta values. + :type values: list[~azure.mgmt.adhybridhealthservice.models.ValueDelta] + :param name: The name of the attribute delta. + :type name: str + :param operation_type: The attribute delta operation type. Possible values + include: 'Undefined', 'Add', 'Replace', 'Update', 'Delete' + :type operation_type: str or + ~azure.mgmt.adhybridhealthservice.models.AttributeDeltaOperationType + :param value_type: The value type. Possible values include: 'Undefined', + 'Dn', 'Binary', 'String', 'Integer', 'Boolean' + :type value_type: str or + ~azure.mgmt.adhybridhealthservice.models.ValueType + :param multi_valued: Indicates if the attribute delta is multivalued or + not. + :type multi_valued: bool + """ + + _attribute_map = { + 'values': {'key': 'values', 'type': '[ValueDelta]'}, + 'name': {'key': 'name', 'type': 'str'}, + 'operation_type': {'key': 'operationType', 'type': 'str'}, + 'value_type': {'key': 'valueType', 'type': 'str'}, + 'multi_valued': {'key': 'multiValued', 'type': 'bool'}, + } + + def __init__(self, *, values=None, name: str=None, operation_type=None, value_type=None, multi_valued: bool=None, **kwargs) -> None: + super(AttributeDelta, self).__init__(**kwargs) + self.values = values + self.name = name + self.operation_type = operation_type + self.value_type = value_type + self.multi_valued = multi_valued + + +class AttributeMapping(Model): + """The attribute mapping details. + + :param mapping_source: The mapping source. + :type mapping_source: + ~azure.mgmt.adhybridhealthservice.models.AttributeMppingSource + :param type: The attribute mapping type. Possible values include: + 'Constant', 'Direct', 'DnPart', 'Script' + :type type: str or + ~azure.mgmt.adhybridhealthservice.models.AttributeMappingType + :param destination_attribute: The destination attribute. + :type destination_attribute: str + :param context_id: The context Id. + :type context_id: str + """ + + _attribute_map = { + 'mapping_source': {'key': 'mappingSource', 'type': 'AttributeMppingSource'}, + 'type': {'key': 'type', 'type': 'str'}, + 'destination_attribute': {'key': 'destinationAttribute', 'type': 'str'}, + 'context_id': {'key': 'contextId', 'type': 'str'}, + } + + def __init__(self, *, mapping_source=None, type=None, destination_attribute: str=None, context_id: str=None, **kwargs) -> None: + super(AttributeMapping, self).__init__(**kwargs) + self.mapping_source = mapping_source + self.type = type + self.destination_attribute = destination_attribute + self.context_id = context_id + + +class AttributeMppingSource(Model): + """The attribute mapping source. + + :param source_attribute: The source attribute. + :type source_attribute: list[str] + :param dn_part: The value for dn part. + :type dn_part: int + :param script_context: The script context. + :type script_context: str + :param constant_value: The constant value. + :type constant_value: str + """ + + _attribute_map = { + 'source_attribute': {'key': 'sourceAttribute', 'type': '[str]'}, + 'dn_part': {'key': 'dnPart', 'type': 'int'}, + 'script_context': {'key': 'scriptContext', 'type': 'str'}, + 'constant_value': {'key': 'constantValue', 'type': 'str'}, + } + + def __init__(self, *, source_attribute=None, dn_part: int=None, script_context: str=None, constant_value: str=None, **kwargs) -> None: + super(AttributeMppingSource, self).__init__(**kwargs) + self.source_attribute = source_attribute + self.dn_part = dn_part + self.script_context = script_context + self.constant_value = constant_value + + +class ChangeNotReimported(Model): + """The changes which are not re-imported. + + :param delta: The delta changes that is not re-imported. + :type delta: + ~azure.mgmt.adhybridhealthservice.models.ChangeNotReimportedDelta + :param entry: The object entry in a change that is not re-imported. + :type entry: + ~azure.mgmt.adhybridhealthservice.models.ChangeNotReimportedEntry + """ + + _attribute_map = { + 'delta': {'key': 'delta', 'type': 'ChangeNotReimportedDelta'}, + 'entry': {'key': 'entry', 'type': 'ChangeNotReimportedEntry'}, + } + + def __init__(self, *, delta=None, entry=None, **kwargs) -> None: + super(ChangeNotReimported, self).__init__(**kwargs) + self.delta = delta + self.entry = entry + + +class ChangeNotReimportedDelta(Model): + """The delta in a change that is not re-imported. + + :param anchor: The anchor. + :type anchor: str + :param dn_attributes: The delta attributes for distinguished names. + :type dn_attributes: + list[~azure.mgmt.adhybridhealthservice.models.AttributeDelta] + :param attributes: The attributes. + :type attributes: + list[~azure.mgmt.adhybridhealthservice.models.AttributeDelta] + :param operation_type: The operation type. Possible values include: + 'Undefined', 'None', 'Add', 'Replace', 'Update', 'Delete', 'Obsolete', + 'DeleteAdd' + :type operation_type: str or + ~azure.mgmt.adhybridhealthservice.models.DeltaOperationType + """ + + _attribute_map = { + 'anchor': {'key': 'anchor', 'type': 'str'}, + 'dn_attributes': {'key': 'dnAttributes', 'type': '[AttributeDelta]'}, + 'attributes': {'key': 'attributes', 'type': '[AttributeDelta]'}, + 'operation_type': {'key': 'operationType', 'type': 'str'}, + } + + def __init__(self, *, anchor: str=None, dn_attributes=None, attributes=None, operation_type=None, **kwargs) -> None: + super(ChangeNotReimportedDelta, self).__init__(**kwargs) + self.anchor = anchor + self.dn_attributes = dn_attributes + self.attributes = attributes + self.operation_type = operation_type + + +class ChangeNotReimportedEntry(Model): + """The object entry in a change that is not re-imported. + + :param anchor: The anchor. + :type anchor: str + :param parent_anchor: The parent anchor. + :type parent_anchor: str + :param primary_object_class: The primary object class. + :type primary_object_class: str + :param object_classes: The list of object classes. + :type object_classes: list[str] + :param dn_attributes: The delta attributes for distinguished names. + :type dn_attributes: + list[~azure.mgmt.adhybridhealthservice.models.AttributeDelta] + :param attributes: The attributes. + :type attributes: + list[~azure.mgmt.adhybridhealthservice.models.AttributeDelta] + :param dn: The distinguished name. + :type dn: str + """ + + _attribute_map = { + 'anchor': {'key': 'anchor', 'type': 'str'}, + 'parent_anchor': {'key': 'parentAnchor', 'type': 'str'}, + 'primary_object_class': {'key': 'primaryObjectClass', 'type': 'str'}, + 'object_classes': {'key': 'objectClasses', 'type': '[str]'}, + 'dn_attributes': {'key': 'dnAttributes', 'type': '[AttributeDelta]'}, + 'attributes': {'key': 'attributes', 'type': '[AttributeDelta]'}, + 'dn': {'key': 'dn', 'type': 'str'}, + } + + def __init__(self, *, anchor: str=None, parent_anchor: str=None, primary_object_class: str=None, object_classes=None, dn_attributes=None, attributes=None, dn: str=None, **kwargs) -> None: + super(ChangeNotReimportedEntry, self).__init__(**kwargs) + self.anchor = anchor + self.parent_anchor = parent_anchor + self.primary_object_class = primary_object_class + self.object_classes = object_classes + self.dn_attributes = dn_attributes + self.attributes = attributes + self.dn = dn + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class Connector(Model): + """The connect details. + + :param connector_id: The connector Id. + :type connector_id: str + :param id: The connector Id. + :type id: str + :param name: The connector name. + :type name: str + :param version: The connector version + :type version: int + :param type: The connector type. + :type type: str + :param description: The connector description. + :type description: str + :param schema_xml: The schema xml for the connector. + :type schema_xml: str + :param password_management_settings: The password management settings of + the connector. + :type password_management_settings: object + :param password_hash_sync_configuration: The password hash synchronization + configuration of the connector. + :type password_hash_sync_configuration: object + :param time_created: The date and time when this connector was created. + :type time_created: datetime + :param time_last_modified: The date and time when this connector was last + modified. + :type time_last_modified: datetime + :param partitions: The partitions of the connector. + :type partitions: list[~azure.mgmt.adhybridhealthservice.models.Partition] + :param run_profiles: The run profiles of the connector. + :type run_profiles: + list[~azure.mgmt.adhybridhealthservice.models.RunProfile] + :param classes_included: The class inclusion list of the connector. + :type classes_included: list[str] + :param attributes_included: The attribute inclusion list of the connector. + :type attributes_included: list[str] + """ + + _attribute_map = { + 'connector_id': {'key': 'connectorId', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'int'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'schema_xml': {'key': 'schemaXml', 'type': 'str'}, + 'password_management_settings': {'key': 'passwordManagementSettings', 'type': 'object'}, + 'password_hash_sync_configuration': {'key': 'passwordHashSyncConfiguration', 'type': 'object'}, + 'time_created': {'key': 'timeCreated', 'type': 'iso-8601'}, + 'time_last_modified': {'key': 'timeLastModified', 'type': 'iso-8601'}, + 'partitions': {'key': 'partitions', 'type': '[Partition]'}, + 'run_profiles': {'key': 'runProfiles', 'type': '[RunProfile]'}, + 'classes_included': {'key': 'classesIncluded', 'type': '[str]'}, + 'attributes_included': {'key': 'attributesIncluded', 'type': '[str]'}, + } + + def __init__(self, *, connector_id: str=None, id: str=None, name: str=None, version: int=None, type: str=None, description: str=None, schema_xml: str=None, password_management_settings=None, password_hash_sync_configuration=None, time_created=None, time_last_modified=None, partitions=None, run_profiles=None, classes_included=None, attributes_included=None, **kwargs) -> None: + super(Connector, self).__init__(**kwargs) + self.connector_id = connector_id + self.id = id + self.name = name + self.version = version + self.type = type + self.description = description + self.schema_xml = schema_xml + self.password_management_settings = password_management_settings + self.password_hash_sync_configuration = password_hash_sync_configuration + self.time_created = time_created + self.time_last_modified = time_last_modified + self.partitions = partitions + self.run_profiles = run_profiles + self.classes_included = classes_included + self.attributes_included = attributes_included + + +class ConnectorConnectionError(Model): + """The connector connection error. + + :param id: The error Id. + :type id: str + :param run_step_result_id: The run step result Id. + :type run_step_result_id: str + :param connector_id: The connector Id. + :type connector_id: str + :param type: The type of error. + :type type: str + :param error_code: The error code. + :type error_code: str + :param message: The message for the connection error. + :type message: str + :param time_occured: The time when the connection error occurred. + :type time_occured: datetime + :param server: The server where the connection error happened. + :type server: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'run_step_result_id': {'key': 'runStepResultId', 'type': 'str'}, + 'connector_id': {'key': 'connectorId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'error_code': {'key': 'errorCode', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'time_occured': {'key': 'timeOccured', 'type': 'iso-8601'}, + 'server': {'key': 'server', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, run_step_result_id: str=None, connector_id: str=None, type: str=None, error_code: str=None, message: str=None, time_occured=None, server: str=None, **kwargs) -> None: + super(ConnectorConnectionError, self).__init__(**kwargs) + self.id = id + self.run_step_result_id = run_step_result_id + self.connector_id = connector_id + self.type = type + self.error_code = error_code + self.message = message + self.time_occured = time_occured + self.server = server + + +class ConnectorConnectionErrors(Model): + """The list of connector connection errors. + + :param value: The value returned by the operation. + :type value: + list[~azure.mgmt.adhybridhealthservice.models.ConnectorConnectionError] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ConnectorConnectionError]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(ConnectorConnectionErrors, self).__init__(**kwargs) + self.value = value + + +class ConnectorMetadata(Model): + """Gets the list of connectors and run profile names. + + :param connectors: The list of connectors. + :type connectors: + list[~azure.mgmt.adhybridhealthservice.models.ConnectorMetadataDetails] + :param run_profile_names: The list of run profile names. + :type run_profile_names: list[str] + """ + + _attribute_map = { + 'connectors': {'key': 'connectors', 'type': '[ConnectorMetadataDetails]'}, + 'run_profile_names': {'key': 'runProfileNames', 'type': '[str]'}, + } + + def __init__(self, *, connectors=None, run_profile_names=None, **kwargs) -> None: + super(ConnectorMetadata, self).__init__(**kwargs) + self.connectors = connectors + self.run_profile_names = run_profile_names + + +class ConnectorMetadataDetails(Model): + """Details of the connector. + + :param connector_id: The Connector Id. + :type connector_id: str + :param connector_display_name: The Connector Display Name + :type connector_display_name: str + """ + + _attribute_map = { + 'connector_id': {'key': 'connectorId', 'type': 'str'}, + 'connector_display_name': {'key': 'connectorDisplayName', 'type': 'str'}, + } + + def __init__(self, *, connector_id: str=None, connector_display_name: str=None, **kwargs) -> None: + super(ConnectorMetadataDetails, self).__init__(**kwargs) + self.connector_id = connector_id + self.connector_display_name = connector_display_name + + +class ConnectorObjectError(Model): + """The connector object error. + + :param id: The error Id. + :type id: str + :param run_step_result_id: The run step result Id. + :type run_step_result_id: str + :param connector_id: The connector Id. + :type connector_id: str + :param type: The type of error. + :type type: str + :param error_code: The error code. + :type error_code: str + :param message: The message for the object error. + :type message: str + :param entry_number: The entry number for object error occurred. + :type entry_number: int + :param line_number: The line number for the object error. + :type line_number: int + :param column_number: The column number for the object error. + :type column_number: int + :param dn: The distinguished name of the object. + :type dn: str + :param anchor: The name for the anchor of the object. + :type anchor: str + :param attribute_name: The attribute name of the object. + :type attribute_name: str + :param server_error_detail: The server side error details. + :type server_error_detail: str + :param values: The value corresponding to attribute name. + :type values: list[str] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'run_step_result_id': {'key': 'runStepResultId', 'type': 'str'}, + 'connector_id': {'key': 'connectorId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'error_code': {'key': 'errorCode', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'entry_number': {'key': 'entryNumber', 'type': 'int'}, + 'line_number': {'key': 'lineNumber', 'type': 'int'}, + 'column_number': {'key': 'columnNumber', 'type': 'int'}, + 'dn': {'key': 'dn', 'type': 'str'}, + 'anchor': {'key': 'anchor', 'type': 'str'}, + 'attribute_name': {'key': 'attributeName', 'type': 'str'}, + 'server_error_detail': {'key': 'serverErrorDetail', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__(self, *, id: str=None, run_step_result_id: str=None, connector_id: str=None, type: str=None, error_code: str=None, message: str=None, entry_number: int=None, line_number: int=None, column_number: int=None, dn: str=None, anchor: str=None, attribute_name: str=None, server_error_detail: str=None, values=None, **kwargs) -> None: + super(ConnectorObjectError, self).__init__(**kwargs) + self.id = id + self.run_step_result_id = run_step_result_id + self.connector_id = connector_id + self.type = type + self.error_code = error_code + self.message = message + self.entry_number = entry_number + self.line_number = line_number + self.column_number = column_number + self.dn = dn + self.anchor = anchor + self.attribute_name = attribute_name + self.server_error_detail = server_error_detail + self.values = values + + +class ConnectorObjectErrors(Model): + """The list of connector object errors. + + :param value: The value returned by the operation. + :type value: + list[~azure.mgmt.adhybridhealthservice.models.ConnectorObjectError] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ConnectorObjectError]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(ConnectorObjectErrors, self).__init__(**kwargs) + self.value = value + + +class Credential(Model): + """The credential for a given server. + + :param identifier: The credential identifier. + :type identifier: str + :param type: The type of credential. + :type type: str + :param credential_data: The credential data. + :type credential_data: list[str] + """ + + _attribute_map = { + 'identifier': {'key': 'identifier', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'credential_data': {'key': 'credentialData', 'type': '[str]'}, + } + + def __init__(self, *, identifier: str=None, type: str=None, credential_data=None, **kwargs) -> None: + super(Credential, self).__init__(**kwargs) + self.identifier = identifier + self.type = type + self.credential_data = credential_data + + +class Dimension(Model): + """The connector object error. + + :param health: The health status for the domain controller. Possible + values include: 'Healthy', 'Warning', 'Error', 'NotMonitored', 'Missing' + :type health: str or ~azure.mgmt.adhybridhealthservice.models.HealthStatus + :param simple_properties: List of service specific configuration + properties. + :type simple_properties: object + :param active_alerts: The count of alerts that are currently active for + the service. + :type active_alerts: int + :param additional_information: The additional information related to the + service. + :type additional_information: str + :param last_updated: The date or time , in UTC, when the service + properties were last updated. + :type last_updated: datetime + :param display_name: The display name of the service. + :type display_name: str + :param resolved_alerts: The total count of alerts that has been resolved + for the service. + :type resolved_alerts: int + :param signature: The signature of the service. + :type signature: str + :param type: The service type for the services onboarded to Azure Active + Directory Connect Health. Depending on whether the service is monitoring, + ADFS, Sync or ADDS roles, the service type can either be + AdFederationService or AadSyncService or AdDomainService. + :type type: str + """ + + _attribute_map = { + 'health': {'key': 'health', 'type': 'str'}, + 'simple_properties': {'key': 'simpleProperties', 'type': 'object'}, + 'active_alerts': {'key': 'activeAlerts', 'type': 'int'}, + 'additional_information': {'key': 'additionalInformation', 'type': 'str'}, + 'last_updated': {'key': 'lastUpdated', 'type': 'iso-8601'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'resolved_alerts': {'key': 'resolvedAlerts', 'type': 'int'}, + 'signature': {'key': 'signature', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, health=None, simple_properties=None, active_alerts: int=None, additional_information: str=None, last_updated=None, display_name: str=None, resolved_alerts: int=None, signature: str=None, type: str=None, **kwargs) -> None: + super(Dimension, self).__init__(**kwargs) + self.health = health + self.simple_properties = simple_properties + self.active_alerts = active_alerts + self.additional_information = additional_information + self.last_updated = last_updated + self.display_name = display_name + self.resolved_alerts = resolved_alerts + self.signature = signature + self.type = type + + +class Display(Model): + """Displays the details related to operations supported by Azure Active + Directory Connect Health. + + :param description: The description for the operation. + :type description: str + :param operation: The details of the operation. + :type operation: str + :param provider: The provider name. + :type provider: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'provider': {'key': 'provider', 'type': 'str'}, + } + + def __init__(self, *, description: str=None, operation: str=None, provider: str=None, **kwargs) -> None: + super(Display, self).__init__(**kwargs) + self.description = description + self.operation = operation + self.provider = provider + + +class ErrorCount(Model): + """The error count details. + + :param error_bucket: The error bucket. + :type error_bucket: str + :param count: The error count. + :type count: int + :param truncated: Indicates if the error count is truncated or not. + :type truncated: bool + """ + + _attribute_map = { + 'error_bucket': {'key': 'errorBucket', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + 'truncated': {'key': 'truncated', 'type': 'bool'}, + } + + def __init__(self, *, error_bucket: str=None, count: int=None, truncated: bool=None, **kwargs) -> None: + super(ErrorCount, self).__init__(**kwargs) + self.error_bucket = error_bucket + self.count = count + self.truncated = truncated + + +class ErrorDetail(Model): + """The error details. + + :param description: The error description. + :type description: str + :param kb_url: The knowledge base article url which contains more + information about the error. + :type kb_url: str + :param detail: Additional details related to the error. + :type detail: str + :param objects_with_sync_error: The list of objects with sync errors. + :type objects_with_sync_error: + ~azure.mgmt.adhybridhealthservice.models.ObjectWithSyncError + :param object_with_sync_error: The object with sync error. + :type object_with_sync_error: + ~azure.mgmt.adhybridhealthservice.models.MergedExportError + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'kb_url': {'key': 'kbUrl', 'type': 'str'}, + 'detail': {'key': 'detail', 'type': 'str'}, + 'objects_with_sync_error': {'key': 'objectsWithSyncError', 'type': 'ObjectWithSyncError'}, + 'object_with_sync_error': {'key': 'objectWithSyncError', 'type': 'MergedExportError'}, + } + + def __init__(self, *, description: str=None, kb_url: str=None, detail: str=None, objects_with_sync_error=None, object_with_sync_error=None, **kwargs) -> None: + super(ErrorDetail, self).__init__(**kwargs) + self.description = description + self.kb_url = kb_url + self.detail = detail + self.objects_with_sync_error = objects_with_sync_error + self.object_with_sync_error = object_with_sync_error + + +class ErrorReportUsersEntry(Model): + """The bad password login attempt details. + + :param user_id: The user ID value. + :type user_id: str + :param ip_address: The IP address corresponding to the last error event. + :type ip_address: str + :param last_updated: The date and time when the last error event was + logged. + :type last_updated: datetime + :param unique_ip_addresses: The list of unique IP addresses. + :type unique_ip_addresses: str + :param total_error_attempts: The total count of specific error events. + :type total_error_attempts: int + """ + + _attribute_map = { + 'user_id': {'key': 'userId', 'type': 'str'}, + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + 'last_updated': {'key': 'lastUpdated', 'type': 'iso-8601'}, + 'unique_ip_addresses': {'key': 'uniqueIpAddresses', 'type': 'str'}, + 'total_error_attempts': {'key': 'totalErrorAttempts', 'type': 'int'}, + } + + def __init__(self, *, user_id: str=None, ip_address: str=None, last_updated=None, unique_ip_addresses: str=None, total_error_attempts: int=None, **kwargs) -> None: + super(ErrorReportUsersEntry, self).__init__(**kwargs) + self.user_id = user_id + self.ip_address = ip_address + self.last_updated = last_updated + self.unique_ip_addresses = unique_ip_addresses + self.total_error_attempts = total_error_attempts + + +class ExportError(Model): + """The export error details. + + :param id: The error Id. + :type id: str + :param run_step_result_id: The run step result Id. + :type run_step_result_id: str + :param connector_id: The connector Id. + :type connector_id: str + :param type: The type of error. + :type type: str + :param error_code: The error code. + :type error_code: str + :param message: The export error message. + :type message: str + :param server_error_detail: The server error detail. + :type server_error_detail: str + :param time_first_occured: The date and time when the export error first + occurred. + :type time_first_occured: datetime + :param retry_count: The retry count. + :type retry_count: int + :param cs_object_id: The cloud object Id. + :type cs_object_id: str + :param dn: The distinguished name. + :type dn: str + :param min_limit: The minimum limit. + :type min_limit: str + :param max_limit: The maximum limit. + :type max_limit: str + :param cloud_anchor: The name of the cloud anchor. + :type cloud_anchor: str + :param attribute_name: The attribute name. + :type attribute_name: str + :param attribute_value: The attribute value. + :type attribute_value: str + :param attribute_multi_value: Indicates if the attribute is multi valued + or not. + :type attribute_multi_value: bool + :param object_id_conflict: The object Id with which there was an attribute + conflict. + :type object_id_conflict: str + :param sam_account_name: The SAM account name. + :type sam_account_name: str + :param ad_object_type: The AD object type + :type ad_object_type: str + :param ad_object_guid: The AD object guid. + :type ad_object_guid: str + :param ad_display_name: The display name for the AD object. + :type ad_display_name: str + :param ad_source_of_authority: The source of authority for the AD object. + :type ad_source_of_authority: str + :param ad_source_anchor: The AD source anchor. + :type ad_source_anchor: str + :param ad_user_principal_name: The user principal name for the AD object. + :type ad_user_principal_name: str + :param ad_distinguished_name: The distinguished name for the AD object. + :type ad_distinguished_name: str + :param ad_mail: The email for the AD object. + :type ad_mail: str + :param time_occured: The date and time of occurrence. + :type time_occured: datetime + :param aad_object_type: The AAD side object type. + :type aad_object_type: str + :param aad_object_guid: The AAD side object guid. + :type aad_object_guid: str + :param aad_display_name: The AAD side display name + :type aad_display_name: str + :param aad_source_of_authority: The AAD side source of authority for the + object. + :type aad_source_of_authority: str + :param aad_user_principal_name: The AAD side user principal name. + :type aad_user_principal_name: str + :param aad_distinguished_name: The AAD side distinguished name for the + object. + :type aad_distinguished_name: str + :param aad_mail: The AAD side email for the object. + :type aad_mail: str + :param last_dir_sync_time: The date and time of last sync run. + :type last_dir_sync_time: datetime + :param modified_attribute_value: The modified attribute value. + :type modified_attribute_value: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'run_step_result_id': {'key': 'runStepResultId', 'type': 'str'}, + 'connector_id': {'key': 'connectorId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'error_code': {'key': 'errorCode', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'server_error_detail': {'key': 'serverErrorDetail', 'type': 'str'}, + 'time_first_occured': {'key': 'timeFirstOccured', 'type': 'iso-8601'}, + 'retry_count': {'key': 'retryCount', 'type': 'int'}, + 'cs_object_id': {'key': 'csObjectId', 'type': 'str'}, + 'dn': {'key': 'dn', 'type': 'str'}, + 'min_limit': {'key': 'minLimit', 'type': 'str'}, + 'max_limit': {'key': 'maxLimit', 'type': 'str'}, + 'cloud_anchor': {'key': 'cloudAnchor', 'type': 'str'}, + 'attribute_name': {'key': 'attributeName', 'type': 'str'}, + 'attribute_value': {'key': 'attributeValue', 'type': 'str'}, + 'attribute_multi_value': {'key': 'attributeMultiValue', 'type': 'bool'}, + 'object_id_conflict': {'key': 'objectIdConflict', 'type': 'str'}, + 'sam_account_name': {'key': 'samAccountName', 'type': 'str'}, + 'ad_object_type': {'key': 'adObjectType', 'type': 'str'}, + 'ad_object_guid': {'key': 'adObjectGuid', 'type': 'str'}, + 'ad_display_name': {'key': 'adDisplayName', 'type': 'str'}, + 'ad_source_of_authority': {'key': 'adSourceOfAuthority', 'type': 'str'}, + 'ad_source_anchor': {'key': 'adSourceAnchor', 'type': 'str'}, + 'ad_user_principal_name': {'key': 'adUserPrincipalName', 'type': 'str'}, + 'ad_distinguished_name': {'key': 'adDistinguishedName', 'type': 'str'}, + 'ad_mail': {'key': 'adMail', 'type': 'str'}, + 'time_occured': {'key': 'timeOccured', 'type': 'iso-8601'}, + 'aad_object_type': {'key': 'aadObjectType', 'type': 'str'}, + 'aad_object_guid': {'key': 'aadObjectGuid', 'type': 'str'}, + 'aad_display_name': {'key': 'aadDisplayName', 'type': 'str'}, + 'aad_source_of_authority': {'key': 'aadSourceOfAuthority', 'type': 'str'}, + 'aad_user_principal_name': {'key': 'aadUserPrincipalName', 'type': 'str'}, + 'aad_distinguished_name': {'key': 'aadDistinguishedName', 'type': 'str'}, + 'aad_mail': {'key': 'aadMail', 'type': 'str'}, + 'last_dir_sync_time': {'key': 'lastDirSyncTime', 'type': 'iso-8601'}, + 'modified_attribute_value': {'key': 'modifiedAttributeValue', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, run_step_result_id: str=None, connector_id: str=None, type: str=None, error_code: str=None, message: str=None, server_error_detail: str=None, time_first_occured=None, retry_count: int=None, cs_object_id: str=None, dn: str=None, min_limit: str=None, max_limit: str=None, cloud_anchor: str=None, attribute_name: str=None, attribute_value: str=None, attribute_multi_value: bool=None, object_id_conflict: str=None, sam_account_name: str=None, ad_object_type: str=None, ad_object_guid: str=None, ad_display_name: str=None, ad_source_of_authority: str=None, ad_source_anchor: str=None, ad_user_principal_name: str=None, ad_distinguished_name: str=None, ad_mail: str=None, time_occured=None, aad_object_type: str=None, aad_object_guid: str=None, aad_display_name: str=None, aad_source_of_authority: str=None, aad_user_principal_name: str=None, aad_distinguished_name: str=None, aad_mail: str=None, last_dir_sync_time=None, modified_attribute_value: str=None, **kwargs) -> None: + super(ExportError, self).__init__(**kwargs) + self.id = id + self.run_step_result_id = run_step_result_id + self.connector_id = connector_id + self.type = type + self.error_code = error_code + self.message = message + self.server_error_detail = server_error_detail + self.time_first_occured = time_first_occured + self.retry_count = retry_count + self.cs_object_id = cs_object_id + self.dn = dn + self.min_limit = min_limit + self.max_limit = max_limit + self.cloud_anchor = cloud_anchor + self.attribute_name = attribute_name + self.attribute_value = attribute_value + self.attribute_multi_value = attribute_multi_value + self.object_id_conflict = object_id_conflict + self.sam_account_name = sam_account_name + self.ad_object_type = ad_object_type + self.ad_object_guid = ad_object_guid + self.ad_display_name = ad_display_name + self.ad_source_of_authority = ad_source_of_authority + self.ad_source_anchor = ad_source_anchor + self.ad_user_principal_name = ad_user_principal_name + self.ad_distinguished_name = ad_distinguished_name + self.ad_mail = ad_mail + self.time_occured = time_occured + self.aad_object_type = aad_object_type + self.aad_object_guid = aad_object_guid + self.aad_display_name = aad_display_name + self.aad_source_of_authority = aad_source_of_authority + self.aad_user_principal_name = aad_user_principal_name + self.aad_distinguished_name = aad_distinguished_name + self.aad_mail = aad_mail + self.last_dir_sync_time = last_dir_sync_time + self.modified_attribute_value = modified_attribute_value + + +class ExportErrors(Model): + """The list of export errors. + + :param value: The value returned by the operation. + :type value: list[~azure.mgmt.adhybridhealthservice.models.ExportError] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExportError]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(ExportErrors, self).__init__(**kwargs) + self.value = value + + +class ExportStatus(Model): + """The details of the export status. + + :param service_id: The id of the service for whom the export status is + being reported. + :type service_id: str + :param service_member_id: The server Id for whom the export status is + being reported. + :type service_member_id: str + :param end_time: The date and time when the export ended. + :type end_time: datetime + :param run_step_result_id: The run step result Id. + :type run_step_result_id: str + """ + + _attribute_map = { + 'service_id': {'key': 'serviceId', 'type': 'str'}, + 'service_member_id': {'key': 'serviceMemberId', 'type': 'str'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'run_step_result_id': {'key': 'runStepResultId', 'type': 'str'}, + } + + def __init__(self, *, service_id: str=None, service_member_id: str=None, end_time=None, run_step_result_id: str=None, **kwargs) -> None: + super(ExportStatus, self).__init__(**kwargs) + self.service_id = service_id + self.service_member_id = service_member_id + self.end_time = end_time + self.run_step_result_id = run_step_result_id + + +class ExtensionErrorInfo(Model): + """The extension error details. + + :param extension_name: The extension name. + :type extension_name: str + :param extension_context: The extension context. + :type extension_context: str + :param call_stack: The call stack for the error. + :type call_stack: str + """ + + _attribute_map = { + 'extension_name': {'key': 'extensionName', 'type': 'str'}, + 'extension_context': {'key': 'extensionContext', 'type': 'str'}, + 'call_stack': {'key': 'callStack', 'type': 'str'}, + } + + def __init__(self, *, extension_name: str=None, extension_context: str=None, call_stack: str=None, **kwargs) -> None: + super(ExtensionErrorInfo, self).__init__(**kwargs) + self.extension_name = extension_name + self.extension_context = extension_context + self.call_stack = call_stack + + +class ForestSummary(Model): + """The forest summary for an ADDS domain. + + :param forest_name: The forest name. + :type forest_name: str + :param domain_count: The domain count. + :type domain_count: int + :param site_count: The site count. + :type site_count: int + :param monitored_dc_count: The number of domain controllers that are + monitored by Azure Active Directory Connect Health. + :type monitored_dc_count: int + :param total_dc_count: The total domain controllers. + :type total_dc_count: int + :param domains: The list of domain controller names. + :type domains: list[str] + :param sites: The list of site names. + :type sites: list[str] + """ + + _attribute_map = { + 'forest_name': {'key': 'forestName', 'type': 'str'}, + 'domain_count': {'key': 'domainCount', 'type': 'int'}, + 'site_count': {'key': 'siteCount', 'type': 'int'}, + 'monitored_dc_count': {'key': 'monitoredDcCount', 'type': 'int'}, + 'total_dc_count': {'key': 'totalDcCount', 'type': 'int'}, + 'domains': {'key': 'domains', 'type': '[str]'}, + 'sites': {'key': 'sites', 'type': '[str]'}, + } + + def __init__(self, *, forest_name: str=None, domain_count: int=None, site_count: int=None, monitored_dc_count: int=None, total_dc_count: int=None, domains=None, sites=None, **kwargs) -> None: + super(ForestSummary, self).__init__(**kwargs) + self.forest_name = forest_name + self.domain_count = domain_count + self.site_count = site_count + self.monitored_dc_count = monitored_dc_count + self.total_dc_count = total_dc_count + self.domains = domains + self.sites = sites + + +class GlobalConfiguration(Model): + """The global configuration settings. + + :param version: The version for the global configuration. + :type version: int + :param schema_xml: The schema for the configuration. + :type schema_xml: str + :param password_sync_enabled: Indicates if password sync is enabled or + not. + :type password_sync_enabled: bool + :param num_saved_pwd_event: The number of saved password events. + :type num_saved_pwd_event: int + :param feature_set: The list of additional feature sets. + :type feature_set: list[~azure.mgmt.adhybridhealthservice.models.Item] + """ + + _attribute_map = { + 'version': {'key': 'version', 'type': 'int'}, + 'schema_xml': {'key': 'schemaXml', 'type': 'str'}, + 'password_sync_enabled': {'key': 'passwordSyncEnabled', 'type': 'bool'}, + 'num_saved_pwd_event': {'key': 'numSavedPwdEvent', 'type': 'int'}, + 'feature_set': {'key': 'featureSet', 'type': '[Item]'}, + } + + def __init__(self, *, version: int=None, schema_xml: str=None, password_sync_enabled: bool=None, num_saved_pwd_event: int=None, feature_set=None, **kwargs) -> None: + super(GlobalConfiguration, self).__init__(**kwargs) + self.version = version + self.schema_xml = schema_xml + self.password_sync_enabled = password_sync_enabled + self.num_saved_pwd_event = num_saved_pwd_event + self.feature_set = feature_set + + +class HelpLink(Model): + """The help link which contains more information related to an alert. + + :param title: The title for the link. + :type title: str + :param url: The url for the help document. + :type url: str + """ + + _attribute_map = { + 'title': {'key': 'title', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + } + + def __init__(self, *, title: str=None, url: str=None, **kwargs) -> None: + super(HelpLink, self).__init__(**kwargs) + self.title = title + self.url = url + + +class Hotfix(Model): + """The details of the hotfix installed in the server. + + :param kb_name: The name of the hotfix KB. + :type kb_name: str + :param link: The link to the KB Article. + :type link: str + :param installed_date: The date and time, in UTC, when the KB was + installed in the server. + :type installed_date: datetime + """ + + _attribute_map = { + 'kb_name': {'key': 'kbName', 'type': 'str'}, + 'link': {'key': 'link', 'type': 'str'}, + 'installed_date': {'key': 'installedDate', 'type': 'iso-8601'}, + } + + def __init__(self, *, kb_name: str=None, link: str=None, installed_date=None, **kwargs) -> None: + super(Hotfix, self).__init__(**kwargs) + self.kb_name = kb_name + self.link = link + self.installed_date = installed_date + + +class Hotfixes(Model): + """The list of hotfixes installed in the server. + + :param value: The value returned by the operation. + :type value: list[~azure.mgmt.adhybridhealthservice.models.Hotfix] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Hotfix]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(Hotfixes, self).__init__(**kwargs) + self.value = value + + +class ImportError(Model): + """The import error details. + + :param id: The error Id. + :type id: str + :param run_step_result_id: The run step result Id. + :type run_step_result_id: str + :param connector_id: The connector Id. + :type connector_id: str + :param type: The type of error. + :type type: str + :param time_occurred: The time when the import error occurred. + :type time_occurred: datetime + :param time_first_occurred: The time when the import error first occurred. + :type time_first_occurred: datetime + :param retry_count: The retry count. + :type retry_count: int + :param algorithm_step_type: The operation type specific to error + reporting. Possible values include: 'Undefined', 'Staging', + 'ConnectorFilter', 'Join', 'Projection', 'ImportFlow', 'Provisioning', + 'ValidateConnectorFilter', 'Deprovisioning', 'ExportFlow', 'MvDeletion', + 'Recall', 'MvObjectTypeChange' + :type algorithm_step_type: str or + ~azure.mgmt.adhybridhealthservice.models.AlgorithmStepType + :param change_not_reimported: The change details that is not re-imported. + :type change_not_reimported: + ~azure.mgmt.adhybridhealthservice.models.ChangeNotReimported + :param extension_error_info: The extension error information. + :type extension_error_info: + ~azure.mgmt.adhybridhealthservice.models.ExtensionErrorInfo + :param rule_error_info: The error details in legacy rule processing. + :type rule_error_info: + ~azure.mgmt.adhybridhealthservice.models.RuleErrorInfo + :param cs_object_id: The object Id. + :type cs_object_id: str + :param dn: The distinguished name. + :type dn: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'run_step_result_id': {'key': 'runStepResultId', 'type': 'str'}, + 'connector_id': {'key': 'connectorId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'time_occurred': {'key': 'timeOccurred', 'type': 'iso-8601'}, + 'time_first_occurred': {'key': 'timeFirstOccurred', 'type': 'iso-8601'}, + 'retry_count': {'key': 'retryCount', 'type': 'int'}, + 'algorithm_step_type': {'key': 'algorithmStepType', 'type': 'str'}, + 'change_not_reimported': {'key': 'changeNotReimported', 'type': 'ChangeNotReimported'}, + 'extension_error_info': {'key': 'extensionErrorInfo', 'type': 'ExtensionErrorInfo'}, + 'rule_error_info': {'key': 'ruleErrorInfo', 'type': 'RuleErrorInfo'}, + 'cs_object_id': {'key': 'csObjectId', 'type': 'str'}, + 'dn': {'key': 'dn', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, run_step_result_id: str=None, connector_id: str=None, type: str=None, time_occurred=None, time_first_occurred=None, retry_count: int=None, algorithm_step_type=None, change_not_reimported=None, extension_error_info=None, rule_error_info=None, cs_object_id: str=None, dn: str=None, **kwargs) -> None: + super(ImportError, self).__init__(**kwargs) + self.id = id + self.run_step_result_id = run_step_result_id + self.connector_id = connector_id + self.type = type + self.time_occurred = time_occurred + self.time_first_occurred = time_first_occurred + self.retry_count = retry_count + self.algorithm_step_type = algorithm_step_type + self.change_not_reimported = change_not_reimported + self.extension_error_info = extension_error_info + self.rule_error_info = rule_error_info + self.cs_object_id = cs_object_id + self.dn = dn + + +class ImportErrors(Model): + """The list of import errors. + + :param value: The value returned by the operation. + :type value: list[~azure.mgmt.adhybridhealthservice.models.ImportError] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ImportError]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(ImportErrors, self).__init__(**kwargs) + self.value = value + + +class InboundReplicationNeighbor(Model): + """The replication summary for the domain controller inbound neighbor. + + :param source_domain_controller: The name of the source domain controller. + :type source_domain_controller: str + :param consecutive_failure_count: The number of consecutive failure + counts. + :type consecutive_failure_count: int + :param naming_context: The naming context. + :type naming_context: str + :param status: The health status for the domain controller + :type status: int + :param last_attempted_sync: The last time a sync was attempted on the + domain controller. + :type last_attempted_sync: datetime + :param last_successful_sync: The last time when a successful sync + happened. + :type last_successful_sync: datetime + :param last_error_code: The last error code. + :type last_error_code: int + :param last_error_message: The error message of the last error. + :type last_error_message: str + :param error_title: The error title. + :type error_title: str + :param error_description: The error description. + :type error_description: str + :param fix_link: The link for the fix of the error. + :type fix_link: str + :param fix_details: The details of the fix. + :type fix_details: str + :param additional_info: The additional details. + :type additional_info: str + """ + + _attribute_map = { + 'source_domain_controller': {'key': 'sourceDomainController', 'type': 'str'}, + 'consecutive_failure_count': {'key': 'consecutiveFailureCount', 'type': 'int'}, + 'naming_context': {'key': 'namingContext', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'int'}, + 'last_attempted_sync': {'key': 'lastAttemptedSync', 'type': 'iso-8601'}, + 'last_successful_sync': {'key': 'lastSuccessfulSync', 'type': 'iso-8601'}, + 'last_error_code': {'key': 'lastErrorCode', 'type': 'int'}, + 'last_error_message': {'key': 'lastErrorMessage', 'type': 'str'}, + 'error_title': {'key': 'errorTitle', 'type': 'str'}, + 'error_description': {'key': 'errorDescription', 'type': 'str'}, + 'fix_link': {'key': 'fixLink', 'type': 'str'}, + 'fix_details': {'key': 'fixDetails', 'type': 'str'}, + 'additional_info': {'key': 'additionalInfo', 'type': 'str'}, + } + + def __init__(self, *, source_domain_controller: str=None, consecutive_failure_count: int=None, naming_context: str=None, status: int=None, last_attempted_sync=None, last_successful_sync=None, last_error_code: int=None, last_error_message: str=None, error_title: str=None, error_description: str=None, fix_link: str=None, fix_details: str=None, additional_info: str=None, **kwargs) -> None: + super(InboundReplicationNeighbor, self).__init__(**kwargs) + self.source_domain_controller = source_domain_controller + self.consecutive_failure_count = consecutive_failure_count + self.naming_context = naming_context + self.status = status + self.last_attempted_sync = last_attempted_sync + self.last_successful_sync = last_successful_sync + self.last_error_code = last_error_code + self.last_error_message = last_error_message + self.error_title = error_title + self.error_description = error_description + self.fix_link = fix_link + self.fix_details = fix_details + self.additional_info = additional_info + + +class InboundReplicationNeighbors(Model): + """The list of replication summary for the domain controller inbound neighbor. + + :param value: The details of inbound replication neighbors. + :type value: + list[~azure.mgmt.adhybridhealthservice.models.InboundReplicationNeighbor] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[InboundReplicationNeighbor]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(InboundReplicationNeighbors, self).__init__(**kwargs) + self.value = value + + +class IPAddressAggregate(Model): + """The key value pair for properties. + + :param id: Unique ID for the entree + :type id: str + :param tenant_id: The tenant ID + :type tenant_id: str + :param service_id: The service ID + :type service_id: str + :param ip_address: The IP address from where the attempted login + originated from. + :type ip_address: str + :param timestamp: When the event occurred + :type timestamp: str + :param first_audit_timestamp: The first audit timestamp + :type first_audit_timestamp: str + :param last_audit_timestamp: The last audit timestamp + :type last_audit_timestamp: str + :param extranet_lockout_error_count: The extranet lockout error count + :type extranet_lockout_error_count: int + :param bad_password_error_count: The bad password error count + :type bad_password_error_count: int + :param unique_usernames_attempted_count: The unique usernames attempted + :type unique_usernames_attempted_count: int + :param attempt_count_threshold_is_exceeded: A value indicating whether the + attempt count threshold been exceeded + :type attempt_count_threshold_is_exceeded: bool + :param time_span: The duration of the event + :type time_span: str + :param is_whitelisted_ip_address: A value indicating whether the IP + address has been whitelisted. + :type is_whitelisted_ip_address: bool + :param network_location: The network location + :type network_location: str + :param attempt_count_threshold_on_trigger: The attempted count threshold + on trigger. + :type attempt_count_threshold_on_trigger: int + :param attempt_threshold_type_on_trigger: The attempted threshold type on + trigger. + :type attempt_threshold_type_on_trigger: str + :param geographic_location: The geographic location. + :type geographic_location: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'service_id': {'key': 'serviceId', 'type': 'str'}, + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'str'}, + 'first_audit_timestamp': {'key': 'firstAuditTimestamp', 'type': 'str'}, + 'last_audit_timestamp': {'key': 'lastAuditTimestamp', 'type': 'str'}, + 'extranet_lockout_error_count': {'key': 'extranetLockoutErrorCount', 'type': 'int'}, + 'bad_password_error_count': {'key': 'badPasswordErrorCount', 'type': 'int'}, + 'unique_usernames_attempted_count': {'key': 'uniqueUsernamesAttemptedCount', 'type': 'int'}, + 'attempt_count_threshold_is_exceeded': {'key': 'attemptCountThresholdIsExceeded', 'type': 'bool'}, + 'time_span': {'key': 'timeSpan', 'type': 'str'}, + 'is_whitelisted_ip_address': {'key': 'isWhitelistedIpAddress', 'type': 'bool'}, + 'network_location': {'key': 'networkLocation', 'type': 'str'}, + 'attempt_count_threshold_on_trigger': {'key': 'attemptCountThresholdOnTrigger', 'type': 'int'}, + 'attempt_threshold_type_on_trigger': {'key': 'attemptThresholdTypeOnTrigger', 'type': 'str'}, + 'geographic_location': {'key': 'geographicLocation', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, tenant_id: str=None, service_id: str=None, ip_address: str=None, timestamp: str=None, first_audit_timestamp: str=None, last_audit_timestamp: str=None, extranet_lockout_error_count: int=None, bad_password_error_count: int=None, unique_usernames_attempted_count: int=None, attempt_count_threshold_is_exceeded: bool=None, time_span: str=None, is_whitelisted_ip_address: bool=None, network_location: str=None, attempt_count_threshold_on_trigger: int=None, attempt_threshold_type_on_trigger: str=None, geographic_location: str=None, **kwargs) -> None: + super(IPAddressAggregate, self).__init__(**kwargs) + self.id = id + self.tenant_id = tenant_id + self.service_id = service_id + self.ip_address = ip_address + self.timestamp = timestamp + self.first_audit_timestamp = first_audit_timestamp + self.last_audit_timestamp = last_audit_timestamp + self.extranet_lockout_error_count = extranet_lockout_error_count + self.bad_password_error_count = bad_password_error_count + self.unique_usernames_attempted_count = unique_usernames_attempted_count + self.attempt_count_threshold_is_exceeded = attempt_count_threshold_is_exceeded + self.time_span = time_span + self.is_whitelisted_ip_address = is_whitelisted_ip_address + self.network_location = network_location + self.attempt_count_threshold_on_trigger = attempt_count_threshold_on_trigger + self.attempt_threshold_type_on_trigger = attempt_threshold_type_on_trigger + self.geographic_location = geographic_location + + +class IPAddressAggregateSetting(Model): + """The key value pair for IP aggregate thresholds. + + :param id: Unique ID for the entree + :type id: str + :param bad_password_and_extranet_lockout_combined_daily_threshold: This + threshold setting defines the per day trigger for a new event to be + generated in the report. + :type bad_password_and_extranet_lockout_combined_daily_threshold: int + :param bad_password_and_extranet_lockout_combined_hourly_threshold: This + threshold setting defines the per hour trigger for a new event to be + generated in the report. + :type bad_password_and_extranet_lockout_combined_hourly_threshold: int + :param extranet_lockout_daily_threshold: This threshold setting defines + the per hour trigger for a new event to be generated in the report. + :type extranet_lockout_daily_threshold: int + :param extranet_lockout_hourly_threshold: This threshold setting defines + the per hour trigger for a new event to be generated in the report. + :type extranet_lockout_hourly_threshold: int + :param email_notification_enabled: A value indicating whether email + notification has been enabled. + :type email_notification_enabled: bool + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'bad_password_and_extranet_lockout_combined_daily_threshold': {'key': 'badPasswordAndExtranetLockoutCombinedDailyThreshold', 'type': 'int'}, + 'bad_password_and_extranet_lockout_combined_hourly_threshold': {'key': 'badPasswordAndExtranetLockoutCombinedHourlyThreshold', 'type': 'int'}, + 'extranet_lockout_daily_threshold': {'key': 'extranetLockoutDailyThreshold', 'type': 'int'}, + 'extranet_lockout_hourly_threshold': {'key': 'extranetLockoutHourlyThreshold', 'type': 'int'}, + 'email_notification_enabled': {'key': 'emailNotificationEnabled', 'type': 'bool'}, + } + + def __init__(self, *, id: str=None, bad_password_and_extranet_lockout_combined_daily_threshold: int=None, bad_password_and_extranet_lockout_combined_hourly_threshold: int=None, extranet_lockout_daily_threshold: int=None, extranet_lockout_hourly_threshold: int=None, email_notification_enabled: bool=None, **kwargs) -> None: + super(IPAddressAggregateSetting, self).__init__(**kwargs) + self.id = id + self.bad_password_and_extranet_lockout_combined_daily_threshold = bad_password_and_extranet_lockout_combined_daily_threshold + self.bad_password_and_extranet_lockout_combined_hourly_threshold = bad_password_and_extranet_lockout_combined_hourly_threshold + self.extranet_lockout_daily_threshold = extranet_lockout_daily_threshold + self.extranet_lockout_hourly_threshold = extranet_lockout_hourly_threshold + self.email_notification_enabled = email_notification_enabled + + +class Item(Model): + """The key value pair for properties. + + :param key: The key for the property. + :type key: str + :param value: The value for the key. + :type value: str + """ + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, key: str=None, value: str=None, **kwargs) -> None: + super(Item, self).__init__(**kwargs) + self.key = key + self.value = value + + +class MergedExportError(Model): + """The merged export error. + + :param id: The error Id. + :type id: str + :param incoming_object_display_name: The incoming object display name. + :type incoming_object_display_name: str + :param incoming_object_type: The incoming object type. + :type incoming_object_type: str + :param user_principal_name: The user principal name + :type user_principal_name: str + :param type: The type of the error. + :type type: str + :param attribute_name: The attribute name. + :type attribute_name: str + :param attribute_value: The attribute value. + :type attribute_value: str + :param time_occurred: The date and time when the error occurred. + :type time_occurred: datetime + :param time_first_occurred: The time when the error first occurred. + :type time_first_occurred: datetime + :param cs_object_id: the cs object Id. + :type cs_object_id: str + :param dn: the DN of the object. + :type dn: str + :param incoming_object: The incoming object details. + :type incoming_object: + ~azure.mgmt.adhybridhealthservice.models.AssociatedObject + :param existing_object: The existing object + :type existing_object: + ~azure.mgmt.adhybridhealthservice.models.AssociatedObject + :param modified_or_removed_attribute_value: The modified or removed + attribute value. + :type modified_or_removed_attribute_value: str + :param run_step_result_id: The run step result Id. + :type run_step_result_id: str + :param sam_account_name: The sam account name. + :type sam_account_name: str + :param server_error_detail: The server error details. + :type server_error_detail: str + :param service_id: The service Id. + :type service_id: str + :param service_member_id: The server Id. + :type service_member_id: str + :param merged_entity_id: The merged entity Id. + :type merged_entity_id: str + :param created_date: The date and time, in UTC, when the error was + created. + :type created_date: datetime + :param export_error_status: The export error status. + :type export_error_status: int + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'incoming_object_display_name': {'key': 'incomingObjectDisplayName', 'type': 'str'}, + 'incoming_object_type': {'key': 'incomingObjectType', 'type': 'str'}, + 'user_principal_name': {'key': 'userPrincipalName', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'attribute_name': {'key': 'attributeName', 'type': 'str'}, + 'attribute_value': {'key': 'attributeValue', 'type': 'str'}, + 'time_occurred': {'key': 'timeOccurred', 'type': 'iso-8601'}, + 'time_first_occurred': {'key': 'timeFirstOccurred', 'type': 'iso-8601'}, + 'cs_object_id': {'key': 'csObjectId', 'type': 'str'}, + 'dn': {'key': 'dn', 'type': 'str'}, + 'incoming_object': {'key': 'incomingObject', 'type': 'AssociatedObject'}, + 'existing_object': {'key': 'existingObject', 'type': 'AssociatedObject'}, + 'modified_or_removed_attribute_value': {'key': 'modifiedOrRemovedAttributeValue', 'type': 'str'}, + 'run_step_result_id': {'key': 'runStepResultId', 'type': 'str'}, + 'sam_account_name': {'key': 'samAccountName', 'type': 'str'}, + 'server_error_detail': {'key': 'serverErrorDetail', 'type': 'str'}, + 'service_id': {'key': 'serviceId', 'type': 'str'}, + 'service_member_id': {'key': 'serviceMemberId', 'type': 'str'}, + 'merged_entity_id': {'key': 'mergedEntityId', 'type': 'str'}, + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'export_error_status': {'key': 'exportErrorStatus', 'type': 'int'}, + } + + def __init__(self, *, id: str=None, incoming_object_display_name: str=None, incoming_object_type: str=None, user_principal_name: str=None, type: str=None, attribute_name: str=None, attribute_value: str=None, time_occurred=None, time_first_occurred=None, cs_object_id: str=None, dn: str=None, incoming_object=None, existing_object=None, modified_or_removed_attribute_value: str=None, run_step_result_id: str=None, sam_account_name: str=None, server_error_detail: str=None, service_id: str=None, service_member_id: str=None, merged_entity_id: str=None, created_date=None, export_error_status: int=None, **kwargs) -> None: + super(MergedExportError, self).__init__(**kwargs) + self.id = id + self.incoming_object_display_name = incoming_object_display_name + self.incoming_object_type = incoming_object_type + self.user_principal_name = user_principal_name + self.type = type + self.attribute_name = attribute_name + self.attribute_value = attribute_value + self.time_occurred = time_occurred + self.time_first_occurred = time_first_occurred + self.cs_object_id = cs_object_id + self.dn = dn + self.incoming_object = incoming_object + self.existing_object = existing_object + self.modified_or_removed_attribute_value = modified_or_removed_attribute_value + self.run_step_result_id = run_step_result_id + self.sam_account_name = sam_account_name + self.server_error_detail = server_error_detail + self.service_id = service_id + self.service_member_id = service_member_id + self.merged_entity_id = merged_entity_id + self.created_date = created_date + self.export_error_status = export_error_status + + +class MetricGroup(Model): + """The metric group details. + + :param key: The key for the group. + :type key: str + :param display_name: The display name for the group. + :type display_name: str + :param invisible_for_ui: indicates if the metric group is displayed in + Azure Active Directory Connect Health UI. + :type invisible_for_ui: bool + """ + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'invisible_for_ui': {'key': 'invisibleForUi', 'type': 'bool'}, + } + + def __init__(self, *, key: str=None, display_name: str=None, invisible_for_ui: bool=None, **kwargs) -> None: + super(MetricGroup, self).__init__(**kwargs) + self.key = key + self.display_name = display_name + self.invisible_for_ui = invisible_for_ui + + +class MetricMetadata(Model): + """The metric meta data. + + :param metrics_processor_class_name: The name of the class which retrieve + and process the metric. + :type metrics_processor_class_name: str + :param metric_name: The metric name + :type metric_name: str + :param groupings: The groupings for the metrics. + :type groupings: + list[~azure.mgmt.adhybridhealthservice.models.MetricGroup] + :param display_name: The display name for the metric. + :type display_name: str + :param value_kind: Indicates if the metrics is a rate,value, percent or + duration type. + :type value_kind: str + :param min_value: The minimum value. + :type min_value: int + :param max_value: The maximum value. + :type max_value: int + :param kind: Indicates whether the dashboard to represent the metric is a + line, bar,pie, area or donut chart. + :type kind: str + :param is_default: Indicates if the metric is a default metric or not. + :type is_default: bool + :param is_perf_counter: Indicates if the metric is a performance counter + metric or not. + :type is_perf_counter: bool + :param is_dev_ops: Indicates if the metric is visible to DevOps or not. + :type is_dev_ops: bool + """ + + _attribute_map = { + 'metrics_processor_class_name': {'key': 'metricsProcessorClassName', 'type': 'str'}, + 'metric_name': {'key': 'metricName', 'type': 'str'}, + 'groupings': {'key': 'groupings', 'type': '[MetricGroup]'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'value_kind': {'key': 'valueKind', 'type': 'str'}, + 'min_value': {'key': 'minValue', 'type': 'int'}, + 'max_value': {'key': 'maxValue', 'type': 'int'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'is_default': {'key': 'isDefault', 'type': 'bool'}, + 'is_perf_counter': {'key': 'isPerfCounter', 'type': 'bool'}, + 'is_dev_ops': {'key': 'isDevOps', 'type': 'bool'}, + } + + def __init__(self, *, metrics_processor_class_name: str=None, metric_name: str=None, groupings=None, display_name: str=None, value_kind: str=None, min_value: int=None, max_value: int=None, kind: str=None, is_default: bool=None, is_perf_counter: bool=None, is_dev_ops: bool=None, **kwargs) -> None: + super(MetricMetadata, self).__init__(**kwargs) + self.metrics_processor_class_name = metrics_processor_class_name + self.metric_name = metric_name + self.groupings = groupings + self.display_name = display_name + self.value_kind = value_kind + self.min_value = min_value + self.max_value = max_value + self.kind = kind + self.is_default = is_default + self.is_perf_counter = is_perf_counter + self.is_dev_ops = is_dev_ops + + +class MetricSet(Model): + """The set of metric values. Example of a MetricSet are Values of token + requests for a Server1 or RelyingParty1. + + :param set_name: The name of the set. + :type set_name: str + :param values: The list of the metric values. + :type values: list[int] + """ + + _attribute_map = { + 'set_name': {'key': 'setName', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[int]'}, + } + + def __init__(self, *, set_name: str=None, values=None, **kwargs) -> None: + super(MetricSet, self).__init__(**kwargs) + self.set_name = set_name + self.values = values + + +class MetricSets(Model): + """The metrics data represented set. + + :param sets: The list of metric set. + :type sets: list[~azure.mgmt.adhybridhealthservice.models.MetricSet] + :param time_stamps: The list of timestamps for each metric in the metric + set. + :type time_stamps: list[datetime] + """ + + _attribute_map = { + 'sets': {'key': 'sets', 'type': '[MetricSet]'}, + 'time_stamps': {'key': 'timeStamps', 'type': '[iso-8601]'}, + } + + def __init__(self, *, sets=None, time_stamps=None, **kwargs) -> None: + super(MetricSets, self).__init__(**kwargs) + self.sets = sets + self.time_stamps = time_stamps + + +class ModuleConfiguration(Model): + """The module configuration as required by the Agent service. + + :param agent_service: The name of agent service. + :type agent_service: str + :param module_name: The name of the module for which the configuration is + applicable. + :type module_name: str + :param properties: The key value pairs of properties required for + configuration. + :type properties: dict[str, str] + """ + + _attribute_map = { + 'agent_service': {'key': 'agentService', 'type': 'str'}, + 'module_name': {'key': 'moduleName', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + } + + def __init__(self, *, agent_service: str=None, module_name: str=None, properties=None, **kwargs) -> None: + super(ModuleConfiguration, self).__init__(**kwargs) + self.agent_service = agent_service + self.module_name = module_name + self.properties = properties + + +class ModuleConfigurations(Model): + """The list of module configurations. + + :param value: The value returned by the operation. + :type value: + list[~azure.mgmt.adhybridhealthservice.models.ModuleConfiguration] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ModuleConfiguration]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(ModuleConfigurations, self).__init__(**kwargs) + self.value = value + + +class ObjectWithSyncError(Model): + """The objects with sync errors. + + :param source_of_authority: The source of authority. + :type source_of_authority: str + :param display_name: The display name. + :type display_name: str + :param object_type: The object type. + :type object_type: str + :param attribute_name: The attribute name. + :type attribute_name: str + :param attribute_value: The attribute value. + :type attribute_value: str + :param modififed_value: The modified value. + :type modififed_value: str + :param user_principal_name: The user principal name. + :type user_principal_name: str + :param object_guid: The object guid. + :type object_guid: str + :param attribute_multi_values: Indicates if the attribute is multi-valued + or not. + :type attribute_multi_values: bool + :param min_limit: The minimum limit. + :type min_limit: str + :param max_limit: The maximum limit. + :type max_limit: str + :param distinguished_name: The distinguished name. + :type distinguished_name: str + :param mail: The email. + :type mail: str + :param time_occured: The date and time of occurrence. + :type time_occured: datetime + :param error_type: The error type. + :type error_type: str + :param source_anchor: The source anchor. + :type source_anchor: str + """ + + _attribute_map = { + 'source_of_authority': {'key': 'sourceOfAuthority', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'attribute_name': {'key': 'attributeName', 'type': 'str'}, + 'attribute_value': {'key': 'attributeValue', 'type': 'str'}, + 'modififed_value': {'key': 'modififedValue', 'type': 'str'}, + 'user_principal_name': {'key': 'userPrincipalName', 'type': 'str'}, + 'object_guid': {'key': 'objectGuid', 'type': 'str'}, + 'attribute_multi_values': {'key': 'attributeMultiValues', 'type': 'bool'}, + 'min_limit': {'key': 'minLimit', 'type': 'str'}, + 'max_limit': {'key': 'maxLimit', 'type': 'str'}, + 'distinguished_name': {'key': 'distinguishedName', 'type': 'str'}, + 'mail': {'key': 'mail', 'type': 'str'}, + 'time_occured': {'key': 'timeOccured', 'type': 'iso-8601'}, + 'error_type': {'key': 'errorType', 'type': 'str'}, + 'source_anchor': {'key': 'sourceAnchor', 'type': 'str'}, + } + + def __init__(self, *, source_of_authority: str=None, display_name: str=None, object_type: str=None, attribute_name: str=None, attribute_value: str=None, modififed_value: str=None, user_principal_name: str=None, object_guid: str=None, attribute_multi_values: bool=None, min_limit: str=None, max_limit: str=None, distinguished_name: str=None, mail: str=None, time_occured=None, error_type: str=None, source_anchor: str=None, **kwargs) -> None: + super(ObjectWithSyncError, self).__init__(**kwargs) + self.source_of_authority = source_of_authority + self.display_name = display_name + self.object_type = object_type + self.attribute_name = attribute_name + self.attribute_value = attribute_value + self.modififed_value = modififed_value + self.user_principal_name = user_principal_name + self.object_guid = object_guid + self.attribute_multi_values = attribute_multi_values + self.min_limit = min_limit + self.max_limit = max_limit + self.distinguished_name = distinguished_name + self.mail = mail + self.time_occured = time_occured + self.error_type = error_type + self.source_anchor = source_anchor + + +class Operation(Model): + """The details of the operation. + + :param name: The name of the operation. + :type name: str + :param display: The display details for the operation. + :type display: object + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'object'}, + } + + def __init__(self, *, name: str=None, display=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = name + self.display = display + + +class Partition(Model): + """Describes the partition in Synchronization service. + + :param id: The partition Id. + :type id: str + :param dn: The distinguished name for the partition. + :type dn: str + :param enabled: Indicates if the partition object is selected or not. + :type enabled: bool + :param time_created: The date and time when the partition is created. + :type time_created: datetime + :param time_last_modified: The time and date when the partition was last + modified. + :type time_last_modified: datetime + :param partition_scope: The scope of the partition. + :type partition_scope: + ~azure.mgmt.adhybridhealthservice.models.PartitionScope + :param name: The name of the partition. + :type name: str + :param is_domain: Indicates if the partition is a domain or not. + :type is_domain: bool + :param type: The partition type. + :type type: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'dn': {'key': 'dn', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'time_created': {'key': 'timeCreated', 'type': 'iso-8601'}, + 'time_last_modified': {'key': 'timeLastModified', 'type': 'iso-8601'}, + 'partition_scope': {'key': 'partitionScope', 'type': 'PartitionScope'}, + 'name': {'key': 'name', 'type': 'str'}, + 'is_domain': {'key': 'isDomain', 'type': 'bool'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, dn: str=None, enabled: bool=None, time_created=None, time_last_modified=None, partition_scope=None, name: str=None, is_domain: bool=None, type: str=None, **kwargs) -> None: + super(Partition, self).__init__(**kwargs) + self.id = id + self.dn = dn + self.enabled = enabled + self.time_created = time_created + self.time_last_modified = time_last_modified + self.partition_scope = partition_scope + self.name = name + self.is_domain = is_domain + self.type = type + + +class PartitionScope(Model): + """The connector partition scope. + + :param is_default: Indicates if the partition scope is default or not. + :type is_default: bool + :param object_classes: The in-scope object classes. + :type object_classes: list[str] + :param containers_included: The list of containers included. + :type containers_included: list[str] + :param containers_excluded: The list of containers excluded. + :type containers_excluded: list[str] + """ + + _attribute_map = { + 'is_default': {'key': 'isDefault', 'type': 'bool'}, + 'object_classes': {'key': 'objectClasses', 'type': '[str]'}, + 'containers_included': {'key': 'containersIncluded', 'type': '[str]'}, + 'containers_excluded': {'key': 'containersExcluded', 'type': '[str]'}, + } + + def __init__(self, *, is_default: bool=None, object_classes=None, containers_included=None, containers_excluded=None, **kwargs) -> None: + super(PartitionScope, self).__init__(**kwargs) + self.is_default = is_default + self.object_classes = object_classes + self.containers_included = containers_included + self.containers_excluded = containers_excluded + + +class PasswordHashSyncConfiguration(Model): + """The password has synchronization configuration settings. + + :param enabled: Indicates if the password hash synchronization + configuration settings is enabled. + :type enabled: bool + :param target: The target. + :type target: str + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'target': {'key': 'target', 'type': 'str'}, + } + + def __init__(self, *, enabled: bool=None, target: str=None, **kwargs) -> None: + super(PasswordHashSyncConfiguration, self).__init__(**kwargs) + self.enabled = enabled + self.target = target + + +class PasswordManagementSettings(Model): + """The password management settings. + + :param enabled: Indicates if the password extension is enabled. + :type enabled: bool + :param extension_file_path: The file path of the password management + extension. + :type extension_file_path: str + :param connect_to: Connection point of password management. + :type connect_to: str + :param connection_timeout: Connection timeout for password extension. + :type connection_timeout: int + :param user: User to execute password extension. + :type user: str + :param supported_password_operations: The supported password operations. + Possible values include: 'Undefined', 'Set', 'Change' + :type supported_password_operations: str or + ~azure.mgmt.adhybridhealthservice.models.PasswordOperationTypes + :param maximum_retry_count: The maximum number of retries. + :type maximum_retry_count: int + :param retry_interval_in_seconds: The time between retries. + :type retry_interval_in_seconds: int + :param requires_secure_connection: Indicates if a secure connection is + required for password management. + :type requires_secure_connection: bool + :param unlock_account: Indicates if accounts should be unlocked when + resetting password. + :type unlock_account: bool + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'extension_file_path': {'key': 'extensionFilePath', 'type': 'str'}, + 'connect_to': {'key': 'connectTo', 'type': 'str'}, + 'connection_timeout': {'key': 'connectionTimeout', 'type': 'int'}, + 'user': {'key': 'user', 'type': 'str'}, + 'supported_password_operations': {'key': 'supportedPasswordOperations', 'type': 'str'}, + 'maximum_retry_count': {'key': 'maximumRetryCount', 'type': 'int'}, + 'retry_interval_in_seconds': {'key': 'retryIntervalInSeconds', 'type': 'int'}, + 'requires_secure_connection': {'key': 'requiresSecureConnection', 'type': 'bool'}, + 'unlock_account': {'key': 'unlockAccount', 'type': 'bool'}, + } + + def __init__(self, *, enabled: bool=None, extension_file_path: str=None, connect_to: str=None, connection_timeout: int=None, user: str=None, supported_password_operations=None, maximum_retry_count: int=None, retry_interval_in_seconds: int=None, requires_secure_connection: bool=None, unlock_account: bool=None, **kwargs) -> None: + super(PasswordManagementSettings, self).__init__(**kwargs) + self.enabled = enabled + self.extension_file_path = extension_file_path + self.connect_to = connect_to + self.connection_timeout = connection_timeout + self.user = user + self.supported_password_operations = supported_password_operations + self.maximum_retry_count = maximum_retry_count + self.retry_interval_in_seconds = retry_interval_in_seconds + self.requires_secure_connection = requires_secure_connection + self.unlock_account = unlock_account + + +class ReplicationStatus(Model): + """Replication summary for a domain controller. + + :param forest_name: The forest name. + :type forest_name: str + :param total_dc_count: The total number of domain controllers for a given + forest. + :type total_dc_count: int + :param error_dc_count: The total number of domain controllers with error + in a given forest. + :type error_dc_count: int + """ + + _attribute_map = { + 'forest_name': {'key': 'forestName', 'type': 'str'}, + 'total_dc_count': {'key': 'totalDcCount', 'type': 'int'}, + 'error_dc_count': {'key': 'errorDcCount', 'type': 'int'}, + } + + def __init__(self, *, forest_name: str=None, total_dc_count: int=None, error_dc_count: int=None, **kwargs) -> None: + super(ReplicationStatus, self).__init__(**kwargs) + self.forest_name = forest_name + self.total_dc_count = total_dc_count + self.error_dc_count = error_dc_count + + +class ReplicationSummary(Model): + """The replication summary for a domain controller. + + :param target_server: The domain controller name. + :type target_server: str + :param site: The site name for a given domain controller. + :type site: str + :param domain: The domain name for a given domain controller. + :type domain: str + :param status: The health status for a domain controller. + :type status: int + :param last_attempted_sync: The last time when a sync was attempted for a + given domain controller. + :type last_attempted_sync: datetime + :param last_successful_sync: The time when the last successful sync + happened for a given domain controller. + :type last_successful_sync: datetime + :param inbound_neighbor_collection: List of individual domain controller + neighbor's inbound replication status. + :type inbound_neighbor_collection: + list[~azure.mgmt.adhybridhealthservice.models.InboundReplicationNeighbor] + """ + + _attribute_map = { + 'target_server': {'key': 'targetServer', 'type': 'str'}, + 'site': {'key': 'site', 'type': 'str'}, + 'domain': {'key': 'domain', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'int'}, + 'last_attempted_sync': {'key': 'lastAttemptedSync', 'type': 'iso-8601'}, + 'last_successful_sync': {'key': 'lastSuccessfulSync', 'type': 'iso-8601'}, + 'inbound_neighbor_collection': {'key': 'inboundNeighborCollection', 'type': '[InboundReplicationNeighbor]'}, + } + + def __init__(self, *, target_server: str=None, site: str=None, domain: str=None, status: int=None, last_attempted_sync=None, last_successful_sync=None, inbound_neighbor_collection=None, **kwargs) -> None: + super(ReplicationSummary, self).__init__(**kwargs) + self.target_server = target_server + self.site = site + self.domain = domain + self.status = status + self.last_attempted_sync = last_attempted_sync + self.last_successful_sync = last_successful_sync + self.inbound_neighbor_collection = inbound_neighbor_collection + + +class Result(Model): + """The result for an operation. + + :param value: The value. + :type value: bool + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'bool'}, + } + + def __init__(self, *, value: bool=None, **kwargs) -> None: + super(Result, self).__init__(**kwargs) + self.value = value + + +class RiskyIPBlobUri(Model): + """The blob uri pointing to Risky IP Report. + + :param tenant_id: The tenant id for whom the report belongs to. + :type tenant_id: str + :param service_id: The service id for whom the report belongs to. + :type service_id: str + :param result_sas_uri: The blob uri for the report. + :type result_sas_uri: str + :param blob_create_date_time: Time at which the new Risky IP report was + requested. + :type blob_create_date_time: datetime + :param job_completion_time: Time at which the blob creation job for the + new Risky IP report was completed. + :type job_completion_time: datetime + :param status: Status of the Risky IP report generation. + :type status: str + """ + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'service_id': {'key': 'serviceId', 'type': 'str'}, + 'result_sas_uri': {'key': 'resultSasUri', 'type': 'str'}, + 'blob_create_date_time': {'key': 'blobCreateDateTime', 'type': 'iso-8601'}, + 'job_completion_time': {'key': 'jobCompletionTime', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, *, tenant_id: str=None, service_id: str=None, result_sas_uri: str=None, blob_create_date_time=None, job_completion_time=None, status: str=None, **kwargs) -> None: + super(RiskyIPBlobUri, self).__init__(**kwargs) + self.tenant_id = tenant_id + self.service_id = service_id + self.result_sas_uri = result_sas_uri + self.blob_create_date_time = blob_create_date_time + self.job_completion_time = job_completion_time + self.status = status + + +class RuleErrorInfo(Model): + """The error details in legacy rule processing. + + :param attribute_mapping: The attribute mapping details. + :type attribute_mapping: + ~azure.mgmt.adhybridhealthservice.models.AttributeMapping + :param connector_id: The connector Id. + :type connector_id: str + :param connector_name: The connector name. + :type connector_name: str + :param cs_object_id: The object Id. + :type cs_object_id: str + :param dn: The distinguished name. + :type dn: str + """ + + _attribute_map = { + 'attribute_mapping': {'key': 'attributeMapping', 'type': 'AttributeMapping'}, + 'connector_id': {'key': 'connectorId', 'type': 'str'}, + 'connector_name': {'key': 'connectorName', 'type': 'str'}, + 'cs_object_id': {'key': 'csObjectId', 'type': 'str'}, + 'dn': {'key': 'dn', 'type': 'str'}, + } + + def __init__(self, *, attribute_mapping=None, connector_id: str=None, connector_name: str=None, cs_object_id: str=None, dn: str=None, **kwargs) -> None: + super(RuleErrorInfo, self).__init__(**kwargs) + self.attribute_mapping = attribute_mapping + self.connector_id = connector_id + self.connector_name = connector_name + self.cs_object_id = cs_object_id + self.dn = dn + + +class RunProfile(Model): + """Describes the run profile. + + :param id: The run profile Id. + :type id: str + :param name: The run profile name + :type name: str + :param run_steps: The run steps of the run profile. + :type run_steps: list[~azure.mgmt.adhybridhealthservice.models.RunStep] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'run_steps': {'key': 'runSteps', 'type': '[RunStep]'}, + } + + def __init__(self, *, id: str=None, name: str=None, run_steps=None, **kwargs) -> None: + super(RunProfile, self).__init__(**kwargs) + self.id = id + self.name = name + self.run_steps = run_steps + + +class RunProfiles(Model): + """The list of run profiles. + + :param value: The value returned by the operation. + :type value: list[~azure.mgmt.adhybridhealthservice.models.RunProfile] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[RunProfile]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(RunProfiles, self).__init__(**kwargs) + self.value = value + + +class RunStep(Model): + """The run step for a run profile. + + :param batch_size: The batch size used by the run step. + :type batch_size: int + :param object_process_limit: The object processing limit. + :type object_process_limit: int + :param object_delete_limit: The object deletion limit. + :type object_delete_limit: int + :param page_size: The page size of the run step. + :type page_size: int + :param partition_id: The Id of the partition that a current run step + operation is executing. + :type partition_id: str + :param operation_type: The run step operation types. + :type operation_type: int + :param timeout: The operation timeout. + :type timeout: int + """ + + _attribute_map = { + 'batch_size': {'key': 'batchSize', 'type': 'int'}, + 'object_process_limit': {'key': 'objectProcessLimit', 'type': 'int'}, + 'object_delete_limit': {'key': 'objectDeleteLimit', 'type': 'int'}, + 'page_size': {'key': 'pageSize', 'type': 'int'}, + 'partition_id': {'key': 'partitionId', 'type': 'str'}, + 'operation_type': {'key': 'operationType', 'type': 'int'}, + 'timeout': {'key': 'timeout', 'type': 'int'}, + } + + def __init__(self, *, batch_size: int=None, object_process_limit: int=None, object_delete_limit: int=None, page_size: int=None, partition_id: str=None, operation_type: int=None, timeout: int=None, **kwargs) -> None: + super(RunStep, self).__init__(**kwargs) + self.batch_size = batch_size + self.object_process_limit = object_process_limit + self.object_delete_limit = object_delete_limit + self.page_size = page_size + self.partition_id = partition_id + self.operation_type = operation_type + self.timeout = timeout + + +class ServiceConfiguration(Model): + """The service configuration. + + :param version: The version of the sync service. + :type version: str + :param service_type: The service type of the server. + :type service_type: int + :param service_account: The service account. + :type service_account: str + :param sql_server: The SQL server information. + :type sql_server: str + :param sql_version: The SQL version. + :type sql_version: str + :param sql_edition: The SQL edition + :type sql_edition: str + :param sql_instance: The SQL instance details. + :type sql_instance: str + :param sql_database_name: The SQL database. + :type sql_database_name: str + :param sql_database_size: The SQL database size. + :type sql_database_size: int + """ + + _attribute_map = { + 'version': {'key': 'version', 'type': 'str'}, + 'service_type': {'key': 'serviceType', 'type': 'int'}, + 'service_account': {'key': 'serviceAccount', 'type': 'str'}, + 'sql_server': {'key': 'sqlServer', 'type': 'str'}, + 'sql_version': {'key': 'sqlVersion', 'type': 'str'}, + 'sql_edition': {'key': 'sqlEdition', 'type': 'str'}, + 'sql_instance': {'key': 'sqlInstance', 'type': 'str'}, + 'sql_database_name': {'key': 'sqlDatabaseName', 'type': 'str'}, + 'sql_database_size': {'key': 'sqlDatabaseSize', 'type': 'int'}, + } + + def __init__(self, *, version: str=None, service_type: int=None, service_account: str=None, sql_server: str=None, sql_version: str=None, sql_edition: str=None, sql_instance: str=None, sql_database_name: str=None, sql_database_size: int=None, **kwargs) -> None: + super(ServiceConfiguration, self).__init__(**kwargs) + self.version = version + self.service_type = service_type + self.service_account = service_account + self.sql_server = sql_server + self.sql_version = sql_version + self.sql_edition = sql_edition + self.sql_instance = sql_instance + self.sql_database_name = sql_database_name + self.sql_database_size = sql_database_size + + +class ServiceMember(Model): + """The server properties for a given service. + + :param service_member_id: The id of the server. + :type service_member_id: str + :param service_id: The service id to whom this server belongs. + :type service_id: str + :param tenant_id: The tenant id to whom this server belongs. + :type tenant_id: str + :param active_alerts: The total number of alerts that are currently active + for the server. + :type active_alerts: int + :param additional_information: The additional information, if any, for the + server. + :type additional_information: str + :param created_date: The date time , in UTC, when the server was onboarded + to Azure Active Directory Connect Health. + :type created_date: datetime + :param dimensions: The server specific configuration related dimensions. + :type dimensions: object + :param disabled: Indicates if the server is disabled or not. + :type disabled: bool + :param disabled_reason: The reason for disabling the server. + :type disabled_reason: int + :param installed_qfes: The list of installed QFEs for the server. + :type installed_qfes: object + :param last_disabled: The date and time , in UTC, when the server was last + disabled. + :type last_disabled: datetime + :param last_reboot: The date and time, in UTC, when the server was last + rebooted. + :type last_reboot: datetime + :param last_server_reported_monitoring_level_change: The date and time, in + UTC, when the server's data monitoring configuration was last changed. + :type last_server_reported_monitoring_level_change: datetime + :param last_updated: The date and time, in UTC, when the server properties + were last updated. + :type last_updated: datetime + :param machine_id: The id of the machine. + :type machine_id: str + :param machine_name: The name of the server. + :type machine_name: str + :param monitoring_configurations_computed: The monitoring configuration of + the server which determines what activities are monitored by Azure Active + Directory Connect Health. + :type monitoring_configurations_computed: object + :param monitoring_configurations_customized: The customized monitoring + configuration of the server which determines what activities are monitored + by Azure Active Directory Connect Health. + :type monitoring_configurations_customized: object + :param os_name: The name of the operating system installed in the machine. + :type os_name: str + :param os_version: The version of the operating system installed in the + machine. + :type os_version: str + :param properties: Server specific properties. + :type properties: object + :param recommended_qfes: The list of recommended hotfixes for the server. + :type recommended_qfes: object + :param resolved_alerts: The total count of alerts that are resolved for + this server. + :type resolved_alerts: int + :param role: The service role that is being monitored in the server. + :type role: str + :param server_reported_monitoring_level: The monitoring level reported by + the server. Possible values include: 'Partial', 'Full', 'Off' + :type server_reported_monitoring_level: str or + ~azure.mgmt.adhybridhealthservice.models.MonitoringLevel + :param status: The health status of the server. + :type status: str + """ + + _attribute_map = { + 'service_member_id': {'key': 'serviceMemberId', 'type': 'str'}, + 'service_id': {'key': 'serviceId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'active_alerts': {'key': 'activeAlerts', 'type': 'int'}, + 'additional_information': {'key': 'additionalInformation', 'type': 'str'}, + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'dimensions': {'key': 'dimensions', 'type': 'object'}, + 'disabled': {'key': 'disabled', 'type': 'bool'}, + 'disabled_reason': {'key': 'disabledReason', 'type': 'int'}, + 'installed_qfes': {'key': 'installedQfes', 'type': 'object'}, + 'last_disabled': {'key': 'lastDisabled', 'type': 'iso-8601'}, + 'last_reboot': {'key': 'lastReboot', 'type': 'iso-8601'}, + 'last_server_reported_monitoring_level_change': {'key': 'lastServerReportedMonitoringLevelChange', 'type': 'iso-8601'}, + 'last_updated': {'key': 'lastUpdated', 'type': 'iso-8601'}, + 'machine_id': {'key': 'machineId', 'type': 'str'}, + 'machine_name': {'key': 'machineName', 'type': 'str'}, + 'monitoring_configurations_computed': {'key': 'monitoringConfigurationsComputed', 'type': 'object'}, + 'monitoring_configurations_customized': {'key': 'monitoringConfigurationsCustomized', 'type': 'object'}, + 'os_name': {'key': 'osName', 'type': 'str'}, + 'os_version': {'key': 'osVersion', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'recommended_qfes': {'key': 'recommendedQfes', 'type': 'object'}, + 'resolved_alerts': {'key': 'resolvedAlerts', 'type': 'int'}, + 'role': {'key': 'role', 'type': 'str'}, + 'server_reported_monitoring_level': {'key': 'serverReportedMonitoringLevel', 'type': 'MonitoringLevel'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, *, service_member_id: str=None, service_id: str=None, tenant_id: str=None, active_alerts: int=None, additional_information: str=None, created_date=None, dimensions=None, disabled: bool=None, disabled_reason: int=None, installed_qfes=None, last_disabled=None, last_reboot=None, last_server_reported_monitoring_level_change=None, last_updated=None, machine_id: str=None, machine_name: str=None, monitoring_configurations_computed=None, monitoring_configurations_customized=None, os_name: str=None, os_version: str=None, properties=None, recommended_qfes=None, resolved_alerts: int=None, role: str=None, server_reported_monitoring_level=None, status: str=None, **kwargs) -> None: + super(ServiceMember, self).__init__(**kwargs) + self.service_member_id = service_member_id + self.service_id = service_id + self.tenant_id = tenant_id + self.active_alerts = active_alerts + self.additional_information = additional_information + self.created_date = created_date + self.dimensions = dimensions + self.disabled = disabled + self.disabled_reason = disabled_reason + self.installed_qfes = installed_qfes + self.last_disabled = last_disabled + self.last_reboot = last_reboot + self.last_server_reported_monitoring_level_change = last_server_reported_monitoring_level_change + self.last_updated = last_updated + self.machine_id = machine_id + self.machine_name = machine_name + self.monitoring_configurations_computed = monitoring_configurations_computed + self.monitoring_configurations_customized = monitoring_configurations_customized + self.os_name = os_name + self.os_version = os_version + self.properties = properties + self.recommended_qfes = recommended_qfes + self.resolved_alerts = resolved_alerts + self.role = role + self.server_reported_monitoring_level = server_reported_monitoring_level + self.status = status + + +class ServiceProperties(Model): + """The service properties for a given service. + + :param id: The id of the service. + :type id: str + :param active_alerts: The count of alerts that are currently active for + the service. + :type active_alerts: int + :param additional_information: The additional information related to the + service. + :type additional_information: str + :param created_date: The date and time, in UTC, when the service was + onboarded to Azure Active Directory Connect Health. + :type created_date: datetime + :param custom_notification_emails: The list of additional emails that are + configured to receive notifications about the service. + :type custom_notification_emails: list[str] + :param disabled: Indicates if the service is disabled or not. + :type disabled: bool + :param display_name: The display name of the service. + :type display_name: str + :param health: The health of the service. + :type health: str + :param last_disabled: The date and time, in UTC, when the service was last + disabled. + :type last_disabled: datetime + :param last_updated: The date or time , in UTC, when the service + properties were last updated. + :type last_updated: datetime + :param monitoring_configurations_computed: The monitoring configuration of + the service which determines what activities are monitored by Azure Active + Directory Connect Health. + :type monitoring_configurations_computed: object + :param monitoring_configurations_customized: The customized monitoring + configuration of the service which determines what activities are + monitored by Azure Active Directory Connect Health. + :type monitoring_configurations_customized: object + :param notification_email_enabled: Indicates if email notification is + enabled or not. + :type notification_email_enabled: bool + :param notification_email_enabled_for_global_admins: Indicates if email + notification is enabled for global administrators of the tenant. + :type notification_email_enabled_for_global_admins: bool + :param notification_emails_enabled_for_global_admins: Indicates if email + notification is enabled for global administrators of the tenant. + :type notification_emails_enabled_for_global_admins: bool + :param notification_emails: The list of emails to whom service + notifications will be sent. + :type notification_emails: list[str] + :param original_disabled_state: Gets the original disable state. + :type original_disabled_state: bool + :param resolved_alerts: The total count of alerts that has been resolved + for the service. + :type resolved_alerts: int + :param service_id: The id of the service. + :type service_id: str + :param service_name: The name of the service. + :type service_name: str + :param signature: The signature of the service. + :type signature: str + :param simple_properties: List of service specific configuration + properties. + :type simple_properties: object + :param tenant_id: The id of the tenant to which the service is registered + to. + :type tenant_id: str + :param type: The service type for the services onboarded to Azure Active + Directory Connect Health. Depending on whether the service is monitoring, + ADFS, Sync or ADDS roles, the service type can either be + AdFederationService or AadSyncService or AdDomainService. + :type type: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'active_alerts': {'key': 'activeAlerts', 'type': 'int'}, + 'additional_information': {'key': 'additionalInformation', 'type': 'str'}, + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'custom_notification_emails': {'key': 'customNotificationEmails', 'type': '[str]'}, + 'disabled': {'key': 'disabled', 'type': 'bool'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'health': {'key': 'health', 'type': 'str'}, + 'last_disabled': {'key': 'lastDisabled', 'type': 'iso-8601'}, + 'last_updated': {'key': 'lastUpdated', 'type': 'iso-8601'}, + 'monitoring_configurations_computed': {'key': 'monitoringConfigurationsComputed', 'type': 'object'}, + 'monitoring_configurations_customized': {'key': 'monitoringConfigurationsCustomized', 'type': 'object'}, + 'notification_email_enabled': {'key': 'notificationEmailEnabled', 'type': 'bool'}, + 'notification_email_enabled_for_global_admins': {'key': 'notificationEmailEnabledForGlobalAdmins', 'type': 'bool'}, + 'notification_emails_enabled_for_global_admins': {'key': 'notificationEmailsEnabledForGlobalAdmins', 'type': 'bool'}, + 'notification_emails': {'key': 'notificationEmails', 'type': '[str]'}, + 'original_disabled_state': {'key': 'originalDisabledState', 'type': 'bool'}, + 'resolved_alerts': {'key': 'resolvedAlerts', 'type': 'int'}, + 'service_id': {'key': 'serviceId', 'type': 'str'}, + 'service_name': {'key': 'serviceName', 'type': 'str'}, + 'signature': {'key': 'signature', 'type': 'str'}, + 'simple_properties': {'key': 'simpleProperties', 'type': 'object'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, active_alerts: int=None, additional_information: str=None, created_date=None, custom_notification_emails=None, disabled: bool=None, display_name: str=None, health: str=None, last_disabled=None, last_updated=None, monitoring_configurations_computed=None, monitoring_configurations_customized=None, notification_email_enabled: bool=None, notification_email_enabled_for_global_admins: bool=None, notification_emails_enabled_for_global_admins: bool=None, notification_emails=None, original_disabled_state: bool=None, resolved_alerts: int=None, service_id: str=None, service_name: str=None, signature: str=None, simple_properties=None, tenant_id: str=None, type: str=None, **kwargs) -> None: + super(ServiceProperties, self).__init__(**kwargs) + self.id = id + self.active_alerts = active_alerts + self.additional_information = additional_information + self.created_date = created_date + self.custom_notification_emails = custom_notification_emails + self.disabled = disabled + self.display_name = display_name + self.health = health + self.last_disabled = last_disabled + self.last_updated = last_updated + self.monitoring_configurations_computed = monitoring_configurations_computed + self.monitoring_configurations_customized = monitoring_configurations_customized + self.notification_email_enabled = notification_email_enabled + self.notification_email_enabled_for_global_admins = notification_email_enabled_for_global_admins + self.notification_emails_enabled_for_global_admins = notification_emails_enabled_for_global_admins + self.notification_emails = notification_emails + self.original_disabled_state = original_disabled_state + self.resolved_alerts = resolved_alerts + self.service_id = service_id + self.service_name = service_name + self.signature = signature + self.simple_properties = simple_properties + self.tenant_id = tenant_id + self.type = type + + +class TabularExportError(Model): + """The details for export error. + + :param service_id: The service Id. + :type service_id: str + :param service_member_id: The server Id. + :type service_member_id: str + :param merged_entity_id: The merged entity Id. + :type merged_entity_id: str + :param tabular_export_error_data: The export error data. + :type tabular_export_error_data: str + """ + + _attribute_map = { + 'service_id': {'key': 'serviceId', 'type': 'str'}, + 'service_member_id': {'key': 'serviceMemberId', 'type': 'str'}, + 'merged_entity_id': {'key': 'mergedEntityId', 'type': 'str'}, + 'tabular_export_error_data': {'key': 'tabularExportErrorData', 'type': 'str'}, + } + + def __init__(self, *, service_id: str=None, service_member_id: str=None, merged_entity_id: str=None, tabular_export_error_data: str=None, **kwargs) -> None: + super(TabularExportError, self).__init__(**kwargs) + self.service_id = service_id + self.service_member_id = service_member_id + self.merged_entity_id = merged_entity_id + self.tabular_export_error_data = tabular_export_error_data + + +class Tenant(Model): + """The details of the onboarded tenant. + + :param tenant_id: The Id of the tenant. + :type tenant_id: str + :param aad_license: The Azure Active Directory license of the tenant. + :type aad_license: str + :param aad_premium: Indicate if the tenant has Azure Active Directory + Premium license or not. + :type aad_premium: bool + :param agent_auto_update: Indicates if the tenant is configured to + automatically receive updates for Azure Active Directory Connect Health + client side features. + :type agent_auto_update: bool + :param alert_suppression_time_in_mins: The time in minutes after which an + alert will be auto-suppressed. + :type alert_suppression_time_in_mins: int + :param consented_to_microsoft_dev_ops: Indicates if the tenant data can be + seen by Microsoft through Azure portal. + :type consented_to_microsoft_dev_ops: bool + :param country_letter_code: The country letter code of the tenant. + :type country_letter_code: str + :param created_date: The date, in UTC, when the tenant was onboarded to + Azure Active Directory Connect Health. + :type created_date: datetime + :param dev_ops_ttl: The date and time, in UTC, till when the tenant data + can be seen by Microsoft through Azure portal. + :type dev_ops_ttl: datetime + :param disabled: Indicates if the tenant is disabled in Azure Active + Directory Connect Health. + :type disabled: bool + :param disabled_reason: The reason due to which the tenant was disabled in + Azure Active Directory Connect Health. + :type disabled_reason: int + :param global_admins_email: The list of global administrators for the + tenant. + :type global_admins_email: list[str] + :param initial_domain: The initial domain of the tenant. + :type initial_domain: str + :param last_disabled: The date and time, in UTC, when the tenant was last + disabled in Azure Active Directory Connect Health. + :type last_disabled: datetime + :param last_verified: The date and time, in UTC, when the tenant + onboarding status in Azure Active Directory Connect Health was last + verified. + :type last_verified: datetime + :param onboarding_allowed: Indicates if the tenant is allowed to onboard + to Azure Active Directory Connect Health. + :type onboarding_allowed: bool + :param onboarded: Indicates if the tenant is already onboarded to Azure + Active Directory Connect Health. + :type onboarded: bool + :param pks_certificate: The certificate associated with the tenant to + onboard data to Azure Active Directory Connect Health. + :type pks_certificate: object + :param private_preview_tenant: Indicates if the tenant has signed up for + private preview of Azure Active Directory Connect Health features. + :type private_preview_tenant: bool + :param tenant_in_quarantine: Indicates if data collection for this tenant + is disabled or not. + :type tenant_in_quarantine: bool + :param tenant_name: The name of the tenant. + :type tenant_name: str + """ + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'aad_license': {'key': 'aadLicense', 'type': 'str'}, + 'aad_premium': {'key': 'aadPremium', 'type': 'bool'}, + 'agent_auto_update': {'key': 'agentAutoUpdate', 'type': 'bool'}, + 'alert_suppression_time_in_mins': {'key': 'alertSuppressionTimeInMins', 'type': 'int'}, + 'consented_to_microsoft_dev_ops': {'key': 'consentedToMicrosoftDevOps', 'type': 'bool'}, + 'country_letter_code': {'key': 'countryLetterCode', 'type': 'str'}, + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'dev_ops_ttl': {'key': 'devOpsTtl', 'type': 'iso-8601'}, + 'disabled': {'key': 'disabled', 'type': 'bool'}, + 'disabled_reason': {'key': 'disabledReason', 'type': 'int'}, + 'global_admins_email': {'key': 'globalAdminsEmail', 'type': '[str]'}, + 'initial_domain': {'key': 'initialDomain', 'type': 'str'}, + 'last_disabled': {'key': 'lastDisabled', 'type': 'iso-8601'}, + 'last_verified': {'key': 'lastVerified', 'type': 'iso-8601'}, + 'onboarding_allowed': {'key': 'onboardingAllowed', 'type': 'bool'}, + 'onboarded': {'key': 'onboarded', 'type': 'bool'}, + 'pks_certificate': {'key': 'pksCertificate', 'type': 'object'}, + 'private_preview_tenant': {'key': 'privatePreviewTenant', 'type': 'bool'}, + 'tenant_in_quarantine': {'key': 'tenantInQuarantine', 'type': 'bool'}, + 'tenant_name': {'key': 'tenantName', 'type': 'str'}, + } + + def __init__(self, *, tenant_id: str=None, aad_license: str=None, aad_premium: bool=None, agent_auto_update: bool=None, alert_suppression_time_in_mins: int=None, consented_to_microsoft_dev_ops: bool=None, country_letter_code: str=None, created_date=None, dev_ops_ttl=None, disabled: bool=None, disabled_reason: int=None, global_admins_email=None, initial_domain: str=None, last_disabled=None, last_verified=None, onboarding_allowed: bool=None, onboarded: bool=None, pks_certificate=None, private_preview_tenant: bool=None, tenant_in_quarantine: bool=None, tenant_name: str=None, **kwargs) -> None: + super(Tenant, self).__init__(**kwargs) + self.tenant_id = tenant_id + self.aad_license = aad_license + self.aad_premium = aad_premium + self.agent_auto_update = agent_auto_update + self.alert_suppression_time_in_mins = alert_suppression_time_in_mins + self.consented_to_microsoft_dev_ops = consented_to_microsoft_dev_ops + self.country_letter_code = country_letter_code + self.created_date = created_date + self.dev_ops_ttl = dev_ops_ttl + self.disabled = disabled + self.disabled_reason = disabled_reason + self.global_admins_email = global_admins_email + self.initial_domain = initial_domain + self.last_disabled = last_disabled + self.last_verified = last_verified + self.onboarding_allowed = onboarding_allowed + self.onboarded = onboarded + self.pks_certificate = pks_certificate + self.private_preview_tenant = private_preview_tenant + self.tenant_in_quarantine = tenant_in_quarantine + self.tenant_name = tenant_name + + +class TenantOnboardingDetails(Model): + """The tenant onboarding details. + + :param tenant_onboarded: Indicates if the tenant is onboarded to Azure + Active Directory Connect Health or not. + :type tenant_onboarded: bool + :param onboarding_display_url: The display url, to help tenant navigate or + onboard to Azure Active Directory Connect Health blade, based on tenant + onboarding status. + :type onboarding_display_url: str + """ + + _attribute_map = { + 'tenant_onboarded': {'key': 'tenantOnboarded', 'type': 'bool'}, + 'onboarding_display_url': {'key': 'onboardingDisplayUrl', 'type': 'str'}, + } + + def __init__(self, *, tenant_onboarded: bool=None, onboarding_display_url: str=None, **kwargs) -> None: + super(TenantOnboardingDetails, self).__init__(**kwargs) + self.tenant_onboarded = tenant_onboarded + self.onboarding_display_url = onboarding_display_url + + +class UserPreference(Model): + """The user preference for a given feature. + + :param metric_names: The name of the metric. + :type metric_names: list[str] + """ + + _attribute_map = { + 'metric_names': {'key': 'metricNames', 'type': '[str]'}, + } + + def __init__(self, *, metric_names=None, **kwargs) -> None: + super(UserPreference, self).__init__(**kwargs) + self.metric_names = metric_names + + +class ValueDelta(Model): + """The value of the delta. + + :param operation_type: The operation type. Possible values include: + 'Undefined', 'Add', 'Update', 'Delete' + :type operation_type: str or + ~azure.mgmt.adhybridhealthservice.models.ValueDeltaOperationType + :param value: The value of the delta. + :type value: str + """ + + _attribute_map = { + 'operation_type': {'key': 'operationType', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, operation_type=None, value: str=None, **kwargs) -> None: + super(ValueDelta, self).__init__(**kwargs) + self.operation_type = operation_type + self.value = value diff --git a/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/models/_paged_models.py b/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/models/_paged_models.py new file mode 100644 index 000000000000..d73cd59bdd89 --- /dev/null +++ b/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/models/_paged_models.py @@ -0,0 +1,261 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class ServicePropertiesPaged(Paged): + """ + A paging container for iterating over a list of :class:`ServiceProperties ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServiceProperties]'} + } + + def __init__(self, *args, **kwargs): + + super(ServicePropertiesPaged, self).__init__(*args, **kwargs) +class ItemPaged(Paged): + """ + A paging container for iterating over a list of :class:`Item ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Item]'} + } + + def __init__(self, *args, **kwargs): + + super(ItemPaged, self).__init__(*args, **kwargs) +class MetricMetadataPaged(Paged): + """ + A paging container for iterating over a list of :class:`MetricMetadata ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[MetricMetadata]'} + } + + def __init__(self, *args, **kwargs): + + super(MetricMetadataPaged, self).__init__(*args, **kwargs) +class ReplicationSummaryPaged(Paged): + """ + A paging container for iterating over a list of :class:`ReplicationSummary ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ReplicationSummary]'} + } + + def __init__(self, *args, **kwargs): + + super(ReplicationSummaryPaged, self).__init__(*args, **kwargs) +class AlertPaged(Paged): + """ + A paging container for iterating over a list of :class:`Alert ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Alert]'} + } + + def __init__(self, *args, **kwargs): + + super(AlertPaged, self).__init__(*args, **kwargs) +class DimensionPaged(Paged): + """ + A paging container for iterating over a list of :class:`Dimension ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Dimension]'} + } + + def __init__(self, *args, **kwargs): + + super(DimensionPaged, self).__init__(*args, **kwargs) +class AddsServiceMemberPaged(Paged): + """ + A paging container for iterating over a list of :class:`AddsServiceMember ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AddsServiceMember]'} + } + + def __init__(self, *args, **kwargs): + + super(AddsServiceMemberPaged, self).__init__(*args, **kwargs) +class CredentialPaged(Paged): + """ + A paging container for iterating over a list of :class:`Credential ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Credential]'} + } + + def __init__(self, *args, **kwargs): + + super(CredentialPaged, self).__init__(*args, **kwargs) +class ServiceMemberPaged(Paged): + """ + A paging container for iterating over a list of :class:`ServiceMember ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServiceMember]'} + } + + def __init__(self, *args, **kwargs): + + super(ServiceMemberPaged, self).__init__(*args, **kwargs) +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) +class ErrorCountPaged(Paged): + """ + A paging container for iterating over a list of :class:`ErrorCount ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ErrorCount]'} + } + + def __init__(self, *args, **kwargs): + + super(ErrorCountPaged, self).__init__(*args, **kwargs) +class MergedExportErrorPaged(Paged): + """ + A paging container for iterating over a list of :class:`MergedExportError ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[MergedExportError]'} + } + + def __init__(self, *args, **kwargs): + + super(MergedExportErrorPaged, self).__init__(*args, **kwargs) +class ExportStatusPaged(Paged): + """ + A paging container for iterating over a list of :class:`ExportStatus ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ExportStatus]'} + } + + def __init__(self, *args, **kwargs): + + super(ExportStatusPaged, self).__init__(*args, **kwargs) +class AlertFeedbackPaged(Paged): + """ + A paging container for iterating over a list of :class:`AlertFeedback ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AlertFeedback]'} + } + + def __init__(self, *args, **kwargs): + + super(AlertFeedbackPaged, self).__init__(*args, **kwargs) +class ErrorReportUsersEntryPaged(Paged): + """ + A paging container for iterating over a list of :class:`ErrorReportUsersEntry ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ErrorReportUsersEntry]'} + } + + def __init__(self, *args, **kwargs): + + super(ErrorReportUsersEntryPaged, self).__init__(*args, **kwargs) +class RiskyIPBlobUriPaged(Paged): + """ + A paging container for iterating over a list of :class:`RiskyIPBlobUri ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RiskyIPBlobUri]'} + } + + def __init__(self, *args, **kwargs): + + super(RiskyIPBlobUriPaged, self).__init__(*args, **kwargs) +class ConnectorPaged(Paged): + """ + A paging container for iterating over a list of :class:`Connector ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Connector]'} + } + + def __init__(self, *args, **kwargs): + + super(ConnectorPaged, self).__init__(*args, **kwargs) +class GlobalConfigurationPaged(Paged): + """ + A paging container for iterating over a list of :class:`GlobalConfiguration ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[GlobalConfiguration]'} + } + + def __init__(self, *args, **kwargs): + + super(GlobalConfigurationPaged, self).__init__(*args, **kwargs) +class IPAddressAggregatePaged(Paged): + """ + A paging container for iterating over a list of :class:`IPAddressAggregate ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[IPAddressAggregate]'} + } + + def __init__(self, *args, **kwargs): + + super(IPAddressAggregatePaged, self).__init__(*args, **kwargs) diff --git a/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/__init__.py b/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/__init__.py new file mode 100644 index 000000000000..cc8f4c7a3c63 --- /dev/null +++ b/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/__init__.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from ._adds_services_operations import AddsServicesOperations +from ._alerts_operations import AlertsOperations +from ._configuration_operations import ConfigurationOperations +from ._dimensions_operations import DimensionsOperations +from ._adds_service_members_operations import AddsServiceMembersOperations +from ._ad_domain_service_members_operations import AdDomainServiceMembersOperations +from ._adds_services_user_preference_operations import AddsServicesUserPreferenceOperations +from ._adds_service_operations import AddsServiceOperations +from ._adds_services_replication_status_operations import AddsServicesReplicationStatusOperations +from ._adds_services_service_members_operations import AddsServicesServiceMembersOperations +from ._operations import Operations +from ._reports_operations import ReportsOperations +from ._services_operations import ServicesOperations +from ._service_operations import ServiceOperations +from ._service_members_operations import ServiceMembersOperations +from ._list_operations import ListOperations +from ._update_operations import UpdateOperations + +__all__ = [ + 'AddsServicesOperations', + 'AlertsOperations', + 'ConfigurationOperations', + 'DimensionsOperations', + 'AddsServiceMembersOperations', + 'AdDomainServiceMembersOperations', + 'AddsServicesUserPreferenceOperations', + 'AddsServiceOperations', + 'AddsServicesReplicationStatusOperations', + 'AddsServicesServiceMembersOperations', + 'Operations', + 'ReportsOperations', + 'ServicesOperations', + 'ServiceOperations', + 'ServiceMembersOperations', + 'ListOperations', + 'UpdateOperations', +] diff --git a/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_ad_domain_service_members_operations.py b/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_ad_domain_service_members_operations.py new file mode 100644 index 000000000000..4deef7343512 --- /dev/null +++ b/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_ad_domain_service_members_operations.py @@ -0,0 +1,132 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class AdDomainServiceMembersOperations(object): + """AdDomainServiceMembersOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar next_partition_key: The next partition key to query for. Constant value: "". + :ivar next_row_key: The next row key to query for. Constant value: "". + :ivar api_version: The version of the API to be used with the client request. Constant value: "2014-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.next_partition_key = "" + self.next_row_key = "" + self.api_version = "2014-01-01" + + self.config = config + + def list( + self, service_name, is_groupby_site, filter=None, query=None, take_count=None, custom_headers=None, raw=False, **operation_config): + """Gets the details of the servers, for a given Active Directory Domain + Service, that are onboarded to Azure Active Directory Connect Health. + + :param service_name: The name of the service. + :type service_name: str + :param is_groupby_site: Indicates if the result should be grouped by + site or not. + :type is_groupby_site: bool + :param filter: The server property filter to apply. + :type filter: str + :param query: The custom query. + :type query: str + :param take_count: The take count , which specifies the number of + elements that can be returned from a sequence. + :type take_count: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AddsServiceMember + :rtype: + ~azure.mgmt.adhybridhealthservice.models.AddsServiceMemberPaged[~azure.mgmt.adhybridhealthservice.models.AddsServiceMember] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + query_parameters['isGroupbySite'] = self._serialize.query("is_groupby_site", is_groupby_site, 'bool') + if query is not None: + query_parameters['query'] = self._serialize.query("query", query, 'str') + query_parameters['nextPartitionKey'] = self._serialize.query("self.next_partition_key", self.next_partition_key, 'str') + query_parameters['nextRowKey'] = self._serialize.query("self.next_row_key", self.next_row_key, 'str') + if take_count is not None: + query_parameters['takeCount'] = self._serialize.query("take_count", take_count, 'int') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AddsServiceMemberPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/addomainservicemembers'} diff --git a/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_adds_service_members_operations.py b/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_adds_service_members_operations.py new file mode 100644 index 000000000000..aa2cc5567248 --- /dev/null +++ b/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_adds_service_members_operations.py @@ -0,0 +1,312 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class AddsServiceMembersOperations(object): + """AddsServiceMembersOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The version of the API to be used with the client request. Constant value: "2014-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2014-01-01" + + self.config = config + + def list( + self, service_name, filter=None, custom_headers=None, raw=False, **operation_config): + """Gets the details of the Active Directory Domain servers, for a given + Active Directory Domain Service, that are onboarded to Azure Active + Directory Connect Health. + + :param service_name: The name of the service. + :type service_name: str + :param filter: The server property filter to apply. + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AddsServiceMember + :rtype: + ~azure.mgmt.adhybridhealthservice.models.AddsServiceMemberPaged[~azure.mgmt.adhybridhealthservice.models.AddsServiceMember] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AddsServiceMemberPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/addsservicemembers'} + + def get( + self, service_name, service_member_id, custom_headers=None, raw=False, **operation_config): + """Gets the details of a server, for a given Active Directory Domain + Controller service, that are onboarded to Azure Active Directory + Connect Health Service. + + :param service_name: The name of the service. + :type service_name: str + :param service_member_id: The server Id. + :type service_member_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ServiceMember or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.adhybridhealthservice.models.ServiceMember or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'serviceMemberId': self._serialize.url("service_member_id", service_member_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ServiceMember', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/servicemembers/{serviceMemberId}'} + + def delete( + self, service_name, service_member_id, confirm=None, custom_headers=None, raw=False, **operation_config): + """Deletes a Active Directory Domain Controller server that has been + onboarded to Azure Active Directory Connect Health Service. + + :param service_name: The name of the service. + :type service_name: str + :param service_member_id: The server Id. + :type service_member_id: str + :param confirm: Indicates if the server will be permanently deleted or + disabled. True indicates that the server will be permanently deleted + and False indicates that the server will be marked disabled and then + deleted after 30 days, if it is not re-registered. + :type confirm: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'serviceMemberId': self._serialize.url("service_member_id", service_member_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if confirm is not None: + query_parameters['confirm'] = self._serialize.query("confirm", confirm, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/servicemembers/{serviceMemberId}'} + + def list_credentials( + self, service_name, service_member_id, filter=None, custom_headers=None, raw=False, **operation_config): + """Gets the credentials of the server which is needed by the agent to + connect to Azure Active Directory Connect Health Service. + + :param service_name: The name of the service. + :type service_name: str + :param service_member_id: The server Id. + :type service_member_id: str + :param filter: The property filter to apply. + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Credential + :rtype: + ~azure.mgmt.adhybridhealthservice.models.CredentialPaged[~azure.mgmt.adhybridhealthservice.models.Credential] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_credentials.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'serviceMemberId': self._serialize.url("service_member_id", service_member_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CredentialPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_credentials.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/servicemembers/{serviceMemberId}/credentials'} diff --git a/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_adds_service_operations.py b/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_adds_service_operations.py new file mode 100644 index 000000000000..a53f6ae2076b --- /dev/null +++ b/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_adds_service_operations.py @@ -0,0 +1,116 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class AddsServiceOperations(object): + """AddsServiceOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The version of the API to be used with the client request. Constant value: "2014-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2014-01-01" + + self.config = config + + def get_metrics( + self, service_name, metric_name, group_name, group_key=None, from_date=None, to_date=None, custom_headers=None, raw=False, **operation_config): + """Gets the server related metrics for a given metric and group + combination. + + :param service_name: The name of the service. + :type service_name: str + :param metric_name: The metric name + :type metric_name: str + :param group_name: The group name + :type group_name: str + :param group_key: The group key + :type group_key: str + :param from_date: The start date. + :type from_date: datetime + :param to_date: The end date. + :type to_date: datetime + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MetricSets or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.adhybridhealthservice.models.MetricSets or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_metrics.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'metricName': self._serialize.url("metric_name", metric_name, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if group_key is not None: + query_parameters['groupKey'] = self._serialize.query("group_key", group_key, 'str') + if from_date is not None: + query_parameters['fromDate'] = self._serialize.query("from_date", from_date, 'iso-8601') + if to_date is not None: + query_parameters['toDate'] = self._serialize.query("to_date", to_date, 'iso-8601') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MetricSets', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_metrics.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/metrics/{metricName}/groups/{groupName}'} diff --git a/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_adds_services_operations.py b/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_adds_services_operations.py new file mode 100644 index 000000000000..4877a1246fc1 --- /dev/null +++ b/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_adds_services_operations.py @@ -0,0 +1,1134 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class AddsServicesOperations(object): + """AddsServicesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The version of the API to be used with the client request. Constant value: "2014-01-01". + :ivar next_partition_key: The next partition key to query for. Constant value: "". + :ivar next_row_key: The next row key to query for. Constant value: "". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2014-01-01" + self.next_partition_key = "" + self.next_row_key = "" + + self.config = config + + def list( + self, filter=None, service_type=None, skip_count=None, take_count=None, custom_headers=None, raw=False, **operation_config): + """Gets the details of Active Directory Domain Service, for a tenant, that + are onboarded to Azure Active Directory Connect Health. + + :param filter: The service property filter to apply. + :type filter: str + :param service_type: The service type for the services onboarded to + Azure Active Directory Connect Health. Depending on whether the + service is monitoring, ADFS, Sync or ADDS roles, the service type can + either be AdFederationService or AadSyncService or AdDomainService. + :type service_type: str + :param skip_count: The skip count, which specifies the number of + elements that can be bypassed from a sequence and then return the + remaining elements. + :type skip_count: int + :param take_count: The take count , which specifies the number of + elements that can be returned from a sequence. + :type take_count: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ServiceProperties + :rtype: + ~azure.mgmt.adhybridhealthservice.models.ServicePropertiesPaged[~azure.mgmt.adhybridhealthservice.models.ServiceProperties] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if service_type is not None: + query_parameters['serviceType'] = self._serialize.query("service_type", service_type, 'str') + if skip_count is not None: + query_parameters['skipCount'] = self._serialize.query("skip_count", skip_count, 'int') + if take_count is not None: + query_parameters['takeCount'] = self._serialize.query("take_count", take_count, 'int') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ServicePropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/addsservices'} + + def add( + self, service, custom_headers=None, raw=False, **operation_config): + """Onboards a service for a given tenant in Azure Active Directory Connect + Health. + + :param service: The service object. + :type service: + ~azure.mgmt.adhybridhealthservice.models.ServiceProperties + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ServiceProperties or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.adhybridhealthservice.models.ServiceProperties or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.add.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(service, 'ServiceProperties') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ServiceProperties', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + add.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/addsservices'} + + def get( + self, service_name, custom_headers=None, raw=False, **operation_config): + """Gets the details of an Active Directory Domain Service for a tenant + having Azure AD Premium license and is onboarded to Azure Active + Directory Connect Health. + + :param service_name: The name of the service. + :type service_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ServiceProperties or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.adhybridhealthservice.models.ServiceProperties or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ServiceProperties', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}'} + + def delete( + self, service_name, confirm=None, custom_headers=None, raw=False, **operation_config): + """Deletes an Active Directory Domain Service which is onboarded to Azure + Active Directory Connect Health. + + :param service_name: The name of the service which needs to be + deleted. + :type service_name: str + :param confirm: Indicates if the service will be permanently deleted + or disabled. True indicates that the service will be permanently + deleted and False indicates that the service will be marked disabled + and then deleted after 30 days, if it is not re-registered. + :type confirm: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if confirm is not None: + query_parameters['confirm'] = self._serialize.query("confirm", confirm, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}'} + + def update( + self, service_name, service, custom_headers=None, raw=False, **operation_config): + """Updates an Active Directory Domain Service properties of an onboarded + service. + + :param service_name: The name of the service which needs to be + deleted. + :type service_name: str + :param service: The service object. + :type service: + ~azure.mgmt.adhybridhealthservice.models.ServiceProperties + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ServiceProperties or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.adhybridhealthservice.models.ServiceProperties or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(service, 'ServiceProperties') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ServiceProperties', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}'} + + def get_forest_summary( + self, service_name, custom_headers=None, raw=False, **operation_config): + """Gets the forest summary for a given Active Directory Domain Service, + that is onboarded to Azure Active Directory Connect Health. + + :param service_name: The name of the service. + :type service_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ForestSummary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.adhybridhealthservice.models.ForestSummary or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_forest_summary.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ForestSummary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_forest_summary.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/forestsummary'} + + def list_metrics_average( + self, service_name, metric_name, group_name, custom_headers=None, raw=False, **operation_config): + """Gets the average of the metric values for a given metric and group + combination. + + :param service_name: The name of the service. + :type service_name: str + :param metric_name: The metric name + :type metric_name: str + :param group_name: The group name + :type group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Item + :rtype: + ~azure.mgmt.adhybridhealthservice.models.ItemPaged[~azure.mgmt.adhybridhealthservice.models.Item] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_metrics_average.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'metricName': self._serialize.url("metric_name", metric_name, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ItemPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_metrics_average.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/metrics/{metricName}/groups/{groupName}/average'} + + def list_metrics_sum( + self, service_name, metric_name, group_name, custom_headers=None, raw=False, **operation_config): + """Gets the sum of the metric values for a given metric and group + combination. + + :param service_name: The name of the service. + :type service_name: str + :param metric_name: The metric name + :type metric_name: str + :param group_name: The group name + :type group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Item + :rtype: + ~azure.mgmt.adhybridhealthservice.models.ItemPaged[~azure.mgmt.adhybridhealthservice.models.Item] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_metrics_sum.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'metricName': self._serialize.url("metric_name", metric_name, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ItemPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_metrics_sum.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/metrics/{metricName}/groups/{groupName}/sum'} + + def list_metric_metadata( + self, service_name, filter=None, perf_counter=None, custom_headers=None, raw=False, **operation_config): + """Gets the service related metrics information. + + :param service_name: The name of the service. + :type service_name: str + :param filter: The metric metadata property filter to apply. + :type filter: str + :param perf_counter: Indicates if only performance counter metrics are + requested. + :type perf_counter: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of MetricMetadata + :rtype: + ~azure.mgmt.adhybridhealthservice.models.MetricMetadataPaged[~azure.mgmt.adhybridhealthservice.models.MetricMetadata] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_metric_metadata.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if perf_counter is not None: + query_parameters['perfCounter'] = self._serialize.query("perf_counter", perf_counter, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.MetricMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_metric_metadata.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/metricmetadata'} + + def get_metric_metadata( + self, service_name, metric_name, custom_headers=None, raw=False, **operation_config): + """Gets the service related metric information. + + :param service_name: The name of the service. + :type service_name: str + :param metric_name: The metric name + :type metric_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MetricMetadata or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.adhybridhealthservice.models.MetricMetadata or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_metric_metadata.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'metricName': self._serialize.url("metric_name", metric_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MetricMetadata', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_metric_metadata.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/metricmetadata/{metricName}'} + + def get_metric_metadata_for_group( + self, service_name, metric_name, group_name, group_key=None, from_date=None, to_date=None, custom_headers=None, raw=False, **operation_config): + """Gets the service related metrics for a given metric and group + combination. + + :param service_name: The name of the service. + :type service_name: str + :param metric_name: The metric name + :type metric_name: str + :param group_name: The group name + :type group_name: str + :param group_key: The group key + :type group_key: str + :param from_date: The start date. + :type from_date: datetime + :param to_date: The end date. + :type to_date: datetime + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MetricSets or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.adhybridhealthservice.models.MetricSets or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_metric_metadata_for_group.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'metricName': self._serialize.url("metric_name", metric_name, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if group_key is not None: + query_parameters['groupKey'] = self._serialize.query("group_key", group_key, 'str') + if from_date is not None: + query_parameters['fromDate'] = self._serialize.query("from_date", from_date, 'iso-8601') + if to_date is not None: + query_parameters['toDate'] = self._serialize.query("to_date", to_date, 'iso-8601') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MetricSets', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_metric_metadata_for_group.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/metricmetadata/{metricName}/groups/{groupName}'} + + def list_replication_details( + self, service_name, filter=None, with_details=None, custom_headers=None, raw=False, **operation_config): + """Gets complete domain controller list along with replication details for + a given Active Directory Domain Service, that is onboarded to Azure + Active Directory Connect Health. + + :param service_name: The name of the service. + :type service_name: str + :param filter: The server property filter to apply. + :type filter: str + :param with_details: Indicates if InboundReplicationNeighbor details + are required or not. + :type with_details: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ReplicationSummary + :rtype: + ~azure.mgmt.adhybridhealthservice.models.ReplicationSummaryPaged[~azure.mgmt.adhybridhealthservice.models.ReplicationSummary] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_replication_details.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if with_details is not None: + query_parameters['withDetails'] = self._serialize.query("with_details", with_details, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ReplicationSummaryPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_replication_details.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/replicationdetails'} + + def list_replication_summary( + self, service_name, is_groupby_site, query, filter=None, take_count=None, custom_headers=None, raw=False, **operation_config): + """Gets complete domain controller list along with replication details for + a given Active Directory Domain Service, that is onboarded to Azure + Active Directory Connect Health. + + :param service_name: The name of the service. + :type service_name: str + :param is_groupby_site: Indicates if the result should be grouped by + site or not. + :type is_groupby_site: bool + :param query: The custom query. + :type query: str + :param filter: The server property filter to apply. + :type filter: str + :param take_count: The take count , which specifies the number of + elements that can be returned from a sequence. + :type take_count: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ReplicationSummary + :rtype: + ~azure.mgmt.adhybridhealthservice.models.ReplicationSummaryPaged[~azure.mgmt.adhybridhealthservice.models.ReplicationSummary] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_replication_summary.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + query_parameters['isGroupbySite'] = self._serialize.query("is_groupby_site", is_groupby_site, 'bool') + query_parameters['query'] = self._serialize.query("query", query, 'str') + query_parameters['nextPartitionKey'] = self._serialize.query("self.next_partition_key", self.next_partition_key, 'str') + query_parameters['nextRowKey'] = self._serialize.query("self.next_row_key", self.next_row_key, 'str') + if take_count is not None: + query_parameters['takeCount'] = self._serialize.query("take_count", take_count, 'int') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ReplicationSummaryPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_replication_summary.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/replicationsummary'} + + def list_server_alerts( + self, service_member_id, service_name, filter=None, state=None, from_parameter=None, to=None, custom_headers=None, raw=False, **operation_config): + """Gets the details of an alert for a given Active Directory Domain + Controller service and server combination. + + :param service_member_id: The server Id for which the alert details + needs to be queried. + :type service_member_id: str + :param service_name: The name of the service. + :type service_name: str + :param filter: The alert property filter to apply. + :type filter: str + :param state: The alert state to query for. + :type state: str + :param from_parameter: The start date to query for. + :type from_parameter: datetime + :param to: The end date till when to query for. + :type to: datetime + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Alert + :rtype: + ~azure.mgmt.adhybridhealthservice.models.AlertPaged[~azure.mgmt.adhybridhealthservice.models.Alert] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_server_alerts.metadata['url'] + path_format_arguments = { + 'serviceMemberId': self._serialize.url("service_member_id", service_member_id, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if state is not None: + query_parameters['state'] = self._serialize.query("state", state, 'str') + if from_parameter is not None: + query_parameters['from'] = self._serialize.query("from_parameter", from_parameter, 'iso-8601') + if to is not None: + query_parameters['to'] = self._serialize.query("to", to, 'iso-8601') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AlertPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_server_alerts.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/servicemembers/{serviceMemberId}/alerts'} + + def list_premium_services( + self, filter=None, service_type=None, skip_count=None, take_count=None, custom_headers=None, raw=False, **operation_config): + """Gets the details of Active Directory Domain Services for a tenant + having Azure AD Premium license and is onboarded to Azure Active + Directory Connect Health. + + :param filter: The service property filter to apply. + :type filter: str + :param service_type: The service type for the services onboarded to + Azure Active Directory Connect Health. Depending on whether the + service is monitoring, ADFS, Sync or ADDS roles, the service type can + either be AdFederationService or AadSyncService or AdDomainService. + :type service_type: str + :param skip_count: The skip count, which specifies the number of + elements that can be bypassed from a sequence and then return the + remaining elements. + :type skip_count: int + :param take_count: The take count , which specifies the number of + elements that can be returned from a sequence. + :type take_count: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ServiceProperties + :rtype: + ~azure.mgmt.adhybridhealthservice.models.ServicePropertiesPaged[~azure.mgmt.adhybridhealthservice.models.ServiceProperties] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_premium_services.metadata['url'] + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if service_type is not None: + query_parameters['serviceType'] = self._serialize.query("service_type", service_type, 'str') + if skip_count is not None: + query_parameters['skipCount'] = self._serialize.query("skip_count", skip_count, 'int') + if take_count is not None: + query_parameters['takeCount'] = self._serialize.query("take_count", take_count, 'int') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ServicePropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_premium_services.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/addsservices/premiumCheck'} diff --git a/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_adds_services_replication_status_operations.py b/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_adds_services_replication_status_operations.py new file mode 100644 index 000000000000..8d5c9b56f0ce --- /dev/null +++ b/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_adds_services_replication_status_operations.py @@ -0,0 +1,98 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class AddsServicesReplicationStatusOperations(object): + """AddsServicesReplicationStatusOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The version of the API to be used with the client request. Constant value: "2014-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2014-01-01" + + self.config = config + + def get( + self, service_name, custom_headers=None, raw=False, **operation_config): + """Gets Replication status for a given Active Directory Domain Service, + that is onboarded to Azure Active Directory Connect Health. + + :param service_name: The name of the service. + :type service_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ReplicationStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.adhybridhealthservice.models.ReplicationStatus or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ReplicationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/replicationstatus'} diff --git a/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_adds_services_service_members_operations.py b/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_adds_services_service_members_operations.py new file mode 100644 index 000000000000..2f853869b803 --- /dev/null +++ b/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_adds_services_service_members_operations.py @@ -0,0 +1,188 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class AddsServicesServiceMembersOperations(object): + """AddsServicesServiceMembersOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The version of the API to be used with the client request. Constant value: "2014-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2014-01-01" + + self.config = config + + def list( + self, service_name, filter=None, dimension_type=None, dimension_signature=None, custom_headers=None, raw=False, **operation_config): + """Gets the details of the servers, for a given Active Directory Domain + Controller service, that are onboarded to Azure Active Directory + Connect Health Service. + + :param service_name: The name of the service. + :type service_name: str + :param filter: The server property filter to apply. + :type filter: str + :param dimension_type: The server specific dimension. + :type dimension_type: str + :param dimension_signature: The value of the dimension. + :type dimension_signature: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ServiceMember + :rtype: + ~azure.mgmt.adhybridhealthservice.models.ServiceMemberPaged[~azure.mgmt.adhybridhealthservice.models.ServiceMember] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if dimension_type is not None: + query_parameters['dimensionType'] = self._serialize.query("dimension_type", dimension_type, 'str') + if dimension_signature is not None: + query_parameters['dimensionSignature'] = self._serialize.query("dimension_signature", dimension_signature, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ServiceMemberPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/servicemembers'} + + def add( + self, service_name, service_member, custom_headers=None, raw=False, **operation_config): + """Onboards a server, for a given Active Directory Domain Controller + service, to Azure Active Directory Connect Health Service. + + :param service_name: The name of the service under which the server is + to be onboarded. + :type service_name: str + :param service_member: The server object. + :type service_member: + ~azure.mgmt.adhybridhealthservice.models.ServiceMember + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ServiceMember or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.adhybridhealthservice.models.ServiceMember or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.add.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(service_member, 'ServiceMember') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ServiceMember', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + add.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/servicemembers'} diff --git a/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_adds_services_user_preference_operations.py b/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_adds_services_user_preference_operations.py new file mode 100644 index 000000000000..4fb355b9a04f --- /dev/null +++ b/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_adds_services_user_preference_operations.py @@ -0,0 +1,212 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class AddsServicesUserPreferenceOperations(object): + """AddsServicesUserPreferenceOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The version of the API to be used with the client request. Constant value: "2014-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2014-01-01" + + self.config = config + + def get( + self, service_name, feature_name, custom_headers=None, raw=False, **operation_config): + """Gets the user preferences for a given feature. + + :param service_name: The name of the service. + :type service_name: str + :param feature_name: The name of the feature. + :type feature_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: UserPreference or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.adhybridhealthservice.models.UserPreference or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'featureName': self._serialize.url("feature_name", feature_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('UserPreference', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/features/{featureName}/userpreference'} + + def delete( + self, service_name, feature_name, custom_headers=None, raw=False, **operation_config): + """Deletes the user preferences for a given feature. + + :param service_name: The name of the service. + :type service_name: str + :param feature_name: The name of the feature. + :type feature_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'featureName': self._serialize.url("feature_name", feature_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/features/{featureName}/userpreference'} + + def add( + self, service_name, feature_name, metric_names=None, custom_headers=None, raw=False, **operation_config): + """Adds the user preferences for a given feature. + + :param service_name: The name of the service. + :type service_name: str + :param feature_name: The name of the feature. + :type feature_name: str + :param metric_names: The name of the metric. + :type metric_names: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + setting = models.UserPreference(metric_names=metric_names) + + # Construct URL + url = self.add.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'featureName': self._serialize.url("feature_name", feature_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(setting, 'UserPreference') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + add.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/features/{featureName}/userpreference'} diff --git a/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_alerts_operations.py b/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_alerts_operations.py new file mode 100644 index 000000000000..d1c2172038ba --- /dev/null +++ b/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_alerts_operations.py @@ -0,0 +1,124 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class AlertsOperations(object): + """AlertsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The version of the API to be used with the client request. Constant value: "2014-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2014-01-01" + + self.config = config + + def list_adds_alerts( + self, service_name, filter=None, state=None, from_parameter=None, to=None, custom_headers=None, raw=False, **operation_config): + """Gets the alerts for a given Active Directory Domain Service. + + :param service_name: The name of the service. + :type service_name: str + :param filter: The alert property filter to apply. + :type filter: str + :param state: The alert state to query for. + :type state: str + :param from_parameter: The start date to query for. + :type from_parameter: datetime + :param to: The end date till when to query for. + :type to: datetime + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Alert + :rtype: + ~azure.mgmt.adhybridhealthservice.models.AlertPaged[~azure.mgmt.adhybridhealthservice.models.Alert] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_adds_alerts.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if state is not None: + query_parameters['state'] = self._serialize.query("state", state, 'str') + if from_parameter is not None: + query_parameters['from'] = self._serialize.query("from_parameter", from_parameter, 'iso-8601') + if to is not None: + query_parameters['to'] = self._serialize.query("to", to, 'iso-8601') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AlertPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_adds_alerts.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/alerts'} diff --git a/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_configuration_operations.py b/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_configuration_operations.py new file mode 100644 index 000000000000..90051861e656 --- /dev/null +++ b/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_configuration_operations.py @@ -0,0 +1,273 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ConfigurationOperations(object): + """ConfigurationOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The version of the API to be used with the client request. Constant value: "2014-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2014-01-01" + + self.config = config + + def list_adds_configurations( + self, service_name, grouping=None, custom_headers=None, raw=False, **operation_config): + """Gets the service configurations. + + :param service_name: The name of the service. + :type service_name: str + :param grouping: The grouping for configurations. + :type grouping: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Item + :rtype: + ~azure.mgmt.adhybridhealthservice.models.ItemPaged[~azure.mgmt.adhybridhealthservice.models.Item] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_adds_configurations.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if grouping is not None: + query_parameters['grouping'] = self._serialize.query("grouping", grouping, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ItemPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_adds_configurations.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/configuration'} + + def add( + self, custom_headers=None, raw=False, **operation_config): + """Onboards a tenant in Azure Active Directory Connect Health. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Tenant or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.adhybridhealthservice.models.Tenant or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.add.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Tenant', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + add.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/configuration'} + + def get( + self, custom_headers=None, raw=False, **operation_config): + """Gets the details of a tenant onboarded to Azure Active Directory + Connect Health. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Tenant or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.adhybridhealthservice.models.Tenant or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Tenant', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/configuration'} + + def update( + self, tenant, custom_headers=None, raw=False, **operation_config): + """Updates tenant properties for tenants onboarded to Azure Active + Directory Connect Health. + + :param tenant: The tenant object with the properties set to the + updated value. + :type tenant: ~azure.mgmt.adhybridhealthservice.models.Tenant + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Tenant or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.adhybridhealthservice.models.Tenant or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(tenant, 'Tenant') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Tenant', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/configuration'} diff --git a/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_dimensions_operations.py b/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_dimensions_operations.py new file mode 100644 index 000000000000..df92123e5ac9 --- /dev/null +++ b/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_dimensions_operations.py @@ -0,0 +1,111 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class DimensionsOperations(object): + """DimensionsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The version of the API to be used with the client request. Constant value: "2014-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2014-01-01" + + self.config = config + + def list_adds_dimensions( + self, service_name, dimension, custom_headers=None, raw=False, **operation_config): + """Gets the dimensions for a given dimension type in a server. + + :param service_name: The name of the service. + :type service_name: str + :param dimension: The dimension type. + :type dimension: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Dimension + :rtype: + ~azure.mgmt.adhybridhealthservice.models.DimensionPaged[~azure.mgmt.adhybridhealthservice.models.Dimension] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_adds_dimensions.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'dimension': self._serialize.url("dimension", dimension, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DimensionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_adds_dimensions.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/dimensions/{dimension}'} diff --git a/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_list_operations.py b/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_list_operations.py new file mode 100644 index 000000000000..23d0a4bcaceb --- /dev/null +++ b/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_list_operations.py @@ -0,0 +1,171 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ListOperations(object): + """ListOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The version of the API to be used with the client request. Constant value: "2014-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2014-01-01" + + self.config = config + + def ip_address_aggregates_by_service( + self, service_name, skiptoken=None, custom_headers=None, raw=False, **operation_config): + """Gets the IP address aggregates for a given service. + + :param service_name: The name of the service. + :type service_name: str + :param skiptoken: A continuationtoken value returned in paginated + result to load different pages. + :type skiptoken: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of IPAddressAggregate + :rtype: + ~azure.mgmt.adhybridhealthservice.models.IPAddressAggregatePaged[~azure.mgmt.adhybridhealthservice.models.IPAddressAggregate] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.ip_address_aggregates_by_service.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if skiptoken is not None: + query_parameters['skiptoken'] = self._serialize.query("skiptoken", skiptoken, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.IPAddressAggregatePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + ip_address_aggregates_by_service.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/services/{serviceName}/ipAddressAggregates'} + + def ip_address_aggregate_settings( + self, service_name, custom_headers=None, raw=False, **operation_config): + """Gets the IP address aggregate settings. + + :param service_name: The name of the service. + :type service_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IPAddressAggregateSetting or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.adhybridhealthservice.models.IPAddressAggregateSetting or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.ip_address_aggregate_settings.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IPAddressAggregateSetting', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + ip_address_aggregate_settings.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/services/{serviceName}/ipAddressAggregateSettings'} diff --git a/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_operations.py b/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_operations.py new file mode 100644 index 000000000000..830d1be07b19 --- /dev/null +++ b/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_operations.py @@ -0,0 +1,102 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class Operations(object): + """Operations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The version of the API to be used with the client request. Constant value: "2014-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2014-01-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists the available Azure Data Factory API operations. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Operation + :rtype: + ~azure.mgmt.adhybridhealthservice.models.OperationPaged[~azure.mgmt.adhybridhealthservice.models.Operation] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/operations'} diff --git a/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_reports_operations.py b/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_reports_operations.py new file mode 100644 index 000000000000..4bd26e0f2f58 --- /dev/null +++ b/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_reports_operations.py @@ -0,0 +1,91 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ReportsOperations(object): + """ReportsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The version of the API to be used with the client request. Constant value: "2014-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2014-01-01" + + self.config = config + + def get_dev_ops( + self, custom_headers=None, raw=False, **operation_config): + """Checks if the user is enabled for Dev Ops access. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Result or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.adhybridhealthservice.models.Result or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_dev_ops.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Result', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_dev_ops.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/reports/DevOps/IsDevOps'} diff --git a/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_service_members_operations.py b/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_service_members_operations.py new file mode 100644 index 000000000000..8c50c80177f9 --- /dev/null +++ b/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_service_members_operations.py @@ -0,0 +1,1013 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ServiceMembersOperations(object): + """ServiceMembersOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The version of the API to be used with the client request. Constant value: "2014-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2014-01-01" + + self.config = config + + def list( + self, service_name, filter=None, dimension_type=None, dimension_signature=None, custom_headers=None, raw=False, **operation_config): + """Gets the details of the servers, for a given service, that are + onboarded to Azure Active Directory Connect Health Service. + + :param service_name: The name of the service. + :type service_name: str + :param filter: The server property filter to apply. + :type filter: str + :param dimension_type: The server specific dimension. + :type dimension_type: str + :param dimension_signature: The value of the dimension. + :type dimension_signature: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ServiceMember + :rtype: + ~azure.mgmt.adhybridhealthservice.models.ServiceMemberPaged[~azure.mgmt.adhybridhealthservice.models.ServiceMember] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if dimension_type is not None: + query_parameters['dimensionType'] = self._serialize.query("dimension_type", dimension_type, 'str') + if dimension_signature is not None: + query_parameters['dimensionSignature'] = self._serialize.query("dimension_signature", dimension_signature, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ServiceMemberPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/services/{serviceName}/servicemembers'} + + def add( + self, service_name, service_member, custom_headers=None, raw=False, **operation_config): + """Onboards a server, for a given service, to Azure Active Directory + Connect Health Service. + + :param service_name: The name of the service under which the server is + to be onboarded. + :type service_name: str + :param service_member: The server object. + :type service_member: + ~azure.mgmt.adhybridhealthservice.models.ServiceMember + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ServiceMember or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.adhybridhealthservice.models.ServiceMember or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.add.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(service_member, 'ServiceMember') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ServiceMember', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + add.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/services/{serviceName}/servicemembers'} + + def get( + self, service_name, service_member_id, custom_headers=None, raw=False, **operation_config): + """Gets the details of a server, for a given service, that are onboarded + to Azure Active Directory Connect Health Service. + + :param service_name: The name of the service. + :type service_name: str + :param service_member_id: The server Id. + :type service_member_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ServiceMember or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.adhybridhealthservice.models.ServiceMember or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'serviceMemberId': self._serialize.url("service_member_id", service_member_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ServiceMember', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/services/{serviceName}/servicemembers/{serviceMemberId}'} + + def delete( + self, service_name, service_member_id, confirm=None, custom_headers=None, raw=False, **operation_config): + """Deletes a server that has been onboarded to Azure Active Directory + Connect Health Service. + + :param service_name: The name of the service. + :type service_name: str + :param service_member_id: The server Id. + :type service_member_id: str + :param confirm: Indicates if the server will be permanently deleted or + disabled. True indicates that the server will be permanently deleted + and False indicates that the server will be marked disabled and then + deleted after 30 days, if it is not re-registered. + :type confirm: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'serviceMemberId': self._serialize.url("service_member_id", service_member_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if confirm is not None: + query_parameters['confirm'] = self._serialize.query("confirm", confirm, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/services/{serviceName}/servicemembers/{serviceMemberId}'} + + def list_alerts( + self, service_member_id, service_name, filter=None, state=None, from_parameter=None, to=None, custom_headers=None, raw=False, **operation_config): + """Gets the details of an alert for a given service and server + combination. + + :param service_member_id: The server Id for which the alert details + needs to be queried. + :type service_member_id: str + :param service_name: The name of the service. + :type service_name: str + :param filter: The alert property filter to apply. + :type filter: str + :param state: The alert state to query for. + :type state: str + :param from_parameter: The start date to query for. + :type from_parameter: datetime + :param to: The end date till when to query for. + :type to: datetime + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Alert + :rtype: + ~azure.mgmt.adhybridhealthservice.models.AlertPaged[~azure.mgmt.adhybridhealthservice.models.Alert] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_alerts.metadata['url'] + path_format_arguments = { + 'serviceMemberId': self._serialize.url("service_member_id", service_member_id, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if state is not None: + query_parameters['state'] = self._serialize.query("state", state, 'str') + if from_parameter is not None: + query_parameters['from'] = self._serialize.query("from_parameter", from_parameter, 'iso-8601') + if to is not None: + query_parameters['to'] = self._serialize.query("to", to, 'iso-8601') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AlertPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_alerts.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/services/{serviceName}/servicemembers/{serviceMemberId}/alerts'} + + def list_connectors( + self, service_name, service_member_id, custom_headers=None, raw=False, **operation_config): + """Gets the connector details for a service. + + :param service_name: The name of the service. + :type service_name: str + :param service_member_id: The server Id. + :type service_member_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Connector + :rtype: + ~azure.mgmt.adhybridhealthservice.models.ConnectorPaged[~azure.mgmt.adhybridhealthservice.models.Connector] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_connectors.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'serviceMemberId': self._serialize.url("service_member_id", service_member_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ConnectorPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_connectors.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/service/{serviceName}/servicemembers/{serviceMemberId}/connectors'} + + def list_credentials( + self, service_name, service_member_id, filter=None, custom_headers=None, raw=False, **operation_config): + """Gets the credentials of the server which is needed by the agent to + connect to Azure Active Directory Connect Health Service. + + :param service_name: The name of the service. + :type service_name: str + :param service_member_id: The server Id. + :type service_member_id: str + :param filter: The property filter to apply. + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Credential + :rtype: + ~azure.mgmt.adhybridhealthservice.models.CredentialPaged[~azure.mgmt.adhybridhealthservice.models.Credential] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_credentials.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'serviceMemberId': self._serialize.url("service_member_id", service_member_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CredentialPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_credentials.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/services/{serviceName}/servicemembers/{serviceMemberId}/credentials'} + + def delete_data( + self, service_name, service_member_id, custom_headers=None, raw=False, **operation_config): + """Deletes the data uploaded by the server to Azure Active Directory + Connect Health Service. + + :param service_name: The name of the service. + :type service_name: str + :param service_member_id: The server Id. + :type service_member_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_data.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'serviceMemberId': self._serialize.url("service_member_id", service_member_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_data.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/services/{serviceName}/servicemembers/{serviceMemberId}/data'} + + def list_data_freshness( + self, service_name, service_member_id, custom_headers=None, raw=False, **operation_config): + """Gets the last time when the server uploaded data to Azure Active + Directory Connect Health Service. + + :param service_name: The name of the service. + :type service_name: str + :param service_member_id: The server Id. + :type service_member_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Item + :rtype: + ~azure.mgmt.adhybridhealthservice.models.ItemPaged[~azure.mgmt.adhybridhealthservice.models.Item] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_data_freshness.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'serviceMemberId': self._serialize.url("service_member_id", service_member_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ItemPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_data_freshness.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/services/{serviceName}/servicemembers/{serviceMemberId}/datafreshness'} + + def list_export_status( + self, service_name, service_member_id, custom_headers=None, raw=False, **operation_config): + """Gets the export status. + + :param service_name: The name of the service. + :type service_name: str + :param service_member_id: The server Id. + :type service_member_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ExportStatus + :rtype: + ~azure.mgmt.adhybridhealthservice.models.ExportStatusPaged[~azure.mgmt.adhybridhealthservice.models.ExportStatus] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_export_status.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'serviceMemberId': self._serialize.url("service_member_id", service_member_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ExportStatusPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_export_status.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/services/{serviceName}/servicemembers/{serviceMemberId}/exportstatus'} + + def list_global_configuration( + self, service_name, service_member_id, custom_headers=None, raw=False, **operation_config): + """Gets the global configuration. + + :param service_name: The name of the service. + :type service_name: str + :param service_member_id: The server id. + :type service_member_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of GlobalConfiguration + :rtype: + ~azure.mgmt.adhybridhealthservice.models.GlobalConfigurationPaged[~azure.mgmt.adhybridhealthservice.models.GlobalConfiguration] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_global_configuration.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'serviceMemberId': self._serialize.url("service_member_id", service_member_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.GlobalConfigurationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_global_configuration.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/services/{serviceName}/servicemembers/{serviceMemberId}/globalconfiguration'} + + def get_metrics( + self, service_name, metric_name, group_name, service_member_id, group_key=None, from_date=None, to_date=None, custom_headers=None, raw=False, **operation_config): + """Gets the server related metrics for a given metric and group + combination. + + :param service_name: The name of the service. + :type service_name: str + :param metric_name: The metric name + :type metric_name: str + :param group_name: The group name + :type group_name: str + :param service_member_id: The server id. + :type service_member_id: str + :param group_key: The group key + :type group_key: str + :param from_date: The start date. + :type from_date: datetime + :param to_date: The end date. + :type to_date: datetime + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MetricSets or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.adhybridhealthservice.models.MetricSets or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_metrics.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'metricName': self._serialize.url("metric_name", metric_name, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceMemberId': self._serialize.url("service_member_id", service_member_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if group_key is not None: + query_parameters['groupKey'] = self._serialize.query("group_key", group_key, 'str') + if from_date is not None: + query_parameters['fromDate'] = self._serialize.query("from_date", from_date, 'iso-8601') + if to_date is not None: + query_parameters['toDate'] = self._serialize.query("to_date", to_date, 'iso-8601') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MetricSets', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_metrics.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/services/{serviceName}/servicemembers/{serviceMemberId}/metrics/{metricName}/groups/{groupName}'} + + def get_service_configuration( + self, service_name, service_member_id, custom_headers=None, raw=False, **operation_config): + """Gets the service configuration. + + :param service_name: The name of the service. + :type service_name: str + :param service_member_id: The server Id. + :type service_member_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ServiceConfiguration or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.adhybridhealthservice.models.ServiceConfiguration + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_service_configuration.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'serviceMemberId': self._serialize.url("service_member_id", service_member_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ServiceConfiguration', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_service_configuration.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/services/{serviceName}/servicemembers/{serviceMemberId}/serviceconfiguration'} + + def get_connector_metadata( + self, service_name, service_member_id, metric_name, custom_headers=None, raw=False, **operation_config): + """Gets the list of connectors and run profile names. + + :param service_name: The name of the service. + :type service_name: str + :param service_member_id: The service member id. + :type service_member_id: str + :param metric_name: The name of the metric. + :type metric_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ConnectorMetadata or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.adhybridhealthservice.models.ConnectorMetadata or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_connector_metadata.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'serviceMemberId': self._serialize.url("service_member_id", service_member_id, 'str'), + 'metricName': self._serialize.url("metric_name", metric_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ConnectorMetadata', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_connector_metadata.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/services/{serviceName}/servicemembers/{serviceMemberId}/metrics/{metricName}'} diff --git a/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_service_operations.py b/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_service_operations.py new file mode 100644 index 000000000000..5a06d0b31615 --- /dev/null +++ b/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_service_operations.py @@ -0,0 +1,116 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ServiceOperations(object): + """ServiceOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The version of the API to be used with the client request. Constant value: "2014-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2014-01-01" + + self.config = config + + def get_metrics( + self, service_name, metric_name, group_name, group_key=None, from_date=None, to_date=None, custom_headers=None, raw=False, **operation_config): + """Gets the server related metrics for a given metric and group + combination. + + :param service_name: The name of the service. + :type service_name: str + :param metric_name: The metric name + :type metric_name: str + :param group_name: The group name + :type group_name: str + :param group_key: The group key + :type group_key: str + :param from_date: The start date. + :type from_date: datetime + :param to_date: The end date. + :type to_date: datetime + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MetricSets or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.adhybridhealthservice.models.MetricSets or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_metrics.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'metricName': self._serialize.url("metric_name", metric_name, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if group_key is not None: + query_parameters['groupKey'] = self._serialize.query("group_key", group_key, 'str') + if from_date is not None: + query_parameters['fromDate'] = self._serialize.query("from_date", from_date, 'iso-8601') + if to_date is not None: + query_parameters['toDate'] = self._serialize.query("to_date", to_date, 'iso-8601') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MetricSets', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_metrics.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/services/{serviceName}/metrics/{metricName}/groups/{groupName}'} diff --git a/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_services_operations.py b/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_services_operations.py new file mode 100644 index 000000000000..5b47cc4261bb --- /dev/null +++ b/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_services_operations.py @@ -0,0 +1,1697 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ServicesOperations(object): + """ServicesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The version of the API to be used with the client request. Constant value: "2014-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2014-01-01" + + self.config = config + + def list( + self, filter=None, service_type=None, skip_count=None, take_count=None, custom_headers=None, raw=False, **operation_config): + """Gets the details of services, for a tenant, that are onboarded to Azure + Active Directory Connect Health. + + :param filter: The service property filter to apply. + :type filter: str + :param service_type: The service type for the services onboarded to + Azure Active Directory Connect Health. Depending on whether the + service is monitoring, ADFS, Sync or ADDS roles, the service type can + either be AdFederationService or AadSyncService or AdDomainService. + :type service_type: str + :param skip_count: The skip count, which specifies the number of + elements that can be bypassed from a sequence and then return the + remaining elements. + :type skip_count: int + :param take_count: The take count , which specifies the number of + elements that can be returned from a sequence. + :type take_count: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ServiceProperties + :rtype: + ~azure.mgmt.adhybridhealthservice.models.ServicePropertiesPaged[~azure.mgmt.adhybridhealthservice.models.ServiceProperties] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if service_type is not None: + query_parameters['serviceType'] = self._serialize.query("service_type", service_type, 'str') + if skip_count is not None: + query_parameters['skipCount'] = self._serialize.query("skip_count", skip_count, 'int') + if take_count is not None: + query_parameters['takeCount'] = self._serialize.query("take_count", take_count, 'int') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ServicePropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/services'} + + def add( + self, service, custom_headers=None, raw=False, **operation_config): + """Onboards a service for a given tenant in Azure Active Directory Connect + Health. + + :param service: The service object. + :type service: + ~azure.mgmt.adhybridhealthservice.models.ServiceProperties + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ServiceProperties or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.adhybridhealthservice.models.ServiceProperties or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.add.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(service, 'ServiceProperties') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ServiceProperties', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + add.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/services'} + + def list_premium( + self, filter=None, service_type=None, skip_count=None, take_count=None, custom_headers=None, raw=False, **operation_config): + """Gets the details of services for a tenant having Azure AD Premium + license and is onboarded to Azure Active Directory Connect Health. + + :param filter: The service property filter to apply. + :type filter: str + :param service_type: The service type for the services onboarded to + Azure Active Directory Connect Health. Depending on whether the + service is monitoring, ADFS, Sync or ADDS roles, the service type can + either be AdFederationService or AadSyncService or AdDomainService. + :type service_type: str + :param skip_count: The skip count, which specifies the number of + elements that can be bypassed from a sequence and then return the + remaining elements. + :type skip_count: int + :param take_count: The take count , which specifies the number of + elements that can be returned from a sequence. + :type take_count: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ServiceProperties + :rtype: + ~azure.mgmt.adhybridhealthservice.models.ServicePropertiesPaged[~azure.mgmt.adhybridhealthservice.models.ServiceProperties] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_premium.metadata['url'] + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if service_type is not None: + query_parameters['serviceType'] = self._serialize.query("service_type", service_type, 'str') + if skip_count is not None: + query_parameters['skipCount'] = self._serialize.query("skip_count", skip_count, 'int') + if take_count is not None: + query_parameters['takeCount'] = self._serialize.query("take_count", take_count, 'int') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ServicePropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_premium.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/services/premiumCheck'} + + def get( + self, service_name, custom_headers=None, raw=False, **operation_config): + """Gets the details of a service for a tenant having Azure AD Premium + license and is onboarded to Azure Active Directory Connect Health. + + :param service_name: The name of the service. + :type service_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ServiceProperties or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.adhybridhealthservice.models.ServiceProperties or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ServiceProperties', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/services/{serviceName}'} + + def delete( + self, service_name, confirm=None, custom_headers=None, raw=False, **operation_config): + """Deletes a service which is onboarded to Azure Active Directory Connect + Health. + + :param service_name: The name of the service which needs to be + deleted. + :type service_name: str + :param confirm: Indicates if the service will be permanently deleted + or disabled. True indicates that the service will be permanently + deleted and False indicates that the service will be marked disabled + and then deleted after 30 days, if it is not re-registered. + :type confirm: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if confirm is not None: + query_parameters['confirm'] = self._serialize.query("confirm", confirm, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/services/{serviceName}'} + + def update( + self, service_name, service, custom_headers=None, raw=False, **operation_config): + """Updates the service properties of an onboarded service. + + :param service_name: The name of the service which needs to be + deleted. + :type service_name: str + :param service: The service object. + :type service: + ~azure.mgmt.adhybridhealthservice.models.ServiceProperties + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ServiceProperties or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.adhybridhealthservice.models.ServiceProperties or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(service, 'ServiceProperties') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ServiceProperties', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/services/{serviceName}'} + + def list_alerts( + self, service_name, filter=None, state=None, from_parameter=None, to=None, custom_headers=None, raw=False, **operation_config): + """Gets the alerts for a given service. + + :param service_name: The name of the service. + :type service_name: str + :param filter: The alert property filter to apply. + :type filter: str + :param state: The alert state to query for. + :type state: str + :param from_parameter: The start date to query for. + :type from_parameter: datetime + :param to: The end date till when to query for. + :type to: datetime + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Alert + :rtype: + ~azure.mgmt.adhybridhealthservice.models.AlertPaged[~azure.mgmt.adhybridhealthservice.models.Alert] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_alerts.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if state is not None: + query_parameters['state'] = self._serialize.query("state", state, 'str') + if from_parameter is not None: + query_parameters['from'] = self._serialize.query("from_parameter", from_parameter, 'iso-8601') + if to is not None: + query_parameters['to'] = self._serialize.query("to", to, 'iso-8601') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AlertPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_alerts.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/services/{serviceName}/alerts'} + + def get_feature_availibility( + self, service_name, feature_name, custom_headers=None, raw=False, **operation_config): + """Checks if the service has all the pre-requisites met to use a feature. + + :param service_name: The name of the service. + :type service_name: str + :param feature_name: The name of the feature. + :type feature_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Result or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.adhybridhealthservice.models.Result or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_feature_availibility.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'featureName': self._serialize.url("feature_name", feature_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Result', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_feature_availibility.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/services/{serviceName}/checkServiceFeatureAvailibility/{featureName}'} + + def list_export_errors( + self, service_name, custom_headers=None, raw=False, **operation_config): + """Gets the count of latest AAD export errors. + + :param service_name: The name of the service. + :type service_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ErrorCount + :rtype: + ~azure.mgmt.adhybridhealthservice.models.ErrorCountPaged[~azure.mgmt.adhybridhealthservice.models.ErrorCount] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_export_errors.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ErrorCountPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_export_errors.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/services/{serviceName}/exporterrors/counts'} + + def list_export_errors_v2( + self, service_name, error_bucket, custom_headers=None, raw=False, **operation_config): + """Gets the categorized export errors. + + :param service_name: The name of the service. + :type service_name: str + :param error_bucket: The error category to query for. + :type error_bucket: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of MergedExportError + :rtype: + ~azure.mgmt.adhybridhealthservice.models.MergedExportErrorPaged[~azure.mgmt.adhybridhealthservice.models.MergedExportError] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_export_errors_v2.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['errorBucket'] = self._serialize.query("error_bucket", error_bucket, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.MergedExportErrorPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_export_errors_v2.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/services/{serviceName}/exporterrors/listV2'} + + def list_export_status( + self, service_name, custom_headers=None, raw=False, **operation_config): + """Gets the export status. + + :param service_name: The name of the service. + :type service_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ExportStatus + :rtype: + ~azure.mgmt.adhybridhealthservice.models.ExportStatusPaged[~azure.mgmt.adhybridhealthservice.models.ExportStatus] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_export_status.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ExportStatusPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_export_status.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/services/{serviceName}/exportstatus'} + + def add_alert_feedback( + self, service_name, alert_feedback, custom_headers=None, raw=False, **operation_config): + """Adds an alert feedback submitted by customer. + + :param service_name: The name of the service. + :type service_name: str + :param alert_feedback: The alert feedback. + :type alert_feedback: + ~azure.mgmt.adhybridhealthservice.models.AlertFeedback + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AlertFeedback or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.adhybridhealthservice.models.AlertFeedback or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.add_alert_feedback.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(alert_feedback, 'AlertFeedback') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AlertFeedback', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + add_alert_feedback.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/services/{serviceName}/feedbacktype/alerts/feedback'} + + def list_alert_feedback( + self, service_name, short_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of all alert feedback for a given tenant and alert type. + + :param service_name: The name of the service. + :type service_name: str + :param short_name: The name of the alert. + :type short_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AlertFeedback + :rtype: + ~azure.mgmt.adhybridhealthservice.models.AlertFeedbackPaged[~azure.mgmt.adhybridhealthservice.models.AlertFeedback] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_alert_feedback.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'shortName': self._serialize.url("short_name", short_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AlertFeedbackPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_alert_feedback.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/services/{serviceName}/feedbacktype/alerts/{shortName}/alertfeedback'} + + def list_metrics_average( + self, service_name, metric_name, group_name, custom_headers=None, raw=False, **operation_config): + """Gets the average of the metric values for a given metric and group + combination. + + :param service_name: The name of the service. + :type service_name: str + :param metric_name: The metric name + :type metric_name: str + :param group_name: The group name + :type group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Item + :rtype: + ~azure.mgmt.adhybridhealthservice.models.ItemPaged[~azure.mgmt.adhybridhealthservice.models.Item] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_metrics_average.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'metricName': self._serialize.url("metric_name", metric_name, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ItemPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_metrics_average.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/services/{serviceName}/metrics/{metricName}/groups/{groupName}/average'} + + def list_metrics_sum( + self, service_name, metric_name, group_name, custom_headers=None, raw=False, **operation_config): + """Gets the sum of the metric values for a given metric and group + combination. + + :param service_name: The name of the service. + :type service_name: str + :param metric_name: The metric name + :type metric_name: str + :param group_name: The group name + :type group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Item + :rtype: + ~azure.mgmt.adhybridhealthservice.models.ItemPaged[~azure.mgmt.adhybridhealthservice.models.Item] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_metrics_sum.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'metricName': self._serialize.url("metric_name", metric_name, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ItemPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_metrics_sum.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/services/{serviceName}/metrics/{metricName}/groups/{groupName}/sum'} + + def list_metric_metadata( + self, service_name, filter=None, perf_counter=None, custom_headers=None, raw=False, **operation_config): + """Gets the service related metrics information. + + :param service_name: The name of the service. + :type service_name: str + :param filter: The metric metadata property filter to apply. + :type filter: str + :param perf_counter: Indicates if only performance counter metrics are + requested. + :type perf_counter: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of MetricMetadata + :rtype: + ~azure.mgmt.adhybridhealthservice.models.MetricMetadataPaged[~azure.mgmt.adhybridhealthservice.models.MetricMetadata] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_metric_metadata.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if perf_counter is not None: + query_parameters['perfCounter'] = self._serialize.query("perf_counter", perf_counter, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.MetricMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_metric_metadata.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/services/{serviceName}/metricmetadata'} + + def get_metric_metadata( + self, service_name, metric_name, custom_headers=None, raw=False, **operation_config): + """Gets the service related metrics information. + + :param service_name: The name of the service. + :type service_name: str + :param metric_name: The metric name + :type metric_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MetricMetadata or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.adhybridhealthservice.models.MetricMetadata or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_metric_metadata.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'metricName': self._serialize.url("metric_name", metric_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MetricMetadata', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_metric_metadata.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/services/{serviceName}/metricmetadata/{metricName}'} + + def get_metric_metadata_for_group( + self, service_name, metric_name, group_name, group_key=None, from_date=None, to_date=None, custom_headers=None, raw=False, **operation_config): + """Gets the service related metrics for a given metric and group + combination. + + :param service_name: The name of the service. + :type service_name: str + :param metric_name: The metric name + :type metric_name: str + :param group_name: The group name + :type group_name: str + :param group_key: The group key + :type group_key: str + :param from_date: The start date. + :type from_date: datetime + :param to_date: The end date. + :type to_date: datetime + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MetricSets or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.adhybridhealthservice.models.MetricSets or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_metric_metadata_for_group.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'metricName': self._serialize.url("metric_name", metric_name, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if group_key is not None: + query_parameters['groupKey'] = self._serialize.query("group_key", group_key, 'str') + if from_date is not None: + query_parameters['fromDate'] = self._serialize.query("from_date", from_date, 'iso-8601') + if to_date is not None: + query_parameters['toDate'] = self._serialize.query("to_date", to_date, 'iso-8601') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MetricSets', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_metric_metadata_for_group.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/services/{serviceName}/metricmetadata/{metricName}/groups/{groupName}'} + + def update_monitoring_configuration( + self, service_name, key=None, value=None, custom_headers=None, raw=False, **operation_config): + """Updates the service level monitoring configuration. + + :param service_name: The name of the service. + :type service_name: str + :param key: The key for the property. + :type key: str + :param value: The value for the key. + :type value: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + configuration_setting = models.Item(key=key, value=value) + + # Construct URL + url = self.update_monitoring_configuration.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(configuration_setting, 'Item') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + update_monitoring_configuration.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/services/{serviceName}/monitoringconfiguration'} + + def list_monitoring_configurations( + self, service_name, custom_headers=None, raw=False, **operation_config): + """Gets the service level monitoring configurations. + + :param service_name: The name of the service. + :type service_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Item + :rtype: + ~azure.mgmt.adhybridhealthservice.models.ItemPaged[~azure.mgmt.adhybridhealthservice.models.Item] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_monitoring_configurations.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ItemPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_monitoring_configurations.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/services/{serviceName}/monitoringconfigurations'} + + def list_user_bad_password_report( + self, service_name, data_source=None, custom_headers=None, raw=False, **operation_config): + """Gets the bad password login attempt report for an user. + + :param service_name: The name of the service. + :type service_name: str + :param data_source: The source of data, if its test data or customer + data. + :type data_source: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ErrorReportUsersEntry + :rtype: + ~azure.mgmt.adhybridhealthservice.models.ErrorReportUsersEntryPaged[~azure.mgmt.adhybridhealthservice.models.ErrorReportUsersEntry] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_user_bad_password_report.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if data_source is not None: + query_parameters['dataSource'] = self._serialize.query("data_source", data_source, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ErrorReportUsersEntryPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_user_bad_password_report.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/services/{serviceName}/reports/badpassword/details/user'} + + def get_tenant_whitelisting( + self, service_name, feature_name, custom_headers=None, raw=False, **operation_config): + """Checks if the tenant, to which a service is registered, is whitelisted + to use a feature. + + :param service_name: The name of the service. + :type service_name: str + :param feature_name: The name of the feature. + :type feature_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Result or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.adhybridhealthservice.models.Result or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_tenant_whitelisting.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'featureName': self._serialize.url("feature_name", feature_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Result', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_tenant_whitelisting.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/services/{serviceName}/TenantWhitelisting/{featureName}'} + + def list_all_risky_ip_download_report( + self, service_name, custom_headers=None, raw=False, **operation_config): + """Gets all Risky IP report URIs for the last 7 days. + + :param service_name: The name of the service. + :type service_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of RiskyIPBlobUri + :rtype: + ~azure.mgmt.adhybridhealthservice.models.RiskyIPBlobUriPaged[~azure.mgmt.adhybridhealthservice.models.RiskyIPBlobUri] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_all_risky_ip_download_report.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RiskyIPBlobUriPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_all_risky_ip_download_report.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/services/{serviceName}/reports/riskyIp/blobUris'} + + def list_current_risky_ip_download_report( + self, service_name, custom_headers=None, raw=False, **operation_config): + """Initiate the generation of a new Risky IP report. Returns the URI for + the new one. + + :param service_name: The name of the service. + :type service_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of RiskyIPBlobUri + :rtype: + ~azure.mgmt.adhybridhealthservice.models.RiskyIPBlobUriPaged[~azure.mgmt.adhybridhealthservice.models.RiskyIPBlobUri] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_current_risky_ip_download_report.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RiskyIPBlobUriPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_current_risky_ip_download_report.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/services/{serviceName}/reports/riskyIp/generateBlobUri'} diff --git a/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_update_operations.py b/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_update_operations.py new file mode 100644 index 000000000000..114b3c86816d --- /dev/null +++ b/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/_update_operations.py @@ -0,0 +1,106 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class UpdateOperations(object): + """UpdateOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The version of the API to be used with the client request. Constant value: "2014-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2014-01-01" + + self.config = config + + def ip_address_aggregate_settings( + self, service_name, ip_address_aggregate_setting, custom_headers=None, raw=False, **operation_config): + """Updates the IP address aggregate settings alert thresholds. + + :param service_name: The name of the service. + :type service_name: str + :param ip_address_aggregate_setting: The IP address aggregate setting + object. + :type ip_address_aggregate_setting: + ~azure.mgmt.adhybridhealthservice.models.IPAddressAggregateSetting + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: IPAddressAggregateSetting or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.adhybridhealthservice.models.IPAddressAggregateSetting or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.ip_address_aggregate_settings.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(ip_address_aggregate_setting, 'IPAddressAggregateSetting') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('IPAddressAggregateSetting', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + ip_address_aggregate_settings.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/services/{serviceName}/ipAddressAggregateSettings'} diff --git a/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/version.py b/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/version.py new file mode 100644 index 000000000000..44e69c49c178 --- /dev/null +++ b/sdk/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/version.py @@ -0,0 +1,13 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +VERSION = "1.0.1" +