# --------------------------------------------------------------------------------------------
# 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 aaz-dev-tools
# --------------------------------------------------------------------------------------------

# pylint: skip-file
# flake8: noqa

from azure.cli.core.aaz import *


@register_command(
    "sentinel data-connector update",
    is_experimental=True,
)
class Update(AAZCommand):
    """Update the data connector.
    """

    _aaz_info = {
        "version": "2022-06-01-preview",
        "resources": [
            ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.operationalinsights/workspaces/{}/providers/microsoft.securityinsights/dataconnectors/{}", "2022-06-01-preview"],
        ]
    }

    AZ_SUPPORT_GENERIC_UPDATE = True

    def _handler(self, command_args):
        super()._handler(command_args)
        self._execute_operations()
        return self._output()

    _args_schema = None

    @classmethod
    def _build_arguments_schema(cls, *args, **kwargs):
        if cls._args_schema is not None:
            return cls._args_schema
        cls._args_schema = super()._build_arguments_schema(*args, **kwargs)

        # define Arg Group ""

        _args_schema = cls._args_schema
        _args_schema.data_connector_id = AAZStrArg(
            options=["-n", "--name", "--data-connector-id"],
            help="Connector ID",
            required=True,
            id_part="child_name_1",
        )
        _args_schema.resource_group = AAZResourceGroupNameArg(
            required=True,
        )
        _args_schema.workspace_name = AAZStrArg(
            options=["-w", "--workspace-name"],
            help="The name of the workspace.",
            required=True,
            is_experimental=True,
            id_part="name",
        )

        # define Arg Group "DataConnector"

        _args_schema = cls._args_schema
        _args_schema.api_polling = AAZObjectArg(
            options=["--api-polling"],
            arg_group="DataConnector",
        )
        _args_schema.aws_cloud_trail = AAZObjectArg(
            options=["--aws-cloud-trail"],
            arg_group="DataConnector",
            help="Amazon web services cloud trail.",
        )
        _args_schema.aws_s3 = AAZObjectArg(
            options=["--aws-s3"],
            arg_group="DataConnector",
            help="Amazon web services s3.",
        )
        _args_schema.azure_active_directory = AAZObjectArg(
            options=["--azure-active-directory"],
            arg_group="DataConnector",
        )
        _args_schema.azure_protection = AAZObjectArg(
            options=["--azure-protection"],
            arg_group="DataConnector",
            help="Azure advanced threat protection.",
        )
        _args_schema.azure_security_center = AAZObjectArg(
            options=["--azure-security-center"],
            arg_group="DataConnector",
        )
        _args_schema.dynamics365 = AAZObjectArg(
            options=["--dynamics365"],
            arg_group="DataConnector",
        )
        _args_schema.generic_ui = AAZObjectArg(
            options=["--generic-ui"],
            arg_group="DataConnector",
        )
        _args_schema.iot = AAZObjectArg(
            options=["--iot"],
            arg_group="DataConnector",
        )
        _args_schema.cloud_app_security = AAZObjectArg(
            options=["--cloud-app-security"],
            arg_group="DataConnector",
            help="Microsoft cloud app security.",
        )
        _args_schema.defender_protection = AAZObjectArg(
            options=["--defender-protection"],
            arg_group="DataConnector",
            help="Microsoft defender advanced threat protection.",
        )
        _args_schema.microsoft_intelligence = AAZObjectArg(
            options=["--microsoft-intelligence"],
            arg_group="DataConnector",
            help="Microsoft threat intelligence.",
        )
        _args_schema.microsoft_protection = AAZObjectArg(
            options=["--microsoft-protection"],
            arg_group="DataConnector",
            help="Microsoft threat protection.",
        )
        _args_schema.office365 = AAZObjectArg(
            options=["--office365"],
            arg_group="DataConnector",
        )
        _args_schema.office365_project = AAZObjectArg(
            options=["--office365-project"],
            arg_group="DataConnector",
        )
        _args_schema.office_atp = AAZObjectArg(
            options=["--office-atp"],
            arg_group="DataConnector",
        )
        _args_schema.office_irm = AAZObjectArg(
            options=["--office-irm"],
            arg_group="DataConnector",
        )
        _args_schema.office_power_bi = AAZObjectArg(
            options=["--office-power-bi"],
            arg_group="DataConnector",
        )
        _args_schema.threat_intelligence = AAZObjectArg(
            options=["--threat-intelligence"],
            arg_group="DataConnector",
        )
        _args_schema.intelligence_taxii = AAZObjectArg(
            options=["--intelligence-taxii"],
            arg_group="DataConnector",
            help="Threat intelligence taxii.",
        )
        _args_schema.etag = AAZStrArg(
            options=["--etag"],
            arg_group="DataConnector",
            help="Etag of the azure resource",
            nullable=True,
        )

        api_polling = cls._args_schema.api_polling
        api_polling.connector_ui_config = AAZObjectArg(
            options=["connector-ui-config"],
            help="Config to describe the instructions blade",
            nullable=True,
        )
        cls._build_args_codeless_ui_connector_config_properties_update(api_polling.connector_ui_config)
        api_polling.polling_config = AAZObjectArg(
            options=["polling-config"],
            help="Config to describe the polling instructions",
            nullable=True,
        )

        polling_config = cls._args_schema.api_polling.polling_config
        polling_config.auth = AAZObjectArg(
            options=["auth"],
            help="Describe the authentication type of the poller",
        )
        polling_config.is_active = AAZBoolArg(
            options=["is-active"],
            help="The poller active status",
            nullable=True,
        )
        polling_config.paging = AAZObjectArg(
            options=["paging"],
            help="Describe the poll request paging config of the poller",
            nullable=True,
        )
        polling_config.request = AAZObjectArg(
            options=["request"],
            help="Describe the poll request config parameters of the poller",
        )
        polling_config.response = AAZObjectArg(
            options=["response"],
            help="Describe the response config parameters of the poller",
            nullable=True,
        )

        auth = cls._args_schema.api_polling.polling_config.auth
        auth.api_key_identifier = AAZStrArg(
            options=["api-key-identifier"],
            help="A prefix send in the header before the actual token",
            nullable=True,
        )
        auth.api_key_name = AAZStrArg(
            options=["api-key-name"],
            help="The header name which the token is sent with",
            nullable=True,
        )
        auth.auth_type = AAZStrArg(
            options=["auth-type"],
            help="The authentication type",
        )
        auth.authorization_endpoint = AAZStrArg(
            options=["authorization-endpoint"],
            help="The endpoint used to authorize the user, used in Oauth 2.0 flow",
            nullable=True,
        )
        auth.flow_name = AAZStrArg(
            options=["flow-name"],
            help="Describes the flow name, for example 'AuthCode' for Oauth 2.0",
            nullable=True,
        )
        auth.is_api_key_in_post_payload = AAZStrArg(
            options=["is-api-key-in-post-payload"],
            help="Marks if the key should sent in header",
            nullable=True,
        )
        auth.is_client_secret_in_header = AAZBoolArg(
            options=["is-client-secret-in-header"],
            help="Marks if we should send the client secret in header or payload, used in Oauth 2.0 flow",
            nullable=True,
        )
        auth.redirection_endpoint = AAZStrArg(
            options=["redirection-endpoint"],
            help="The redirect endpoint where we will get the authorization code, used in Oauth 2.0 flow",
            nullable=True,
        )
        auth.scope = AAZStrArg(
            options=["scope"],
            help="The OAuth token scope",
            nullable=True,
        )
        auth.token_endpoint = AAZStrArg(
            options=["token-endpoint"],
            help="The endpoint used to issue a token, used in Oauth 2.0 flow",
            nullable=True,
        )

        paging = cls._args_schema.api_polling.polling_config.paging
        paging.next_page_para_name = AAZStrArg(
            options=["next-page-para-name"],
            help="Defines the name of a next page attribute",
            nullable=True,
        )
        paging.next_page_token_json_path = AAZStrArg(
            options=["next-page-token-json-path"],
            help="Defines the path to a next page token JSON",
            nullable=True,
        )
        paging.page_count_attribute_path = AAZStrArg(
            options=["page-count-attribute-path"],
            help="Defines the path to a page count attribute",
            nullable=True,
        )
        paging.page_size = AAZIntArg(
            options=["page-size"],
            help="Defines the paging size",
            nullable=True,
        )
        paging.page_size_para_name = AAZStrArg(
            options=["page-size-para-name"],
            help="Defines the name of the page size parameter",
            nullable=True,
        )
        paging.page_time_stamp_attribute_path = AAZStrArg(
            options=["page-time-stamp-attribute-path"],
            help="Defines the path to a paging time stamp attribute",
            nullable=True,
        )
        paging.page_total_count_attribute_path = AAZStrArg(
            options=["page-total-count-attribute-path"],
            help="Defines the path to a page total count attribute",
            nullable=True,
        )
        paging.paging_type = AAZStrArg(
            options=["paging-type"],
            help="Describes the type. could be 'None', 'PageToken', 'PageCount', 'TimeStamp'",
        )
        paging.search_the_latest_time_stamp_from_events_list = AAZStrArg(
            options=["search-the-latest-time-stamp-from-events-list"],
            help="Determines whether to search for the latest time stamp in the events list",
            nullable=True,
        )

        request = cls._args_schema.api_polling.polling_config.request
        request.api_endpoint = AAZStrArg(
            options=["api-endpoint"],
            help="Describe the endpoint we should pull the data from",
        )
        request.end_time_attribute_name = AAZStrArg(
            options=["end-time-attribute-name"],
            help="This will be used the query events from the end of the time window",
            nullable=True,
        )
        request.http_method = AAZStrArg(
            options=["http-method"],
            help="The http method type we will use in the poll request, GET or POST",
        )
        request.query_parameters_template = AAZStrArg(
            options=["query-parameters-template"],
            help="For advanced scenarios for example user name/password embedded in nested JSON payload",
            nullable=True,
        )
        request.query_time_format = AAZStrArg(
            options=["query-time-format"],
            help="The time format will be used the query events in a specific window",
        )
        request.query_window_in_min = AAZIntArg(
            options=["query-window-in-min"],
            help="The window interval we will use the pull the data",
        )
        request.rate_limit_qps = AAZIntArg(
            options=["rate-limit-qps"],
            help="Defines the rate limit QPS",
            nullable=True,
        )
        request.retry_count = AAZIntArg(
            options=["retry-count"],
            help="Describe the amount of time we should try and poll the data in case of failure",
            nullable=True,
        )
        request.start_time_attribute_name = AAZStrArg(
            options=["start-time-attribute-name"],
            help="This will be used the query events from a start of the time window",
            nullable=True,
        )
        request.timeout_in_seconds = AAZIntArg(
            options=["timeout-in-seconds"],
            help="The number of seconds we will consider as a request timeout",
            nullable=True,
        )

        response = cls._args_schema.api_polling.polling_config.response
        response.events_json_paths = AAZListArg(
            options=["events-json-paths"],
            help="Describes the path we should extract the data in the response",
        )
        response.is_gzip_compressed = AAZBoolArg(
            options=["is-gzip-compressed"],
            help="Describes if the data in the response is Gzip",
            nullable=True,
        )
        response.success_status_json_path = AAZStrArg(
            options=["success-status-json-path"],
            help="Describes the path we should extract the status code in the response",
            nullable=True,
        )
        response.success_status_value = AAZStrArg(
            options=["success-status-value"],
            help="Describes the path we should extract the status value in the response",
            nullable=True,
        )

        events_json_paths = cls._args_schema.api_polling.polling_config.response.events_json_paths
        events_json_paths.Element = AAZStrArg()

        aws_cloud_trail = cls._args_schema.aws_cloud_trail
        aws_cloud_trail.aws_role_arn = AAZStrArg(
            options=["aws-role-arn"],
            help="The Aws Role Arn (with CloudTrailReadOnly policy) that is used to access the Aws account.",
            nullable=True,
        )
        aws_cloud_trail.data_types = AAZObjectArg(
            options=["data-types"],
            help="The available data types for the connector.",
        )

        data_types = cls._args_schema.aws_cloud_trail.data_types
        data_types.logs = AAZObjectArg(
            options=["logs"],
            help="Logs data type.",
        )

        logs = cls._args_schema.aws_cloud_trail.data_types.logs
        logs.state = AAZStrArg(
            options=["state"],
            help="Describe whether this data type connection is enabled or not.",
            enum={"Disabled": "Disabled", "Enabled": "Enabled"},
        )

        aws_s3 = cls._args_schema.aws_s3
        aws_s3.data_types = AAZObjectArg(
            options=["data-types"],
            help="The available data types for the connector.",
        )
        aws_s3.destination_table = AAZStrArg(
            options=["destination-table"],
            help="The logs destination table name in LogAnalytics.",
        )
        aws_s3.role_arn = AAZStrArg(
            options=["role-arn"],
            help="The Aws Role Arn that is used to access the Aws account.",
        )
        aws_s3.sqs_urls = AAZListArg(
            options=["sqs-urls"],
            help="The AWS sqs urls for the connector.",
        )

        data_types = cls._args_schema.aws_s3.data_types
        data_types.logs = AAZObjectArg(
            options=["logs"],
            help="Logs data type.",
        )

        logs = cls._args_schema.aws_s3.data_types.logs
        logs.state = AAZStrArg(
            options=["state"],
            help="Describe whether this data type connection is enabled or not.",
            enum={"Disabled": "Disabled", "Enabled": "Enabled"},
        )

        sqs_urls = cls._args_schema.aws_s3.sqs_urls
        sqs_urls.Element = AAZStrArg()

        azure_active_directory = cls._args_schema.azure_active_directory
        azure_active_directory.data_types = AAZObjectArg(
            options=["data-types"],
            help="The available data types for the connector.",
            nullable=True,
        )
        cls._build_args_alerts_data_type_of_data_connector_update(azure_active_directory.data_types)
        azure_active_directory.tenant_id = AAZStrArg(
            options=["tenant-id"],
            help="The tenant id to connect to, and get the data from.",
        )

        azure_protection = cls._args_schema.azure_protection
        azure_protection.data_types = AAZObjectArg(
            options=["data-types"],
            help="The available data types for the connector.",
            nullable=True,
        )
        cls._build_args_alerts_data_type_of_data_connector_update(azure_protection.data_types)
        azure_protection.tenant_id = AAZStrArg(
            options=["tenant-id"],
            help="The tenant id to connect to, and get the data from.",
        )

        azure_security_center = cls._args_schema.azure_security_center
        azure_security_center.data_types = AAZObjectArg(
            options=["data-types"],
            help="The available data types for the connector.",
            nullable=True,
        )
        cls._build_args_alerts_data_type_of_data_connector_update(azure_security_center.data_types)
        azure_security_center.subscription_id = AAZStrArg(
            options=["subscription-id"],
            help="The subscription id to connect to, and get the data from.",
            nullable=True,
        )

        dynamics365 = cls._args_schema.dynamics365
        dynamics365.data_types = AAZObjectArg(
            options=["data-types"],
            help="The available data types for the connector.",
        )
        dynamics365.tenant_id = AAZStrArg(
            options=["tenant-id"],
            help="The tenant id to connect to, and get the data from.",
        )

        data_types = cls._args_schema.dynamics365.data_types
        data_types.dynamics365_cds_activities = AAZObjectArg(
            options=["dynamics365-cds-activities"],
            help="Common Data Service data type connection.",
        )

        dynamics365_cds_activities = cls._args_schema.dynamics365.data_types.dynamics365_cds_activities
        dynamics365_cds_activities.state = AAZStrArg(
            options=["state"],
            help="Describe whether this data type connection is enabled or not.",
            enum={"Disabled": "Disabled", "Enabled": "Enabled"},
        )

        generic_ui = cls._args_schema.generic_ui
        generic_ui.connector_ui_config = AAZObjectArg(
            options=["connector-ui-config"],
            help="Config to describe the instructions blade",
            nullable=True,
        )
        cls._build_args_codeless_ui_connector_config_properties_update(generic_ui.connector_ui_config)

        iot = cls._args_schema.iot
        iot.data_types = AAZObjectArg(
            options=["data-types"],
            help="The available data types for the connector.",
            nullable=True,
        )
        cls._build_args_alerts_data_type_of_data_connector_update(iot.data_types)
        iot.subscription_id = AAZStrArg(
            options=["subscription-id"],
            help="The subscription id to connect to, and get the data from.",
            nullable=True,
        )

        cloud_app_security = cls._args_schema.cloud_app_security
        cloud_app_security.data_types = AAZObjectArg(
            options=["data-types"],
            help="The available data types for the connector.",
        )
        cloud_app_security.tenant_id = AAZStrArg(
            options=["tenant-id"],
            help="The tenant id to connect to, and get the data from.",
        )

        data_types = cls._args_schema.cloud_app_security.data_types
        data_types.alerts = AAZObjectArg(
            options=["alerts"],
            help="Alerts data type connection.",
        )
        cls._build_args_data_connector_data_type_common_update(data_types.alerts)
        data_types.discovery_logs = AAZObjectArg(
            options=["discovery-logs"],
            help="Discovery log data type connection.",
        )
        cls._build_args_data_connector_data_type_common_update(data_types.discovery_logs)

        defender_protection = cls._args_schema.defender_protection
        defender_protection.data_types = AAZObjectArg(
            options=["data-types"],
            help="The available data types for the connector.",
            nullable=True,
        )
        cls._build_args_alerts_data_type_of_data_connector_update(defender_protection.data_types)
        defender_protection.tenant_id = AAZStrArg(
            options=["tenant-id"],
            help="The tenant id to connect to, and get the data from.",
        )

        microsoft_intelligence = cls._args_schema.microsoft_intelligence
        microsoft_intelligence.data_types = AAZObjectArg(
            options=["data-types"],
            help="The available data types for the connector.",
        )
        microsoft_intelligence.tenant_id = AAZStrArg(
            options=["tenant-id"],
            help="The tenant id to connect to, and get the data from.",
        )

        data_types = cls._args_schema.microsoft_intelligence.data_types
        data_types.bing_safety_phishing_url = AAZObjectArg(
            options=["bing-safety-phishing-url"],
            help="Data type for Microsoft Threat Intelligence Platforms data connector.",
        )
        data_types.microsoft_emerging_threat_feed = AAZObjectArg(
            options=["microsoft-emerging-threat-feed"],
            help="Data type for Microsoft Threat Intelligence Platforms data connector.",
        )

        bing_safety_phishing_url = cls._args_schema.microsoft_intelligence.data_types.bing_safety_phishing_url
        bing_safety_phishing_url.lookback_period = AAZStrArg(
            options=["lookback-period"],
            help="lookback period",
        )
        bing_safety_phishing_url.state = AAZStrArg(
            options=["state"],
            help="Describe whether this data type connection is enabled or not.",
            enum={"Disabled": "Disabled", "Enabled": "Enabled"},
        )

        microsoft_emerging_threat_feed = cls._args_schema.microsoft_intelligence.data_types.microsoft_emerging_threat_feed
        microsoft_emerging_threat_feed.lookback_period = AAZStrArg(
            options=["lookback-period"],
            help="lookback period",
        )
        microsoft_emerging_threat_feed.state = AAZStrArg(
            options=["state"],
            help="Describe whether this data type connection is enabled or not.",
            enum={"Disabled": "Disabled", "Enabled": "Enabled"},
        )

        microsoft_protection = cls._args_schema.microsoft_protection
        microsoft_protection.data_types = AAZObjectArg(
            options=["data-types"],
            help="The available data types for the connector.",
        )
        microsoft_protection.tenant_id = AAZStrArg(
            options=["tenant-id"],
            help="The tenant id to connect to, and get the data from.",
        )

        data_types = cls._args_schema.microsoft_protection.data_types
        data_types.incidents = AAZObjectArg(
            options=["incidents"],
            help="Data type for Microsoft Threat Protection Platforms data connector.",
        )

        incidents = cls._args_schema.microsoft_protection.data_types.incidents
        incidents.state = AAZStrArg(
            options=["state"],
            help="Describe whether this data type connection is enabled or not.",
            enum={"Disabled": "Disabled", "Enabled": "Enabled"},
        )

        office365 = cls._args_schema.office365
        office365.data_types = AAZObjectArg(
            options=["data-types"],
            help="The available data types for the connector.",
        )
        office365.tenant_id = AAZStrArg(
            options=["tenant-id"],
            help="The tenant id to connect to, and get the data from.",
        )

        data_types = cls._args_schema.office365.data_types
        data_types.exchange = AAZObjectArg(
            options=["exchange"],
            help="Exchange data type connection.",
        )
        data_types.share_point = AAZObjectArg(
            options=["share-point"],
            help="SharePoint data type connection.",
        )
        data_types.teams = AAZObjectArg(
            options=["teams"],
            help="Teams data type connection.",
        )

        exchange = cls._args_schema.office365.data_types.exchange
        exchange.state = AAZStrArg(
            options=["state"],
            help="Describe whether this data type connection is enabled or not.",
            enum={"Disabled": "Disabled", "Enabled": "Enabled"},
        )

        share_point = cls._args_schema.office365.data_types.share_point
        share_point.state = AAZStrArg(
            options=["state"],
            help="Describe whether this data type connection is enabled or not.",
            enum={"Disabled": "Disabled", "Enabled": "Enabled"},
        )

        teams = cls._args_schema.office365.data_types.teams
        teams.state = AAZStrArg(
            options=["state"],
            help="Describe whether this data type connection is enabled or not.",
            enum={"Disabled": "Disabled", "Enabled": "Enabled"},
        )

        office365_project = cls._args_schema.office365_project
        office365_project.data_types = AAZObjectArg(
            options=["data-types"],
            help="The available data types for the connector.",
        )
        office365_project.tenant_id = AAZStrArg(
            options=["tenant-id"],
            help="The tenant id to connect to, and get the data from.",
        )

        data_types = cls._args_schema.office365_project.data_types
        data_types.logs = AAZObjectArg(
            options=["logs"],
            help="Logs data type.",
        )

        logs = cls._args_schema.office365_project.data_types.logs
        logs.state = AAZStrArg(
            options=["state"],
            help="Describe whether this data type connection is enabled or not.",
            enum={"Disabled": "Disabled", "Enabled": "Enabled"},
        )

        office_atp = cls._args_schema.office_atp
        office_atp.data_types = AAZObjectArg(
            options=["data-types"],
            help="The available data types for the connector.",
            nullable=True,
        )
        cls._build_args_alerts_data_type_of_data_connector_update(office_atp.data_types)
        office_atp.tenant_id = AAZStrArg(
            options=["tenant-id"],
            help="The tenant id to connect to, and get the data from.",
        )

        office_irm = cls._args_schema.office_irm
        office_irm.data_types = AAZObjectArg(
            options=["data-types"],
            help="The available data types for the connector.",
            nullable=True,
        )
        cls._build_args_alerts_data_type_of_data_connector_update(office_irm.data_types)
        office_irm.tenant_id = AAZStrArg(
            options=["tenant-id"],
            help="The tenant id to connect to, and get the data from.",
        )

        office_power_bi = cls._args_schema.office_power_bi
        office_power_bi.data_types = AAZObjectArg(
            options=["data-types"],
            help="The available data types for the connector.",
        )
        office_power_bi.tenant_id = AAZStrArg(
            options=["tenant-id"],
            help="The tenant id to connect to, and get the data from.",
        )

        data_types = cls._args_schema.office_power_bi.data_types
        data_types.logs = AAZObjectArg(
            options=["logs"],
            help="Logs data type.",
        )

        logs = cls._args_schema.office_power_bi.data_types.logs
        logs.state = AAZStrArg(
            options=["state"],
            help="Describe whether this data type connection is enabled or not.",
            enum={"Disabled": "Disabled", "Enabled": "Enabled"},
        )

        threat_intelligence = cls._args_schema.threat_intelligence
        threat_intelligence.data_types = AAZObjectArg(
            options=["data-types"],
            help="The available data types for the connector.",
        )
        threat_intelligence.tenant_id = AAZStrArg(
            options=["tenant-id"],
            help="The tenant id to connect to, and get the data from.",
        )
        threat_intelligence.tip_lookback_period = AAZStrArg(
            options=["tip-lookback-period"],
            help="The lookback period for the feed to be imported.",
            nullable=True,
        )

        data_types = cls._args_schema.threat_intelligence.data_types
        data_types.indicators = AAZObjectArg(
            options=["indicators"],
            help="Data type for indicators connection.",
        )

        indicators = cls._args_schema.threat_intelligence.data_types.indicators
        indicators.state = AAZStrArg(
            options=["state"],
            help="Describe whether this data type connection is enabled or not.",
            enum={"Disabled": "Disabled", "Enabled": "Enabled"},
        )

        intelligence_taxii = cls._args_schema.intelligence_taxii
        intelligence_taxii.collection_id = AAZStrArg(
            options=["collection-id"],
            help="The collection id of the TAXII server.",
            nullable=True,
        )
        intelligence_taxii.data_types = AAZObjectArg(
            options=["data-types"],
            help="The available data types for Threat Intelligence TAXII data connector.",
        )
        intelligence_taxii.friendly_name = AAZStrArg(
            options=["friendly-name"],
            help="The friendly name for the TAXII server.",
            nullable=True,
        )
        intelligence_taxii.password = AAZStrArg(
            options=["password"],
            help="The password for the TAXII server.",
            nullable=True,
        )
        intelligence_taxii.polling_frequency = AAZStrArg(
            options=["polling-frequency"],
            help="The polling frequency for the TAXII server.",
            nullable=True,
            enum={"OnceADay": "OnceADay", "OnceAMinute": "OnceAMinute", "OnceAnHour": "OnceAnHour"},
        )
        intelligence_taxii.taxii_lookback_period = AAZStrArg(
            options=["taxii-lookback-period"],
            help="The lookback period for the TAXII server.",
            nullable=True,
        )
        intelligence_taxii.taxii_server = AAZStrArg(
            options=["taxii-server"],
            help="The API root for the TAXII server.",
            nullable=True,
        )
        intelligence_taxii.tenant_id = AAZStrArg(
            options=["tenant-id"],
            help="The tenant id to connect to, and get the data from.",
        )
        intelligence_taxii.user_name = AAZStrArg(
            options=["user-name"],
            help="The userName for the TAXII server.",
            nullable=True,
        )
        intelligence_taxii.workspace_id = AAZStrArg(
            options=["workspace-id"],
            help="The workspace id.",
            nullable=True,
        )

        data_types = cls._args_schema.intelligence_taxii.data_types
        data_types.taxii_client = AAZObjectArg(
            options=["taxii-client"],
            help="Data type for TAXII connector.",
        )

        taxii_client = cls._args_schema.intelligence_taxii.data_types.taxii_client
        taxii_client.state = AAZStrArg(
            options=["state"],
            help="Describe whether this data type connection is enabled or not.",
            enum={"Disabled": "Disabled", "Enabled": "Enabled"},
        )
        return cls._args_schema

    _args_alerts_data_type_of_data_connector_update = None

    @classmethod
    def _build_args_alerts_data_type_of_data_connector_update(cls, _schema):
        if cls._args_alerts_data_type_of_data_connector_update is not None:
            _schema.alerts = cls._args_alerts_data_type_of_data_connector_update.alerts
            return

        cls._args_alerts_data_type_of_data_connector_update = AAZObjectArg(
            nullable=True,
        )

        alerts_data_type_of_data_connector_update = cls._args_alerts_data_type_of_data_connector_update
        alerts_data_type_of_data_connector_update.alerts = AAZObjectArg(
            options=["alerts"],
            help="Alerts data type connection.",
        )
        cls._build_args_data_connector_data_type_common_update(alerts_data_type_of_data_connector_update.alerts)

        _schema.alerts = cls._args_alerts_data_type_of_data_connector_update.alerts

    _args_codeless_ui_connector_config_properties_update = None

    @classmethod
    def _build_args_codeless_ui_connector_config_properties_update(cls, _schema):
        if cls._args_codeless_ui_connector_config_properties_update is not None:
            _schema.availability = cls._args_codeless_ui_connector_config_properties_update.availability
            _schema.connectivity_criteria = cls._args_codeless_ui_connector_config_properties_update.connectivity_criteria
            _schema.custom_image = cls._args_codeless_ui_connector_config_properties_update.custom_image
            _schema.data_types = cls._args_codeless_ui_connector_config_properties_update.data_types
            _schema.description_markdown = cls._args_codeless_ui_connector_config_properties_update.description_markdown
            _schema.graph_queries = cls._args_codeless_ui_connector_config_properties_update.graph_queries
            _schema.graph_queries_table_name = cls._args_codeless_ui_connector_config_properties_update.graph_queries_table_name
            _schema.instruction_steps = cls._args_codeless_ui_connector_config_properties_update.instruction_steps
            _schema.permissions = cls._args_codeless_ui_connector_config_properties_update.permissions
            _schema.publisher = cls._args_codeless_ui_connector_config_properties_update.publisher
            _schema.sample_queries = cls._args_codeless_ui_connector_config_properties_update.sample_queries
            _schema.title = cls._args_codeless_ui_connector_config_properties_update.title
            return

        cls._args_codeless_ui_connector_config_properties_update = AAZObjectArg(
            nullable=True,
        )

        codeless_ui_connector_config_properties_update = cls._args_codeless_ui_connector_config_properties_update
        codeless_ui_connector_config_properties_update.availability = AAZObjectArg(
            options=["availability"],
            help="Connector Availability Status",
        )
        codeless_ui_connector_config_properties_update.connectivity_criteria = AAZListArg(
            options=["connectivity-criteria"],
            help="Define the way the connector check connectivity",
        )
        codeless_ui_connector_config_properties_update.custom_image = AAZStrArg(
            options=["custom-image"],
            help="An optional custom image to be used when displaying the connector within Azure Sentinel's connector's gallery",
            nullable=True,
        )
        codeless_ui_connector_config_properties_update.data_types = AAZListArg(
            options=["data-types"],
            help="Data types to check for last data received",
        )
        codeless_ui_connector_config_properties_update.description_markdown = AAZStrArg(
            options=["description-markdown"],
            help="Connector description",
        )
        codeless_ui_connector_config_properties_update.graph_queries = AAZListArg(
            options=["graph-queries"],
            help="The graph query to show the current data status",
        )
        codeless_ui_connector_config_properties_update.graph_queries_table_name = AAZStrArg(
            options=["graph-queries-table-name"],
            help="Name of the table the connector will insert the data to",
        )
        codeless_ui_connector_config_properties_update.instruction_steps = AAZListArg(
            options=["instruction-steps"],
            help="Instruction steps to enable the connector",
        )
        codeless_ui_connector_config_properties_update.permissions = AAZObjectArg(
            options=["permissions"],
            help="Permissions required for the connector",
        )
        codeless_ui_connector_config_properties_update.publisher = AAZStrArg(
            options=["publisher"],
            help="Connector publisher name",
        )
        codeless_ui_connector_config_properties_update.sample_queries = AAZListArg(
            options=["sample-queries"],
            help="The sample queries for the connector",
        )
        codeless_ui_connector_config_properties_update.title = AAZStrArg(
            options=["title"],
            help="Connector blade title",
        )

        availability = cls._args_codeless_ui_connector_config_properties_update.availability
        availability.is_preview = AAZBoolArg(
            options=["is-preview"],
            help="Set connector as preview",
            nullable=True,
        )
        availability.status = AAZIntArg(
            options=["status"],
            help="The connector Availability Status",
            nullable=True,
            enum={"1": 1},
        )

        connectivity_criteria = cls._args_codeless_ui_connector_config_properties_update.connectivity_criteria
        connectivity_criteria.Element = AAZObjectArg()

        _element = cls._args_codeless_ui_connector_config_properties_update.connectivity_criteria.Element
        _element.type = AAZStrArg(
            options=["type"],
            help="type of connectivity",
            nullable=True,
            enum={"IsConnectedQuery": "IsConnectedQuery"},
        )
        _element.value = AAZListArg(
            options=["value"],
            help="Queries for checking connectivity",
            nullable=True,
        )

        value = cls._args_codeless_ui_connector_config_properties_update.connectivity_criteria.Element.value
        value.Element = AAZStrArg()

        data_types = cls._args_codeless_ui_connector_config_properties_update.data_types
        data_types.Element = AAZObjectArg()

        _element = cls._args_codeless_ui_connector_config_properties_update.data_types.Element
        _element.last_data_received_query = AAZStrArg(
            options=["last-data-received-query"],
            help="Query for indicate last data received",
            nullable=True,
        )
        _element.name = AAZStrArg(
            options=["name"],
            help="Name of the data type to show in the graph. can be use with {{graphQueriesTableName}} placeholder",
            nullable=True,
        )

        graph_queries = cls._args_codeless_ui_connector_config_properties_update.graph_queries
        graph_queries.Element = AAZObjectArg()

        _element = cls._args_codeless_ui_connector_config_properties_update.graph_queries.Element
        _element.base_query = AAZStrArg(
            options=["base-query"],
            help="The base query for the graph",
            nullable=True,
        )
        _element.legend = AAZStrArg(
            options=["legend"],
            help="The legend for the graph",
            nullable=True,
        )
        _element.metric_name = AAZStrArg(
            options=["metric-name"],
            help="the metric that the query is checking",
            nullable=True,
        )

        instruction_steps = cls._args_codeless_ui_connector_config_properties_update.instruction_steps
        instruction_steps.Element = AAZObjectArg()

        _element = cls._args_codeless_ui_connector_config_properties_update.instruction_steps.Element
        _element.description = AAZStrArg(
            options=["description"],
            help="Instruction step description",
            nullable=True,
        )
        _element.instructions = AAZListArg(
            options=["instructions"],
            help="Instruction step details",
            nullable=True,
        )
        _element.title = AAZStrArg(
            options=["title"],
            help="Instruction step title",
            nullable=True,
        )

        instructions = cls._args_codeless_ui_connector_config_properties_update.instruction_steps.Element.instructions
        instructions.Element = AAZObjectArg()

        _element = cls._args_codeless_ui_connector_config_properties_update.instruction_steps.Element.instructions.Element
        _element.type = AAZStrArg(
            options=["type"],
            help="The kind of the setting",
            enum={"CopyableLabel": "CopyableLabel", "InfoMessage": "InfoMessage", "InstructionStepsGroup": "InstructionStepsGroup"},
        )

        permissions = cls._args_codeless_ui_connector_config_properties_update.permissions
        permissions.customs = AAZListArg(
            options=["customs"],
            help="Customs permissions required for the connector",
            nullable=True,
        )
        permissions.resource_provider = AAZListArg(
            options=["resource-provider"],
            help="Resource provider permissions required for the connector",
            nullable=True,
        )

        customs = cls._args_codeless_ui_connector_config_properties_update.permissions.customs
        customs.Element = AAZObjectArg()

        _element = cls._args_codeless_ui_connector_config_properties_update.permissions.customs.Element
        _element.description = AAZStrArg(
            options=["description"],
            help="Customs permissions description",
            nullable=True,
        )
        _element.name = AAZStrArg(
            options=["name"],
            help="Customs permissions name",
            nullable=True,
        )

        resource_provider = cls._args_codeless_ui_connector_config_properties_update.permissions.resource_provider
        resource_provider.Element = AAZObjectArg()

        _element = cls._args_codeless_ui_connector_config_properties_update.permissions.resource_provider.Element
        _element.permissions_display_text = AAZStrArg(
            options=["permissions-display-text"],
            help="Permission description text",
            nullable=True,
        )
        _element.provider = AAZStrArg(
            options=["provider"],
            help="Provider name",
            nullable=True,
            enum={"Microsoft.Authorization/policyAssignments": "Microsoft.Authorization/policyAssignments", "Microsoft.OperationalInsights/solutions": "Microsoft.OperationalInsights/solutions", "Microsoft.OperationalInsights/workspaces": "Microsoft.OperationalInsights/workspaces", "Microsoft.OperationalInsights/workspaces/datasources": "Microsoft.OperationalInsights/workspaces/datasources", "Microsoft.OperationalInsights/workspaces/sharedKeys": "Microsoft.OperationalInsights/workspaces/sharedKeys", "microsoft.aadiam/diagnosticSettings": "microsoft.aadiam/diagnosticSettings"},
        )
        _element.provider_display_name = AAZStrArg(
            options=["provider-display-name"],
            help="Permission provider display name",
            nullable=True,
        )
        _element.required_permissions = AAZObjectArg(
            options=["required-permissions"],
            help="Required permissions for the connector",
            nullable=True,
        )
        _element.scope = AAZStrArg(
            options=["scope"],
            help="Permission provider scope",
            nullable=True,
            enum={"ResourceGroup": "ResourceGroup", "Subscription": "Subscription", "Workspace": "Workspace"},
        )

        required_permissions = cls._args_codeless_ui_connector_config_properties_update.permissions.resource_provider.Element.required_permissions
        required_permissions.action = AAZBoolArg(
            options=["action"],
            help="action permission",
            nullable=True,
        )
        required_permissions.delete = AAZBoolArg(
            options=["delete"],
            help="delete permission",
            nullable=True,
        )
        required_permissions.read = AAZBoolArg(
            options=["read"],
            help="read permission",
            nullable=True,
        )
        required_permissions.write = AAZBoolArg(
            options=["write"],
            help="write permission",
            nullable=True,
        )

        sample_queries = cls._args_codeless_ui_connector_config_properties_update.sample_queries
        sample_queries.Element = AAZObjectArg()

        _element = cls._args_codeless_ui_connector_config_properties_update.sample_queries.Element
        _element.description = AAZStrArg(
            options=["description"],
            help="The sample query description",
            nullable=True,
        )
        _element.query = AAZStrArg(
            options=["query"],
            help="the sample query",
            nullable=True,
        )

        _schema.availability = cls._args_codeless_ui_connector_config_properties_update.availability
        _schema.connectivity_criteria = cls._args_codeless_ui_connector_config_properties_update.connectivity_criteria
        _schema.custom_image = cls._args_codeless_ui_connector_config_properties_update.custom_image
        _schema.data_types = cls._args_codeless_ui_connector_config_properties_update.data_types
        _schema.description_markdown = cls._args_codeless_ui_connector_config_properties_update.description_markdown
        _schema.graph_queries = cls._args_codeless_ui_connector_config_properties_update.graph_queries
        _schema.graph_queries_table_name = cls._args_codeless_ui_connector_config_properties_update.graph_queries_table_name
        _schema.instruction_steps = cls._args_codeless_ui_connector_config_properties_update.instruction_steps
        _schema.permissions = cls._args_codeless_ui_connector_config_properties_update.permissions
        _schema.publisher = cls._args_codeless_ui_connector_config_properties_update.publisher
        _schema.sample_queries = cls._args_codeless_ui_connector_config_properties_update.sample_queries
        _schema.title = cls._args_codeless_ui_connector_config_properties_update.title

    _args_data_connector_data_type_common_update = None

    @classmethod
    def _build_args_data_connector_data_type_common_update(cls, _schema):
        if cls._args_data_connector_data_type_common_update is not None:
            _schema.state = cls._args_data_connector_data_type_common_update.state
            return

        cls._args_data_connector_data_type_common_update = AAZObjectArg()

        data_connector_data_type_common_update = cls._args_data_connector_data_type_common_update
        data_connector_data_type_common_update.state = AAZStrArg(
            options=["state"],
            help="Describe whether this data type connection is enabled or not.",
            enum={"Disabled": "Disabled", "Enabled": "Enabled"},
        )

        _schema.state = cls._args_data_connector_data_type_common_update.state

    def _execute_operations(self):
        self.DataConnectorsGet(ctx=self.ctx)()
        self.InstanceUpdateByJson(ctx=self.ctx)()
        self.InstanceUpdateByGeneric(ctx=self.ctx)()
        self.DataConnectorsCreateOrUpdate(ctx=self.ctx)()

    def _output(self, *args, **kwargs):
        result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True)
        return result

    class DataConnectorsGet(AAZHttpOperation):
        CLIENT_TYPE = "MgmtClient"

        def __call__(self, *args, **kwargs):
            request = self.make_request()
            session = self.client.send_request(request=request, stream=False, **kwargs)
            if session.http_response.status_code in [200]:
                return self.on_200(session)

            return self.on_error(session.http_response)

        @property
        def url(self):
            return self.client.format_url(
                "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/dataConnectors/{dataConnectorId}",
                **self.url_parameters
            )

        @property
        def method(self):
            return "GET"

        @property
        def error_format(self):
            return "ODataV4Format"

        @property
        def url_parameters(self):
            parameters = {
                **self.serialize_url_param(
                    "dataConnectorId", self.ctx.args.data_connector_id,
                    required=True,
                ),
                **self.serialize_url_param(
                    "resourceGroupName", self.ctx.args.resource_group,
                    required=True,
                ),
                **self.serialize_url_param(
                    "subscriptionId", self.ctx.subscription_id,
                    required=True,
                ),
                **self.serialize_url_param(
                    "workspaceName", self.ctx.args.workspace_name,
                    required=True,
                ),
            }
            return parameters

        @property
        def query_parameters(self):
            parameters = {
                **self.serialize_query_param(
                    "api-version", "2022-06-01-preview",
                    required=True,
                ),
            }
            return parameters

        @property
        def header_parameters(self):
            parameters = {
                **self.serialize_header_param(
                    "Accept", "application/json",
                ),
            }
            return parameters

        def on_200(self, session):
            data = self.deserialize_http_content(session)
            self.ctx.set_var(
                "instance",
                data,
                schema_builder=self._build_schema_on_200
            )

        _schema_on_200 = None

        @classmethod
        def _build_schema_on_200(cls):
            if cls._schema_on_200 is not None:
                return cls._schema_on_200

            cls._schema_on_200 = AAZObjectType()
            _build_schema_data_connector_read(cls._schema_on_200)

            return cls._schema_on_200

    class DataConnectorsCreateOrUpdate(AAZHttpOperation):
        CLIENT_TYPE = "MgmtClient"

        def __call__(self, *args, **kwargs):
            request = self.make_request()
            session = self.client.send_request(request=request, stream=False, **kwargs)
            if session.http_response.status_code in [200, 201]:
                return self.on_200_201(session)

            return self.on_error(session.http_response)

        @property
        def url(self):
            return self.client.format_url(
                "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/dataConnectors/{dataConnectorId}",
                **self.url_parameters
            )

        @property
        def method(self):
            return "PUT"

        @property
        def error_format(self):
            return "ODataV4Format"

        @property
        def url_parameters(self):
            parameters = {
                **self.serialize_url_param(
                    "dataConnectorId", self.ctx.args.data_connector_id,
                    required=True,
                ),
                **self.serialize_url_param(
                    "resourceGroupName", self.ctx.args.resource_group,
                    required=True,
                ),
                **self.serialize_url_param(
                    "subscriptionId", self.ctx.subscription_id,
                    required=True,
                ),
                **self.serialize_url_param(
                    "workspaceName", self.ctx.args.workspace_name,
                    required=True,
                ),
            }
            return parameters

        @property
        def query_parameters(self):
            parameters = {
                **self.serialize_query_param(
                    "api-version", "2022-06-01-preview",
                    required=True,
                ),
            }
            return parameters

        @property
        def header_parameters(self):
            parameters = {
                **self.serialize_header_param(
                    "Content-Type", "application/json",
                ),
                **self.serialize_header_param(
                    "Accept", "application/json",
                ),
            }
            return parameters

        @property
        def content(self):
            _content_value, _builder = self.new_content_builder(
                self.ctx.args,
                value=self.ctx.vars.instance,
            )

            return self.serialize_content(_content_value)

        def on_200_201(self, session):
            data = self.deserialize_http_content(session)
            self.ctx.set_var(
                "instance",
                data,
                schema_builder=self._build_schema_on_200_201
            )

        _schema_on_200_201 = None

        @classmethod
        def _build_schema_on_200_201(cls):
            if cls._schema_on_200_201 is not None:
                return cls._schema_on_200_201

            cls._schema_on_200_201 = AAZObjectType()
            _build_schema_data_connector_read(cls._schema_on_200_201)

            return cls._schema_on_200_201

    class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation):

        def __call__(self, *args, **kwargs):
            self._update_instance(self.ctx.vars.instance)

        def _update_instance(self, instance):
            _instance_value, _builder = self.new_content_builder(
                self.ctx.args,
                value=instance,
                typ=AAZObjectType
            )
            _builder.set_prop("etag", AAZStrType, ".etag")
            _builder.set_const("kind", "APIPolling", AAZStrType, ".api_polling", typ_kwargs={"flags": {"required": True}})
            _builder.set_const("kind", "AmazonWebServicesCloudTrail", AAZStrType, ".aws_cloud_trail", typ_kwargs={"flags": {"required": True}})
            _builder.set_const("kind", "AmazonWebServicesS3", AAZStrType, ".aws_s3", typ_kwargs={"flags": {"required": True}})
            _builder.set_const("kind", "AzureActiveDirectory", AAZStrType, ".azure_active_directory", typ_kwargs={"flags": {"required": True}})
            _builder.set_const("kind", "AzureAdvancedThreatProtection", AAZStrType, ".azure_protection", typ_kwargs={"flags": {"required": True}})
            _builder.set_const("kind", "AzureSecurityCenter", AAZStrType, ".azure_security_center", typ_kwargs={"flags": {"required": True}})
            _builder.set_const("kind", "Dynamics365", AAZStrType, ".dynamics365", typ_kwargs={"flags": {"required": True}})
            _builder.set_const("kind", "GenericUI", AAZStrType, ".generic_ui", typ_kwargs={"flags": {"required": True}})
            _builder.set_const("kind", "IOT", AAZStrType, ".iot", typ_kwargs={"flags": {"required": True}})
            _builder.set_const("kind", "MicrosoftCloudAppSecurity", AAZStrType, ".cloud_app_security", typ_kwargs={"flags": {"required": True}})
            _builder.set_const("kind", "MicrosoftDefenderAdvancedThreatProtection", AAZStrType, ".defender_protection", typ_kwargs={"flags": {"required": True}})
            _builder.set_const("kind", "MicrosoftThreatIntelligence", AAZStrType, ".microsoft_intelligence", typ_kwargs={"flags": {"required": True}})
            _builder.set_const("kind", "MicrosoftThreatProtection", AAZStrType, ".microsoft_protection", typ_kwargs={"flags": {"required": True}})
            _builder.set_const("kind", "Office365", AAZStrType, ".office365", typ_kwargs={"flags": {"required": True}})
            _builder.set_const("kind", "Office365Project", AAZStrType, ".office365_project", typ_kwargs={"flags": {"required": True}})
            _builder.set_const("kind", "OfficeATP", AAZStrType, ".office_atp", typ_kwargs={"flags": {"required": True}})
            _builder.set_const("kind", "OfficeIRM", AAZStrType, ".office_irm", typ_kwargs={"flags": {"required": True}})
            _builder.set_const("kind", "OfficePowerBI", AAZStrType, ".office_power_bi", typ_kwargs={"flags": {"required": True}})
            _builder.set_const("kind", "ThreatIntelligence", AAZStrType, ".threat_intelligence", typ_kwargs={"flags": {"required": True}})
            _builder.set_const("kind", "ThreatIntelligenceTaxii", AAZStrType, ".intelligence_taxii", typ_kwargs={"flags": {"required": True}})
            _builder.discriminate_by("kind", "APIPolling")
            _builder.discriminate_by("kind", "AmazonWebServicesCloudTrail")
            _builder.discriminate_by("kind", "AmazonWebServicesS3")
            _builder.discriminate_by("kind", "AzureActiveDirectory")
            _builder.discriminate_by("kind", "AzureAdvancedThreatProtection")
            _builder.discriminate_by("kind", "AzureSecurityCenter")
            _builder.discriminate_by("kind", "Dynamics365")
            _builder.discriminate_by("kind", "GenericUI")
            _builder.discriminate_by("kind", "IOT")
            _builder.discriminate_by("kind", "MicrosoftCloudAppSecurity")
            _builder.discriminate_by("kind", "MicrosoftDefenderAdvancedThreatProtection")
            _builder.discriminate_by("kind", "MicrosoftThreatIntelligence")
            _builder.discriminate_by("kind", "MicrosoftThreatProtection")
            _builder.discriminate_by("kind", "Office365")
            _builder.discriminate_by("kind", "Office365Project")
            _builder.discriminate_by("kind", "OfficeATP")
            _builder.discriminate_by("kind", "OfficeIRM")
            _builder.discriminate_by("kind", "OfficePowerBI")
            _builder.discriminate_by("kind", "ThreatIntelligence")
            _builder.discriminate_by("kind", "ThreatIntelligenceTaxii")

            disc_api_polling = _builder.get("{kind:APIPolling}")
            if disc_api_polling is not None:
                disc_api_polling.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})

            properties = _builder.get("{kind:APIPolling}.properties")
            if properties is not None:
                _build_schema_codeless_ui_connector_config_properties_update(properties.set_prop("connectorUiConfig", AAZObjectType, ".api_polling.connector_ui_config"))
                properties.set_prop("pollingConfig", AAZObjectType, ".api_polling.polling_config")

            polling_config = _builder.get("{kind:APIPolling}.properties.pollingConfig")
            if polling_config is not None:
                polling_config.set_prop("auth", AAZObjectType, ".auth", typ_kwargs={"flags": {"required": True}})
                polling_config.set_prop("isActive", AAZBoolType, ".is_active")
                polling_config.set_prop("paging", AAZObjectType, ".paging")
                polling_config.set_prop("request", AAZObjectType, ".request", typ_kwargs={"flags": {"required": True}})
                polling_config.set_prop("response", AAZObjectType, ".response")

            auth = _builder.get("{kind:APIPolling}.properties.pollingConfig.auth")
            if auth is not None:
                auth.set_prop("apiKeyIdentifier", AAZStrType, ".api_key_identifier")
                auth.set_prop("apiKeyName", AAZStrType, ".api_key_name")
                auth.set_prop("authType", AAZStrType, ".auth_type", typ_kwargs={"flags": {"required": True}})
                auth.set_prop("authorizationEndpoint", AAZStrType, ".authorization_endpoint")
                auth.set_prop("flowName", AAZStrType, ".flow_name")
                auth.set_prop("isApiKeyInPostPayload", AAZStrType, ".is_api_key_in_post_payload")
                auth.set_prop("isClientSecretInHeader", AAZBoolType, ".is_client_secret_in_header")
                auth.set_prop("redirectionEndpoint", AAZStrType, ".redirection_endpoint")
                auth.set_prop("scope", AAZStrType, ".scope")
                auth.set_prop("tokenEndpoint", AAZStrType, ".token_endpoint")

            paging = _builder.get("{kind:APIPolling}.properties.pollingConfig.paging")
            if paging is not None:
                paging.set_prop("nextPageParaName", AAZStrType, ".next_page_para_name")
                paging.set_prop("nextPageTokenJsonPath", AAZStrType, ".next_page_token_json_path")
                paging.set_prop("pageCountAttributePath", AAZStrType, ".page_count_attribute_path")
                paging.set_prop("pageSize", AAZIntType, ".page_size")
                paging.set_prop("pageSizeParaName", AAZStrType, ".page_size_para_name")
                paging.set_prop("pageTimeStampAttributePath", AAZStrType, ".page_time_stamp_attribute_path")
                paging.set_prop("pageTotalCountAttributePath", AAZStrType, ".page_total_count_attribute_path")
                paging.set_prop("pagingType", AAZStrType, ".paging_type", typ_kwargs={"flags": {"required": True}})
                paging.set_prop("searchTheLatestTimeStampFromEventsList", AAZStrType, ".search_the_latest_time_stamp_from_events_list")

            request = _builder.get("{kind:APIPolling}.properties.pollingConfig.request")
            if request is not None:
                request.set_prop("apiEndpoint", AAZStrType, ".api_endpoint", typ_kwargs={"flags": {"required": True}})
                request.set_prop("endTimeAttributeName", AAZStrType, ".end_time_attribute_name")
                request.set_prop("httpMethod", AAZStrType, ".http_method", typ_kwargs={"flags": {"required": True}})
                request.set_prop("queryParametersTemplate", AAZStrType, ".query_parameters_template")
                request.set_prop("queryTimeFormat", AAZStrType, ".query_time_format", typ_kwargs={"flags": {"required": True}})
                request.set_prop("queryWindowInMin", AAZIntType, ".query_window_in_min", typ_kwargs={"flags": {"required": True}})
                request.set_prop("rateLimitQps", AAZIntType, ".rate_limit_qps")
                request.set_prop("retryCount", AAZIntType, ".retry_count")
                request.set_prop("startTimeAttributeName", AAZStrType, ".start_time_attribute_name")
                request.set_prop("timeoutInSeconds", AAZIntType, ".timeout_in_seconds")

            response = _builder.get("{kind:APIPolling}.properties.pollingConfig.response")
            if response is not None:
                response.set_prop("eventsJsonPaths", AAZListType, ".events_json_paths", typ_kwargs={"flags": {"required": True}})
                response.set_prop("isGzipCompressed", AAZBoolType, ".is_gzip_compressed")
                response.set_prop("successStatusJsonPath", AAZStrType, ".success_status_json_path")
                response.set_prop("successStatusValue", AAZStrType, ".success_status_value")

            events_json_paths = _builder.get("{kind:APIPolling}.properties.pollingConfig.response.eventsJsonPaths")
            if events_json_paths is not None:
                events_json_paths.set_elements(AAZStrType, ".")

            disc_amazon_web_services_cloud_trail = _builder.get("{kind:AmazonWebServicesCloudTrail}")
            if disc_amazon_web_services_cloud_trail is not None:
                disc_amazon_web_services_cloud_trail.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})

            properties = _builder.get("{kind:AmazonWebServicesCloudTrail}.properties")
            if properties is not None:
                properties.set_prop("awsRoleArn", AAZStrType, ".aws_cloud_trail.aws_role_arn")
                properties.set_prop("dataTypes", AAZObjectType, ".aws_cloud_trail.data_types", typ_kwargs={"flags": {"required": True}})

            data_types = _builder.get("{kind:AmazonWebServicesCloudTrail}.properties.dataTypes")
            if data_types is not None:
                data_types.set_prop("logs", AAZObjectType, ".logs", typ_kwargs={"flags": {"required": True}})

            logs = _builder.get("{kind:AmazonWebServicesCloudTrail}.properties.dataTypes.logs")
            if logs is not None:
                logs.set_prop("state", AAZStrType, ".state", typ_kwargs={"flags": {"required": True}})

            disc_amazon_web_services_s3 = _builder.get("{kind:AmazonWebServicesS3}")
            if disc_amazon_web_services_s3 is not None:
                disc_amazon_web_services_s3.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})

            properties = _builder.get("{kind:AmazonWebServicesS3}.properties")
            if properties is not None:
                properties.set_prop("dataTypes", AAZObjectType, ".aws_s3.data_types", typ_kwargs={"flags": {"required": True}})
                properties.set_prop("destinationTable", AAZStrType, ".aws_s3.destination_table", typ_kwargs={"flags": {"required": True}})
                properties.set_prop("roleArn", AAZStrType, ".aws_s3.role_arn", typ_kwargs={"flags": {"required": True}})
                properties.set_prop("sqsUrls", AAZListType, ".aws_s3.sqs_urls", typ_kwargs={"flags": {"required": True}})

            data_types = _builder.get("{kind:AmazonWebServicesS3}.properties.dataTypes")
            if data_types is not None:
                data_types.set_prop("logs", AAZObjectType, ".logs", typ_kwargs={"flags": {"required": True}})

            logs = _builder.get("{kind:AmazonWebServicesS3}.properties.dataTypes.logs")
            if logs is not None:
                logs.set_prop("state", AAZStrType, ".state", typ_kwargs={"flags": {"required": True}})

            sqs_urls = _builder.get("{kind:AmazonWebServicesS3}.properties.sqsUrls")
            if sqs_urls is not None:
                sqs_urls.set_elements(AAZStrType, ".")

            disc_azure_active_directory = _builder.get("{kind:AzureActiveDirectory}")
            if disc_azure_active_directory is not None:
                disc_azure_active_directory.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})

            properties = _builder.get("{kind:AzureActiveDirectory}.properties")
            if properties is not None:
                _build_schema_alerts_data_type_of_data_connector_update(properties.set_prop("dataTypes", AAZObjectType, ".azure_active_directory.data_types"))
                properties.set_prop("tenantId", AAZStrType, ".azure_active_directory.tenant_id", typ_kwargs={"flags": {"required": True}})

            disc_azure_advanced_threat_protection = _builder.get("{kind:AzureAdvancedThreatProtection}")
            if disc_azure_advanced_threat_protection is not None:
                disc_azure_advanced_threat_protection.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})

            properties = _builder.get("{kind:AzureAdvancedThreatProtection}.properties")
            if properties is not None:
                _build_schema_alerts_data_type_of_data_connector_update(properties.set_prop("dataTypes", AAZObjectType, ".azure_protection.data_types"))
                properties.set_prop("tenantId", AAZStrType, ".azure_protection.tenant_id", typ_kwargs={"flags": {"required": True}})

            disc_azure_security_center = _builder.get("{kind:AzureSecurityCenter}")
            if disc_azure_security_center is not None:
                disc_azure_security_center.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})

            properties = _builder.get("{kind:AzureSecurityCenter}.properties")
            if properties is not None:
                _build_schema_alerts_data_type_of_data_connector_update(properties.set_prop("dataTypes", AAZObjectType, ".azure_security_center.data_types"))
                properties.set_prop("subscriptionId", AAZStrType, ".azure_security_center.subscription_id")

            disc_dynamics365 = _builder.get("{kind:Dynamics365}")
            if disc_dynamics365 is not None:
                disc_dynamics365.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})

            properties = _builder.get("{kind:Dynamics365}.properties")
            if properties is not None:
                properties.set_prop("dataTypes", AAZObjectType, ".dynamics365.data_types", typ_kwargs={"flags": {"required": True}})
                properties.set_prop("tenantId", AAZStrType, ".dynamics365.tenant_id", typ_kwargs={"flags": {"required": True}})

            data_types = _builder.get("{kind:Dynamics365}.properties.dataTypes")
            if data_types is not None:
                data_types.set_prop("dynamics365CdsActivities", AAZObjectType, ".dynamics365_cds_activities", typ_kwargs={"flags": {"required": True}})

            dynamics365_cds_activities = _builder.get("{kind:Dynamics365}.properties.dataTypes.dynamics365CdsActivities")
            if dynamics365_cds_activities is not None:
                dynamics365_cds_activities.set_prop("state", AAZStrType, ".state", typ_kwargs={"flags": {"required": True}})

            disc_generic_ui = _builder.get("{kind:GenericUI}")
            if disc_generic_ui is not None:
                disc_generic_ui.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})

            properties = _builder.get("{kind:GenericUI}.properties")
            if properties is not None:
                _build_schema_codeless_ui_connector_config_properties_update(properties.set_prop("connectorUiConfig", AAZObjectType, ".generic_ui.connector_ui_config"))

            disc_iot = _builder.get("{kind:IOT}")
            if disc_iot is not None:
                disc_iot.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})

            properties = _builder.get("{kind:IOT}.properties")
            if properties is not None:
                _build_schema_alerts_data_type_of_data_connector_update(properties.set_prop("dataTypes", AAZObjectType, ".iot.data_types"))
                properties.set_prop("subscriptionId", AAZStrType, ".iot.subscription_id")

            disc_microsoft_cloud_app_security = _builder.get("{kind:MicrosoftCloudAppSecurity}")
            if disc_microsoft_cloud_app_security is not None:
                disc_microsoft_cloud_app_security.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})

            properties = _builder.get("{kind:MicrosoftCloudAppSecurity}.properties")
            if properties is not None:
                properties.set_prop("dataTypes", AAZObjectType, ".cloud_app_security.data_types", typ_kwargs={"flags": {"required": True}})
                properties.set_prop("tenantId", AAZStrType, ".cloud_app_security.tenant_id", typ_kwargs={"flags": {"required": True}})

            data_types = _builder.get("{kind:MicrosoftCloudAppSecurity}.properties.dataTypes")
            if data_types is not None:
                _build_schema_data_connector_data_type_common_update(data_types.set_prop("alerts", AAZObjectType, ".alerts", typ_kwargs={"flags": {"required": True}}))
                _build_schema_data_connector_data_type_common_update(data_types.set_prop("discoveryLogs", AAZObjectType, ".discovery_logs"))

            disc_microsoft_defender_advanced_threat_protection = _builder.get("{kind:MicrosoftDefenderAdvancedThreatProtection}")
            if disc_microsoft_defender_advanced_threat_protection is not None:
                disc_microsoft_defender_advanced_threat_protection.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})

            properties = _builder.get("{kind:MicrosoftDefenderAdvancedThreatProtection}.properties")
            if properties is not None:
                _build_schema_alerts_data_type_of_data_connector_update(properties.set_prop("dataTypes", AAZObjectType, ".defender_protection.data_types"))
                properties.set_prop("tenantId", AAZStrType, ".defender_protection.tenant_id", typ_kwargs={"flags": {"required": True}})

            disc_microsoft_threat_intelligence = _builder.get("{kind:MicrosoftThreatIntelligence}")
            if disc_microsoft_threat_intelligence is not None:
                disc_microsoft_threat_intelligence.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})

            properties = _builder.get("{kind:MicrosoftThreatIntelligence}.properties")
            if properties is not None:
                properties.set_prop("dataTypes", AAZObjectType, ".microsoft_intelligence.data_types", typ_kwargs={"flags": {"required": True}})
                properties.set_prop("tenantId", AAZStrType, ".microsoft_intelligence.tenant_id", typ_kwargs={"flags": {"required": True}})

            data_types = _builder.get("{kind:MicrosoftThreatIntelligence}.properties.dataTypes")
            if data_types is not None:
                data_types.set_prop("bingSafetyPhishingURL", AAZObjectType, ".bing_safety_phishing_url", typ_kwargs={"flags": {"required": True}})
                data_types.set_prop("microsoftEmergingThreatFeed", AAZObjectType, ".microsoft_emerging_threat_feed", typ_kwargs={"flags": {"required": True}})

            bing_safety_phishing_url = _builder.get("{kind:MicrosoftThreatIntelligence}.properties.dataTypes.bingSafetyPhishingURL")
            if bing_safety_phishing_url is not None:
                bing_safety_phishing_url.set_prop("lookbackPeriod", AAZStrType, ".lookback_period", typ_kwargs={"flags": {"required": True}})
                bing_safety_phishing_url.set_prop("state", AAZStrType, ".state", typ_kwargs={"flags": {"required": True}})

            microsoft_emerging_threat_feed = _builder.get("{kind:MicrosoftThreatIntelligence}.properties.dataTypes.microsoftEmergingThreatFeed")
            if microsoft_emerging_threat_feed is not None:
                microsoft_emerging_threat_feed.set_prop("lookbackPeriod", AAZStrType, ".lookback_period", typ_kwargs={"flags": {"required": True}})
                microsoft_emerging_threat_feed.set_prop("state", AAZStrType, ".state", typ_kwargs={"flags": {"required": True}})

            disc_microsoft_threat_protection = _builder.get("{kind:MicrosoftThreatProtection}")
            if disc_microsoft_threat_protection is not None:
                disc_microsoft_threat_protection.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})

            properties = _builder.get("{kind:MicrosoftThreatProtection}.properties")
            if properties is not None:
                properties.set_prop("dataTypes", AAZObjectType, ".microsoft_protection.data_types", typ_kwargs={"flags": {"required": True}})
                properties.set_prop("tenantId", AAZStrType, ".microsoft_protection.tenant_id", typ_kwargs={"flags": {"required": True}})

            data_types = _builder.get("{kind:MicrosoftThreatProtection}.properties.dataTypes")
            if data_types is not None:
                data_types.set_prop("incidents", AAZObjectType, ".incidents", typ_kwargs={"flags": {"required": True}})

            incidents = _builder.get("{kind:MicrosoftThreatProtection}.properties.dataTypes.incidents")
            if incidents is not None:
                incidents.set_prop("state", AAZStrType, ".state", typ_kwargs={"flags": {"required": True}})

            disc_office365 = _builder.get("{kind:Office365}")
            if disc_office365 is not None:
                disc_office365.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})

            properties = _builder.get("{kind:Office365}.properties")
            if properties is not None:
                properties.set_prop("dataTypes", AAZObjectType, ".office365.data_types", typ_kwargs={"flags": {"required": True}})
                properties.set_prop("tenantId", AAZStrType, ".office365.tenant_id", typ_kwargs={"flags": {"required": True}})

            data_types = _builder.get("{kind:Office365}.properties.dataTypes")
            if data_types is not None:
                data_types.set_prop("exchange", AAZObjectType, ".exchange", typ_kwargs={"flags": {"required": True}})
                data_types.set_prop("sharePoint", AAZObjectType, ".share_point", typ_kwargs={"flags": {"required": True}})
                data_types.set_prop("teams", AAZObjectType, ".teams", typ_kwargs={"flags": {"required": True}})

            exchange = _builder.get("{kind:Office365}.properties.dataTypes.exchange")
            if exchange is not None:
                exchange.set_prop("state", AAZStrType, ".state", typ_kwargs={"flags": {"required": True}})

            share_point = _builder.get("{kind:Office365}.properties.dataTypes.sharePoint")
            if share_point is not None:
                share_point.set_prop("state", AAZStrType, ".state", typ_kwargs={"flags": {"required": True}})

            teams = _builder.get("{kind:Office365}.properties.dataTypes.teams")
            if teams is not None:
                teams.set_prop("state", AAZStrType, ".state", typ_kwargs={"flags": {"required": True}})

            disc_office365_project = _builder.get("{kind:Office365Project}")
            if disc_office365_project is not None:
                disc_office365_project.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})

            properties = _builder.get("{kind:Office365Project}.properties")
            if properties is not None:
                properties.set_prop("dataTypes", AAZObjectType, ".office365_project.data_types", typ_kwargs={"flags": {"required": True}})
                properties.set_prop("tenantId", AAZStrType, ".office365_project.tenant_id", typ_kwargs={"flags": {"required": True}})

            data_types = _builder.get("{kind:Office365Project}.properties.dataTypes")
            if data_types is not None:
                data_types.set_prop("logs", AAZObjectType, ".logs", typ_kwargs={"flags": {"required": True}})

            logs = _builder.get("{kind:Office365Project}.properties.dataTypes.logs")
            if logs is not None:
                logs.set_prop("state", AAZStrType, ".state", typ_kwargs={"flags": {"required": True}})

            disc_office_atp = _builder.get("{kind:OfficeATP}")
            if disc_office_atp is not None:
                disc_office_atp.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})

            properties = _builder.get("{kind:OfficeATP}.properties")
            if properties is not None:
                _build_schema_alerts_data_type_of_data_connector_update(properties.set_prop("dataTypes", AAZObjectType, ".office_atp.data_types"))
                properties.set_prop("tenantId", AAZStrType, ".office_atp.tenant_id", typ_kwargs={"flags": {"required": True}})

            disc_office_irm = _builder.get("{kind:OfficeIRM}")
            if disc_office_irm is not None:
                disc_office_irm.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})

            properties = _builder.get("{kind:OfficeIRM}.properties")
            if properties is not None:
                _build_schema_alerts_data_type_of_data_connector_update(properties.set_prop("dataTypes", AAZObjectType, ".office_irm.data_types"))
                properties.set_prop("tenantId", AAZStrType, ".office_irm.tenant_id", typ_kwargs={"flags": {"required": True}})

            disc_office_power_bi = _builder.get("{kind:OfficePowerBI}")
            if disc_office_power_bi is not None:
                disc_office_power_bi.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})

            properties = _builder.get("{kind:OfficePowerBI}.properties")
            if properties is not None:
                properties.set_prop("dataTypes", AAZObjectType, ".office_power_bi.data_types", typ_kwargs={"flags": {"required": True}})
                properties.set_prop("tenantId", AAZStrType, ".office_power_bi.tenant_id", typ_kwargs={"flags": {"required": True}})

            data_types = _builder.get("{kind:OfficePowerBI}.properties.dataTypes")
            if data_types is not None:
                data_types.set_prop("logs", AAZObjectType, ".logs", typ_kwargs={"flags": {"required": True}})

            logs = _builder.get("{kind:OfficePowerBI}.properties.dataTypes.logs")
            if logs is not None:
                logs.set_prop("state", AAZStrType, ".state", typ_kwargs={"flags": {"required": True}})

            disc_threat_intelligence = _builder.get("{kind:ThreatIntelligence}")
            if disc_threat_intelligence is not None:
                disc_threat_intelligence.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})

            properties = _builder.get("{kind:ThreatIntelligence}.properties")
            if properties is not None:
                properties.set_prop("dataTypes", AAZObjectType, ".threat_intelligence.data_types", typ_kwargs={"flags": {"required": True}})
                properties.set_prop("tenantId", AAZStrType, ".threat_intelligence.tenant_id", typ_kwargs={"flags": {"required": True}})
                properties.set_prop("tipLookbackPeriod", AAZStrType, ".threat_intelligence.tip_lookback_period", typ_kwargs={"nullable": True})

            data_types = _builder.get("{kind:ThreatIntelligence}.properties.dataTypes")
            if data_types is not None:
                data_types.set_prop("indicators", AAZObjectType, ".indicators", typ_kwargs={"flags": {"required": True}})

            indicators = _builder.get("{kind:ThreatIntelligence}.properties.dataTypes.indicators")
            if indicators is not None:
                indicators.set_prop("state", AAZStrType, ".state", typ_kwargs={"flags": {"required": True}})

            disc_threat_intelligence_taxii = _builder.get("{kind:ThreatIntelligenceTaxii}")
            if disc_threat_intelligence_taxii is not None:
                disc_threat_intelligence_taxii.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})

            properties = _builder.get("{kind:ThreatIntelligenceTaxii}.properties")
            if properties is not None:
                properties.set_prop("collectionId", AAZStrType, ".intelligence_taxii.collection_id")
                properties.set_prop("dataTypes", AAZObjectType, ".intelligence_taxii.data_types", typ_kwargs={"flags": {"required": True}})
                properties.set_prop("friendlyName", AAZStrType, ".intelligence_taxii.friendly_name")
                properties.set_prop("password", AAZStrType, ".intelligence_taxii.password")
                properties.set_prop("pollingFrequency", AAZStrType, ".intelligence_taxii.polling_frequency", typ_kwargs={"flags": {"required": True}, "nullable": True})
                properties.set_prop("taxiiLookbackPeriod", AAZStrType, ".intelligence_taxii.taxii_lookback_period", typ_kwargs={"nullable": True})
                properties.set_prop("taxiiServer", AAZStrType, ".intelligence_taxii.taxii_server")
                properties.set_prop("tenantId", AAZStrType, ".intelligence_taxii.tenant_id", typ_kwargs={"flags": {"required": True}})
                properties.set_prop("userName", AAZStrType, ".intelligence_taxii.user_name")
                properties.set_prop("workspaceId", AAZStrType, ".intelligence_taxii.workspace_id")

            data_types = _builder.get("{kind:ThreatIntelligenceTaxii}.properties.dataTypes")
            if data_types is not None:
                data_types.set_prop("taxiiClient", AAZObjectType, ".taxii_client", typ_kwargs={"flags": {"required": True}})

            taxii_client = _builder.get("{kind:ThreatIntelligenceTaxii}.properties.dataTypes.taxiiClient")
            if taxii_client is not None:
                taxii_client.set_prop("state", AAZStrType, ".state", typ_kwargs={"flags": {"required": True}})

            return _instance_value

    class InstanceUpdateByGeneric(AAZGenericInstanceUpdateOperation):

        def __call__(self, *args, **kwargs):
            self._update_instance_by_generic(
                self.ctx.vars.instance,
                self.ctx.generic_update_args
            )


