From db22a567fc8b02beb56add9a9816543a50174ce9 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 27 Aug 2018 23:58:08 +0000 Subject: [PATCH] Generated from e58725f13e72bf5ed0b17808debf9d7caeac793c ResourceGraph Py conf --- .../azure/mgmt/resourcegraph/__init__.py | 18 +++ .../mgmt/resourcegraph/models/__init__.py | 71 +++++++++ .../azure/mgmt/resourcegraph/models/column.py | 40 ++++++ .../mgmt/resourcegraph/models/column_py3.py | 40 ++++++ .../azure/mgmt/resourcegraph/models/error.py | 45 ++++++ .../resourcegraph/models/error_details.py | 43 ++++++ .../resourcegraph/models/error_details_py3.py | 43 ++++++ .../mgmt/resourcegraph/models/error_py3.py | 45 ++++++ .../resourcegraph/models/error_response.py | 49 +++++++ .../models/error_response_py3.py | 49 +++++++ .../azure/mgmt/resourcegraph/models/facet.py | 48 +++++++ .../mgmt/resourcegraph/models/facet_error.py | 45 ++++++ .../resourcegraph/models/facet_error_py3.py | 45 ++++++ .../mgmt/resourcegraph/models/facet_py3.py | 48 +++++++ .../resourcegraph/models/facet_request.py | 38 +++++ .../models/facet_request_options.py | 37 +++++ .../models/facet_request_options_py3.py | 37 +++++ .../resourcegraph/models/facet_request_py3.py | 38 +++++ .../mgmt/resourcegraph/models/facet_result.py | 57 ++++++++ .../resourcegraph/models/facet_result_py3.py | 57 ++++++++ .../mgmt/resourcegraph/models/operation.py | 36 +++++ .../resourcegraph/models/operation_display.py | 40 ++++++ .../models/operation_display_py3.py | 40 ++++++ .../resourcegraph/models/operation_paged.py | 27 ++++ .../resourcegraph/models/operation_py3.py | 36 +++++ .../resourcegraph/models/query_request.py | 49 +++++++ .../models/query_request_options.py | 44 ++++++ .../models/query_request_options_py3.py | 44 ++++++ .../resourcegraph/models/query_request_py3.py | 49 +++++++ .../resourcegraph/models/query_response.py | 64 +++++++++ .../models/query_response_py3.py | 64 +++++++++ .../models/resource_graph_client_enums.py | 33 +++++ .../azure/mgmt/resourcegraph/models/table.py | 39 +++++ .../mgmt/resourcegraph/models/table_py3.py | 39 +++++ .../mgmt/resourcegraph/operations/__init__.py | 16 +++ .../resourcegraph/operations/operations.py | 98 +++++++++++++ .../resourcegraph/resource_graph_client.py | 135 ++++++++++++++++++ .../azure/mgmt/resourcegraph/version.py | 13 ++ 38 files changed, 1759 insertions(+) create mode 100644 azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/__init__.py create mode 100644 azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/__init__.py create mode 100644 azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/column.py create mode 100644 azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/column_py3.py create mode 100644 azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/error.py create mode 100644 azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/error_details.py create mode 100644 azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/error_details_py3.py create mode 100644 azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/error_py3.py create mode 100644 azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/error_response.py create mode 100644 azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/error_response_py3.py create mode 100644 azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/facet.py create mode 100644 azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/facet_error.py create mode 100644 azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/facet_error_py3.py create mode 100644 azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/facet_py3.py create mode 100644 azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/facet_request.py create mode 100644 azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/facet_request_options.py create mode 100644 azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/facet_request_options_py3.py create mode 100644 azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/facet_request_py3.py create mode 100644 azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/facet_result.py create mode 100644 azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/facet_result_py3.py create mode 100644 azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/operation.py create mode 100644 azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/operation_display.py create mode 100644 azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/operation_display_py3.py create mode 100644 azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/operation_paged.py create mode 100644 azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/operation_py3.py create mode 100644 azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/query_request.py create mode 100644 azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/query_request_options.py create mode 100644 azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/query_request_options_py3.py create mode 100644 azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/query_request_py3.py create mode 100644 azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/query_response.py create mode 100644 azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/query_response_py3.py create mode 100644 azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/resource_graph_client_enums.py create mode 100644 azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/table.py create mode 100644 azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/table_py3.py create mode 100644 azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/operations/__init__.py create mode 100644 azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/operations/operations.py create mode 100644 azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/resource_graph_client.py create mode 100644 azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/version.py diff --git a/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/__init__.py b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/__init__.py new file mode 100644 index 000000000000..7cab47e782dd --- /dev/null +++ b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/__init__.py @@ -0,0 +1,18 @@ +# 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_graph_client import ResourceGraphClient +from .version import VERSION + +__all__ = ['ResourceGraphClient'] + +__version__ = VERSION + diff --git a/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/__init__.py b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/__init__.py new file mode 100644 index 000000000000..b9665e9850d4 --- /dev/null +++ b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/__init__.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. +# -------------------------------------------------------------------------- + +try: + from .query_request_options_py3 import QueryRequestOptions + from .facet_request_options_py3 import FacetRequestOptions + from .facet_request_py3 import FacetRequest + from .query_request_py3 import QueryRequest + from .column_py3 import Column + from .table_py3 import Table + from .facet_py3 import Facet + from .query_response_py3 import QueryResponse + from .facet_result_py3 import FacetResult + from .error_details_py3 import ErrorDetails + from .facet_error_py3 import FacetError + from .error_py3 import Error + from .error_response_py3 import ErrorResponse, ErrorResponseException + from .operation_display_py3 import OperationDisplay + from .operation_py3 import Operation +except (SyntaxError, ImportError): + from .query_request_options import QueryRequestOptions + from .facet_request_options import FacetRequestOptions + from .facet_request import FacetRequest + from .query_request import QueryRequest + from .column import Column + from .table import Table + from .facet import Facet + from .query_response import QueryResponse + from .facet_result import FacetResult + from .error_details import ErrorDetails + from .facet_error import FacetError + from .error import Error + from .error_response import ErrorResponse, ErrorResponseException + from .operation_display import OperationDisplay + from .operation import Operation +from .operation_paged import OperationPaged +from .resource_graph_client_enums import ( + FacetSortOrder, + ResultTruncated, + ColumnDataType, +) + +__all__ = [ + 'QueryRequestOptions', + 'FacetRequestOptions', + 'FacetRequest', + 'QueryRequest', + 'Column', + 'Table', + 'Facet', + 'QueryResponse', + 'FacetResult', + 'ErrorDetails', + 'FacetError', + 'Error', + 'ErrorResponse', 'ErrorResponseException', + 'OperationDisplay', + 'Operation', + 'OperationPaged', + 'FacetSortOrder', + 'ResultTruncated', + 'ColumnDataType', +] diff --git a/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/column.py b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/column.py new file mode 100644 index 000000000000..5374aa3c8bcb --- /dev/null +++ b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/column.py @@ -0,0 +1,40 @@ +# 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 Column(Model): + """Query result column descriptor. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Column name. + :type name: str + :param type: Required. Column data type. Possible values include: + 'string', 'integer', 'number', 'boolean', 'object' + :type type: str or ~azure.mgmt.resourcegraph.models.ColumnDataType + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ColumnDataType'}, + } + + def __init__(self, **kwargs): + super(Column, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) diff --git a/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/column_py3.py b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/column_py3.py new file mode 100644 index 000000000000..018db7627f50 --- /dev/null +++ b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/column_py3.py @@ -0,0 +1,40 @@ +# 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 Column(Model): + """Query result column descriptor. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Column name. + :type name: str + :param type: Required. Column data type. Possible values include: + 'string', 'integer', 'number', 'boolean', 'object' + :type type: str or ~azure.mgmt.resourcegraph.models.ColumnDataType + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ColumnDataType'}, + } + + def __init__(self, *, name: str, type, **kwargs) -> None: + super(Column, self).__init__(**kwargs) + self.name = name + self.type = type diff --git a/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/error.py b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/error.py new file mode 100644 index 000000000000..a636be2b606b --- /dev/null +++ b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/error.py @@ -0,0 +1,45 @@ +# 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 Error(Model): + """Error info. + + Error details. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. Error code identifying the specific error. + :type code: str + :param message: Required. A human readable error message. + :type message: str + :param details: Error details + :type details: list[~azure.mgmt.resourcegraph.models.ErrorDetails] + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorDetails]'}, + } + + def __init__(self, **kwargs): + super(Error, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.details = kwargs.get('details', None) diff --git a/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/error_details.py b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/error_details.py new file mode 100644 index 000000000000..cc6a9b8ce133 --- /dev/null +++ b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/error_details.py @@ -0,0 +1,43 @@ +# 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 ErrorDetails(Model): + """Error details. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. Error code identifying the specific error. + :type code: str + :param message: Required. A human readable error message. + :type message: str + :param additional_properties: Additional custom properties. + :type additional_properties: object + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'additional_properties': {'key': 'additionalProperties', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(ErrorDetails, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.additional_properties = kwargs.get('additional_properties', None) diff --git a/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/error_details_py3.py b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/error_details_py3.py new file mode 100644 index 000000000000..4a9e5079b695 --- /dev/null +++ b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/error_details_py3.py @@ -0,0 +1,43 @@ +# 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 ErrorDetails(Model): + """Error details. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. Error code identifying the specific error. + :type code: str + :param message: Required. A human readable error message. + :type message: str + :param additional_properties: Additional custom properties. + :type additional_properties: object + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'additional_properties': {'key': 'additionalProperties', 'type': 'object'}, + } + + def __init__(self, *, code: str, message: str, additional_properties=None, **kwargs) -> None: + super(ErrorDetails, self).__init__(**kwargs) + self.code = code + self.message = message + self.additional_properties = additional_properties diff --git a/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/error_py3.py b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/error_py3.py new file mode 100644 index 000000000000..794e64393602 --- /dev/null +++ b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/error_py3.py @@ -0,0 +1,45 @@ +# 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 Error(Model): + """Error info. + + Error details. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. Error code identifying the specific error. + :type code: str + :param message: Required. A human readable error message. + :type message: str + :param details: Error details + :type details: list[~azure.mgmt.resourcegraph.models.ErrorDetails] + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorDetails]'}, + } + + def __init__(self, *, code: str, message: str, details=None, **kwargs) -> None: + super(Error, self).__init__(**kwargs) + self.code = code + self.message = message + self.details = details diff --git a/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/error_response.py b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/error_response.py new file mode 100644 index 000000000000..4edf5fbea873 --- /dev/null +++ b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/error_response.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 +from msrest.exceptions import HttpOperationError + + +class ErrorResponse(Model): + """Error response. + + An error response from the API. + + All required parameters must be populated in order to send to Azure. + + :param error: Required. Error information. + :type error: ~azure.mgmt.resourcegraph.models.Error + """ + + _validation = { + 'error': {'required': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'Error'}, + } + + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) diff --git a/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/error_response_py3.py b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/error_response_py3.py new file mode 100644 index 000000000000..f29ed91e8354 --- /dev/null +++ b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/error_response_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 +from msrest.exceptions import HttpOperationError + + +class ErrorResponse(Model): + """Error response. + + An error response from the API. + + All required parameters must be populated in order to send to Azure. + + :param error: Required. Error information. + :type error: ~azure.mgmt.resourcegraph.models.Error + """ + + _validation = { + 'error': {'required': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'Error'}, + } + + def __init__(self, *, error, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.error = error + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) diff --git a/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/facet.py b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/facet.py new file mode 100644 index 000000000000..9b9193356ed8 --- /dev/null +++ b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/facet.py @@ -0,0 +1,48 @@ +# 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 Facet(Model): + """A facet containing additional statistics on the response of a query. Can be + either FacetResult or FacetError. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: FacetResult, FacetError + + All required parameters must be populated in order to send to Azure. + + :param expression: Required. Facet expression, same as in the + corresponding facet request. + :type expression: str + :param result_type: Required. Constant filled by server. + :type result_type: str + """ + + _validation = { + 'expression': {'required': True}, + 'result_type': {'required': True}, + } + + _attribute_map = { + 'expression': {'key': 'expression', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + } + + _subtype_map = { + 'result_type': {'FacetResult': 'FacetResult', 'FacetError': 'FacetError'} + } + + def __init__(self, **kwargs): + super(Facet, self).__init__(**kwargs) + self.expression = kwargs.get('expression', None) + self.result_type = None diff --git a/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/facet_error.py b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/facet_error.py new file mode 100644 index 000000000000..aab89e709432 --- /dev/null +++ b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/facet_error.py @@ -0,0 +1,45 @@ +# 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 .facet import Facet + + +class FacetError(Facet): + """A facet whose execution resulted in an error. + + All required parameters must be populated in order to send to Azure. + + :param expression: Required. Facet expression, same as in the + corresponding facet request. + :type expression: str + :param result_type: Required. Constant filled by server. + :type result_type: str + :param errors: Required. An array containing detected facet errors with + details. + :type errors: list[~azure.mgmt.resourcegraph.models.ErrorDetails] + """ + + _validation = { + 'expression': {'required': True}, + 'result_type': {'required': True}, + 'errors': {'required': True}, + } + + _attribute_map = { + 'expression': {'key': 'expression', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ErrorDetails]'}, + } + + def __init__(self, **kwargs): + super(FacetError, self).__init__(**kwargs) + self.errors = kwargs.get('errors', None) + self.result_type = 'FacetError' diff --git a/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/facet_error_py3.py b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/facet_error_py3.py new file mode 100644 index 000000000000..06da3acc4562 --- /dev/null +++ b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/facet_error_py3.py @@ -0,0 +1,45 @@ +# 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 .facet_py3 import Facet + + +class FacetError(Facet): + """A facet whose execution resulted in an error. + + All required parameters must be populated in order to send to Azure. + + :param expression: Required. Facet expression, same as in the + corresponding facet request. + :type expression: str + :param result_type: Required. Constant filled by server. + :type result_type: str + :param errors: Required. An array containing detected facet errors with + details. + :type errors: list[~azure.mgmt.resourcegraph.models.ErrorDetails] + """ + + _validation = { + 'expression': {'required': True}, + 'result_type': {'required': True}, + 'errors': {'required': True}, + } + + _attribute_map = { + 'expression': {'key': 'expression', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ErrorDetails]'}, + } + + def __init__(self, *, expression: str, errors, **kwargs) -> None: + super(FacetError, self).__init__(expression=expression, **kwargs) + self.errors = errors + self.result_type = 'FacetError' diff --git a/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/facet_py3.py b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/facet_py3.py new file mode 100644 index 000000000000..ffe29392108d --- /dev/null +++ b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/facet_py3.py @@ -0,0 +1,48 @@ +# 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 Facet(Model): + """A facet containing additional statistics on the response of a query. Can be + either FacetResult or FacetError. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: FacetResult, FacetError + + All required parameters must be populated in order to send to Azure. + + :param expression: Required. Facet expression, same as in the + corresponding facet request. + :type expression: str + :param result_type: Required. Constant filled by server. + :type result_type: str + """ + + _validation = { + 'expression': {'required': True}, + 'result_type': {'required': True}, + } + + _attribute_map = { + 'expression': {'key': 'expression', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + } + + _subtype_map = { + 'result_type': {'FacetResult': 'FacetResult', 'FacetError': 'FacetError'} + } + + def __init__(self, *, expression: str, **kwargs) -> None: + super(Facet, self).__init__(**kwargs) + self.expression = expression + self.result_type = None diff --git a/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/facet_request.py b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/facet_request.py new file mode 100644 index 000000000000..0f01fe8229d4 --- /dev/null +++ b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/facet_request.py @@ -0,0 +1,38 @@ +# 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 FacetRequest(Model): + """A request to compute additional statistics (facets) over the query results. + + All required parameters must be populated in order to send to Azure. + + :param expression: Required. The column or list of columns to summarize by + :type expression: str + :param options: The options for facet evaluation + :type options: ~azure.mgmt.resourcegraph.models.FacetRequestOptions + """ + + _validation = { + 'expression': {'required': True}, + } + + _attribute_map = { + 'expression': {'key': 'expression', 'type': 'str'}, + 'options': {'key': 'options', 'type': 'FacetRequestOptions'}, + } + + def __init__(self, **kwargs): + super(FacetRequest, self).__init__(**kwargs) + self.expression = kwargs.get('expression', None) + self.options = kwargs.get('options', None) diff --git a/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/facet_request_options.py b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/facet_request_options.py new file mode 100644 index 000000000000..4ea94a3bd963 --- /dev/null +++ b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/facet_request_options.py @@ -0,0 +1,37 @@ +# 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 FacetRequestOptions(Model): + """The options for facet evaluation. + + :param sort_order: The sorting order by the hit count. Possible values + include: 'asc', 'desc'. Default value: "desc" . + :type sort_order: str or ~azure.mgmt.resourcegraph.models.FacetSortOrder + :param top: The maximum number of facet rows that should be returned. + :type top: int + """ + + _validation = { + 'top': {'maximum': 1000, 'minimum': 1}, + } + + _attribute_map = { + 'sort_order': {'key': 'sortOrder', 'type': 'FacetSortOrder'}, + 'top': {'key': '$top', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(FacetRequestOptions, self).__init__(**kwargs) + self.sort_order = kwargs.get('sort_order', "desc") + self.top = kwargs.get('top', None) diff --git a/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/facet_request_options_py3.py b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/facet_request_options_py3.py new file mode 100644 index 000000000000..677fda8ce26c --- /dev/null +++ b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/facet_request_options_py3.py @@ -0,0 +1,37 @@ +# 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 FacetRequestOptions(Model): + """The options for facet evaluation. + + :param sort_order: The sorting order by the hit count. Possible values + include: 'asc', 'desc'. Default value: "desc" . + :type sort_order: str or ~azure.mgmt.resourcegraph.models.FacetSortOrder + :param top: The maximum number of facet rows that should be returned. + :type top: int + """ + + _validation = { + 'top': {'maximum': 1000, 'minimum': 1}, + } + + _attribute_map = { + 'sort_order': {'key': 'sortOrder', 'type': 'FacetSortOrder'}, + 'top': {'key': '$top', 'type': 'int'}, + } + + def __init__(self, *, sort_order="desc", top: int=None, **kwargs) -> None: + super(FacetRequestOptions, self).__init__(**kwargs) + self.sort_order = sort_order + self.top = top diff --git a/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/facet_request_py3.py b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/facet_request_py3.py new file mode 100644 index 000000000000..cc0fd8b132df --- /dev/null +++ b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/facet_request_py3.py @@ -0,0 +1,38 @@ +# 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 FacetRequest(Model): + """A request to compute additional statistics (facets) over the query results. + + All required parameters must be populated in order to send to Azure. + + :param expression: Required. The column or list of columns to summarize by + :type expression: str + :param options: The options for facet evaluation + :type options: ~azure.mgmt.resourcegraph.models.FacetRequestOptions + """ + + _validation = { + 'expression': {'required': True}, + } + + _attribute_map = { + 'expression': {'key': 'expression', 'type': 'str'}, + 'options': {'key': 'options', 'type': 'FacetRequestOptions'}, + } + + def __init__(self, *, expression: str, options=None, **kwargs) -> None: + super(FacetRequest, self).__init__(**kwargs) + self.expression = expression + self.options = options diff --git a/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/facet_result.py b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/facet_result.py new file mode 100644 index 000000000000..82dede8eb06f --- /dev/null +++ b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/facet_result.py @@ -0,0 +1,57 @@ +# 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 .facet import Facet + + +class FacetResult(Facet): + """Successfully executed facet containing additional statistics on the + response of a query. + + All required parameters must be populated in order to send to Azure. + + :param expression: Required. Facet expression, same as in the + corresponding facet request. + :type expression: str + :param result_type: Required. Constant filled by server. + :type result_type: str + :param total_records: Required. Number of total records in the facet + results. + :type total_records: long + :param count: Required. Number of records returned in the facet response. + :type count: int + :param data: Required. A table containing the desired facets. Only present + if the facet is valid. + :type data: ~azure.mgmt.resourcegraph.models.Table + """ + + _validation = { + 'expression': {'required': True}, + 'result_type': {'required': True}, + 'total_records': {'required': True}, + 'count': {'required': True}, + 'data': {'required': True}, + } + + _attribute_map = { + 'expression': {'key': 'expression', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'total_records': {'key': 'totalRecords', 'type': 'long'}, + 'count': {'key': 'count', 'type': 'int'}, + 'data': {'key': 'data', 'type': 'Table'}, + } + + def __init__(self, **kwargs): + super(FacetResult, self).__init__(**kwargs) + self.total_records = kwargs.get('total_records', None) + self.count = kwargs.get('count', None) + self.data = kwargs.get('data', None) + self.result_type = 'FacetResult' diff --git a/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/facet_result_py3.py b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/facet_result_py3.py new file mode 100644 index 000000000000..4f3e9f499f75 --- /dev/null +++ b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/facet_result_py3.py @@ -0,0 +1,57 @@ +# 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 .facet_py3 import Facet + + +class FacetResult(Facet): + """Successfully executed facet containing additional statistics on the + response of a query. + + All required parameters must be populated in order to send to Azure. + + :param expression: Required. Facet expression, same as in the + corresponding facet request. + :type expression: str + :param result_type: Required. Constant filled by server. + :type result_type: str + :param total_records: Required. Number of total records in the facet + results. + :type total_records: long + :param count: Required. Number of records returned in the facet response. + :type count: int + :param data: Required. A table containing the desired facets. Only present + if the facet is valid. + :type data: ~azure.mgmt.resourcegraph.models.Table + """ + + _validation = { + 'expression': {'required': True}, + 'result_type': {'required': True}, + 'total_records': {'required': True}, + 'count': {'required': True}, + 'data': {'required': True}, + } + + _attribute_map = { + 'expression': {'key': 'expression', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'total_records': {'key': 'totalRecords', 'type': 'long'}, + 'count': {'key': 'count', 'type': 'int'}, + 'data': {'key': 'data', 'type': 'Table'}, + } + + def __init__(self, *, expression: str, total_records: int, count: int, data, **kwargs) -> None: + super(FacetResult, self).__init__(expression=expression, **kwargs) + self.total_records = total_records + self.count = count + self.data = data + self.result_type = 'FacetResult' diff --git a/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/operation.py b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/operation.py new file mode 100644 index 000000000000..d824b9fd31af --- /dev/null +++ b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/operation.py @@ -0,0 +1,36 @@ +# 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 Operation(Model): + """Resource Graph REST API operation definition. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param display: Display metadata associated with the operation. + :type display: ~azure.mgmt.resourcegraph.models.OperationDisplay + :param origin: The origin of operations. + :type origin: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + self.origin = kwargs.get('origin', None) diff --git a/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/operation_display.py b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/operation_display.py new file mode 100644 index 000000000000..59392b296d7a --- /dev/null +++ b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/operation_display.py @@ -0,0 +1,40 @@ +# 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 OperationDisplay(Model): + """Display metadata associated with the operation. + + :param provider: Service provider: Microsoft Resource Graph. + :type provider: str + :param resource: Resource on which the operation is performed etc. + :type resource: str + :param operation: Type of operation: get, read, delete, etc. + :type operation: str + :param description: Description for the operation. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) diff --git a/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/operation_display_py3.py b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/operation_display_py3.py new file mode 100644 index 000000000000..6d4bd89ec8cc --- /dev/null +++ b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/operation_display_py3.py @@ -0,0 +1,40 @@ +# 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 OperationDisplay(Model): + """Display metadata associated with the operation. + + :param provider: Service provider: Microsoft Resource Graph. + :type provider: str + :param resource: Resource on which the operation is performed etc. + :type resource: str + :param operation: Type of operation: get, read, delete, etc. + :type operation: str + :param description: Description for the operation. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description diff --git a/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/operation_paged.py b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/operation_paged.py new file mode 100644 index 000000000000..ec7e9b01c05b --- /dev/null +++ b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/operation_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 OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/operation_py3.py b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/operation_py3.py new file mode 100644 index 000000000000..886eb84942a7 --- /dev/null +++ b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/operation_py3.py @@ -0,0 +1,36 @@ +# 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 Operation(Model): + """Resource Graph REST API operation definition. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param display: Display metadata associated with the operation. + :type display: ~azure.mgmt.resourcegraph.models.OperationDisplay + :param origin: The origin of operations. + :type origin: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, display=None, origin: str=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = name + self.display = display + self.origin = origin diff --git a/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/query_request.py b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/query_request.py new file mode 100644 index 000000000000..e1290209ada6 --- /dev/null +++ b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/query_request.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 QueryRequest(Model): + """Describes a query to be executed. + + All required parameters must be populated in order to send to Azure. + + :param subscriptions: Required. Azure subscriptions against which to + execute the query. + :type subscriptions: list[str] + :param query: Required. The resources query. + :type query: str + :param options: The query evaluation options + :type options: ~azure.mgmt.resourcegraph.models.QueryRequestOptions + :param facets: An array of facet requests to be computed against the query + result. + :type facets: list[~azure.mgmt.resourcegraph.models.FacetRequest] + """ + + _validation = { + 'subscriptions': {'required': True}, + 'query': {'required': True}, + } + + _attribute_map = { + 'subscriptions': {'key': 'subscriptions', 'type': '[str]'}, + 'query': {'key': 'query', 'type': 'str'}, + 'options': {'key': 'options', 'type': 'QueryRequestOptions'}, + 'facets': {'key': 'facets', 'type': '[FacetRequest]'}, + } + + def __init__(self, **kwargs): + super(QueryRequest, self).__init__(**kwargs) + self.subscriptions = kwargs.get('subscriptions', None) + self.query = kwargs.get('query', None) + self.options = kwargs.get('options', None) + self.facets = kwargs.get('facets', None) diff --git a/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/query_request_options.py b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/query_request_options.py new file mode 100644 index 000000000000..f2a9fe75fd09 --- /dev/null +++ b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/query_request_options.py @@ -0,0 +1,44 @@ +# 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 QueryRequestOptions(Model): + """The options for query evaluation. + + :param skip_token: Continuation token for pagination, capturing the next + page size and offset, as well as the context of the query. + :type skip_token: str + :param top: The maximum number of rows that the query should return. + Overrides the page size when ```$skipToken``` property is present. + :type top: int + :param skip: The number of rows to skip from the beginning of the results. + Overrides the next page offset when ```$skipToken``` property is present. + :type skip: int + """ + + _validation = { + 'top': {'maximum': 1000, 'minimum': 1}, + 'skip': {'minimum': 0}, + } + + _attribute_map = { + 'skip_token': {'key': '$skipToken', 'type': 'str'}, + 'top': {'key': '$top', 'type': 'int'}, + 'skip': {'key': '$skip', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(QueryRequestOptions, self).__init__(**kwargs) + self.skip_token = kwargs.get('skip_token', None) + self.top = kwargs.get('top', None) + self.skip = kwargs.get('skip', None) diff --git a/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/query_request_options_py3.py b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/query_request_options_py3.py new file mode 100644 index 000000000000..e6019a31a6fc --- /dev/null +++ b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/query_request_options_py3.py @@ -0,0 +1,44 @@ +# 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 QueryRequestOptions(Model): + """The options for query evaluation. + + :param skip_token: Continuation token for pagination, capturing the next + page size and offset, as well as the context of the query. + :type skip_token: str + :param top: The maximum number of rows that the query should return. + Overrides the page size when ```$skipToken``` property is present. + :type top: int + :param skip: The number of rows to skip from the beginning of the results. + Overrides the next page offset when ```$skipToken``` property is present. + :type skip: int + """ + + _validation = { + 'top': {'maximum': 1000, 'minimum': 1}, + 'skip': {'minimum': 0}, + } + + _attribute_map = { + 'skip_token': {'key': '$skipToken', 'type': 'str'}, + 'top': {'key': '$top', 'type': 'int'}, + 'skip': {'key': '$skip', 'type': 'int'}, + } + + def __init__(self, *, skip_token: str=None, top: int=None, skip: int=None, **kwargs) -> None: + super(QueryRequestOptions, self).__init__(**kwargs) + self.skip_token = skip_token + self.top = top + self.skip = skip diff --git a/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/query_request_py3.py b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/query_request_py3.py new file mode 100644 index 000000000000..a4e251dd1016 --- /dev/null +++ b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/query_request_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 QueryRequest(Model): + """Describes a query to be executed. + + All required parameters must be populated in order to send to Azure. + + :param subscriptions: Required. Azure subscriptions against which to + execute the query. + :type subscriptions: list[str] + :param query: Required. The resources query. + :type query: str + :param options: The query evaluation options + :type options: ~azure.mgmt.resourcegraph.models.QueryRequestOptions + :param facets: An array of facet requests to be computed against the query + result. + :type facets: list[~azure.mgmt.resourcegraph.models.FacetRequest] + """ + + _validation = { + 'subscriptions': {'required': True}, + 'query': {'required': True}, + } + + _attribute_map = { + 'subscriptions': {'key': 'subscriptions', 'type': '[str]'}, + 'query': {'key': 'query', 'type': 'str'}, + 'options': {'key': 'options', 'type': 'QueryRequestOptions'}, + 'facets': {'key': 'facets', 'type': '[FacetRequest]'}, + } + + def __init__(self, *, subscriptions, query: str, options=None, facets=None, **kwargs) -> None: + super(QueryRequest, self).__init__(**kwargs) + self.subscriptions = subscriptions + self.query = query + self.options = options + self.facets = facets diff --git a/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/query_response.py b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/query_response.py new file mode 100644 index 000000000000..eb09fe97d757 --- /dev/null +++ b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/query_response.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 msrest.serialization import Model + + +class QueryResponse(Model): + """Query result. + + All required parameters must be populated in order to send to Azure. + + :param total_records: Required. Number of total records matching the + query. + :type total_records: long + :param count: Required. Number of records returned in the current + response. In the case of paging, this is the number of records in the + current page. + :type count: long + :param result_truncated: Required. Indicates whether the query results are + truncated. Possible values include: 'true', 'false' + :type result_truncated: str or + ~azure.mgmt.resourcegraph.models.ResultTruncated + :param skip_token: When present, the value can be passed to a subsequent + query call (together with the same query and subscriptions used in the + current request) to retrieve the next page of data. + :type skip_token: str + :param data: Required. Query output in tabular format. + :type data: ~azure.mgmt.resourcegraph.models.Table + :param facets: Query facets. + :type facets: list[~azure.mgmt.resourcegraph.models.Facet] + """ + + _validation = { + 'total_records': {'required': True}, + 'count': {'required': True}, + 'result_truncated': {'required': True}, + 'data': {'required': True}, + } + + _attribute_map = { + 'total_records': {'key': 'totalRecords', 'type': 'long'}, + 'count': {'key': 'count', 'type': 'long'}, + 'result_truncated': {'key': 'resultTruncated', 'type': 'ResultTruncated'}, + 'skip_token': {'key': '$skipToken', 'type': 'str'}, + 'data': {'key': 'data', 'type': 'Table'}, + 'facets': {'key': 'facets', 'type': '[Facet]'}, + } + + def __init__(self, **kwargs): + super(QueryResponse, self).__init__(**kwargs) + self.total_records = kwargs.get('total_records', None) + self.count = kwargs.get('count', None) + self.result_truncated = kwargs.get('result_truncated', None) + self.skip_token = kwargs.get('skip_token', None) + self.data = kwargs.get('data', None) + self.facets = kwargs.get('facets', None) diff --git a/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/query_response_py3.py b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/query_response_py3.py new file mode 100644 index 000000000000..c86ed4df6f90 --- /dev/null +++ b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/query_response_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 msrest.serialization import Model + + +class QueryResponse(Model): + """Query result. + + All required parameters must be populated in order to send to Azure. + + :param total_records: Required. Number of total records matching the + query. + :type total_records: long + :param count: Required. Number of records returned in the current + response. In the case of paging, this is the number of records in the + current page. + :type count: long + :param result_truncated: Required. Indicates whether the query results are + truncated. Possible values include: 'true', 'false' + :type result_truncated: str or + ~azure.mgmt.resourcegraph.models.ResultTruncated + :param skip_token: When present, the value can be passed to a subsequent + query call (together with the same query and subscriptions used in the + current request) to retrieve the next page of data. + :type skip_token: str + :param data: Required. Query output in tabular format. + :type data: ~azure.mgmt.resourcegraph.models.Table + :param facets: Query facets. + :type facets: list[~azure.mgmt.resourcegraph.models.Facet] + """ + + _validation = { + 'total_records': {'required': True}, + 'count': {'required': True}, + 'result_truncated': {'required': True}, + 'data': {'required': True}, + } + + _attribute_map = { + 'total_records': {'key': 'totalRecords', 'type': 'long'}, + 'count': {'key': 'count', 'type': 'long'}, + 'result_truncated': {'key': 'resultTruncated', 'type': 'ResultTruncated'}, + 'skip_token': {'key': '$skipToken', 'type': 'str'}, + 'data': {'key': 'data', 'type': 'Table'}, + 'facets': {'key': 'facets', 'type': '[Facet]'}, + } + + def __init__(self, *, total_records: int, count: int, result_truncated, data, skip_token: str=None, facets=None, **kwargs) -> None: + super(QueryResponse, self).__init__(**kwargs) + self.total_records = total_records + self.count = count + self.result_truncated = result_truncated + self.skip_token = skip_token + self.data = data + self.facets = facets diff --git a/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/resource_graph_client_enums.py b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/resource_graph_client_enums.py new file mode 100644 index 000000000000..6973ac9c0e59 --- /dev/null +++ b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/resource_graph_client_enums.py @@ -0,0 +1,33 @@ +# 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 enum import Enum + + +class FacetSortOrder(str, Enum): + + asc = "asc" + desc = "desc" + + +class ResultTruncated(str, Enum): + + true = "true" + false = "false" + + +class ColumnDataType(str, Enum): + + string = "string" + integer = "integer" + number = "number" + boolean = "boolean" + object_enum = "object" diff --git a/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/table.py b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/table.py new file mode 100644 index 000000000000..03a8cd806eec --- /dev/null +++ b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/table.py @@ -0,0 +1,39 @@ +# 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 Table(Model): + """Query output in tabular format. + + All required parameters must be populated in order to send to Azure. + + :param columns: Required. Query result column descriptors. + :type columns: list[~azure.mgmt.resourcegraph.models.Column] + :param rows: Required. Query result rows. + :type rows: list[list[object]] + """ + + _validation = { + 'columns': {'required': True}, + 'rows': {'required': True}, + } + + _attribute_map = { + 'columns': {'key': 'columns', 'type': '[Column]'}, + 'rows': {'key': 'rows', 'type': '[[object]]'}, + } + + def __init__(self, **kwargs): + super(Table, self).__init__(**kwargs) + self.columns = kwargs.get('columns', None) + self.rows = kwargs.get('rows', None) diff --git a/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/table_py3.py b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/table_py3.py new file mode 100644 index 000000000000..e14b7dfe5790 --- /dev/null +++ b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/models/table_py3.py @@ -0,0 +1,39 @@ +# 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 Table(Model): + """Query output in tabular format. + + All required parameters must be populated in order to send to Azure. + + :param columns: Required. Query result column descriptors. + :type columns: list[~azure.mgmt.resourcegraph.models.Column] + :param rows: Required. Query result rows. + :type rows: list[list[object]] + """ + + _validation = { + 'columns': {'required': True}, + 'rows': {'required': True}, + } + + _attribute_map = { + 'columns': {'key': 'columns', 'type': '[Column]'}, + 'rows': {'key': 'rows', 'type': '[[object]]'}, + } + + def __init__(self, *, columns, rows, **kwargs) -> None: + super(Table, self).__init__(**kwargs) + self.columns = columns + self.rows = rows diff --git a/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/operations/__init__.py b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/operations/__init__.py new file mode 100644 index 000000000000..6bddce0d5c34 --- /dev/null +++ b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/operations/__init__.py @@ -0,0 +1,16 @@ +# 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 .operations import Operations + +__all__ = [ + 'Operations', +] diff --git a/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/operations/operations.py b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/operations/operations.py new file mode 100644 index 000000000000..d8ee6f0a57a1 --- /dev/null +++ b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/operations/operations.py @@ -0,0 +1,98 @@ +# 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 Operations(object): + """Operations 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. Constant value: "2018-09-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-09-01-preview" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all of the available REST API operations. + + :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 Operation + :rtype: + ~azure.mgmt.resourcegraph.models.OperationPaged[~azure.mgmt.resourcegraph.models.Operation] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, '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.OperationPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/providers/Microsoft.ResourceGraph/operations'} diff --git a/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/resource_graph_client.py b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/resource_graph_client.py new file mode 100644 index 000000000000..6f5ff0e93e33 --- /dev/null +++ b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/resource_graph_client.py @@ -0,0 +1,135 @@ +# 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.service_client import SDKClient +from msrest import Serializer, Deserializer +from msrestazure import AzureConfiguration +from .version import VERSION +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +import uuid +from .operations.operations import Operations +from . import models + + +class ResourceGraphClientConfiguration(AzureConfiguration): + """Configuration for ResourceGraphClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param str base_url: Service URL + """ + + def __init__( + self, credentials, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(ResourceGraphClientConfiguration, self).__init__(base_url) + + self.add_user_agent('azure-mgmt-resourcegraph/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + + +class ResourceGraphClient(SDKClient): + """Azure Resource Graph API Reference + + :ivar config: Configuration for client. + :vartype config: ResourceGraphClientConfiguration + + :ivar operations: Operations operations + :vartype operations: azure.mgmt.resourcegraph.operations.Operations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param str base_url: Service URL + """ + + def __init__( + self, credentials, base_url=None): + + self.config = ResourceGraphClientConfiguration(credentials, base_url) + super(ResourceGraphClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2018-09-01-preview' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) + + def resources( + self, query, custom_headers=None, raw=False, **operation_config): + """Queries the resources managed by Azure Resource Manager for all + subscriptions specified in the request. + + :param query: Request specifying query and its options. + :type query: ~azure.mgmt.resourcegraph.models.QueryRequest + :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: QueryResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.resourcegraph.models.QueryResponse or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.resources.metadata['url'] + + # 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(query, 'QueryRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('QueryResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + resources.metadata = {'url': '/providers/Microsoft.ResourceGraph/resources'} diff --git a/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/version.py b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/version.py new file mode 100644 index 000000000000..5a7feab42d26 --- /dev/null +++ b/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/version.py @@ -0,0 +1,13 @@ +# 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. +# -------------------------------------------------------------------------- + +VERSION = "0.6.0" +