Skip to content
Prev Previous commit
Next Next commit
[AutoPR securityinsights/resource-manager] Cases swagger updates (#6524)
* Generated from eee3abfb0974b398a83e8c304732163a83314bcc

more fixes

* Generated from 23d7ddc0a994dcad4bcc056d3522942db2211199

some fixes

* Generated from 7349895d27a0fb8fb0eca4736cd03c3c2fd5090d

changes assignedTo property name to owner + added more values to closeReason enum

* Generated from d3a471b37883a3c181e4a20cdbd6b5ec12fcbe1e

set x-nullable to true in UserInfo.objectId
  • Loading branch information
AutorestCI authored Aug 9, 2019
commit 658731a2574bd707997c993bd595e9f2bbc3c3c8
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from .action_py3 import Action
from .user_info_py3 import UserInfo
from .case_py3 import Case
from .case_comment_py3 import CaseComment
from .bookmark_py3 import Bookmark
from .data_connector_py3 import DataConnector
from .data_connector_kind1_py3 import DataConnectorKind1
Expand Down Expand Up @@ -90,6 +91,7 @@
from .action import Action
from .user_info import UserInfo
from .case import Case
from .case_comment import CaseComment
from .bookmark import Bookmark
from .data_connector import DataConnector
from .data_connector_kind1 import DataConnectorKind1
Expand Down Expand Up @@ -157,6 +159,7 @@
from .alert_rule_paged import AlertRulePaged
from .action_paged import ActionPaged
from .case_paged import CasePaged
from .case_comment_paged import CaseCommentPaged
from .bookmark_paged import BookmarkPaged
from .data_connector_paged import DataConnectorPaged
from .entity_paged import EntityPaged
Expand Down Expand Up @@ -197,6 +200,7 @@
'Action',
'UserInfo',
'Case',
'CaseComment',
'Bookmark',
'DataConnector',
'DataConnectorKind1',
Expand Down Expand Up @@ -264,6 +268,7 @@
'AlertRulePaged',
'ActionPaged',
'CasePaged',
'CaseCommentPaged',
'BookmarkPaged',
'DataConnectorPaged',
'EntityPaged',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,40 +28,57 @@ class Case(Resource):
:vartype name: str
:param etag: Etag of the alert rule.
:type etag: str
:param last_updated_time_utc: The last time the case was updated
:type last_updated_time_utc: datetime
:param created_time_utc: The time the case was created
:type created_time_utc: datetime
:ivar last_updated_time_utc: The last time the case was updated
:vartype last_updated_time_utc: datetime
:ivar created_time_utc: The time the case was created
:vartype created_time_utc: datetime
:param end_time_utc: The end time of the case
:type end_time_utc: datetime
:param start_time_utc: The start time of the case
:param start_time_utc: Required. The start time of the case
:type start_time_utc: datetime
:param labels: List of labels relevant to this case
:type labels: list[str]
:param description: The description of the case
:type description: str
:param title: Required. The title of the case
:type title: str
:param assigned_to: Describes a user that the case is assigned to
:type assigned_to: ~azure.mgmt.securityinsight.models.UserInfo
:param owner: Describes a user that the case is assigned to
:type owner: ~azure.mgmt.securityinsight.models.UserInfo
:param severity: Required. The severity of the case. Possible values
include: 'Critical', 'High', 'Medium', 'Low', 'Informational'
:type severity: str or ~azure.mgmt.securityinsight.models.CaseSeverity
:param status: Required. The status of the case. Possible values include:
'Draft', 'New', 'InProgress', 'Closed'
:type status: str or ~azure.mgmt.securityinsight.models.CaseStatus
:param close_reason: The reason the case was closed. Possible values
include: 'Resolved', 'Dismissed', 'Other'
include: 'Resolved', 'Dismissed', 'TruePositive', 'FalsePositive', 'Other'
:type close_reason: str or ~azure.mgmt.securityinsight.models.CloseReason
:param closed_reason_text: the case close reason details
:type closed_reason_text: str
:ivar related_alert_ids: List of related alert identifiers
:vartype related_alert_ids: list[str]
:ivar case_number: a sequential number
:vartype case_number: int
:ivar last_comment: the last comment in the case
:vartype last_comment: str
:ivar total_comments: the number of total comments in the case
:vartype total_comments: int
"""

_validation = {
'id': {'readonly': True},
'type': {'readonly': True},
'name': {'readonly': True},
'last_updated_time_utc': {'readonly': True},
'created_time_utc': {'readonly': True},
'start_time_utc': {'required': True},
'title': {'required': True},
'severity': {'required': True},
'status': {'required': True},
'related_alert_ids': {'readonly': True},
'case_number': {'readonly': True},
'last_comment': {'readonly': True},
'total_comments': {'readonly': True},
}

_attribute_map = {
Expand All @@ -76,23 +93,33 @@ class Case(Resource):
'labels': {'key': 'properties.labels', 'type': '[str]'},
'description': {'key': 'properties.description', 'type': 'str'},
'title': {'key': 'properties.title', 'type': 'str'},
'assigned_to': {'key': 'properties.assignedTo', 'type': 'UserInfo'},
'owner': {'key': 'properties.owner', 'type': 'UserInfo'},
'severity': {'key': 'properties.severity', 'type': 'str'},
'status': {'key': 'properties.status', 'type': 'str'},
'close_reason': {'key': 'properties.closeReason', 'type': 'str'},
'closed_reason_text': {'key': 'properties.closedReasonText', 'type': 'str'},
'related_alert_ids': {'key': 'properties.relatedAlertIds', 'type': '[str]'},
'case_number': {'key': 'properties.caseNumber', 'type': 'int'},
'last_comment': {'key': 'properties.lastComment', 'type': 'str'},
'total_comments': {'key': 'properties.totalComments', 'type': 'int'},
}

def __init__(self, **kwargs):
super(Case, self).__init__(**kwargs)
self.etag = kwargs.get('etag', None)
self.last_updated_time_utc = kwargs.get('last_updated_time_utc', None)
self.created_time_utc = kwargs.get('created_time_utc', None)
self.last_updated_time_utc = None
self.created_time_utc = None
self.end_time_utc = kwargs.get('end_time_utc', None)
self.start_time_utc = kwargs.get('start_time_utc', None)
self.labels = kwargs.get('labels', None)
self.description = kwargs.get('description', None)
self.title = kwargs.get('title', None)
self.assigned_to = kwargs.get('assigned_to', None)
self.owner = kwargs.get('owner', None)
self.severity = kwargs.get('severity', None)
self.status = kwargs.get('status', None)
self.close_reason = kwargs.get('close_reason', None)
self.closed_reason_text = kwargs.get('closed_reason_text', None)
self.related_alert_ids = None
self.case_number = None
self.last_comment = None
self.total_comments = None
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# 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 CaseComment(Resource):
"""Represents a case comment.

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 type: Azure resource type
:vartype type: str
:ivar name: Azure resource name
:vartype name: str
:param message: Required. The comment message
:type message: str
:ivar created_time_utc: The time the comment was created
:vartype created_time_utc: datetime
:ivar user_info: Describes the user that created the comment
:vartype user_info: ~azure.mgmt.securityinsight.models.UserInfo
"""

_validation = {
'id': {'readonly': True},
'type': {'readonly': True},
'name': {'readonly': True},
'message': {'required': True},
'created_time_utc': {'readonly': True},
'user_info': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'message': {'key': 'properties.message', 'type': 'str'},
'created_time_utc': {'key': 'properties.createdTimeUtc', 'type': 'iso-8601'},
'user_info': {'key': 'properties.userInfo', 'type': 'UserInfo'},
}

def __init__(self, **kwargs):
super(CaseComment, self).__init__(**kwargs)
self.message = kwargs.get('message', None)
self.created_time_utc = None
self.user_info = None
Original file line number Diff line number Diff line change
@@ -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 CaseCommentPaged(Paged):
"""
A paging container for iterating over a list of :class:`CaseComment <azure.mgmt.securityinsight.models.CaseComment>` object
"""

_attribute_map = {
'next_link': {'key': 'nextLink', 'type': 'str'},
'current_page': {'key': 'value', 'type': '[CaseComment]'}
}

def __init__(self, *args, **kwargs):

super(CaseCommentPaged, self).__init__(*args, **kwargs)
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# 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 CaseComment(Resource):
"""Represents a case comment.

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 type: Azure resource type
:vartype type: str
:ivar name: Azure resource name
:vartype name: str
:param message: Required. The comment message
:type message: str
:ivar created_time_utc: The time the comment was created
:vartype created_time_utc: datetime
:ivar user_info: Describes the user that created the comment
:vartype user_info: ~azure.mgmt.securityinsight.models.UserInfo
"""

_validation = {
'id': {'readonly': True},
'type': {'readonly': True},
'name': {'readonly': True},
'message': {'required': True},
'created_time_utc': {'readonly': True},
'user_info': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'message': {'key': 'properties.message', 'type': 'str'},
'created_time_utc': {'key': 'properties.createdTimeUtc', 'type': 'iso-8601'},
'user_info': {'key': 'properties.userInfo', 'type': 'UserInfo'},
}

def __init__(self, *, message: str, **kwargs) -> None:
super(CaseComment, self).__init__(**kwargs)
self.message = message
self.created_time_utc = None
self.user_info = None
Original file line number Diff line number Diff line change
Expand Up @@ -28,40 +28,57 @@ class Case(Resource):
:vartype name: str
:param etag: Etag of the alert rule.
:type etag: str
:param last_updated_time_utc: The last time the case was updated
:type last_updated_time_utc: datetime
:param created_time_utc: The time the case was created
:type created_time_utc: datetime
:ivar last_updated_time_utc: The last time the case was updated
:vartype last_updated_time_utc: datetime
:ivar created_time_utc: The time the case was created
:vartype created_time_utc: datetime
:param end_time_utc: The end time of the case
:type end_time_utc: datetime
:param start_time_utc: The start time of the case
:param start_time_utc: Required. The start time of the case
:type start_time_utc: datetime
:param labels: List of labels relevant to this case
:type labels: list[str]
:param description: The description of the case
:type description: str
:param title: Required. The title of the case
:type title: str
:param assigned_to: Describes a user that the case is assigned to
:type assigned_to: ~azure.mgmt.securityinsight.models.UserInfo
:param owner: Describes a user that the case is assigned to
:type owner: ~azure.mgmt.securityinsight.models.UserInfo
:param severity: Required. The severity of the case. Possible values
include: 'Critical', 'High', 'Medium', 'Low', 'Informational'
:type severity: str or ~azure.mgmt.securityinsight.models.CaseSeverity
:param status: Required. The status of the case. Possible values include:
'Draft', 'New', 'InProgress', 'Closed'
:type status: str or ~azure.mgmt.securityinsight.models.CaseStatus
:param close_reason: The reason the case was closed. Possible values
include: 'Resolved', 'Dismissed', 'Other'
include: 'Resolved', 'Dismissed', 'TruePositive', 'FalsePositive', 'Other'
:type close_reason: str or ~azure.mgmt.securityinsight.models.CloseReason
:param closed_reason_text: the case close reason details
:type closed_reason_text: str
:ivar related_alert_ids: List of related alert identifiers
:vartype related_alert_ids: list[str]
:ivar case_number: a sequential number
:vartype case_number: int
:ivar last_comment: the last comment in the case
:vartype last_comment: str
:ivar total_comments: the number of total comments in the case
:vartype total_comments: int
"""

_validation = {
'id': {'readonly': True},
'type': {'readonly': True},
'name': {'readonly': True},
'last_updated_time_utc': {'readonly': True},
'created_time_utc': {'readonly': True},
'start_time_utc': {'required': True},
'title': {'required': True},
'severity': {'required': True},
'status': {'required': True},
'related_alert_ids': {'readonly': True},
'case_number': {'readonly': True},
'last_comment': {'readonly': True},
'total_comments': {'readonly': True},
}

_attribute_map = {
Expand All @@ -76,23 +93,33 @@ class Case(Resource):
'labels': {'key': 'properties.labels', 'type': '[str]'},
'description': {'key': 'properties.description', 'type': 'str'},
'title': {'key': 'properties.title', 'type': 'str'},
'assigned_to': {'key': 'properties.assignedTo', 'type': 'UserInfo'},
'owner': {'key': 'properties.owner', 'type': 'UserInfo'},
'severity': {'key': 'properties.severity', 'type': 'str'},
'status': {'key': 'properties.status', 'type': 'str'},
'close_reason': {'key': 'properties.closeReason', 'type': 'str'},
'closed_reason_text': {'key': 'properties.closedReasonText', 'type': 'str'},
'related_alert_ids': {'key': 'properties.relatedAlertIds', 'type': '[str]'},
'case_number': {'key': 'properties.caseNumber', 'type': 'int'},
'last_comment': {'key': 'properties.lastComment', 'type': 'str'},
'total_comments': {'key': 'properties.totalComments', 'type': 'int'},
}

def __init__(self, *, title: str, severity, status, etag: str=None, last_updated_time_utc=None, created_time_utc=None, end_time_utc=None, start_time_utc=None, labels=None, description: str=None, assigned_to=None, close_reason=None, **kwargs) -> None:
def __init__(self, *, start_time_utc, title: str, severity, status, etag: str=None, end_time_utc=None, labels=None, description: str=None, owner=None, close_reason=None, closed_reason_text: str=None, **kwargs) -> None:
super(Case, self).__init__(**kwargs)
self.etag = etag
self.last_updated_time_utc = last_updated_time_utc
self.created_time_utc = created_time_utc
self.last_updated_time_utc = None
self.created_time_utc = None
self.end_time_utc = end_time_utc
self.start_time_utc = start_time_utc
self.labels = labels
self.description = description
self.title = title
self.assigned_to = assigned_to
self.owner = owner
self.severity = severity
self.status = status
self.close_reason = close_reason
self.closed_reason_text = closed_reason_text
self.related_alert_ids = None
self.case_number = None
self.last_comment = None
self.total_comments = None
Loading