def _build_schema_alerts_data_type_of_data_connector_update(_builder):
    if _builder is None:
        return
    _build_schema_data_connector_data_type_common_update(_builder.set_prop("alerts", AAZObjectType, ".alerts", typ_kwargs={"flags": {"required": True}}))


def _build_schema_codeless_ui_connector_config_properties_update(_builder):
    if _builder is None:
        return
    _builder.set_prop("availability", AAZObjectType, ".availability", typ_kwargs={"flags": {"required": True}})
    _builder.set_prop("connectivityCriteria", AAZListType, ".connectivity_criteria", typ_kwargs={"flags": {"required": True}})
    _builder.set_prop("customImage", AAZStrType, ".custom_image")
    _builder.set_prop("dataTypes", AAZListType, ".data_types", typ_kwargs={"flags": {"required": True}})
    _builder.set_prop("descriptionMarkdown", AAZStrType, ".description_markdown", typ_kwargs={"flags": {"required": True}})
    _builder.set_prop("graphQueries", AAZListType, ".graph_queries", typ_kwargs={"flags": {"required": True}})
    _builder.set_prop("graphQueriesTableName", AAZStrType, ".graph_queries_table_name", typ_kwargs={"flags": {"required": True}})
    _builder.set_prop("instructionSteps", AAZListType, ".instruction_steps", typ_kwargs={"flags": {"required": True}})
    _builder.set_prop("permissions", AAZObjectType, ".permissions", typ_kwargs={"flags": {"required": True}})
    _builder.set_prop("publisher", AAZStrType, ".publisher", typ_kwargs={"flags": {"required": True}})
    _builder.set_prop("sampleQueries", AAZListType, ".sample_queries", typ_kwargs={"flags": {"required": True}})
    _builder.set_prop("title", AAZStrType, ".title", typ_kwargs={"flags": {"required": True}})

    availability = _builder.get(".availability")
    if availability is not None:
        availability.set_prop("isPreview", AAZBoolType, ".is_preview")
        availability.set_prop("status", AAZIntType, ".status")

    connectivity_criteria = _builder.get(".connectivityCriteria")
    if connectivity_criteria is not None:
        connectivity_criteria.set_elements(AAZObjectType)

    _elements = _builder.get(".connectivityCriteria[]")
    if _elements is not None:
        _elements.set_prop("type", AAZStrType, "@CodelessUiConnectorConfigProperties_update.connectivity_criteria.[].type")
        _elements.set_prop("value", AAZListType, "@CodelessUiConnectorConfigProperties_update.connectivity_criteria.[].value")

    value = _builder.get(".connectivityCriteria[].value")
    if value is not None:
        value.set_elements(AAZStrType, ".")

    data_types = _builder.get(".dataTypes")
    if data_types is not None:
        data_types.set_elements(AAZObjectType)

    _elements = _builder.get(".dataTypes[]")
    if _elements is not None:
        _elements.set_prop("lastDataReceivedQuery", AAZStrType, "@CodelessUiConnectorConfigProperties_update.data_types.[].last_data_received_query")
        _elements.set_prop("name", AAZStrType, "@CodelessUiConnectorConfigProperties_update.data_types.[].name")

    graph_queries = _builder.get(".graphQueries")
    if graph_queries is not None:
        graph_queries.set_elements(AAZObjectType)

    _elements = _builder.get(".graphQueries[]")
    if _elements is not None:
        _elements.set_prop("baseQuery", AAZStrType, "@CodelessUiConnectorConfigProperties_update.graph_queries.[].base_query")
        _elements.set_prop("legend", AAZStrType, "@CodelessUiConnectorConfigProperties_update.graph_queries.[].legend")
        _elements.set_prop("metricName", AAZStrType, "@CodelessUiConnectorConfigProperties_update.graph_queries.[].metric_name")

    instruction_steps = _builder.get(".instructionSteps")
    if instruction_steps is not None:
        instruction_steps.set_elements(AAZObjectType)

    _elements = _builder.get(".instructionSteps[]")
    if _elements is not None:
        _elements.set_prop("description", AAZStrType, "@CodelessUiConnectorConfigProperties_update.instruction_steps.[].description")
        _elements.set_prop("instructions", AAZListType, "@CodelessUiConnectorConfigProperties_update.instruction_steps.[].instructions")
        _elements.set_prop("title", AAZStrType, "@CodelessUiConnectorConfigProperties_update.instruction_steps.[].title")

    instructions = _builder.get(".instructionSteps[].instructions")
    if instructions is not None:
        instructions.set_elements(AAZObjectType)

    _elements = _builder.get(".instructionSteps[].instructions[]")
    if _elements is not None:
        _elements.set_prop("type", AAZStrType, "@CodelessUiConnectorConfigProperties_update.instruction_steps.[].instructions.[].type", typ_kwargs={"flags": {"required": True}})

    permissions = _builder.get(".permissions")
    if permissions is not None:
        permissions.set_prop("customs", AAZListType, ".customs")
        permissions.set_prop("resourceProvider", AAZListType, ".resource_provider")

    customs = _builder.get(".permissions.customs")
    if customs is not None:
        customs.set_elements(AAZObjectType)

    _elements = _builder.get(".permissions.customs[]")
    if _elements is not None:
        _elements.set_prop("description", AAZStrType, "@CodelessUiConnectorConfigProperties_update.permissions.customs.[].description")
        _elements.set_prop("name", AAZStrType, "@CodelessUiConnectorConfigProperties_update.permissions.customs.[].name")

    resource_provider = _builder.get(".permissions.resourceProvider")
    if resource_provider is not None:
        resource_provider.set_elements(AAZObjectType)

    _elements = _builder.get(".permissions.resourceProvider[]")
    if _elements is not None:
        _elements.set_prop("permissionsDisplayText", AAZStrType, "@CodelessUiConnectorConfigProperties_update.permissions.resource_provider.[].permissions_display_text")
        _elements.set_prop("provider", AAZStrType, "@CodelessUiConnectorConfigProperties_update.permissions.resource_provider.[].provider")
        _elements.set_prop("providerDisplayName", AAZStrType, "@CodelessUiConnectorConfigProperties_update.permissions.resource_provider.[].provider_display_name")
        _elements.set_prop("requiredPermissions", AAZObjectType, "@CodelessUiConnectorConfigProperties_update.permissions.resource_provider.[].required_permissions")
        _elements.set_prop("scope", AAZStrType, "@CodelessUiConnectorConfigProperties_update.permissions.resource_provider.[].scope")

    required_permissions = _builder.get(".permissions.resourceProvider[].requiredPermissions")
    if required_permissions is not None:
        required_permissions.set_prop("action", AAZBoolType, ".action")
        required_permissions.set_prop("delete", AAZBoolType, ".delete")
        required_permissions.set_prop("read", AAZBoolType, ".read")
        required_permissions.set_prop("write", AAZBoolType, ".write")

    sample_queries = _builder.get(".sampleQueries")
    if sample_queries is not None:
        sample_queries.set_elements(AAZObjectType)

    _elements = _builder.get(".sampleQueries[]")
    if _elements is not None:
        _elements.set_prop("description", AAZStrType, "@CodelessUiConnectorConfigProperties_update.sample_queries.[].description")
        _elements.set_prop("query", AAZStrType, "@CodelessUiConnectorConfigProperties_update.sample_queries.[].query")


