# --------------------------------------------------------------------------------------------
# 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 show",
    is_experimental=True,
)
class Show(AAZCommand):
    """Get a 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"],
        ]
    }

    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",
        )
        return cls._args_schema

    def _execute_operations(self):
        self.DataConnectorsGet(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()

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

            system_data = cls._schema_on_200.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 = cls._schema_on_200.discriminate_by("kind", "APIPolling")
            disc_api_polling.properties = AAZObjectType(
                flags={"client_flatten": True},
            )

            properties = cls._schema_on_200.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 = cls._schema_on_200.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 = cls._schema_on_200.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 = cls._schema_on_200.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 = cls._schema_on_200.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 = cls._schema_on_200.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 = cls._schema_on_200.discriminate_by("kind", "APIPolling").properties.polling_config.response.events_json_paths
            events_json_paths.Element = AAZStrType()

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

            properties = cls._schema_on_200.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 = cls._schema_on_200.discriminate_by("kind", "AmazonWebServicesCloudTrail").properties.data_types
            data_types.logs = AAZObjectType(
                flags={"required": True},
            )

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

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

            properties = cls._schema_on_200.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 = cls._schema_on_200.discriminate_by("kind", "AmazonWebServicesS3").properties.data_types
            data_types.logs = AAZObjectType(
                flags={"required": True},
            )

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

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

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

            properties = cls._schema_on_200.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 = cls._schema_on_200.discriminate_by("kind", "AzureAdvancedThreatProtection")
            disc_azure_advanced_threat_protection.properties = AAZObjectType(
                flags={"client_flatten": True},
            )

            properties = cls._schema_on_200.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 = cls._schema_on_200.discriminate_by("kind", "AzureSecurityCenter")
            disc_azure_security_center.properties = AAZObjectType(
                flags={"client_flatten": True},
            )

            properties = cls._schema_on_200.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 = cls._schema_on_200.discriminate_by("kind", "Dynamics365")
            disc_dynamics365.properties = AAZObjectType(
                flags={"client_flatten": True},
            )

            properties = cls._schema_on_200.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 = cls._schema_on_200.discriminate_by("kind", "Dynamics365").properties.data_types
            data_types.dynamics365_cds_activities = AAZObjectType(
                serialized_name="dynamics365CdsActivities",
                flags={"required": True},
            )

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

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

            properties = cls._schema_on_200.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 = cls._schema_on_200.discriminate_by("kind", "IOT")
            disc_iot.properties = AAZObjectType(
                flags={"client_flatten": True},
            )

            properties = cls._schema_on_200.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 = cls._schema_on_200.discriminate_by("kind", "MicrosoftCloudAppSecurity")
            disc_microsoft_cloud_app_security.properties = AAZObjectType(
                flags={"client_flatten": True},
            )

            properties = cls._schema_on_200.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 = cls._schema_on_200.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 = cls._schema_on_200.discriminate_by("kind", "MicrosoftDefenderAdvancedThreatProtection")
            disc_microsoft_defender_advanced_threat_protection.properties = AAZObjectType(
                flags={"client_flatten": True},
            )

            properties = cls._schema_on_200.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 = cls._schema_on_200.discriminate_by("kind", "MicrosoftThreatIntelligence")
            disc_microsoft_threat_intelligence.properties = AAZObjectType(
                flags={"client_flatten": True},
            )

            properties = cls._schema_on_200.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 = cls._schema_on_200.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 = cls._schema_on_200.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 = cls._schema_on_200.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 = cls._schema_on_200.discriminate_by("kind", "MicrosoftThreatProtection")
            disc_microsoft_threat_protection.properties = AAZObjectType(
                flags={"client_flatten": True},
            )

            properties = cls._schema_on_200.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 = cls._schema_on_200.discriminate_by("kind", "MicrosoftThreatProtection").properties.data_types
            data_types.incidents = AAZObjectType(
                flags={"required": True},
            )

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

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

            properties = cls._schema_on_200.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 = cls._schema_on_200.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 = cls._schema_on_200.discriminate_by("kind", "Office365").properties.data_types.exchange
            exchange.state = AAZStrType(
                flags={"required": True},
            )

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

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

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

            properties = cls._schema_on_200.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 = cls._schema_on_200.discriminate_by("kind", "Office365Project").properties.data_types
            data_types.logs = AAZObjectType(
                flags={"required": True},
            )

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

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

            properties = cls._schema_on_200.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 = cls._schema_on_200.discriminate_by("kind", "OfficeIRM")
            disc_office_irm.properties = AAZObjectType(
                flags={"client_flatten": True},
            )

            properties = cls._schema_on_200.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 = cls._schema_on_200.discriminate_by("kind", "OfficePowerBI")
            disc_office_power_bi.properties = AAZObjectType(
                flags={"client_flatten": True},
            )

            properties = cls._schema_on_200.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 = cls._schema_on_200.discriminate_by("kind", "OfficePowerBI").properties.data_types
            data_types.logs = AAZObjectType(
                flags={"required": True},
            )

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

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

            properties = cls._schema_on_200.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 = cls._schema_on_200.discriminate_by("kind", "ThreatIntelligence").properties.data_types
            data_types.indicators = AAZObjectType(
                flags={"required": True},
            )

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

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

            properties = cls._schema_on_200.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 = cls._schema_on_200.discriminate_by("kind", "ThreatIntelligenceTaxii").properties.data_types
            data_types.taxii_client = AAZObjectType(
                serialized_name="taxiiClient",
                flags={"required": True},
            )

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

            return cls._schema_on_200


_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


__all__ = ["Show"]
