Skip to content
New issue

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

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

Already on GitHub? # to your account

[AutoPR applicationinsights/data-plane/operationalinsights/data-plane] [App Insights/Operational Insights] New Data Plane API versions, bug fixes, and cleanup #2568

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
18 changes: 18 additions & 0 deletions azure-operationalinsights/azure/operationalinsights/__init__.py
Original file line number Diff line number Diff line change
@@ -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 .operational_insights_data_client import OperationalInsightsDataClient
from .version import VERSION

__all__ = ['OperationalInsightsDataClient']

__version__ = VERSION

Original file line number Diff line number Diff line change
@@ -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.
# --------------------------------------------------------------------------

try:
from .query_body_py3 import QueryBody
from .column_py3 import Column
from .table_py3 import Table
from .query_results_py3 import QueryResults
from .error_detail_py3 import ErrorDetail
from .error_info_py3 import ErrorInfo
from .error_response_py3 import ErrorResponse, ErrorResponseException
except (SyntaxError, ImportError):
from .query_body import QueryBody
from .column import Column
from .table import Table
from .query_results import QueryResults
from .error_detail import ErrorDetail
from .error_info import ErrorInfo
from .error_response import ErrorResponse, ErrorResponseException

__all__ = [
'QueryBody',
'Column',
'Table',
'QueryResults',
'ErrorDetail',
'ErrorInfo',
'ErrorResponse', 'ErrorResponseException',
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# 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):
"""A table column.

A column in a table.

:param name: The name of this column.
:type name: str
:param type: The data type of this column.
:type type: str
"""

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
}

def __init__(self, **kwargs):
super(Column, self).__init__(**kwargs)
self.name = kwargs.get('name', None)
self.type = kwargs.get('type', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# 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):
"""A table column.

A column in a table.

:param name: The name of this column.
:type name: str
:param type: The data type of this column.
:type type: str
"""

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
}

def __init__(self, *, name: str=None, type: str=None, **kwargs) -> None:
super(Column, self).__init__(**kwargs)
self.name = name
self.type = type
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# 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 ErrorDetail(Model):
"""Error details.

All required parameters must be populated in order to send to Azure.

:param code: Required. The error's code.
:type code: str
:param message: Required. A human readable error message.
:type message: str
:param target: Indicates which property in the request is responsible for
the error.
:type target: str
:param value: Indicates which value in 'target' is responsible for the
error.
:type value: str
:param resources: Indicates resources which were responsible for the
error.
:type resources: list[str]
:param additional_properties:
:type additional_properties: object
"""

_validation = {
'code': {'required': True},
'message': {'required': True},
}

_attribute_map = {
'code': {'key': 'code', 'type': 'str'},
'message': {'key': 'message', 'type': 'str'},
'target': {'key': 'target', 'type': 'str'},
'value': {'key': 'value', 'type': 'str'},
'resources': {'key': 'resources', 'type': '[str]'},
'additional_properties': {'key': 'additionalProperties', 'type': 'object'},
}

def __init__(self, **kwargs):
super(ErrorDetail, self).__init__(**kwargs)
self.code = kwargs.get('code', None)
self.message = kwargs.get('message', None)
self.target = kwargs.get('target', None)
self.value = kwargs.get('value', None)
self.resources = kwargs.get('resources', None)
self.additional_properties = kwargs.get('additional_properties', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# 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 ErrorDetail(Model):
"""Error details.

All required parameters must be populated in order to send to Azure.

:param code: Required. The error's code.
:type code: str
:param message: Required. A human readable error message.
:type message: str
:param target: Indicates which property in the request is responsible for
the error.
:type target: str
:param value: Indicates which value in 'target' is responsible for the
error.
:type value: str
:param resources: Indicates resources which were responsible for the
error.
:type resources: list[str]
:param additional_properties:
:type additional_properties: object
"""

_validation = {
'code': {'required': True},
'message': {'required': True},
}

_attribute_map = {
'code': {'key': 'code', 'type': 'str'},
'message': {'key': 'message', 'type': 'str'},
'target': {'key': 'target', 'type': 'str'},
'value': {'key': 'value', 'type': 'str'},
'resources': {'key': 'resources', 'type': '[str]'},
'additional_properties': {'key': 'additionalProperties', 'type': 'object'},
}

def __init__(self, *, code: str, message: str, target: str=None, value: str=None, resources=None, additional_properties=None, **kwargs) -> None:
super(ErrorDetail, self).__init__(**kwargs)
self.code = code
self.message = message
self.target = target
self.value = value
self.resources = resources
self.additional_properties = additional_properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# 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 ErrorInfo(Model):
"""The code and message for an error.

All required parameters must be populated in order to send to Azure.

:param code: Required. A machine readable error code.
:type code: str
:param message: Required. A human readable error message.
:type message: str
:param details: error details.
:type details: list[~azure.operationalinsights.models.ErrorDetail]
:param innererror: Inner error details if they exist.
:type innererror: ~azure.operationalinsights.models.ErrorInfo
:param additional_properties:
:type additional_properties: object
"""

_validation = {
'code': {'required': True},
'message': {'required': True},
}

_attribute_map = {
'code': {'key': 'code', 'type': 'str'},
'message': {'key': 'message', 'type': 'str'},
'details': {'key': 'details', 'type': '[ErrorDetail]'},
'innererror': {'key': 'innererror', 'type': 'ErrorInfo'},
'additional_properties': {'key': 'additionalProperties', 'type': 'object'},
}

def __init__(self, **kwargs):
super(ErrorInfo, self).__init__(**kwargs)
self.code = kwargs.get('code', None)
self.message = kwargs.get('message', None)
self.details = kwargs.get('details', None)
self.innererror = kwargs.get('innererror', None)
self.additional_properties = kwargs.get('additional_properties', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# 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 ErrorInfo(Model):
"""The code and message for an error.

All required parameters must be populated in order to send to Azure.

:param code: Required. A machine readable error code.
:type code: str
:param message: Required. A human readable error message.
:type message: str
:param details: error details.
:type details: list[~azure.operationalinsights.models.ErrorDetail]
:param innererror: Inner error details if they exist.
:type innererror: ~azure.operationalinsights.models.ErrorInfo
:param additional_properties:
:type additional_properties: object
"""

_validation = {
'code': {'required': True},
'message': {'required': True},
}

_attribute_map = {
'code': {'key': 'code', 'type': 'str'},
'message': {'key': 'message', 'type': 'str'},
'details': {'key': 'details', 'type': '[ErrorDetail]'},
'innererror': {'key': 'innererror', 'type': 'ErrorInfo'},
'additional_properties': {'key': 'additionalProperties', 'type': 'object'},
}

def __init__(self, *, code: str, message: str, details=None, innererror=None, additional_properties=None, **kwargs) -> None:
super(ErrorInfo, self).__init__(**kwargs)
self.code = code
self.message = message
self.details = details
self.innererror = innererror
self.additional_properties = additional_properties
Original file line number Diff line number Diff line change
@@ -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 details.

Contains details when the response code indicates an error.

All required parameters must be populated in order to send to Azure.

:param error: Required. The error details.
:type error: ~azure.operationalinsights.models.ErrorInfo
"""

_validation = {
'error': {'required': True},
}

_attribute_map = {
'error': {'key': 'error', 'type': 'ErrorInfo'},
}

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)
Loading