-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Expand file tree
/
Copy pathbookmark_entity.py
More file actions
111 lines (102 loc) · 4.39 KB
/
bookmark_entity.py
File metadata and controls
111 lines (102 loc) · 4.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from .entity import Entity
class BookmarkEntity(Entity):
"""Represents a bookmark entity.
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 kind: Required. Constant filled by server.
:type kind: str
:ivar friendly_name: The graph item display name which is a short humanly
readable description of the graph item instance. This property is optional
and might be system generated.
:vartype friendly_name: str
:ivar additional_data: A bag of custom fields that should be part of the
entity and will be presented to the user.
:vartype additional_data: dict[str, object]
:ivar display_name: the display name
:vartype display_name: str
:ivar created: the created date/time
:vartype created: datetime
:ivar updated: the last updated date/time
:vartype updated: datetime
:param created_by: information about the user that created this bookmark
:type created_by: ~azure.mgmt.securityinsight.models.UserInfo
:param updated_by: information about the user that last updated this
bookmark
:type updated_by: ~azure.mgmt.securityinsight.models.UserInfo
:ivar event_time: the last event date/time
:vartype event_time: datetime
:ivar notes: the user-defined notes
:vartype notes: str
:param labels: the user-defined tags
:type labels: list[str]
:ivar query: the query that produced the result
:vartype query: str
:ivar query_result: the result of the query (a single bookmarked result
row)
:vartype query_result: str
"""
_validation = {
'id': {'readonly': True},
'type': {'readonly': True},
'name': {'readonly': True},
'kind': {'required': True},
'friendly_name': {'readonly': True},
'additional_data': {'readonly': True},
'display_name': {'readonly': True},
'created': {'readonly': True},
'updated': {'readonly': True},
'event_time': {'readonly': True},
'notes': {'readonly': True},
'query': {'readonly': True},
'query_result': {'readonly': True},
}
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'kind': {'key': 'kind', 'type': 'str'},
'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'},
'additional_data': {'key': 'properties.additionalData', 'type': '{object}'},
'display_name': {'key': 'properties.displayName', 'type': 'str'},
'created': {'key': 'properties.created', 'type': 'iso-8601'},
'updated': {'key': 'properties.updated', 'type': 'iso-8601'},
'created_by': {'key': 'properties.createdBy', 'type': 'UserInfo'},
'updated_by': {'key': 'properties.updatedBy', 'type': 'UserInfo'},
'event_time': {'key': 'properties.eventTime', 'type': 'iso-8601'},
'notes': {'key': 'properties.notes', 'type': 'str'},
'labels': {'key': 'properties.labels', 'type': '[str]'},
'query': {'key': 'properties.query', 'type': 'str'},
'query_result': {'key': 'properties.queryResult', 'type': 'str'},
}
def __init__(self, **kwargs):
super(BookmarkEntity, self).__init__(**kwargs)
self.friendly_name = None
self.additional_data = None
self.display_name = None
self.created = None
self.updated = None
self.created_by = kwargs.get('created_by', None)
self.updated_by = kwargs.get('updated_by', None)
self.event_time = None
self.notes = None
self.labels = kwargs.get('labels', None)
self.query = None
self.query_result = None
self.kind = 'Bookmark'