Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR securityinsights/resource-manager] added new resource to securityinsights- entityQueries #5512

Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Generated from e06b1caf7c26d4ee8f1269af295d4f0b145a2854
added entity queries properties
AutorestCI committed May 29, 2019
commit c98e4bf5bd3b8549d43d1b9b4986c80c5116b971
Original file line number Diff line number Diff line change
@@ -24,6 +24,22 @@ class EntityQuery(Resource):
:vartype type: str
:ivar name: Azure resource name
:vartype name: str
:param query_template: The template query string to be parsed and
formatted
:type query_template: str
:param input_entity_type: The type of the query's source entity
:type input_entity_type: str
:param input_fields: List of the fields of the source entity that are
required to run the query
:type input_fields: list[str]
:param output_entity_types: List of the desired output types to be
constructed from the result
:type output_entity_types: list[str]
:param data_sources: List of the data sources that are required to run the
query
:type data_sources: list[str]
:param display_name: The query display name
:type display_name: str
"""

_validation = {
@@ -36,7 +52,19 @@ class EntityQuery(Resource):
'id': {'key': 'id', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'query_template': {'key': 'properties.queryTemplate', 'type': 'str'},
'input_entity_type': {'key': 'properties.inputEntityType', 'type': 'str'},
'input_fields': {'key': 'properties.inputFields', 'type': '[str]'},
'output_entity_types': {'key': 'properties.outputEntityTypes', 'type': '[str]'},
'data_sources': {'key': 'properties.dataSources', 'type': '[str]'},
'display_name': {'key': 'properties.displayName', 'type': 'str'},
}

def __init__(self, **kwargs):
super(EntityQuery, self).__init__(**kwargs)
self.query_template = kwargs.get('query_template', None)
self.input_entity_type = kwargs.get('input_entity_type', None)
self.input_fields = kwargs.get('input_fields', None)
self.output_entity_types = kwargs.get('output_entity_types', None)
self.data_sources = kwargs.get('data_sources', None)
self.display_name = kwargs.get('display_name', None)
Original file line number Diff line number Diff line change
@@ -24,6 +24,22 @@ class EntityQuery(Resource):
:vartype type: str
:ivar name: Azure resource name
:vartype name: str
:param query_template: The template query string to be parsed and
formatted
:type query_template: str
:param input_entity_type: The type of the query's source entity
:type input_entity_type: str
:param input_fields: List of the fields of the source entity that are
required to run the query
:type input_fields: list[str]
:param output_entity_types: List of the desired output types to be
constructed from the result
:type output_entity_types: list[str]
:param data_sources: List of the data sources that are required to run the
query
:type data_sources: list[str]
:param display_name: The query display name
:type display_name: str
"""

_validation = {
@@ -36,7 +52,19 @@ class EntityQuery(Resource):
'id': {'key': 'id', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'query_template': {'key': 'properties.queryTemplate', 'type': 'str'},
'input_entity_type': {'key': 'properties.inputEntityType', 'type': 'str'},
'input_fields': {'key': 'properties.inputFields', 'type': '[str]'},
'output_entity_types': {'key': 'properties.outputEntityTypes', 'type': '[str]'},
'data_sources': {'key': 'properties.dataSources', 'type': '[str]'},
'display_name': {'key': 'properties.displayName', 'type': 'str'},
}

def __init__(self, **kwargs) -> None:
def __init__(self, *, query_template: str=None, input_entity_type: str=None, input_fields=None, output_entity_types=None, data_sources=None, display_name: str=None, **kwargs) -> None:
super(EntityQuery, self).__init__(**kwargs)
self.query_template = query_template
self.input_entity_type = input_entity_type
self.input_fields = input_fields
self.output_entity_types = output_entity_types
self.data_sources = data_sources
self.display_name = display_name