-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AutoPR applicationinsights/resource-manager] Adding Workbooks resour…
…ce type (#2307) * Generated from aee99140e738b1db27861cc263ff999b6a57c637 Rename workbookDelete.json to WorkbookDelete.json * Generated from e6041b26985b8686bee360952ebfc897e16d90e2 Merge branch 'master' of https://github.com/ericc1103/azure-rest-api-specs * Generated from 667221564451572a6967ad8f15baf609a46ffe8a Update swagger to add subscriptionId * Generated from 92ff8e941e2653e47b92665f1a30943ac968fe84 Fixed duplicated operation id issue * Generated from c245a85973ec62e036c09efc7375f77a5c4cf758 Removed links endpoint * Generated from 4227f6c77925c789e94cfa8b5e2545594e21b323 Removed link logic and added get by resourceid * Generated from 328b75c26fc80e1be1fa36a4e5684dc302886c53 Applied PR comments
- Loading branch information
1 parent
5ed4ed7
commit a9f16b4
Showing
11 changed files
with
792 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/error_field_contract.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 ErrorFieldContract(Model): | ||
"""Error Field contract. | ||
:param code: Property level error code. | ||
:type code: str | ||
:param message: Human-readable representation of property-level error. | ||
:type message: str | ||
:param target: Property name. | ||
:type target: str | ||
""" | ||
|
||
_attribute_map = { | ||
'code': {'key': 'code', 'type': 'str'}, | ||
'message': {'key': 'message', 'type': 'str'}, | ||
'target': {'key': 'target', 'type': 'str'}, | ||
} | ||
|
||
def __init__(self, code=None, message=None, target=None): | ||
super(ErrorFieldContract, self).__init__() | ||
self.code = code | ||
self.message = message | ||
self.target = target |
36 changes: 36 additions & 0 deletions
36
azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/link_properties.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 LinkProperties(Model): | ||
"""Contains a sourceId and workbook resource id to link two resources. | ||
:param source_id: The source Azure resource id | ||
:type source_id: str | ||
:param target_id: The workbook Azure resource id | ||
:type target_id: str | ||
:param category: The category of workbook | ||
:type category: str | ||
""" | ||
|
||
_attribute_map = { | ||
'source_id': {'key': 'sourceId', 'type': 'str'}, | ||
'target_id': {'key': 'targetId', 'type': 'str'}, | ||
'category': {'key': 'category', 'type': 'str'}, | ||
} | ||
|
||
def __init__(self, source_id=None, target_id=None, category=None): | ||
super(LinkProperties, self).__init__() | ||
self.source_id = source_id | ||
self.target_id = target_id | ||
self.category = category |
112 changes: 112 additions & 0 deletions
112
azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/workbook.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for | ||
# license information. | ||
# | ||
# Code generated by Microsoft (R) AutoRest Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is | ||
# regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
from .resource import Resource | ||
|
||
|
||
class Workbook(Resource): | ||
"""An Application Insights workbook definition. | ||
Variables are only populated by the server, and will be ignored when | ||
sending a request. | ||
:ivar id: Azure resource Id | ||
:vartype id: str | ||
:ivar name: Azure resource name | ||
:vartype name: str | ||
:ivar type: Azure resource type | ||
:vartype type: str | ||
:param location: Resource location | ||
:type location: str | ||
:param tags: Resource tags | ||
:type tags: dict[str, str] | ||
:param kind: The kind of workbook. Choices are user and shared. Possible | ||
values include: 'user', 'shared' | ||
:type kind: str or ~azure.mgmt.applicationinsights.models.SharedTypeKind | ||
:param workbook_name: The user-defined name of the workbook. | ||
:type workbook_name: str | ||
:param serialized_data: Configuration of this particular workbook. | ||
Configuration data is a string containing valid JSON | ||
:type serialized_data: str | ||
:param version: This instance's version of the data model. This can change | ||
as new features are added that can be marked workbook. | ||
:type version: str | ||
:param workbook_id: Internally assigned unique id of the workbook | ||
definition. | ||
:type workbook_id: str | ||
:param shared_type_kind: Enum indicating if this workbook definition is | ||
owned by a specific user or is shared between all users with access to the | ||
Application Insights component. Possible values include: 'user', 'shared'. | ||
Default value: "shared" . | ||
:type shared_type_kind: str or | ||
~azure.mgmt.applicationinsights.models.SharedTypeKind | ||
:ivar time_modified: Date and time in UTC of the last modification that | ||
was made to this workbook definition. | ||
:vartype time_modified: str | ||
:param category: Workbook category, as defined by the user at creation | ||
time. | ||
:type category: str | ||
:param workbook_tags: A list of 0 or more tags that are associated with | ||
this workbook definition | ||
:type workbook_tags: list[str] | ||
:param user_id: Unique user id of the specific user that owns this | ||
workbook. | ||
:type user_id: str | ||
:param source_resource_id: Optional resourceId for a source resource. | ||
:type source_resource_id: str | ||
""" | ||
|
||
_validation = { | ||
'id': {'readonly': True}, | ||
'name': {'readonly': True}, | ||
'type': {'readonly': True}, | ||
'location': {'required': True}, | ||
'workbook_name': {'required': True}, | ||
'serialized_data': {'required': True}, | ||
'workbook_id': {'required': True}, | ||
'shared_type_kind': {'required': True}, | ||
'time_modified': {'readonly': True}, | ||
'category': {'required': True}, | ||
'user_id': {'required': True}, | ||
} | ||
|
||
_attribute_map = { | ||
'id': {'key': 'id', 'type': 'str'}, | ||
'name': {'key': 'name', 'type': 'str'}, | ||
'type': {'key': 'type', 'type': 'str'}, | ||
'location': {'key': 'location', 'type': 'str'}, | ||
'tags': {'key': 'tags', 'type': '{str}'}, | ||
'kind': {'key': 'kind', 'type': 'str'}, | ||
'workbook_name': {'key': 'properties.name', 'type': 'str'}, | ||
'serialized_data': {'key': 'properties.serializedData', 'type': 'str'}, | ||
'version': {'key': 'properties.version', 'type': 'str'}, | ||
'workbook_id': {'key': 'properties.workbookId', 'type': 'str'}, | ||
'shared_type_kind': {'key': 'properties.kind', 'type': 'str'}, | ||
'time_modified': {'key': 'properties.timeModified', 'type': 'str'}, | ||
'category': {'key': 'properties.category', 'type': 'str'}, | ||
'workbook_tags': {'key': 'properties.tags', 'type': '[str]'}, | ||
'user_id': {'key': 'properties.userId', 'type': 'str'}, | ||
'source_resource_id': {'key': 'properties.sourceResourceId', 'type': 'str'}, | ||
} | ||
|
||
def __init__(self, location, workbook_name, serialized_data, workbook_id, category, user_id, tags=None, kind=None, version=None, shared_type_kind="shared", workbook_tags=None, source_resource_id=None): | ||
super(Workbook, self).__init__(location=location, tags=tags) | ||
self.kind = kind | ||
self.workbook_name = workbook_name | ||
self.serialized_data = serialized_data | ||
self.version = version | ||
self.workbook_id = workbook_id | ||
self.shared_type_kind = shared_type_kind | ||
self.time_modified = None | ||
self.category = category | ||
self.workbook_tags = workbook_tags | ||
self.user_id = user_id | ||
self.source_resource_id = source_resource_id |
52 changes: 52 additions & 0 deletions
52
azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/workbook_error.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# 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 WorkbookError(Model): | ||
"""Error message body that will indicate why the operation failed. | ||
:param code: Service-defined error code. This code serves as a sub-status | ||
for the HTTP error code specified in the response. | ||
:type code: str | ||
:param message: Human-readable representation of the error. | ||
:type message: str | ||
:param details: The list of invalid fields send in request, in case of | ||
validation error. | ||
:type details: | ||
list[~azure.mgmt.applicationinsights.models.ErrorFieldContract] | ||
""" | ||
|
||
_attribute_map = { | ||
'code': {'key': 'code', 'type': 'str'}, | ||
'message': {'key': 'message', 'type': 'str'}, | ||
'details': {'key': 'details', 'type': '[ErrorFieldContract]'}, | ||
} | ||
|
||
def __init__(self, code=None, message=None, details=None): | ||
super(WorkbookError, self).__init__() | ||
self.code = code | ||
self.message = message | ||
self.details = details | ||
|
||
|
||
class WorkbookErrorException(HttpOperationError): | ||
"""Server responsed with exception of type: 'WorkbookError'. | ||
:param deserialize: A deserializer | ||
:param response: Server response to be deserialized. | ||
""" | ||
|
||
def __init__(self, deserialize, response, *args): | ||
|
||
super(WorkbookErrorException, self).__init__(deserialize, response, 'WorkbookError', *args) |
28 changes: 28 additions & 0 deletions
28
azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/workbooks.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# 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 Workbooks(Model): | ||
"""Workbook list result. | ||
:param value: An array of workbooks. | ||
:type value: list[~azure.mgmt.applicationinsights.models.Workbook] | ||
""" | ||
|
||
_attribute_map = { | ||
'value': {'key': 'value', 'type': '[Workbook]'}, | ||
} | ||
|
||
def __init__(self, value=None): | ||
super(Workbooks, self).__init__() | ||
self.value = value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.