def _build_schema_data_connector_data_type_common_update(_builder):
    if _builder is None:
        return
    _builder.set_prop("state", AAZStrType, ".state", typ_kwargs={"flags": {"required": True}})


_schema_alerts_data_type_of_data_connector_read = None


def _build_schema_alerts_data_type_of_data_connector_read(_schema):
    global _schema_alerts_data_type_of_data_connector_read
    if _schema_alerts_data_type_of_data_connector_read is not None:
        _schema.alerts = _schema_alerts_data_type_of_data_connector_read.alerts
        return

    _schema_alerts_data_type_of_data_connector_read = AAZObjectType()

    alerts_data_type_of_data_connector_read = _schema_alerts_data_type_of_data_connector_read
    alerts_data_type_of_data_connector_read.alerts = AAZObjectType(
        flags={"required": True},
    )
    _build_schema_data_connector_data_type_common_read(alerts_data_type_of_data_connector_read.alerts)

    _schema.alerts = _schema_alerts_data_type_of_data_connector_read.alerts


_schema_codeless_ui_connector_config_properties_read = None


def _build_schema_codeless_ui_connector_config_properties_read(_schema):
    global _schema_codeless_ui_connector_config_properties_read
    if _schema_codeless_ui_connector_config_properties_read is not None:
        _schema.availability = _schema_codeless_ui_connector_config_properties_read.availability
        _schema.connectivity_criteria = _schema_codeless_ui_connector_config_properties_read.connectivity_criteria
        _schema.custom_image = _schema_codeless_ui_connector_config_properties_read.custom_image
        _schema.data_types = _schema_codeless_ui_connector_config_properties_read.data_types
        _schema.description_markdown = _schema_codeless_ui_connector_config_properties_read.description_markdown
        _schema.graph_queries = _schema_codeless_ui_connector_config_properties_read.graph_queries
        _schema.graph_queries_table_name = _schema_codeless_ui_connector_config_properties_read.graph_queries_table_name
        _schema.instruction_steps = _schema_codeless_ui_connector_config_properties_read.instruction_steps
        _schema.permissions = _schema_codeless_ui_connector_config_properties_read.permissions
        _schema.publisher = _schema_codeless_ui_connector_config_properties_read.publisher
        _schema.sample_queries = _schema_codeless_ui_connector_config_properties_read.sample_queries
        _schema.title = _schema_codeless_ui_connector_config_properties_read.title
        return

    _schema_codeless_ui_connector_config_properties_read = AAZObjectType()

    codeless_ui_connector_config_properties_read = _schema_codeless_ui_connector_config_properties_read
    codeless_ui_connector_config_properties_read.availability = AAZObjectType(
        flags={"required": True},
    )
    codeless_ui_connector_config_properties_read.connectivity_criteria = AAZListType(
        serialized_name="connectivityCriteria",
        flags={"required": True},
    )
    codeless_ui_connector_config_properties_read.custom_image = AAZStrType(
        serialized_name="customImage",
    )
    codeless_ui_connector_config_properties_read.data_types = AAZListType(
        serialized_name="dataTypes",
        flags={"required": True},
    )
    codeless_ui_connector_config_properties_read.description_markdown = AAZStrType(
        serialized_name="descriptionMarkdown",
        flags={"required": True},
    )
    codeless_ui_connector_config_properties_read.graph_queries = AAZListType(
        serialized_name="graphQueries",
        flags={"required": True},
    )
    codeless_ui_connector_config_properties_read.graph_queries_table_name = AAZStrType(
        serialized_name="graphQueriesTableName",
        flags={"required": True},
    )
    codeless_ui_connector_config_properties_read.instruction_steps = AAZListType(
        serialized_name="instructionSteps",
        flags={"required": True},
    )
    codeless_ui_connector_config_properties_read.permissions = AAZObjectType(
        flags={"required": True},
    )
    codeless_ui_connector_config_properties_read.publisher = AAZStrType(
        flags={"required": True},
    )
    codeless_ui_connector_config_properties_read.sample_queries = AAZListType(
        serialized_name="sampleQueries",
        flags={"required": True},
    )
    codeless_ui_connector_config_properties_read.title = AAZStrType(
        flags={"required": True},
    )

    availability = _schema_codeless_ui_connector_config_properties_read.availability
    availability.is_preview = AAZBoolType(
        serialized_name="isPreview",
    )
    availability.status = AAZIntType()

    connectivity_criteria = _schema_codeless_ui_connector_config_properties_read.connectivity_criteria
    connectivity_criteria.Element = AAZObjectType()

    _element = _schema_codeless_ui_connector_config_properties_read.connectivity_criteria.Element
    _element.type = AAZStrType()
    _element.value = AAZListType()

    value = _schema_codeless_ui_connector_config_properties_read.connectivity_criteria.Element.value
    value.Element = AAZStrType()

    data_types = _schema_codeless_ui_connector_config_properties_read.data_types
    data_types.Element = AAZObjectType()

    _element = _schema_codeless_ui_connector_config_properties_read.data_types.Element
    _element.last_data_received_query = AAZStrType(
        serialized_name="lastDataReceivedQuery",
    )
    _element.name = AAZStrType()

    graph_queries = _schema_codeless_ui_connector_config_properties_read.graph_queries
    graph_queries.Element = AAZObjectType()

    _element = _schema_codeless_ui_connector_config_properties_read.graph_queries.Element
    _element.base_query = AAZStrType(
        serialized_name="baseQuery",
    )
    _element.legend = AAZStrType()
    _element.metric_name = AAZStrType(
        serialized_name="metricName",
    )

    instruction_steps = _schema_codeless_ui_connector_config_properties_read.instruction_steps
    instruction_steps.Element = AAZObjectType()

    _element = _schema_codeless_ui_connector_config_properties_read.instruction_steps.Element
    _element.description = AAZStrType()
    _element.instructions = AAZListType()
    _element.title = AAZStrType()

    instructions = _schema_codeless_ui_connector_config_properties_read.instruction_steps.Element.instructions
    instructions.Element = AAZObjectType()

    _element = _schema_codeless_ui_connector_config_properties_read.instruction_steps.Element.instructions.Element
    _element.type = AAZStrType(
        flags={"required": True},
    )

    permissions = _schema_codeless_ui_connector_config_properties_read.permissions
    permissions.customs = AAZListType()
    permissions.resource_provider = AAZListType(
        serialized_name="resourceProvider",
    )

    customs = _schema_codeless_ui_connector_config_properties_read.permissions.customs
    customs.Element = AAZObjectType()

    _element = _schema_codeless_ui_connector_config_properties_read.permissions.customs.Element
    _element.description = AAZStrType()
    _element.name = AAZStrType()

    resource_provider = _schema_codeless_ui_connector_config_properties_read.permissions.resource_provider
    resource_provider.Element = AAZObjectType()

    _element = _schema_codeless_ui_connector_config_properties_read.permissions.resource_provider.Element
    _element.permissions_display_text = AAZStrType(
        serialized_name="permissionsDisplayText",
    )
    _element.provider = AAZStrType()
    _element.provider_display_name = AAZStrType(
        serialized_name="providerDisplayName",
    )
    _element.required_permissions = AAZObjectType(
        serialized_name="requiredPermissions",
    )
    _element.scope = AAZStrType()

    required_permissions = _schema_codeless_ui_connector_config_properties_read.permissions.resource_provider.Element.required_permissions
    required_permissions.action = AAZBoolType()
    required_permissions.delete = AAZBoolType()
    required_permissions.read = AAZBoolType()
    required_permissions.write = AAZBoolType()

    sample_queries = _schema_codeless_ui_connector_config_properties_read.sample_queries
    sample_queries.Element = AAZObjectType()

    _element = _schema_codeless_ui_connector_config_properties_read.sample_queries.Element
    _element.description = AAZStrType()
    _element.query = AAZStrType()

    _schema.availability = _schema_codeless_ui_connector_config_properties_read.availability
    _schema.connectivity_criteria = _schema_codeless_ui_connector_config_properties_read.connectivity_criteria
    _schema.custom_image = _schema_codeless_ui_connector_config_properties_read.custom_image
    _schema.data_types = _schema_codeless_ui_connector_config_properties_read.data_types
    _schema.description_markdown = _schema_codeless_ui_connector_config_properties_read.description_markdown
    _schema.graph_queries = _schema_codeless_ui_connector_config_properties_read.graph_queries
    _schema.graph_queries_table_name = _schema_codeless_ui_connector_config_properties_read.graph_queries_table_name
    _schema.instruction_steps = _schema_codeless_ui_connector_config_properties_read.instruction_steps
    _schema.permissions = _schema_codeless_ui_connector_config_properties_read.permissions
    _schema.publisher = _schema_codeless_ui_connector_config_properties_read.publisher
    _schema.sample_queries = _schema_codeless_ui_connector_config_properties_read.sample_queries
    _schema.title = _schema_codeless_ui_connector_config_properties_read.title


