From 9a275d84449b40d35b236eacd3dffec8b19873c0 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot Date: Tue, 24 Sep 2019 14:55:10 +0000 Subject: [PATCH] Generated from d5db81f5ac5460c875cb8ae8d801964cc7374490 fix ResourceWithEtag not to contain inheritance to fix the multiple inheritance bug when generating arm client from swagger --- .../mgmt/securityinsight/models/__init__.py | 36 +- .../models/aad_data_connector.py | 15 + .../models/aad_data_connector_py3.py | 15 + .../models/aatp_data_connector.py | 15 + .../models/aatp_data_connector_py3.py | 15 + .../models/{action.py => action_request.py} | 6 +- .../{action_py3.py => action_request_py3.py} | 6 +- .../securityinsight/models/action_response.py | 50 +++ ...tion_paged.py => action_response_paged.py} | 8 +- .../models/action_response_py3.py | 50 +++ .../mgmt/securityinsight/models/alert_rule.py | 18 + .../securityinsight/models/alert_rule_py3.py | 18 + .../models/asc_data_connector.py | 15 + .../models/asc_data_connector_py3.py | 15 + .../models/aws_cloud_trail_data_connector.py | 15 + .../aws_cloud_trail_data_connector_py3.py | 15 + .../models/bookmark_relation.py | 75 ++++ .../models/bookmark_relation_paged.py | 27 ++ .../models/bookmark_relation_py3.py | 75 ++++ .../securityinsight/models/case_relation.py | 71 ++++ .../models/case_relation_paged.py | 27 ++ .../models/case_relation_py3.py | 71 ++++ .../securityinsight/models/data_connector.py | 18 + .../models/data_connector_py3.py | 18 + .../models/fusion_alert_rule.py | 12 + .../models/fusion_alert_rule_py3.py | 12 + .../models/mcas_data_connector.py | 15 + .../models/mcas_data_connector_py3.py | 15 + .../models/mdatp_data_connector.py | 15 + .../models/mdatp_data_connector_py3.py | 15 + ...t_security_incident_creation_alert_rule.py | 12 + ...curity_incident_creation_alert_rule_py3.py | 12 + .../models/office_data_connector.py | 15 + .../models/office_data_connector_py3.py | 15 + .../securityinsight/models/relation_base.py | 52 +++ .../models/relation_base_py3.py | 52 +++ .../securityinsight/models/relation_node.py | 49 +++ .../models/relation_node_py3.py | 49 +++ .../models/relations_model_input.py | 64 ++++ .../models/relations_model_input_py3.py | 64 ++++ .../models/resource_with_etag.py | 7 +- .../models/resource_with_etag_py3.py | 7 +- .../models/scheduled_alert_rule.py | 12 + .../models/scheduled_alert_rule_py3.py | 12 + .../models/security_insights_enums.py | 11 + .../mgmt/securityinsight/models/settings.py | 18 + .../securityinsight/models/settings_py3.py | 18 + .../models/ti_data_connector.py | 15 + .../models/ti_data_connector_py3.py | 15 + .../securityinsight/models/toggle_settings.py | 15 + .../models/toggle_settings_py3.py | 15 + .../securityinsight/models/ueba_settings.py | 12 + .../models/ueba_settings_py3.py | 12 + .../securityinsight/operations/__init__.py | 4 + .../operations/actions_operations.py | 8 +- .../operations/alert_rules_operations.py | 20 +- .../bookmark_relations_operations.py | 356 ++++++++++++++++++ .../operations/case_relations_operations.py | 356 ++++++++++++++++++ .../mgmt/securityinsight/security_insights.py | 10 + 59 files changed, 2052 insertions(+), 33 deletions(-) rename sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/{action.py => action_request.py} (89%) rename sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/{action_py3.py => action_request_py3.py} (89%) create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/action_response.py rename sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/{action_paged.py => action_response_paged.py} (74%) create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/action_response_py3.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/bookmark_relation.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/bookmark_relation_paged.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/bookmark_relation_py3.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/case_relation.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/case_relation_paged.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/case_relation_py3.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/relation_base.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/relation_base_py3.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/relation_node.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/relation_node_py3.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/relations_model_input.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/relations_model_input_py3.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/bookmark_relations_operations.py create mode 100644 sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/case_relations_operations.py diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/__init__.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/__init__.py index dc4d700298d4..51418beb18fc 100644 --- a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/__init__.py +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/__init__.py @@ -16,7 +16,8 @@ from .aatp_data_connector_py3 import AATPDataConnector from .asc_data_connector_py3 import ASCDataConnector from .account_entity_py3 import AccountEntity - from .action_py3 import Action + from .action_request_py3 import ActionRequest + from .action_response_py3 import ActionResponse from .aggregations_py3 import Aggregations from .aggregations_kind1_py3 import AggregationsKind1 from .alert_rule_py3 import AlertRule @@ -28,6 +29,11 @@ from .aws_cloud_trail_data_connector_data_types_py3 import AwsCloudTrailDataConnectorDataTypes from .aws_cloud_trail_data_connector_py3 import AwsCloudTrailDataConnector from .azure_resource_entity_py3 import AzureResourceEntity + from .relation_base_py3 import RelationBase + from .case_relation_py3 import CaseRelation + from .bookmark_relation_py3 import BookmarkRelation + from .relation_node_py3 import RelationNode + from .relations_model_input_py3 import RelationsModelInput from .user_info_py3 import UserInfo from .bookmark_py3 import Bookmark from .case_py3 import Case @@ -100,7 +106,8 @@ from .aatp_data_connector import AATPDataConnector from .asc_data_connector import ASCDataConnector from .account_entity import AccountEntity - from .action import Action + from .action_request import ActionRequest + from .action_response import ActionResponse from .aggregations import Aggregations from .aggregations_kind1 import AggregationsKind1 from .alert_rule import AlertRule @@ -112,6 +119,11 @@ from .aws_cloud_trail_data_connector_data_types import AwsCloudTrailDataConnectorDataTypes from .aws_cloud_trail_data_connector import AwsCloudTrailDataConnector from .azure_resource_entity import AzureResourceEntity + from .relation_base import RelationBase + from .case_relation import CaseRelation + from .bookmark_relation import BookmarkRelation + from .relation_node import RelationNode + from .relations_model_input import RelationsModelInput from .user_info import UserInfo from .bookmark import Bookmark from .case import Case @@ -179,11 +191,13 @@ from .url_entity import UrlEntity from .operation_paged import OperationPaged from .alert_rule_paged import AlertRulePaged -from .action_paged import ActionPaged +from .action_response_paged import ActionResponsePaged from .alert_rule_template_paged import AlertRuleTemplatePaged from .case_paged import CasePaged from .case_comment_paged import CaseCommentPaged from .bookmark_paged import BookmarkPaged +from .case_relation_paged import CaseRelationPaged +from .bookmark_relation_paged import BookmarkRelationPaged from .data_connector_paged import DataConnectorPaged from .entity_paged import EntityPaged from .office_consent_paged import OfficeConsentPaged @@ -196,6 +210,8 @@ AttackTactic, TriggerOperator, AlertSeverity, + RelationTypes, + RelationNodeKind, CloseReason, CaseSeverity, CaseStatus, @@ -225,7 +241,8 @@ 'AATPDataConnector', 'ASCDataConnector', 'AccountEntity', - 'Action', + 'ActionRequest', + 'ActionResponse', 'Aggregations', 'AggregationsKind1', 'AlertRule', @@ -237,6 +254,11 @@ 'AwsCloudTrailDataConnectorDataTypes', 'AwsCloudTrailDataConnector', 'AzureResourceEntity', + 'RelationBase', + 'CaseRelation', + 'BookmarkRelation', + 'RelationNode', + 'RelationsModelInput', 'UserInfo', 'Bookmark', 'Case', @@ -304,11 +326,13 @@ 'UrlEntity', 'OperationPaged', 'AlertRulePaged', - 'ActionPaged', + 'ActionResponsePaged', 'AlertRuleTemplatePaged', 'CasePaged', 'CaseCommentPaged', 'BookmarkPaged', + 'CaseRelationPaged', + 'BookmarkRelationPaged', 'DataConnectorPaged', 'EntityPaged', 'OfficeConsentPaged', @@ -320,6 +344,8 @@ 'AttackTactic', 'TriggerOperator', 'AlertSeverity', + 'RelationTypes', + 'RelationNodeKind', 'CloseReason', 'CaseSeverity', 'CaseStatus', diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/aad_data_connector.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/aad_data_connector.py index 206e18f4df13..ae814ea5ca08 100644 --- a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/aad_data_connector.py +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/aad_data_connector.py @@ -15,8 +15,17 @@ class AADDataConnector(DataConnector): """Represents AAD (Azure Active Directory) data connector. + Variables are only populated by the server, and will be ignored when + sending a request. + All required parameters must be populated in order to send to Azure. + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str :param etag: Etag of the azure resource :type etag: str :param kind: Required. Constant filled by server. @@ -29,10 +38,16 @@ class AADDataConnector(DataConnector): """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'kind': {'required': True}, } _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/aad_data_connector_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/aad_data_connector_py3.py index 7c09c7a31c74..3e6e6fbdbd5a 100644 --- a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/aad_data_connector_py3.py +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/aad_data_connector_py3.py @@ -15,8 +15,17 @@ class AADDataConnector(DataConnector): """Represents AAD (Azure Active Directory) data connector. + Variables are only populated by the server, and will be ignored when + sending a request. + All required parameters must be populated in order to send to Azure. + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str :param etag: Etag of the azure resource :type etag: str :param kind: Required. Constant filled by server. @@ -29,10 +38,16 @@ class AADDataConnector(DataConnector): """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'kind': {'required': True}, } _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/aatp_data_connector.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/aatp_data_connector.py index d4b2cbf36ac4..4b3fea5f2199 100644 --- a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/aatp_data_connector.py +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/aatp_data_connector.py @@ -15,8 +15,17 @@ class AATPDataConnector(DataConnector): """Represents AATP (Azure Advanced Threat Protection) data connector. + Variables are only populated by the server, and will be ignored when + sending a request. + All required parameters must be populated in order to send to Azure. + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str :param etag: Etag of the azure resource :type etag: str :param kind: Required. Constant filled by server. @@ -29,10 +38,16 @@ class AATPDataConnector(DataConnector): """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'kind': {'required': True}, } _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/aatp_data_connector_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/aatp_data_connector_py3.py index 260b6325ac05..7cacc566c796 100644 --- a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/aatp_data_connector_py3.py +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/aatp_data_connector_py3.py @@ -15,8 +15,17 @@ class AATPDataConnector(DataConnector): """Represents AATP (Azure Advanced Threat Protection) data connector. + Variables are only populated by the server, and will be ignored when + sending a request. + All required parameters must be populated in order to send to Azure. + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str :param etag: Etag of the azure resource :type etag: str :param kind: Required. Constant filled by server. @@ -29,10 +38,16 @@ class AATPDataConnector(DataConnector): """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'kind': {'required': True}, } _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/action.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/action_request.py similarity index 89% rename from sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/action.py rename to sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/action_request.py index c4f388ec15c6..d3fde90d37ec 100644 --- a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/action.py +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/action_request.py @@ -12,7 +12,7 @@ from .resource_with_etag import ResourceWithEtag -class Action(ResourceWithEtag): +class ActionRequest(ResourceWithEtag): """Action for alert rule. Variables are only populated by the server, and will be ignored when @@ -26,7 +26,7 @@ class Action(ResourceWithEtag): :vartype type: str :param etag: Etag of the azure resource :type etag: str - :param trigger_uri: The uri for the action to trigger. + :param trigger_uri: Logic App Callback URL for this specific workflow. :type trigger_uri: str """ @@ -45,5 +45,5 @@ class Action(ResourceWithEtag): } def __init__(self, **kwargs): - super(Action, self).__init__(**kwargs) + super(ActionRequest, self).__init__(**kwargs) self.trigger_uri = kwargs.get('trigger_uri', None) diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/action_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/action_request_py3.py similarity index 89% rename from sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/action_py3.py rename to sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/action_request_py3.py index 6f9ead30890c..36514032253e 100644 --- a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/action_py3.py +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/action_request_py3.py @@ -12,7 +12,7 @@ from .resource_with_etag_py3 import ResourceWithEtag -class Action(ResourceWithEtag): +class ActionRequest(ResourceWithEtag): """Action for alert rule. Variables are only populated by the server, and will be ignored when @@ -26,7 +26,7 @@ class Action(ResourceWithEtag): :vartype type: str :param etag: Etag of the azure resource :type etag: str - :param trigger_uri: The uri for the action to trigger. + :param trigger_uri: Logic App Callback URL for this specific workflow. :type trigger_uri: str """ @@ -45,5 +45,5 @@ class Action(ResourceWithEtag): } def __init__(self, *, etag: str=None, trigger_uri: str=None, **kwargs) -> None: - super(Action, self).__init__(etag=etag, **kwargs) + super(ActionRequest, self).__init__(etag=etag, **kwargs) self.trigger_uri = trigger_uri diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/action_response.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/action_response.py new file mode 100644 index 000000000000..d40b0f4f7c9b --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/action_response.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class ActionResponse(Resource): + """Action for alert rule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str + :param etag: Etag of the action. + :type etag: str + :param workflow_id: The name of the logic app's workflow. + :type workflow_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'workflow_id': {'key': 'properties.workflowId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ActionResponse, self).__init__(**kwargs) + self.etag = kwargs.get('etag', None) + self.workflow_id = kwargs.get('workflow_id', None) diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/action_paged.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/action_response_paged.py similarity index 74% rename from sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/action_paged.py rename to sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/action_response_paged.py index 2aff45e3393b..4bf2cad55601 100644 --- a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/action_paged.py +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/action_response_paged.py @@ -12,16 +12,16 @@ from msrest.paging import Paged -class ActionPaged(Paged): +class ActionResponsePaged(Paged): """ - A paging container for iterating over a list of :class:`Action ` object + A paging container for iterating over a list of :class:`ActionResponse ` object """ _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Action]'} + 'current_page': {'key': 'value', 'type': '[ActionResponse]'} } def __init__(self, *args, **kwargs): - super(ActionPaged, self).__init__(*args, **kwargs) + super(ActionResponsePaged, self).__init__(*args, **kwargs) diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/action_response_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/action_response_py3.py new file mode 100644 index 000000000000..eb05d08d5e40 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/action_response_py3.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class ActionResponse(Resource): + """Action for alert rule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str + :param etag: Etag of the action. + :type etag: str + :param workflow_id: The name of the logic app's workflow. + :type workflow_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'workflow_id': {'key': 'properties.workflowId', 'type': 'str'}, + } + + def __init__(self, *, etag: str=None, workflow_id: str=None, **kwargs) -> None: + super(ActionResponse, self).__init__(**kwargs) + self.etag = etag + self.workflow_id = workflow_id diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/alert_rule.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/alert_rule.py index 75aa1a8a0c0c..d6385014cfd8 100644 --- a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/alert_rule.py +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/alert_rule.py @@ -19,8 +19,17 @@ class AlertRule(Model): sub-classes are: FusionAlertRule, MicrosoftSecurityIncidentCreationAlertRule, ScheduledAlertRule + Variables are only populated by the server, and will be ignored when + sending a request. + All required parameters must be populated in order to send to Azure. + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str :param etag: Etag of the azure resource :type etag: str :param kind: Required. Constant filled by server. @@ -28,10 +37,16 @@ class AlertRule(Model): """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'kind': {'required': True}, } _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, } @@ -42,5 +57,8 @@ class AlertRule(Model): def __init__(self, **kwargs): super(AlertRule, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None self.etag = kwargs.get('etag', None) self.kind = None diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/alert_rule_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/alert_rule_py3.py index 0ae295ff2c32..5f2a8225350a 100644 --- a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/alert_rule_py3.py +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/alert_rule_py3.py @@ -19,8 +19,17 @@ class AlertRule(Model): sub-classes are: FusionAlertRule, MicrosoftSecurityIncidentCreationAlertRule, ScheduledAlertRule + Variables are only populated by the server, and will be ignored when + sending a request. + All required parameters must be populated in order to send to Azure. + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str :param etag: Etag of the azure resource :type etag: str :param kind: Required. Constant filled by server. @@ -28,10 +37,16 @@ class AlertRule(Model): """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'kind': {'required': True}, } _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, } @@ -42,5 +57,8 @@ class AlertRule(Model): def __init__(self, *, etag: str=None, **kwargs) -> None: super(AlertRule, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None self.etag = etag self.kind = None diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/asc_data_connector.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/asc_data_connector.py index 907225647538..2b5903b81cc2 100644 --- a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/asc_data_connector.py +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/asc_data_connector.py @@ -15,8 +15,17 @@ class ASCDataConnector(DataConnector): """Represents ASC (Azure Security Center) data connector. + Variables are only populated by the server, and will be ignored when + sending a request. + All required parameters must be populated in order to send to Azure. + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str :param etag: Etag of the azure resource :type etag: str :param kind: Required. Constant filled by server. @@ -30,10 +39,16 @@ class ASCDataConnector(DataConnector): """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'kind': {'required': True}, } _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'data_types': {'key': 'properties.dataTypes', 'type': 'AlertsDataTypeOfDataConnector'}, diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/asc_data_connector_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/asc_data_connector_py3.py index 1fa97460d3cd..c6b7fdaea4d1 100644 --- a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/asc_data_connector_py3.py +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/asc_data_connector_py3.py @@ -15,8 +15,17 @@ class ASCDataConnector(DataConnector): """Represents ASC (Azure Security Center) data connector. + Variables are only populated by the server, and will be ignored when + sending a request. + All required parameters must be populated in order to send to Azure. + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str :param etag: Etag of the azure resource :type etag: str :param kind: Required. Constant filled by server. @@ -30,10 +39,16 @@ class ASCDataConnector(DataConnector): """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'kind': {'required': True}, } _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'data_types': {'key': 'properties.dataTypes', 'type': 'AlertsDataTypeOfDataConnector'}, diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/aws_cloud_trail_data_connector.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/aws_cloud_trail_data_connector.py index fa36177fa7bd..1694a5e0bcdd 100644 --- a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/aws_cloud_trail_data_connector.py +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/aws_cloud_trail_data_connector.py @@ -15,8 +15,17 @@ class AwsCloudTrailDataConnector(DataConnector): """Represents Amazon Web Services CloudTrail data connector. + Variables are only populated by the server, and will be ignored when + sending a request. + All required parameters must be populated in order to send to Azure. + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str :param etag: Etag of the azure resource :type etag: str :param kind: Required. Constant filled by server. @@ -30,10 +39,16 @@ class AwsCloudTrailDataConnector(DataConnector): """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'kind': {'required': True}, } _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'aws_role_arn': {'key': 'properties.awsRoleArn', 'type': 'str'}, diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/aws_cloud_trail_data_connector_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/aws_cloud_trail_data_connector_py3.py index 2df0cc407407..8fc96cd3871f 100644 --- a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/aws_cloud_trail_data_connector_py3.py +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/aws_cloud_trail_data_connector_py3.py @@ -15,8 +15,17 @@ class AwsCloudTrailDataConnector(DataConnector): """Represents Amazon Web Services CloudTrail data connector. + Variables are only populated by the server, and will be ignored when + sending a request. + All required parameters must be populated in order to send to Azure. + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str :param etag: Etag of the azure resource :type etag: str :param kind: Required. Constant filled by server. @@ -30,10 +39,16 @@ class AwsCloudTrailDataConnector(DataConnector): """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'kind': {'required': True}, } _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'aws_role_arn': {'key': 'properties.awsRoleArn', 'type': 'str'}, diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/bookmark_relation.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/bookmark_relation.py new file mode 100644 index 000000000000..0ef238de56fd --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/bookmark_relation.py @@ -0,0 +1,75 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .relation_base import RelationBase + + +class BookmarkRelation(RelationBase): + """Represents a bookmark relation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str + :ivar kind: The type of relation node. Possible values include: + 'CasesToBookmarks' + :vartype kind: str or ~azure.mgmt.securityinsight.models.RelationTypes + :param etag: ETag for relation + :type etag: str + :param relation_name: Required. Name of relation + :type relation_name: str + :param bookmark_id: Required. The case related bookmark id + :type bookmark_id: str + :param case_identifier: Required. The case identifier + :type case_identifier: str + :param case_title: The case title + :type case_title: str + :param case_severity: The case severity + :type case_severity: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'relation_name': {'required': True}, + 'bookmark_id': {'required': True}, + 'case_identifier': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'relation_name': {'key': 'properties.relationName', 'type': 'str'}, + 'bookmark_id': {'key': 'properties.bookmarkId', 'type': 'str'}, + 'case_identifier': {'key': 'properties.caseIdentifier', 'type': 'str'}, + 'case_title': {'key': 'properties.caseTitle', 'type': 'str'}, + 'case_severity': {'key': 'properties.caseSeverity', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(BookmarkRelation, self).__init__(**kwargs) + self.relation_name = kwargs.get('relation_name', None) + self.bookmark_id = kwargs.get('bookmark_id', None) + self.case_identifier = kwargs.get('case_identifier', None) + self.case_title = kwargs.get('case_title', None) + self.case_severity = kwargs.get('case_severity', None) diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/bookmark_relation_paged.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/bookmark_relation_paged.py new file mode 100644 index 000000000000..4b1c83dc0e22 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/bookmark_relation_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class BookmarkRelationPaged(Paged): + """ + A paging container for iterating over a list of :class:`BookmarkRelation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[BookmarkRelation]'} + } + + def __init__(self, *args, **kwargs): + + super(BookmarkRelationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/bookmark_relation_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/bookmark_relation_py3.py new file mode 100644 index 000000000000..b83c8889f34b --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/bookmark_relation_py3.py @@ -0,0 +1,75 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .relation_base_py3 import RelationBase + + +class BookmarkRelation(RelationBase): + """Represents a bookmark relation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str + :ivar kind: The type of relation node. Possible values include: + 'CasesToBookmarks' + :vartype kind: str or ~azure.mgmt.securityinsight.models.RelationTypes + :param etag: ETag for relation + :type etag: str + :param relation_name: Required. Name of relation + :type relation_name: str + :param bookmark_id: Required. The case related bookmark id + :type bookmark_id: str + :param case_identifier: Required. The case identifier + :type case_identifier: str + :param case_title: The case title + :type case_title: str + :param case_severity: The case severity + :type case_severity: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'relation_name': {'required': True}, + 'bookmark_id': {'required': True}, + 'case_identifier': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'relation_name': {'key': 'properties.relationName', 'type': 'str'}, + 'bookmark_id': {'key': 'properties.bookmarkId', 'type': 'str'}, + 'case_identifier': {'key': 'properties.caseIdentifier', 'type': 'str'}, + 'case_title': {'key': 'properties.caseTitle', 'type': 'str'}, + 'case_severity': {'key': 'properties.caseSeverity', 'type': 'str'}, + } + + def __init__(self, *, relation_name: str, bookmark_id: str, case_identifier: str, etag: str=None, case_title: str=None, case_severity: str=None, **kwargs) -> None: + super(BookmarkRelation, self).__init__(etag=etag, **kwargs) + self.relation_name = relation_name + self.bookmark_id = bookmark_id + self.case_identifier = case_identifier + self.case_title = case_title + self.case_severity = case_severity diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/case_relation.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/case_relation.py new file mode 100644 index 000000000000..a74688bf44ef --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/case_relation.py @@ -0,0 +1,71 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .relation_base import RelationBase + + +class CaseRelation(RelationBase): + """Represents a case relation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str + :ivar kind: The type of relation node. Possible values include: + 'CasesToBookmarks' + :vartype kind: str or ~azure.mgmt.securityinsight.models.RelationTypes + :param etag: ETag for relation + :type etag: str + :param relation_name: Required. Name of relation + :type relation_name: str + :param bookmark_id: Required. The case related bookmark id + :type bookmark_id: str + :param case_identifier: Required. The case identifier + :type case_identifier: str + :param bookmark_name: The case related bookmark name + :type bookmark_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'relation_name': {'required': True}, + 'bookmark_id': {'required': True}, + 'case_identifier': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'relation_name': {'key': 'properties.relationName', 'type': 'str'}, + 'bookmark_id': {'key': 'properties.bookmarkId', 'type': 'str'}, + 'case_identifier': {'key': 'properties.caseIdentifier', 'type': 'str'}, + 'bookmark_name': {'key': 'properties.bookmarkName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CaseRelation, self).__init__(**kwargs) + self.relation_name = kwargs.get('relation_name', None) + self.bookmark_id = kwargs.get('bookmark_id', None) + self.case_identifier = kwargs.get('case_identifier', None) + self.bookmark_name = kwargs.get('bookmark_name', None) diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/case_relation_paged.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/case_relation_paged.py new file mode 100644 index 000000000000..acdf4d2b3de5 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/case_relation_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class CaseRelationPaged(Paged): + """ + A paging container for iterating over a list of :class:`CaseRelation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[CaseRelation]'} + } + + def __init__(self, *args, **kwargs): + + super(CaseRelationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/case_relation_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/case_relation_py3.py new file mode 100644 index 000000000000..6176ba85bfa2 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/case_relation_py3.py @@ -0,0 +1,71 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .relation_base_py3 import RelationBase + + +class CaseRelation(RelationBase): + """Represents a case relation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str + :ivar kind: The type of relation node. Possible values include: + 'CasesToBookmarks' + :vartype kind: str or ~azure.mgmt.securityinsight.models.RelationTypes + :param etag: ETag for relation + :type etag: str + :param relation_name: Required. Name of relation + :type relation_name: str + :param bookmark_id: Required. The case related bookmark id + :type bookmark_id: str + :param case_identifier: Required. The case identifier + :type case_identifier: str + :param bookmark_name: The case related bookmark name + :type bookmark_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'relation_name': {'required': True}, + 'bookmark_id': {'required': True}, + 'case_identifier': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'relation_name': {'key': 'properties.relationName', 'type': 'str'}, + 'bookmark_id': {'key': 'properties.bookmarkId', 'type': 'str'}, + 'case_identifier': {'key': 'properties.caseIdentifier', 'type': 'str'}, + 'bookmark_name': {'key': 'properties.bookmarkName', 'type': 'str'}, + } + + def __init__(self, *, relation_name: str, bookmark_id: str, case_identifier: str, etag: str=None, bookmark_name: str=None, **kwargs) -> None: + super(CaseRelation, self).__init__(etag=etag, **kwargs) + self.relation_name = relation_name + self.bookmark_id = bookmark_id + self.case_identifier = case_identifier + self.bookmark_name = bookmark_name diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector.py index 7e817f2fefa8..da8121507c94 100644 --- a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector.py +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector.py @@ -20,8 +20,17 @@ class DataConnector(Model): AwsCloudTrailDataConnector, MCASDataConnector, MDATPDataConnector, OfficeDataConnector, TIDataConnector + Variables are only populated by the server, and will be ignored when + sending a request. + All required parameters must be populated in order to send to Azure. + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str :param etag: Etag of the azure resource :type etag: str :param kind: Required. Constant filled by server. @@ -29,10 +38,16 @@ class DataConnector(Model): """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'kind': {'required': True}, } _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, } @@ -43,5 +58,8 @@ class DataConnector(Model): def __init__(self, **kwargs): super(DataConnector, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None self.etag = kwargs.get('etag', None) self.kind = None diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_py3.py index 1c57b9cd6bc1..0ec58112cc80 100644 --- a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_py3.py +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/data_connector_py3.py @@ -20,8 +20,17 @@ class DataConnector(Model): AwsCloudTrailDataConnector, MCASDataConnector, MDATPDataConnector, OfficeDataConnector, TIDataConnector + Variables are only populated by the server, and will be ignored when + sending a request. + All required parameters must be populated in order to send to Azure. + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str :param etag: Etag of the azure resource :type etag: str :param kind: Required. Constant filled by server. @@ -29,10 +38,16 @@ class DataConnector(Model): """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'kind': {'required': True}, } _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, } @@ -43,5 +58,8 @@ class DataConnector(Model): def __init__(self, *, etag: str=None, **kwargs) -> None: super(DataConnector, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None self.etag = etag self.kind = None diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/fusion_alert_rule.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/fusion_alert_rule.py index 4efde82ff055..5e0cdd28f415 100644 --- a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/fusion_alert_rule.py +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/fusion_alert_rule.py @@ -20,6 +20,12 @@ class FusionAlertRule(AlertRule): All required parameters must be populated in order to send to Azure. + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str :param etag: Etag of the azure resource :type etag: str :param kind: Required. Constant filled by server. @@ -46,6 +52,9 @@ class FusionAlertRule(AlertRule): """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'kind': {'required': True}, 'alert_rule_template_name': {'required': True}, 'description': {'readonly': True}, @@ -57,6 +66,9 @@ class FusionAlertRule(AlertRule): } _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'alert_rule_template_name': {'key': 'properties.alertRuleTemplateName', 'type': 'str'}, diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/fusion_alert_rule_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/fusion_alert_rule_py3.py index b1151b759da1..6b48b063b450 100644 --- a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/fusion_alert_rule_py3.py +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/fusion_alert_rule_py3.py @@ -20,6 +20,12 @@ class FusionAlertRule(AlertRule): All required parameters must be populated in order to send to Azure. + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str :param etag: Etag of the azure resource :type etag: str :param kind: Required. Constant filled by server. @@ -46,6 +52,9 @@ class FusionAlertRule(AlertRule): """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'kind': {'required': True}, 'alert_rule_template_name': {'required': True}, 'description': {'readonly': True}, @@ -57,6 +66,9 @@ class FusionAlertRule(AlertRule): } _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'alert_rule_template_name': {'key': 'properties.alertRuleTemplateName', 'type': 'str'}, diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/mcas_data_connector.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/mcas_data_connector.py index 5c49887946d1..7e30b43c406a 100644 --- a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/mcas_data_connector.py +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/mcas_data_connector.py @@ -15,8 +15,17 @@ class MCASDataConnector(DataConnector): """Represents MCAS (Microsoft Cloud App Security) data connector. + Variables are only populated by the server, and will be ignored when + sending a request. + All required parameters must be populated in order to send to Azure. + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str :param etag: Etag of the azure resource :type etag: str :param kind: Required. Constant filled by server. @@ -29,10 +38,16 @@ class MCASDataConnector(DataConnector): """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'kind': {'required': True}, } _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/mcas_data_connector_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/mcas_data_connector_py3.py index a68f5d1d50b4..15d314f538bf 100644 --- a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/mcas_data_connector_py3.py +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/mcas_data_connector_py3.py @@ -15,8 +15,17 @@ class MCASDataConnector(DataConnector): """Represents MCAS (Microsoft Cloud App Security) data connector. + Variables are only populated by the server, and will be ignored when + sending a request. + All required parameters must be populated in order to send to Azure. + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str :param etag: Etag of the azure resource :type etag: str :param kind: Required. Constant filled by server. @@ -29,10 +38,16 @@ class MCASDataConnector(DataConnector): """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'kind': {'required': True}, } _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/mdatp_data_connector.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/mdatp_data_connector.py index 625c59a1eb8a..95b2591710b0 100644 --- a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/mdatp_data_connector.py +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/mdatp_data_connector.py @@ -16,8 +16,17 @@ class MDATPDataConnector(DataConnector): """Represents MDATP (Microsoft Defender Advanced Threat Protection) data connector. + Variables are only populated by the server, and will be ignored when + sending a request. + All required parameters must be populated in order to send to Azure. + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str :param etag: Etag of the azure resource :type etag: str :param kind: Required. Constant filled by server. @@ -30,10 +39,16 @@ class MDATPDataConnector(DataConnector): """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'kind': {'required': True}, } _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/mdatp_data_connector_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/mdatp_data_connector_py3.py index a642f96fde36..1a965baab491 100644 --- a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/mdatp_data_connector_py3.py +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/mdatp_data_connector_py3.py @@ -16,8 +16,17 @@ class MDATPDataConnector(DataConnector): """Represents MDATP (Microsoft Defender Advanced Threat Protection) data connector. + Variables are only populated by the server, and will be ignored when + sending a request. + All required parameters must be populated in order to send to Azure. + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str :param etag: Etag of the azure resource :type etag: str :param kind: Required. Constant filled by server. @@ -30,10 +39,16 @@ class MDATPDataConnector(DataConnector): """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'kind': {'required': True}, } _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/microsoft_security_incident_creation_alert_rule.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/microsoft_security_incident_creation_alert_rule.py index fb3219ea83c6..ee698df3d1ce 100644 --- a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/microsoft_security_incident_creation_alert_rule.py +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/microsoft_security_incident_creation_alert_rule.py @@ -20,6 +20,12 @@ class MicrosoftSecurityIncidentCreationAlertRule(AlertRule): All required parameters must be populated in order to send to Azure. + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str :param etag: Etag of the azure resource :type etag: str :param kind: Required. Constant filled by server. @@ -56,6 +62,9 @@ class MicrosoftSecurityIncidentCreationAlertRule(AlertRule): """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'kind': {'required': True}, 'product_filter': {'required': True}, 'display_name': {'required': True}, @@ -64,6 +73,9 @@ class MicrosoftSecurityIncidentCreationAlertRule(AlertRule): } _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'display_names_filter': {'key': 'properties.displayNamesFilter', 'type': '[str]'}, diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/microsoft_security_incident_creation_alert_rule_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/microsoft_security_incident_creation_alert_rule_py3.py index cf7a4c7f46c1..49305d47a218 100644 --- a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/microsoft_security_incident_creation_alert_rule_py3.py +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/microsoft_security_incident_creation_alert_rule_py3.py @@ -20,6 +20,12 @@ class MicrosoftSecurityIncidentCreationAlertRule(AlertRule): All required parameters must be populated in order to send to Azure. + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str :param etag: Etag of the azure resource :type etag: str :param kind: Required. Constant filled by server. @@ -56,6 +62,9 @@ class MicrosoftSecurityIncidentCreationAlertRule(AlertRule): """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'kind': {'required': True}, 'product_filter': {'required': True}, 'display_name': {'required': True}, @@ -64,6 +73,9 @@ class MicrosoftSecurityIncidentCreationAlertRule(AlertRule): } _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'display_names_filter': {'key': 'properties.displayNamesFilter', 'type': '[str]'}, diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_data_connector.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_data_connector.py index fc74f352150e..da61e1f7e33f 100644 --- a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_data_connector.py +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_data_connector.py @@ -15,8 +15,17 @@ class OfficeDataConnector(DataConnector): """Represents office data connector. + Variables are only populated by the server, and will be ignored when + sending a request. + All required parameters must be populated in order to send to Azure. + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str :param etag: Etag of the azure resource :type etag: str :param kind: Required. Constant filled by server. @@ -29,10 +38,16 @@ class OfficeDataConnector(DataConnector): """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'kind': {'required': True}, } _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_data_connector_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_data_connector_py3.py index fd20446c8d9e..1e39f7f646c9 100644 --- a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_data_connector_py3.py +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/office_data_connector_py3.py @@ -15,8 +15,17 @@ class OfficeDataConnector(DataConnector): """Represents office data connector. + Variables are only populated by the server, and will be ignored when + sending a request. + All required parameters must be populated in order to send to Azure. + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str :param etag: Etag of the azure resource :type etag: str :param kind: Required. Constant filled by server. @@ -29,10 +38,16 @@ class OfficeDataConnector(DataConnector): """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'kind': {'required': True}, } _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/relation_base.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/relation_base.py new file mode 100644 index 000000000000..90c16c434502 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/relation_base.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class RelationBase(Resource): + """Represents a relation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str + :ivar kind: The type of relation node. Possible values include: + 'CasesToBookmarks' + :vartype kind: str or ~azure.mgmt.securityinsight.models.RelationTypes + :param etag: ETag for relation + :type etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RelationBase, self).__init__(**kwargs) + self.kind = None + self.etag = kwargs.get('etag', None) diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/relation_base_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/relation_base_py3.py new file mode 100644 index 000000000000..dea30f55e6cc --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/relation_base_py3.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class RelationBase(Resource): + """Represents a relation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str + :ivar kind: The type of relation node. Possible values include: + 'CasesToBookmarks' + :vartype kind: str or ~azure.mgmt.securityinsight.models.RelationTypes + :param etag: ETag for relation + :type etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, *, etag: str=None, **kwargs) -> None: + super(RelationBase, self).__init__(**kwargs) + self.kind = None + self.etag = etag diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/relation_node.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/relation_node.py new file mode 100644 index 000000000000..3a97617848eb --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/relation_node.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RelationNode(Model): + """Relation node. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param relation_node_id: Relation Node Id + :type relation_node_id: str + :ivar relation_node_kind: The type of relation node. Possible values + include: 'Case', 'Bookmark' + :vartype relation_node_kind: str or + ~azure.mgmt.securityinsight.models.RelationNodeKind + :param etag: Etag for relation node + :type etag: str + :param relation_additional_properties: Additional set of properties + :type relation_additional_properties: dict[str, str] + """ + + _validation = { + 'relation_node_kind': {'readonly': True}, + } + + _attribute_map = { + 'relation_node_id': {'key': 'relationNodeId', 'type': 'str'}, + 'relation_node_kind': {'key': 'relationNodeKind', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'relation_additional_properties': {'key': 'relationAdditionalProperties', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(RelationNode, self).__init__(**kwargs) + self.relation_node_id = kwargs.get('relation_node_id', None) + self.relation_node_kind = None + self.etag = kwargs.get('etag', None) + self.relation_additional_properties = kwargs.get('relation_additional_properties', None) diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/relation_node_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/relation_node_py3.py new file mode 100644 index 000000000000..c1a33561a989 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/relation_node_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RelationNode(Model): + """Relation node. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param relation_node_id: Relation Node Id + :type relation_node_id: str + :ivar relation_node_kind: The type of relation node. Possible values + include: 'Case', 'Bookmark' + :vartype relation_node_kind: str or + ~azure.mgmt.securityinsight.models.RelationNodeKind + :param etag: Etag for relation node + :type etag: str + :param relation_additional_properties: Additional set of properties + :type relation_additional_properties: dict[str, str] + """ + + _validation = { + 'relation_node_kind': {'readonly': True}, + } + + _attribute_map = { + 'relation_node_id': {'key': 'relationNodeId', 'type': 'str'}, + 'relation_node_kind': {'key': 'relationNodeKind', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'relation_additional_properties': {'key': 'relationAdditionalProperties', 'type': '{str}'}, + } + + def __init__(self, *, relation_node_id: str=None, etag: str=None, relation_additional_properties=None, **kwargs) -> None: + super(RelationNode, self).__init__(**kwargs) + self.relation_node_id = relation_node_id + self.relation_node_kind = None + self.etag = etag + self.relation_additional_properties = relation_additional_properties diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/relations_model_input.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/relations_model_input.py new file mode 100644 index 000000000000..aa25bcaf532f --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/relations_model_input.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .relation_base import RelationBase + + +class RelationsModelInput(RelationBase): + """Relation input model. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str + :ivar kind: The type of relation node. Possible values include: + 'CasesToBookmarks' + :vartype kind: str or ~azure.mgmt.securityinsight.models.RelationTypes + :param etag: ETag for relation + :type etag: str + :param relation_name: Name of relation + :type relation_name: str + :param source_relation_node: Relation source node + :type source_relation_node: + ~azure.mgmt.securityinsight.models.RelationNode + :param target_relation_node: Relation target node + :type target_relation_node: + ~azure.mgmt.securityinsight.models.RelationNode + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'relation_name': {'key': 'properties.relationName', 'type': 'str'}, + 'source_relation_node': {'key': 'properties.sourceRelationNode', 'type': 'RelationNode'}, + 'target_relation_node': {'key': 'properties.targetRelationNode', 'type': 'RelationNode'}, + } + + def __init__(self, **kwargs): + super(RelationsModelInput, self).__init__(**kwargs) + self.relation_name = kwargs.get('relation_name', None) + self.source_relation_node = kwargs.get('source_relation_node', None) + self.target_relation_node = kwargs.get('target_relation_node', None) diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/relations_model_input_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/relations_model_input_py3.py new file mode 100644 index 000000000000..8a1850b49b51 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/relations_model_input_py3.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .relation_base_py3 import RelationBase + + +class RelationsModelInput(RelationBase): + """Relation input model. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str + :ivar kind: The type of relation node. Possible values include: + 'CasesToBookmarks' + :vartype kind: str or ~azure.mgmt.securityinsight.models.RelationTypes + :param etag: ETag for relation + :type etag: str + :param relation_name: Name of relation + :type relation_name: str + :param source_relation_node: Relation source node + :type source_relation_node: + ~azure.mgmt.securityinsight.models.RelationNode + :param target_relation_node: Relation target node + :type target_relation_node: + ~azure.mgmt.securityinsight.models.RelationNode + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'relation_name': {'key': 'properties.relationName', 'type': 'str'}, + 'source_relation_node': {'key': 'properties.sourceRelationNode', 'type': 'RelationNode'}, + 'target_relation_node': {'key': 'properties.targetRelationNode', 'type': 'RelationNode'}, + } + + def __init__(self, *, etag: str=None, relation_name: str=None, source_relation_node=None, target_relation_node=None, **kwargs) -> None: + super(RelationsModelInput, self).__init__(etag=etag, **kwargs) + self.relation_name = relation_name + self.source_relation_node = source_relation_node + self.target_relation_node = target_relation_node diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/resource_with_etag.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/resource_with_etag.py index 5b417d2ace84..5132458f5fbb 100644 --- a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/resource_with_etag.py +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/resource_with_etag.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from msrest.serialization import Model -class ResourceWithEtag(Resource): +class ResourceWithEtag(Model): """An azure resource object with an Etag property. Variables are only populated by the server, and will be ignored when @@ -43,4 +43,7 @@ class ResourceWithEtag(Resource): def __init__(self, **kwargs): super(ResourceWithEtag, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None self.etag = kwargs.get('etag', None) diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/resource_with_etag_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/resource_with_etag_py3.py index 36b6bec523eb..fcb83f8d8edd 100644 --- a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/resource_with_etag_py3.py +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/resource_with_etag_py3.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource_py3 import Resource +from msrest.serialization import Model -class ResourceWithEtag(Resource): +class ResourceWithEtag(Model): """An azure resource object with an Etag property. Variables are only populated by the server, and will be ignored when @@ -43,4 +43,7 @@ class ResourceWithEtag(Resource): def __init__(self, *, etag: str=None, **kwargs) -> None: super(ResourceWithEtag, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None self.etag = etag diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/scheduled_alert_rule.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/scheduled_alert_rule.py index c24230eb45ab..f454a1b09517 100644 --- a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/scheduled_alert_rule.py +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/scheduled_alert_rule.py @@ -20,6 +20,12 @@ class ScheduledAlertRule(AlertRule): All required parameters must be populated in order to send to Azure. + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str :param etag: Etag of the azure resource :type etag: str :param kind: Required. Constant filled by server. @@ -68,6 +74,9 @@ class ScheduledAlertRule(AlertRule): """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'kind': {'required': True}, 'display_name': {'required': True}, 'enabled': {'required': True}, @@ -77,6 +86,9 @@ class ScheduledAlertRule(AlertRule): } _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'query': {'key': 'properties.query', 'type': 'str'}, diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/scheduled_alert_rule_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/scheduled_alert_rule_py3.py index 31e539891990..e63f54e51274 100644 --- a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/scheduled_alert_rule_py3.py +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/scheduled_alert_rule_py3.py @@ -20,6 +20,12 @@ class ScheduledAlertRule(AlertRule): All required parameters must be populated in order to send to Azure. + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str :param etag: Etag of the azure resource :type etag: str :param kind: Required. Constant filled by server. @@ -68,6 +74,9 @@ class ScheduledAlertRule(AlertRule): """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'kind': {'required': True}, 'display_name': {'required': True}, 'enabled': {'required': True}, @@ -77,6 +86,9 @@ class ScheduledAlertRule(AlertRule): } _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'query': {'key': 'properties.query', 'type': 'str'}, diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/security_insights_enums.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/security_insights_enums.py index 1fbe9fafa771..25dc355f5a41 100644 --- a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/security_insights_enums.py +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/security_insights_enums.py @@ -69,6 +69,17 @@ class AlertSeverity(str, Enum): informational = "Informational" #: Informational severity +class RelationTypes(str, Enum): + + cases_to_bookmarks = "CasesToBookmarks" #: Relations between cases and bookmarks + + +class RelationNodeKind(str, Enum): + + case = "Case" #: Case node part of the relation + bookmark = "Bookmark" #: Bookmark node part of the relation + + class CloseReason(str, Enum): resolved = "Resolved" #: Case was resolved diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/settings.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/settings.py index dae2f113b97f..52dbb45951ea 100644 --- a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/settings.py +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/settings.py @@ -18,8 +18,17 @@ class Settings(Model): You probably want to use the sub-classes and not this class directly. Known sub-classes are: ToggleSettings, UebaSettings + Variables are only populated by the server, and will be ignored when + sending a request. + All required parameters must be populated in order to send to Azure. + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str :param etag: Etag of the azure resource :type etag: str :param kind: Required. Constant filled by server. @@ -27,10 +36,16 @@ class Settings(Model): """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'kind': {'required': True}, } _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, } @@ -41,5 +56,8 @@ class Settings(Model): def __init__(self, **kwargs): super(Settings, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None self.etag = kwargs.get('etag', None) self.kind = None diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/settings_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/settings_py3.py index 8973d82ff5d8..a21875854a2c 100644 --- a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/settings_py3.py +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/settings_py3.py @@ -18,8 +18,17 @@ class Settings(Model): You probably want to use the sub-classes and not this class directly. Known sub-classes are: ToggleSettings, UebaSettings + Variables are only populated by the server, and will be ignored when + sending a request. + All required parameters must be populated in order to send to Azure. + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str :param etag: Etag of the azure resource :type etag: str :param kind: Required. Constant filled by server. @@ -27,10 +36,16 @@ class Settings(Model): """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'kind': {'required': True}, } _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, } @@ -41,5 +56,8 @@ class Settings(Model): def __init__(self, *, etag: str=None, **kwargs) -> None: super(Settings, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None self.etag = etag self.kind = None diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ti_data_connector.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ti_data_connector.py index e09a23aad36d..4cb1fd77dbbd 100644 --- a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ti_data_connector.py +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ti_data_connector.py @@ -15,8 +15,17 @@ class TIDataConnector(DataConnector): """Represents threat intelligence data connector. + Variables are only populated by the server, and will be ignored when + sending a request. + All required parameters must be populated in order to send to Azure. + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str :param etag: Etag of the azure resource :type etag: str :param kind: Required. Constant filled by server. @@ -29,10 +38,16 @@ class TIDataConnector(DataConnector): """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'kind': {'required': True}, } _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ti_data_connector_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ti_data_connector_py3.py index 762872e152b6..54731b84b747 100644 --- a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ti_data_connector_py3.py +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ti_data_connector_py3.py @@ -15,8 +15,17 @@ class TIDataConnector(DataConnector): """Represents threat intelligence data connector. + Variables are only populated by the server, and will be ignored when + sending a request. + All required parameters must be populated in order to send to Azure. + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str :param etag: Etag of the azure resource :type etag: str :param kind: Required. Constant filled by server. @@ -29,10 +38,16 @@ class TIDataConnector(DataConnector): """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'kind': {'required': True}, } _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/toggle_settings.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/toggle_settings.py index c1aa73d9806d..4983c1cbee1f 100644 --- a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/toggle_settings.py +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/toggle_settings.py @@ -15,8 +15,17 @@ class ToggleSettings(Settings): """Settings with single toggle. + Variables are only populated by the server, and will be ignored when + sending a request. + All required parameters must be populated in order to send to Azure. + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str :param etag: Etag of the azure resource :type etag: str :param kind: Required. Constant filled by server. @@ -26,10 +35,16 @@ class ToggleSettings(Settings): """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'kind': {'required': True}, } _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'is_enabled': {'key': 'properties.isEnabled', 'type': 'bool'}, diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/toggle_settings_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/toggle_settings_py3.py index 0fa3ac767a2c..beb32b979fa1 100644 --- a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/toggle_settings_py3.py +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/toggle_settings_py3.py @@ -15,8 +15,17 @@ class ToggleSettings(Settings): """Settings with single toggle. + Variables are only populated by the server, and will be ignored when + sending a request. + All required parameters must be populated in order to send to Azure. + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str :param etag: Etag of the azure resource :type etag: str :param kind: Required. Constant filled by server. @@ -26,10 +35,16 @@ class ToggleSettings(Settings): """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'kind': {'required': True}, } _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'is_enabled': {'key': 'properties.isEnabled', 'type': 'bool'}, diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ueba_settings.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ueba_settings.py index 621f9d5ba15c..c323bf03917b 100644 --- a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ueba_settings.py +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ueba_settings.py @@ -20,6 +20,12 @@ class UebaSettings(Settings): All required parameters must be populated in order to send to Azure. + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str :param etag: Etag of the azure resource :type etag: str :param kind: Required. Constant filled by server. @@ -39,12 +45,18 @@ class UebaSettings(Settings): """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'kind': {'required': True}, 'atp_license_status': {'readonly': True}, 'status_in_mcas': {'readonly': True}, } _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'atp_license_status': {'key': 'properties.atpLicenseStatus', 'type': 'str'}, diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ueba_settings_py3.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ueba_settings_py3.py index 86912996f197..5e6267682f72 100644 --- a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ueba_settings_py3.py +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/models/ueba_settings_py3.py @@ -20,6 +20,12 @@ class UebaSettings(Settings): All required parameters must be populated in order to send to Azure. + :ivar id: Azure resource Id + :vartype id: str + :ivar name: Azure resource name + :vartype name: str + :ivar type: Azure resource type + :vartype type: str :param etag: Etag of the azure resource :type etag: str :param kind: Required. Constant filled by server. @@ -39,12 +45,18 @@ class UebaSettings(Settings): """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'kind': {'required': True}, 'atp_license_status': {'readonly': True}, 'status_in_mcas': {'readonly': True}, } _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'atp_license_status': {'key': 'properties.atpLicenseStatus', 'type': 'str'}, diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/__init__.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/__init__.py index 798ec5d6d81b..926b96bcc95b 100644 --- a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/__init__.py +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/__init__.py @@ -17,6 +17,8 @@ from .comments_operations import CommentsOperations from .case_comments_operations import CaseCommentsOperations from .bookmarks_operations import BookmarksOperations +from .case_relations_operations import CaseRelationsOperations +from .bookmark_relations_operations import BookmarkRelationsOperations from .data_connectors_operations import DataConnectorsOperations from .entities_operations import EntitiesOperations from .office_consents_operations import OfficeConsentsOperations @@ -33,6 +35,8 @@ 'CommentsOperations', 'CaseCommentsOperations', 'BookmarksOperations', + 'CaseRelationsOperations', + 'BookmarkRelationsOperations', 'DataConnectorsOperations', 'EntitiesOperations', 'OfficeConsentsOperations', diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/actions_operations.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/actions_operations.py index e32d7e6f3188..d24f621c601d 100644 --- a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/actions_operations.py +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/actions_operations.py @@ -56,9 +56,9 @@ def list_by_alert_rule( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of Action + :return: An iterator like instance of ActionResponse :rtype: - ~azure.mgmt.securityinsight.models.ActionPaged[~azure.mgmt.securityinsight.models.Action] + ~azure.mgmt.securityinsight.models.ActionResponsePaged[~azure.mgmt.securityinsight.models.ActionResponse] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -105,11 +105,11 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ActionPaged(internal_paging, self._deserialize.dependencies) + deserialized = models.ActionResponsePaged(internal_paging, self._deserialize.dependencies) if raw: header_dict = {} - client_raw_response = models.ActionPaged(internal_paging, self._deserialize.dependencies, header_dict) + client_raw_response = models.ActionResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) return client_raw_response return deserialized diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/alert_rules_operations.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/alert_rules_operations.py index b658e128a757..282c561bab1e 100644 --- a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/alert_rules_operations.py +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/alert_rules_operations.py @@ -342,8 +342,8 @@ def get_action( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: Action or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.securityinsight.models.Action or + :return: ActionResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.securityinsight.models.ActionResponse or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ @@ -385,7 +385,7 @@ def get_action( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('Action', response) + deserialized = self._deserialize('ActionResponse', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -412,19 +412,19 @@ def create_or_update_action( :type action_id: str :param etag: Etag of the azure resource :type etag: str - :param trigger_uri: The uri for the action to trigger. + :param trigger_uri: Logic App Callback URL for this specific workflow. :type trigger_uri: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: Action or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.securityinsight.models.Action or + :return: ActionResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.securityinsight.models.ActionResponse or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - action = models.Action(etag=etag, trigger_uri=trigger_uri) + action = models.ActionRequest(etag=etag, trigger_uri=trigger_uri) # Construct URL url = self.create_or_update_action.metadata['url'] @@ -454,7 +454,7 @@ def create_or_update_action( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(action, 'Action') + body_content = self._serialize.body(action, 'ActionRequest') # Construct and send request request = self._client.put(url, query_parameters, header_parameters, body_content) @@ -468,9 +468,9 @@ def create_or_update_action( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('Action', response) + deserialized = self._deserialize('ActionResponse', response) if response.status_code == 201: - deserialized = self._deserialize('Action', response) + deserialized = self._deserialize('ActionResponse', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/bookmark_relations_operations.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/bookmark_relations_operations.py new file mode 100644 index 000000000000..ba8625d5e879 --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/bookmark_relations_operations.py @@ -0,0 +1,356 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class BookmarkRelationsOperations(object): + """BookmarkRelationsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2019-01-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01-preview" + + self.config = config + + def list( + self, resource_group_name, operational_insights_resource_provider, workspace_name, bookmark_id, filter=None, orderby=None, top=None, skip_token=None, custom_headers=None, raw=False, **operation_config): + """Gets all bookmark relations. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param operational_insights_resource_provider: The namespace of + workspaces resource provider- Microsoft.OperationalInsights. + :type operational_insights_resource_provider: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param bookmark_id: Bookmark ID + :type bookmark_id: str + :param filter: Filters the results, based on a Boolean condition. + Optional. + :type filter: str + :param orderby: Sorts the results. Optional. + :type orderby: str + :param top: Returns only the first n results. Optional. + :type top: int + :param skip_token: Skiptoken is only used if a previous operation + returned a partial result. If a previous response contains a nextLink + element, the value of the nextLink element will include a skiptoken + parameter that specifies a starting point to use for subsequent calls. + Optional. + :type skip_token: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of BookmarkRelation + :rtype: + ~azure.mgmt.securityinsight.models.BookmarkRelationPaged[~azure.mgmt.securityinsight.models.BookmarkRelation] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'operationalInsightsResourceProvider': self._serialize.url("operational_insights_resource_provider", operational_insights_resource_provider, 'str'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=90, min_length=1), + 'bookmarkId': self._serialize.url("bookmark_id", bookmark_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if orderby is not None: + query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.BookmarkRelationPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.BookmarkRelationPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}/relations'} + + def get_relation( + self, resource_group_name, operational_insights_resource_provider, workspace_name, bookmark_id, relation_name, custom_headers=None, raw=False, **operation_config): + """Gets a bookmark relation. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param operational_insights_resource_provider: The namespace of + workspaces resource provider- Microsoft.OperationalInsights. + :type operational_insights_resource_provider: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param bookmark_id: Bookmark ID + :type bookmark_id: str + :param relation_name: Relation Name + :type relation_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BookmarkRelation or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.securityinsight.models.BookmarkRelation or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_relation.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'operationalInsightsResourceProvider': self._serialize.url("operational_insights_resource_provider", operational_insights_resource_provider, 'str'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=90, min_length=1), + 'bookmarkId': self._serialize.url("bookmark_id", bookmark_id, 'str'), + 'relationName': self._serialize.url("relation_name", relation_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('BookmarkRelation', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_relation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}/relations/{relationName}'} + + def create_or_update_relation( + self, resource_group_name, operational_insights_resource_provider, workspace_name, bookmark_id, relation_name, relation_input_model, custom_headers=None, raw=False, **operation_config): + """Creates the bookmark relation. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param operational_insights_resource_provider: The namespace of + workspaces resource provider- Microsoft.OperationalInsights. + :type operational_insights_resource_provider: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param bookmark_id: Bookmark ID + :type bookmark_id: str + :param relation_name: Relation Name + :type relation_name: str + :param relation_input_model: The relation input model + :type relation_input_model: + ~azure.mgmt.securityinsight.models.RelationsModelInput + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BookmarkRelation or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.securityinsight.models.BookmarkRelation or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update_relation.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'operationalInsightsResourceProvider': self._serialize.url("operational_insights_resource_provider", operational_insights_resource_provider, 'str'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=90, min_length=1), + 'bookmarkId': self._serialize.url("bookmark_id", bookmark_id, 'str'), + 'relationName': self._serialize.url("relation_name", relation_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(relation_input_model, 'RelationsModelInput') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('BookmarkRelation', response) + if response.status_code == 201: + deserialized = self._deserialize('BookmarkRelation', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_relation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}/relations/{relationName}'} + + def delete_relation( + self, resource_group_name, operational_insights_resource_provider, workspace_name, bookmark_id, relation_name, custom_headers=None, raw=False, **operation_config): + """Delete the bookmark relation. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param operational_insights_resource_provider: The namespace of + workspaces resource provider- Microsoft.OperationalInsights. + :type operational_insights_resource_provider: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param bookmark_id: Bookmark ID + :type bookmark_id: str + :param relation_name: Relation Name + :type relation_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_relation.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'operationalInsightsResourceProvider': self._serialize.url("operational_insights_resource_provider", operational_insights_resource_provider, 'str'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=90, min_length=1), + 'bookmarkId': self._serialize.url("bookmark_id", bookmark_id, 'str'), + 'relationName': self._serialize.url("relation_name", relation_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_relation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}/relations/{relationName}'} diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/case_relations_operations.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/case_relations_operations.py new file mode 100644 index 000000000000..10fe41bf728a --- /dev/null +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/case_relations_operations.py @@ -0,0 +1,356 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class CaseRelationsOperations(object): + """CaseRelationsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API version for the operation. Constant value: "2019-01-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-01-01-preview" + + self.config = config + + def list( + self, resource_group_name, operational_insights_resource_provider, workspace_name, case_id, filter=None, orderby=None, top=None, skip_token=None, custom_headers=None, raw=False, **operation_config): + """Gets all case relations. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param operational_insights_resource_provider: The namespace of + workspaces resource provider- Microsoft.OperationalInsights. + :type operational_insights_resource_provider: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param case_id: Case ID + :type case_id: str + :param filter: Filters the results, based on a Boolean condition. + Optional. + :type filter: str + :param orderby: Sorts the results. Optional. + :type orderby: str + :param top: Returns only the first n results. Optional. + :type top: int + :param skip_token: Skiptoken is only used if a previous operation + returned a partial result. If a previous response contains a nextLink + element, the value of the nextLink element will include a skiptoken + parameter that specifies a starting point to use for subsequent calls. + Optional. + :type skip_token: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of CaseRelation + :rtype: + ~azure.mgmt.securityinsight.models.CaseRelationPaged[~azure.mgmt.securityinsight.models.CaseRelation] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'operationalInsightsResourceProvider': self._serialize.url("operational_insights_resource_provider", operational_insights_resource_provider, 'str'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=90, min_length=1), + 'caseId': self._serialize.url("case_id", case_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if orderby is not None: + query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.CaseRelationPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.CaseRelationPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/cases/{caseId}/relations'} + + def get_relation( + self, resource_group_name, operational_insights_resource_provider, workspace_name, case_id, relation_name, custom_headers=None, raw=False, **operation_config): + """Gets a case relation. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param operational_insights_resource_provider: The namespace of + workspaces resource provider- Microsoft.OperationalInsights. + :type operational_insights_resource_provider: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param case_id: Case ID + :type case_id: str + :param relation_name: Relation Name + :type relation_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CaseRelation or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.securityinsight.models.CaseRelation or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_relation.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'operationalInsightsResourceProvider': self._serialize.url("operational_insights_resource_provider", operational_insights_resource_provider, 'str'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=90, min_length=1), + 'caseId': self._serialize.url("case_id", case_id, 'str'), + 'relationName': self._serialize.url("relation_name", relation_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('CaseRelation', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_relation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/cases/{caseId}/relations/{relationName}'} + + def create_or_update_relation( + self, resource_group_name, operational_insights_resource_provider, workspace_name, case_id, relation_name, relation_input_model, custom_headers=None, raw=False, **operation_config): + """Creates or updates the case relation. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param operational_insights_resource_provider: The namespace of + workspaces resource provider- Microsoft.OperationalInsights. + :type operational_insights_resource_provider: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param case_id: Case ID + :type case_id: str + :param relation_name: Relation Name + :type relation_name: str + :param relation_input_model: The relation input model + :type relation_input_model: + ~azure.mgmt.securityinsight.models.RelationsModelInput + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CaseRelation or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.securityinsight.models.CaseRelation or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update_relation.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'operationalInsightsResourceProvider': self._serialize.url("operational_insights_resource_provider", operational_insights_resource_provider, 'str'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=90, min_length=1), + 'caseId': self._serialize.url("case_id", case_id, 'str'), + 'relationName': self._serialize.url("relation_name", relation_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(relation_input_model, 'RelationsModelInput') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('CaseRelation', response) + if response.status_code == 201: + deserialized = self._deserialize('CaseRelation', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_relation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/cases/{caseId}/relations/{relationName}'} + + def delete_relation( + self, resource_group_name, operational_insights_resource_provider, workspace_name, case_id, relation_name, custom_headers=None, raw=False, **operation_config): + """Delete the case relation. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param operational_insights_resource_provider: The namespace of + workspaces resource provider- Microsoft.OperationalInsights. + :type operational_insights_resource_provider: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param case_id: Case ID + :type case_id: str + :param relation_name: Relation Name + :type relation_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_relation.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'operationalInsightsResourceProvider': self._serialize.url("operational_insights_resource_provider", operational_insights_resource_provider, 'str'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=90, min_length=1), + 'caseId': self._serialize.url("case_id", case_id, 'str'), + 'relationName': self._serialize.url("relation_name", relation_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_relation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/cases/{caseId}/relations/{relationName}'} diff --git a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/security_insights.py b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/security_insights.py index 496bd58a4113..6dc40813c051 100644 --- a/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/security_insights.py +++ b/sdk/azure-mgmt-securityinsight/azure/mgmt/securityinsight/security_insights.py @@ -21,6 +21,8 @@ from .operations.comments_operations import CommentsOperations from .operations.case_comments_operations import CaseCommentsOperations from .operations.bookmarks_operations import BookmarksOperations +from .operations.case_relations_operations import CaseRelationsOperations +from .operations.bookmark_relations_operations import BookmarkRelationsOperations from .operations.data_connectors_operations import DataConnectorsOperations from .operations.entities_operations import EntitiesOperations from .operations.office_consents_operations import OfficeConsentsOperations @@ -84,6 +86,10 @@ class SecurityInsights(SDKClient): :vartype case_comments: azure.mgmt.securityinsight.operations.CaseCommentsOperations :ivar bookmarks: Bookmarks operations :vartype bookmarks: azure.mgmt.securityinsight.operations.BookmarksOperations + :ivar case_relations: CaseRelations operations + :vartype case_relations: azure.mgmt.securityinsight.operations.CaseRelationsOperations + :ivar bookmark_relations: BookmarkRelations operations + :vartype bookmark_relations: azure.mgmt.securityinsight.operations.BookmarkRelationsOperations :ivar data_connectors: DataConnectors operations :vartype data_connectors: azure.mgmt.securityinsight.operations.DataConnectorsOperations :ivar entities: Entities operations @@ -132,6 +138,10 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.bookmarks = BookmarksOperations( self._client, self.config, self._serialize, self._deserialize) + self.case_relations = CaseRelationsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.bookmark_relations = BookmarkRelationsOperations( + self._client, self.config, self._serialize, self._deserialize) self.data_connectors = DataConnectorsOperations( self._client, self.config, self._serialize, self._deserialize) self.entities = EntitiesOperations(