_schema_data_connector_data_type_common_read = None


def _build_schema_data_connector_data_type_common_read(_schema):
    global _schema_data_connector_data_type_common_read
    if _schema_data_connector_data_type_common_read is not None:
        _schema.state = _schema_data_connector_data_type_common_read.state
        return

    _schema_data_connector_data_type_common_read = AAZObjectType()

    data_connector_data_type_common_read = _schema_data_connector_data_type_common_read
    data_connector_data_type_common_read.state = AAZStrType(
        flags={"required": True},
    )

    _schema.state = _schema_data_connector_data_type_common_read.state


_schema_data_connector_read = None


def _build_schema_data_connector_read(_schema):
    global _schema_data_connector_read
    if _schema_data_connector_read is not None:
        _schema.etag = _schema_data_connector_read.etag
        _schema.id = _schema_data_connector_read.id
        _schema.kind = _schema_data_connector_read.kind
        _schema.name = _schema_data_connector_read.name
        _schema.system_data = _schema_data_connector_read.system_data
        _schema.type = _schema_data_connector_read.type
        _schema.discriminate_by(
            "kind",
            "APIPolling",
            _schema_data_connector_read.discriminate_by(
                "kind",
                "APIPolling",
            )
        )
        _schema.discriminate_by(
            "kind",
            "AmazonWebServicesCloudTrail",
            _schema_data_connector_read.discriminate_by(
                "kind",
                "AmazonWebServicesCloudTrail",
            )
        )
        _schema.discriminate_by(
            "kind",
            "AmazonWebServicesS3",
            _schema_data_connector_read.discriminate_by(
                "kind",
                "AmazonWebServicesS3",
            )
        )
        _schema.discriminate_by(
            "kind",
            "AzureActiveDirectory",
            _schema_data_connector_read.discriminate_by(
                "kind",
                "AzureActiveDirectory",
            )
        )
        _schema.discriminate_by(
            "kind",
            "AzureAdvancedThreatProtection",
            _schema_data_connector_read.discriminate_by(
                "kind",
                "AzureAdvancedThreatProtection",
            )
        )
        _schema.discriminate_by(
            "kind",
            "AzureSecurityCenter",
            _schema_data_connector_read.discriminate_by(
                "kind",
                "AzureSecurityCenter",
            )
        )
        _schema.discriminate_by(
            "kind",
            "Dynamics365",
            _schema_data_connector_read.discriminate_by(
                "kind",
                "Dynamics365",
            )
        )
        _schema.discriminate_by(
            "kind",
            "GenericUI",
            _schema_data_connector_read.discriminate_by(
                "kind",
                "GenericUI",
            )
        )
        _schema.discriminate_by(
            "kind",
            "IOT",
            _schema_data_connector_read.discriminate_by(
                "kind",
                "IOT",
            )
        )
        _schema.discriminate_by(
            "kind",
            "MicrosoftCloudAppSecurity",
            _schema_data_connector_read.discriminate_by(
                "kind",
                "MicrosoftCloudAppSecurity",
            )
        )
        _schema.discriminate_by(
            "kind",
            "MicrosoftDefenderAdvancedThreatProtection",
            _schema_data_connector_read.discriminate_by(
                "kind",
                "MicrosoftDefenderAdvancedThreatProtection",
            )
        )
        _schema.discriminate_by(
            "kind",
            "MicrosoftThreatIntelligence",
            _schema_data_connector_read.discriminate_by(
                "kind",
                "MicrosoftThreatIntelligence",
            )
        )
        _schema.discriminate_by(
            "kind",
            "MicrosoftThreatProtection",
            _schema_data_connector_read.discriminate_by(
                "kind",
                "MicrosoftThreatProtection",
            )
        )
        _schema.discriminate_by(
            "kind",
            "Office365",
            _schema_data_connector_read.discriminate_by(
                "kind",
                "Office365",
            )
        )
        _schema.discriminate_by(
            "kind",
            "Office365Project",
            _schema_data_connector_read.discriminate_by(
                "kind",
                "Office365Project",
            )
        )
        _schema.discriminate_by(
            "kind",
            "OfficeATP",
            _schema_data_connector_read.discriminate_by(
                "kind",
                "OfficeATP",
            )
        )
        _schema.discriminate_by(
            "kind",
            "OfficeIRM",
            _schema_data_connector_read.discriminate_by(
                "kind",
                "OfficeIRM",
            )
        )
        _schema.discriminate_by(
            "kind",
            "OfficePowerBI",
            _schema_data_connector_read.discriminate_by(
                "kind",
                "OfficePowerBI",
            )
        )
        _schema.discriminate_by(
            "kind",
            "ThreatIntelligence",
            _schema_data_connector_read.discriminate_by(
                "kind",
                "ThreatIntelligence",
            )
        )
        _schema.discriminate_by(
            "kind",
            "ThreatIntelligenceTaxii",
            _schema_data_connector_read.discriminate_by(
                "kind",
                "ThreatIntelligenceTaxii",
            )
        )
        return

    _schema_data_connector_read = AAZObjectType()

    data_connector_read = _schema_data_connector_read
    data_connector_read.etag = AAZStrType()
    data_connector_read.id = AAZStrType(
        flags={"read_only": True},
    )
    data_connector_read.kind = AAZStrType(
        flags={"required": True},
    )
    data_connector_read.name = AAZStrType(
        flags={"read_only": True},
    )
    data_connector_read.system_data = AAZObjectType(
        serialized_name="systemData",
        flags={"read_only": True},
    )
    data_connector_read.type = AAZStrType(
        flags={"read_only": True},
    )

    system_data = _schema_data_connector_read.system_data
    system_data.created_at = AAZStrType(
        serialized_name="createdAt",
        flags={"read_only": True},
    )
    system_data.created_by = AAZStrType(
        serialized_name="createdBy",
        flags={"read_only": True},
    )
    system_data.created_by_type = AAZStrType(
        serialized_name="createdByType",
        flags={"read_only": True},
    )
    system_data.last_modified_at = AAZStrType(
        serialized_name="lastModifiedAt",
        flags={"read_only": True},
    )
    system_data.last_modified_by = AAZStrType(
        serialized_name="lastModifiedBy",
        flags={"read_only": True},
    )
    system_data.last_modified_by_type = AAZStrType(
        serialized_name="lastModifiedByType",
        flags={"read_only": True},
    )

    disc_api_polling = _schema_data_connector_read.discriminate_by("kind", "APIPolling")
    disc_api_polling.properties = AAZObjectType(
        flags={"client_flatten": True},
    )

    properties = _schema_data_connector_read.discriminate_by("kind", "APIPolling").properties
    properties.connector_ui_config = AAZObjectType(
        serialized_name="connectorUiConfig",
    )
    _build_schema_codeless_ui_connector_config_properties_read(properties.connector_ui_config)
    properties.polling_config = AAZObjectType(
        serialized_name="pollingConfig",
    )

    polling_config = _schema_data_connector_read.discriminate_by("kind", "APIPolling").properties.polling_config
    polling_config.auth = AAZObjectType(
        flags={"required": True},
    )
    polling_config.is_active = AAZBoolType(
        serialized_name="isActive",
    )
    polling_config.paging = AAZObjectType()
    polling_config.request = AAZObjectType(
        flags={"required": True},
    )
    polling_config.response = AAZObjectType()

    auth = _schema_data_connector_read.discriminate_by("kind", "APIPolling").properties.polling_config.auth
    auth.api_key_identifier = AAZStrType(
        serialized_name="apiKeyIdentifier",
    )
    auth.api_key_name = AAZStrType(
        serialized_name="apiKeyName",
    )
    auth.auth_type = AAZStrType(
        serialized_name="authType",
        flags={"required": True},
    )
    auth.authorization_endpoint = AAZStrType(
        serialized_name="authorizationEndpoint",
    )
    auth.flow_name = AAZStrType(
        serialized_name="flowName",
    )
    auth.is_api_key_in_post_payload = AAZStrType(
        serialized_name="isApiKeyInPostPayload",
    )
    auth.is_client_secret_in_header = AAZBoolType(
        serialized_name="isClientSecretInHeader",
    )
    auth.redirection_endpoint = AAZStrType(
        serialized_name="redirectionEndpoint",
    )
    auth.scope = AAZStrType()
    auth.token_endpoint = AAZStrType(
        serialized_name="tokenEndpoint",
    )

    paging = _schema_data_connector_read.discriminate_by("kind", "APIPolling").properties.polling_config.paging
    paging.next_page_para_name = AAZStrType(
        serialized_name="nextPageParaName",
    )
    paging.next_page_token_json_path = AAZStrType(
        serialized_name="nextPageTokenJsonPath",
    )
    paging.page_count_attribute_path = AAZStrType(
        serialized_name="pageCountAttributePath",
    )
    paging.page_size = AAZIntType(
        serialized_name="pageSize",
    )
    paging.page_size_para_name = AAZStrType(
        serialized_name="pageSizeParaName",
    )
    paging.page_time_stamp_attribute_path = AAZStrType(
        serialized_name="pageTimeStampAttributePath",
    )
    paging.page_total_count_attribute_path = AAZStrType(
        serialized_name="pageTotalCountAttributePath",
    )
    paging.paging_type = AAZStrType(
        serialized_name="pagingType",
        flags={"required": True},
    )
    paging.search_the_latest_time_stamp_from_events_list = AAZStrType(
        serialized_name="searchTheLatestTimeStampFromEventsList",
    )

    request = _schema_data_connector_read.discriminate_by("kind", "APIPolling").properties.polling_config.request
    request.api_endpoint = AAZStrType(
        serialized_name="apiEndpoint",
        flags={"required": True},
    )
    request.end_time_attribute_name = AAZStrType(
        serialized_name="endTimeAttributeName",
    )
    request.http_method = AAZStrType(
        serialized_name="httpMethod",
        flags={"required": True},
    )
    request.query_parameters_template = AAZStrType(
        serialized_name="queryParametersTemplate",
    )
    request.query_time_format = AAZStrType(
        serialized_name="queryTimeFormat",
        flags={"required": True},
    )
    request.query_window_in_min = AAZIntType(
        serialized_name="queryWindowInMin",
        flags={"required": True},
    )
    request.rate_limit_qps = AAZIntType(
        serialized_name="rateLimitQps",
    )
    request.retry_count = AAZIntType(
        serialized_name="retryCount",
    )
    request.start_time_attribute_name = AAZStrType(
        serialized_name="startTimeAttributeName",
    )
    request.timeout_in_seconds = AAZIntType(
        serialized_name="timeoutInSeconds",
    )

    response = _schema_data_connector_read.discriminate_by("kind", "APIPolling").properties.polling_config.response
    response.events_json_paths = AAZListType(
        serialized_name="eventsJsonPaths",
        flags={"required": True},
    )
    response.is_gzip_compressed = AAZBoolType(
        serialized_name="isGzipCompressed",
    )
    response.success_status_json_path = AAZStrType(
        serialized_name="successStatusJsonPath",
    )
    response.success_status_value = AAZStrType(
        serialized_name="successStatusValue",
    )

    events_json_paths = _schema_data_connector_read.discriminate_by("kind", "APIPolling").properties.polling_config.response.events_json_paths
    events_json_paths.Element = AAZStrType()

    disc_amazon_web_services_cloud_trail = _schema_data_connector_read.discriminate_by("kind", "AmazonWebServicesCloudTrail")
    disc_amazon_web_services_cloud_trail.properties = AAZObjectType(
        flags={"client_flatten": True},
    )

    properties = _schema_data_connector_read.discriminate_by("kind", "AmazonWebServicesCloudTrail").properties
    properties.aws_role_arn = AAZStrType(
        serialized_name="awsRoleArn",
    )
    properties.data_types = AAZObjectType(
        serialized_name="dataTypes",
        flags={"required": True},
    )

    data_types = _schema_data_connector_read.discriminate_by("kind", "AmazonWebServicesCloudTrail").properties.data_types
    data_types.logs = AAZObjectType(
        flags={"required": True},
    )

    logs = _schema_data_connector_read.discriminate_by("kind", "AmazonWebServicesCloudTrail").properties.data_types.logs
    logs.state = AAZStrType(
        flags={"required": True},
    )

    disc_amazon_web_services_s3 = _schema_data_connector_read.discriminate_by("kind", "AmazonWebServicesS3")
    disc_amazon_web_services_s3.properties = AAZObjectType(
        flags={"client_flatten": True},
    )

    properties = _schema_data_connector_read.discriminate_by("kind", "AmazonWebServicesS3").properties
    properties.data_types = AAZObjectType(
        serialized_name="dataTypes",
        flags={"required": True},
    )
    properties.destination_table = AAZStrType(
        serialized_name="destinationTable",
        flags={"required": True},
    )
    properties.role_arn = AAZStrType(
        serialized_name="roleArn",
        flags={"required": True},
    )
    properties.sqs_urls = AAZListType(
        serialized_name="sqsUrls",
        flags={"required": True},
    )

    data_types = _schema_data_connector_read.discriminate_by("kind", "AmazonWebServicesS3").properties.data_types
    data_types.logs = AAZObjectType(
        flags={"required": True},
    )

    logs = _schema_data_connector_read.discriminate_by("kind", "AmazonWebServicesS3").properties.data_types.logs
    logs.state = AAZStrType(
        flags={"required": True},
    )

    sqs_urls = _schema_data_connector_read.discriminate_by("kind", "AmazonWebServicesS3").properties.sqs_urls
    sqs_urls.Element = AAZStrType()

    disc_azure_active_directory = _schema_data_connector_read.discriminate_by("kind", "AzureActiveDirectory")
    disc_azure_active_directory.properties = AAZObjectType(
        flags={"client_flatten": True},
    )

    properties = _schema_data_connector_read.discriminate_by("kind", "AzureActiveDirectory").properties
    properties.data_types = AAZObjectType(
        serialized_name="dataTypes",
    )
    _build_schema_alerts_data_type_of_data_connector_read(properties.data_types)
    properties.tenant_id = AAZStrType(
        serialized_name="tenantId",
        flags={"required": True},
    )

    disc_azure_advanced_threat_protection = _schema_data_connector_read.discriminate_by("kind", "AzureAdvancedThreatProtection")
    disc_azure_advanced_threat_protection.properties = AAZObjectType(
        flags={"client_flatten": True},
    )

    properties = _schema_data_connector_read.discriminate_by("kind", "AzureAdvancedThreatProtection").properties
    properties.data_types = AAZObjectType(
        serialized_name="dataTypes",
    )
    _build_schema_alerts_data_type_of_data_connector_read(properties.data_types)
    properties.tenant_id = AAZStrType(
        serialized_name="tenantId",
        flags={"required": True},
    )

    disc_azure_security_center = _schema_data_connector_read.discriminate_by("kind", "AzureSecurityCenter")
    disc_azure_security_center.properties = AAZObjectType(
        flags={"client_flatten": True},
    )

    properties = _schema_data_connector_read.discriminate_by("kind", "AzureSecurityCenter").properties
    properties.data_types = AAZObjectType(
        serialized_name="dataTypes",
    )
    _build_schema_alerts_data_type_of_data_connector_read(properties.data_types)
    properties.subscription_id = AAZStrType(
        serialized_name="subscriptionId",
    )

    disc_dynamics365 = _schema_data_connector_read.discriminate_by("kind", "Dynamics365")
    disc_dynamics365.properties = AAZObjectType(
        flags={"client_flatten": True},
    )

    properties = _schema_data_connector_read.discriminate_by("kind", "Dynamics365").properties
    properties.data_types = AAZObjectType(
        serialized_name="dataTypes",
        flags={"required": True},
    )
    properties.tenant_id = AAZStrType(
        serialized_name="tenantId",
        flags={"required": True},
    )

    data_types = _schema_data_connector_read.discriminate_by("kind", "Dynamics365").properties.data_types
    data_types.dynamics365_cds_activities = AAZObjectType(
        serialized_name="dynamics365CdsActivities",
        flags={"required": True},
    )

    dynamics365_cds_activities = _schema_data_connector_read.discriminate_by("kind", "Dynamics365").properties.data_types.dynamics365_cds_activities
    dynamics365_cds_activities.state = AAZStrType(
        flags={"required": True},
    )

    disc_generic_ui = _schema_data_connector_read.discriminate_by("kind", "GenericUI")
    disc_generic_ui.properties = AAZObjectType(
        flags={"client_flatten": True},
    )

    properties = _schema_data_connector_read.discriminate_by("kind", "GenericUI").properties
    properties.connector_ui_config = AAZObjectType(
        serialized_name="connectorUiConfig",
    )
    _build_schema_codeless_ui_connector_config_properties_read(properties.connector_ui_config)

    disc_iot = _schema_data_connector_read.discriminate_by("kind", "IOT")
    disc_iot.properties = AAZObjectType(
        flags={"client_flatten": True},
    )

    properties = _schema_data_connector_read.discriminate_by("kind", "IOT").properties
    properties.data_types = AAZObjectType(
        serialized_name="dataTypes",
    )
    _build_schema_alerts_data_type_of_data_connector_read(properties.data_types)
    properties.subscription_id = AAZStrType(
        serialized_name="subscriptionId",
    )

    disc_microsoft_cloud_app_security = _schema_data_connector_read.discriminate_by("kind", "MicrosoftCloudAppSecurity")
    disc_microsoft_cloud_app_security.properties = AAZObjectType(
        flags={"client_flatten": True},
    )

    properties = _schema_data_connector_read.discriminate_by("kind", "MicrosoftCloudAppSecurity").properties
    properties.data_types = AAZObjectType(
        serialized_name="dataTypes",
        flags={"required": True},
    )
    properties.tenant_id = AAZStrType(
        serialized_name="tenantId",
        flags={"required": True},
    )

    data_types = _schema_data_connector_read.discriminate_by("kind", "MicrosoftCloudAppSecurity").properties.data_types
    data_types.alerts = AAZObjectType(
        flags={"required": True},
    )
    _build_schema_data_connector_data_type_common_read(data_types.alerts)
    data_types.discovery_logs = AAZObjectType(
        serialized_name="discoveryLogs",
    )
    _build_schema_data_connector_data_type_common_read(data_types.discovery_logs)

    disc_microsoft_defender_advanced_threat_protection = _schema_data_connector_read.discriminate_by("kind", "MicrosoftDefenderAdvancedThreatProtection")
    disc_microsoft_defender_advanced_threat_protection.properties = AAZObjectType(
        flags={"client_flatten": True},
    )

    properties = _schema_data_connector_read.discriminate_by("kind", "MicrosoftDefenderAdvancedThreatProtection").properties
    properties.data_types = AAZObjectType(
        serialized_name="dataTypes",
    )
    _build_schema_alerts_data_type_of_data_connector_read(properties.data_types)
    properties.tenant_id = AAZStrType(
        serialized_name="tenantId",
        flags={"required": True},
    )

    disc_microsoft_threat_intelligence = _schema_data_connector_read.discriminate_by("kind", "MicrosoftThreatIntelligence")
    disc_microsoft_threat_intelligence.properties = AAZObjectType(
        flags={"client_flatten": True},
    )

    properties = _schema_data_connector_read.discriminate_by("kind", "MicrosoftThreatIntelligence").properties
    properties.data_types = AAZObjectType(
        serialized_name="dataTypes",
        flags={"required": True},
    )
    properties.tenant_id = AAZStrType(
        serialized_name="tenantId",
        flags={"required": True},
    )

    data_types = _schema_data_connector_read.discriminate_by("kind", "MicrosoftThreatIntelligence").properties.data_types
    data_types.bing_safety_phishing_url = AAZObjectType(
        serialized_name="bingSafetyPhishingURL",
        flags={"required": True},
    )
    data_types.microsoft_emerging_threat_feed = AAZObjectType(
        serialized_name="microsoftEmergingThreatFeed",
        flags={"required": True},
    )

    bing_safety_phishing_url = _schema_data_connector_read.discriminate_by("kind", "MicrosoftThreatIntelligence").properties.data_types.bing_safety_phishing_url
    bing_safety_phishing_url.lookback_period = AAZStrType(
        serialized_name="lookbackPeriod",
        flags={"required": True},
    )
    bing_safety_phishing_url.state = AAZStrType(
        flags={"required": True},
    )

    microsoft_emerging_threat_feed = _schema_data_connector_read.discriminate_by("kind", "MicrosoftThreatIntelligence").properties.data_types.microsoft_emerging_threat_feed
    microsoft_emerging_threat_feed.lookback_period = AAZStrType(
        serialized_name="lookbackPeriod",
        flags={"required": True},
    )
    microsoft_emerging_threat_feed.state = AAZStrType(
        flags={"required": True},
    )

    disc_microsoft_threat_protection = _schema_data_connector_read.discriminate_by("kind", "MicrosoftThreatProtection")
    disc_microsoft_threat_protection.properties = AAZObjectType(
        flags={"client_flatten": True},
    )

    properties = _schema_data_connector_read.discriminate_by("kind", "MicrosoftThreatProtection").properties
    properties.data_types = AAZObjectType(
        serialized_name="dataTypes",
        flags={"required": True},
    )
    properties.tenant_id = AAZStrType(
        serialized_name="tenantId",
        flags={"required": True},
    )

    data_types = _schema_data_connector_read.discriminate_by("kind", "MicrosoftThreatProtection").properties.data_types
    data_types.incidents = AAZObjectType(
        flags={"required": True},
    )

    incidents = _schema_data_connector_read.discriminate_by("kind", "MicrosoftThreatProtection").properties.data_types.incidents
    incidents.state = AAZStrType(
        flags={"required": True},
    )

    disc_office365 = _schema_data_connector_read.discriminate_by("kind", "Office365")
    disc_office365.properties = AAZObjectType(
        flags={"client_flatten": True},
    )

    properties = _schema_data_connector_read.discriminate_by("kind", "Office365").properties
    properties.data_types = AAZObjectType(
        serialized_name="dataTypes",
        flags={"required": True},
    )
    properties.tenant_id = AAZStrType(
        serialized_name="tenantId",
        flags={"required": True},
    )

    data_types = _schema_data_connector_read.discriminate_by("kind", "Office365").properties.data_types
    data_types.exchange = AAZObjectType(
        flags={"required": True},
    )
    data_types.share_point = AAZObjectType(
        serialized_name="sharePoint",
        flags={"required": True},
    )
    data_types.teams = AAZObjectType(
        flags={"required": True},
    )

    exchange = _schema_data_connector_read.discriminate_by("kind", "Office365").properties.data_types.exchange
    exchange.state = AAZStrType(
        flags={"required": True},
    )

    share_point = _schema_data_connector_read.discriminate_by("kind", "Office365").properties.data_types.share_point
    share_point.state = AAZStrType(
        flags={"required": True},
    )

    teams = _schema_data_connector_read.discriminate_by("kind", "Office365").properties.data_types.teams
    teams.state = AAZStrType(
        flags={"required": True},
    )

    disc_office365_project = _schema_data_connector_read.discriminate_by("kind", "Office365Project")
    disc_office365_project.properties = AAZObjectType(
        flags={"client_flatten": True},
    )

    properties = _schema_data_connector_read.discriminate_by("kind", "Office365Project").properties
    properties.data_types = AAZObjectType(
        serialized_name="dataTypes",
        flags={"required": True},
    )
    properties.tenant_id = AAZStrType(
        serialized_name="tenantId",
        flags={"required": True},
    )

    data_types = _schema_data_connector_read.discriminate_by("kind", "Office365Project").properties.data_types
    data_types.logs = AAZObjectType(
        flags={"required": True},
    )

    logs = _schema_data_connector_read.discriminate_by("kind", "Office365Project").properties.data_types.logs
    logs.state = AAZStrType(
        flags={"required": True},
    )

    disc_office_atp = _schema_data_connector_read.discriminate_by("kind", "OfficeATP")
    disc_office_atp.properties = AAZObjectType(
        flags={"client_flatten": True},
    )

    properties = _schema_data_connector_read.discriminate_by("kind", "OfficeATP").properties
    properties.data_types = AAZObjectType(
        serialized_name="dataTypes",
    )
    _build_schema_alerts_data_type_of_data_connector_read(properties.data_types)
    properties.tenant_id = AAZStrType(
        serialized_name="tenantId",
        flags={"required": True},
    )

    disc_office_irm = _schema_data_connector_read.discriminate_by("kind", "OfficeIRM")
    disc_office_irm.properties = AAZObjectType(
        flags={"client_flatten": True},
    )

    properties = _schema_data_connector_read.discriminate_by("kind", "OfficeIRM").properties
    properties.data_types = AAZObjectType(
        serialized_name="dataTypes",
    )
    _build_schema_alerts_data_type_of_data_connector_read(properties.data_types)
    properties.tenant_id = AAZStrType(
        serialized_name="tenantId",
        flags={"required": True},
    )

    disc_office_power_bi = _schema_data_connector_read.discriminate_by("kind", "OfficePowerBI")
    disc_office_power_bi.properties = AAZObjectType(
        flags={"client_flatten": True},
    )

    properties = _schema_data_connector_read.discriminate_by("kind", "OfficePowerBI").properties
    properties.data_types = AAZObjectType(
        serialized_name="dataTypes",
        flags={"required": True},
    )
    properties.tenant_id = AAZStrType(
        serialized_name="tenantId",
        flags={"required": True},
    )

    data_types = _schema_data_connector_read.discriminate_by("kind", "OfficePowerBI").properties.data_types
    data_types.logs = AAZObjectType(
        flags={"required": True},
    )

    logs = _schema_data_connector_read.discriminate_by("kind", "OfficePowerBI").properties.data_types.logs
    logs.state = AAZStrType(
        flags={"required": True},
    )

    disc_threat_intelligence = _schema_data_connector_read.discriminate_by("kind", "ThreatIntelligence")
    disc_threat_intelligence.properties = AAZObjectType(
        flags={"client_flatten": True},
    )

    properties = _schema_data_connector_read.discriminate_by("kind", "ThreatIntelligence").properties
    properties.data_types = AAZObjectType(
        serialized_name="dataTypes",
        flags={"required": True},
    )
    properties.tenant_id = AAZStrType(
        serialized_name="tenantId",
        flags={"required": True},
    )
    properties.tip_lookback_period = AAZStrType(
        serialized_name="tipLookbackPeriod",
        nullable=True,
    )

    data_types = _schema_data_connector_read.discriminate_by("kind", "ThreatIntelligence").properties.data_types
    data_types.indicators = AAZObjectType(
        flags={"required": True},
    )

    indicators = _schema_data_connector_read.discriminate_by("kind", "ThreatIntelligence").properties.data_types.indicators
    indicators.state = AAZStrType(
        flags={"required": True},
    )

    disc_threat_intelligence_taxii = _schema_data_connector_read.discriminate_by("kind", "ThreatIntelligenceTaxii")
    disc_threat_intelligence_taxii.properties = AAZObjectType(
        flags={"client_flatten": True},
    )

    properties = _schema_data_connector_read.discriminate_by("kind", "ThreatIntelligenceTaxii").properties
    properties.collection_id = AAZStrType(
        serialized_name="collectionId",
    )
    properties.data_types = AAZObjectType(
        serialized_name="dataTypes",
        flags={"required": True},
    )
    properties.friendly_name = AAZStrType(
        serialized_name="friendlyName",
    )
    properties.password = AAZStrType()
    properties.polling_frequency = AAZStrType(
        serialized_name="pollingFrequency",
        flags={"required": True},
        nullable=True,
    )
    properties.taxii_lookback_period = AAZStrType(
        serialized_name="taxiiLookbackPeriod",
        nullable=True,
    )
    properties.taxii_server = AAZStrType(
        serialized_name="taxiiServer",
    )
    properties.tenant_id = AAZStrType(
        serialized_name="tenantId",
        flags={"required": True},
    )
    properties.user_name = AAZStrType(
        serialized_name="userName",
    )
    properties.workspace_id = AAZStrType(
        serialized_name="workspaceId",
    )

    data_types = _schema_data_connector_read.discriminate_by("kind", "ThreatIntelligenceTaxii").properties.data_types
    data_types.taxii_client = AAZObjectType(
        serialized_name="taxiiClient",
        flags={"required": True},
    )

    taxii_client = _schema_data_connector_read.discriminate_by("kind", "ThreatIntelligenceTaxii").properties.data_types.taxii_client
    taxii_client.state = AAZStrType(
        flags={"required": True},
    )

    _schema.etag = _schema_data_connector_read.etag
    _schema.id = _schema_data_connector_read.id
    _schema.kind = _schema_data_connector_read.kind
    _schema.name = _schema_data_connector_read.name
    _schema.system_data = _schema_data_connector_read.system_data
    _schema.type = _schema_data_connector_read.type
    _schema.discriminate_by(
            "kind",
            "APIPolling",
            _schema_data_connector_read.discriminate_by(
                "kind",
                "APIPolling",
            )
        )
    _schema.discriminate_by(
            "kind",
            "AmazonWebServicesCloudTrail",
            _schema_data_connector_read.discriminate_by(
                "kind",
                "AmazonWebServicesCloudTrail",
            )
        )
    _schema.discriminate_by(
            "kind",
            "AmazonWebServicesS3",
            _schema_data_connector_read.discriminate_by(
                "kind",
                "AmazonWebServicesS3",
            )
        )
    _schema.discriminate_by(
            "kind",
            "AzureActiveDirectory",
            _schema_data_connector_read.discriminate_by(
                "kind",
                "AzureActiveDirectory",
            )
        )
    _schema.discriminate_by(
            "kind",
            "AzureAdvancedThreatProtection",
            _schema_data_connector_read.discriminate_by(
                "kind",
                "AzureAdvancedThreatProtection",
            )
        )
    _schema.discriminate_by(
            "kind",
            "AzureSecurityCenter",
            _schema_data_connector_read.discriminate_by(
                "kind",
                "AzureSecurityCenter",
            )
        )
    _schema.discriminate_by(
            "kind",
            "Dynamics365",
            _schema_data_connector_read.discriminate_by(
                "kind",
                "Dynamics365",
            )
        )
    _schema.discriminate_by(
            "kind",
            "GenericUI",
            _schema_data_connector_read.discriminate_by(
                "kind",
                "GenericUI",
            )
        )
    _schema.discriminate_by(
            "kind",
            "IOT",
            _schema_data_connector_read.discriminate_by(
                "kind",
                "IOT",
            )
        )
    _schema.discriminate_by(
            "kind",
            "MicrosoftCloudAppSecurity",
            _schema_data_connector_read.discriminate_by(
                "kind",
                "MicrosoftCloudAppSecurity",
            )
        )
    _schema.discriminate_by(
            "kind",
            "MicrosoftDefenderAdvancedThreatProtection",
            _schema_data_connector_read.discriminate_by(
                "kind",
                "MicrosoftDefenderAdvancedThreatProtection",
            )
        )
    _schema.discriminate_by(
            "kind",
            "MicrosoftThreatIntelligence",
            _schema_data_connector_read.discriminate_by(
                "kind",
                "MicrosoftThreatIntelligence",
            )
        )
    _schema.discriminate_by(
            "kind",
            "MicrosoftThreatProtection",
            _schema_data_connector_read.discriminate_by(
                "kind",
                "MicrosoftThreatProtection",
            )
        )
    _schema.discriminate_by(
            "kind",
            "Office365",
            _schema_data_connector_read.discriminate_by(
                "kind",
                "Office365",
            )
        )
    _schema.discriminate_by(
            "kind",
            "Office365Project",
            _schema_data_connector_read.discriminate_by(
                "kind",
                "Office365Project",
            )
        )
    _schema.discriminate_by(
            "kind",
            "OfficeATP",
            _schema_data_connector_read.discriminate_by(
                "kind",
                "OfficeATP",
            )
        )
    _schema.discriminate_by(
            "kind",
            "OfficeIRM",
            _schema_data_connector_read.discriminate_by(
                "kind",
                "OfficeIRM",
            )
        )
    _schema.discriminate_by(
            "kind",
            "OfficePowerBI",
            _schema_data_connector_read.discriminate_by(
                "kind",
                "OfficePowerBI",
            )
        )
    _schema.discriminate_by(
            "kind",
            "ThreatIntelligence",
            _schema_data_connector_read.discriminate_by(
                "kind",
                "ThreatIntelligence",
            )
        )
    _schema.discriminate_by(
            "kind",
            "ThreatIntelligenceTaxii",
            _schema_data_connector_read.discriminate_by(
                "kind",
                "ThreatIntelligenceTaxii",
            )
        )


__all__ = ["Update"]
