Skip to content

Commit

Permalink
CodeGen from PR 11746 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 262366e6b5d9dd38630c3aa9e31e8b1f10dc0b8a into 7a12c79
  • Loading branch information
SDKAuto committed Dec 1, 2020
1 parent e1f2009 commit d8e4132
Show file tree
Hide file tree
Showing 33 changed files with 1,817 additions and 171 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
from .operations import WebTestsOperations
from .operations import AnalyticsItemsOperations
from .operations import WorkbooksOperations
from .operations import MyWorkbooksOperations
from . import models


Expand Down Expand Up @@ -70,6 +71,8 @@ class ApplicationInsightsManagementClient(SDKClient):
:vartype analytics_items: azure.mgmt.applicationinsights.v2015_05_01.operations.AnalyticsItemsOperations
:ivar workbooks: Workbooks operations
:vartype workbooks: azure.mgmt.applicationinsights.v2015_05_01.operations.WorkbooksOperations
:ivar my_workbooks: MyWorkbooks operations
:vartype my_workbooks: azure.mgmt.applicationinsights.v2015_05_01.operations.MyWorkbooksOperations
:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
Expand Down Expand Up @@ -122,3 +125,5 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.workbooks = WorkbooksOperations(
self._client, self.config, self._serialize, self._deserialize)
self.my_workbooks = MyWorkbooksOperations(
self._client, self.config, self._serialize, self._deserialize)
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@
from ._models_py3 import ErrorResponse, ErrorResponseException
from ._models_py3 import InnerError
from ._models_py3 import LinkProperties
from ._models_py3 import MyWorkbook
from ._models_py3 import MyWorkbookError, MyWorkbookErrorException
from ._models_py3 import MyWorkbookResource
from ._models_py3 import Operation
from ._models_py3 import OperationDisplay
from ._models_py3 import PrivateLinkScopedResource
Expand Down Expand Up @@ -83,6 +86,9 @@
from ._models import ErrorResponse, ErrorResponseException
from ._models import InnerError
from ._models import LinkProperties
from ._models import MyWorkbook
from ._models import MyWorkbookError, MyWorkbookErrorException
from ._models import MyWorkbookResource
from ._models import Operation
from ._models import OperationDisplay
from ._models import PrivateLinkScopedResource
Expand All @@ -101,6 +107,7 @@
from ._paged_models import ApplicationInsightsComponentAPIKeyPaged
from ._paged_models import ApplicationInsightsComponentPaged
from ._paged_models import ApplicationInsightsComponentWebTestLocationPaged
from ._paged_models import MyWorkbookPaged
from ._paged_models import OperationPaged
from ._paged_models import WebTestPaged
from ._paged_models import WorkbookPaged
Expand All @@ -109,6 +116,7 @@
ApplicationType,
FlowType,
RequestSource,
IngestionMode,
PurgeState,
FavoriteType,
WebTestKind,
Expand Down Expand Up @@ -151,6 +159,9 @@
'ErrorResponse', 'ErrorResponseException',
'InnerError',
'LinkProperties',
'MyWorkbook',
'MyWorkbookError', 'MyWorkbookErrorException',
'MyWorkbookResource',
'Operation',
'OperationDisplay',
'PrivateLinkScopedResource',
Expand All @@ -173,9 +184,11 @@
'ApplicationInsightsComponentWebTestLocationPaged',
'WebTestPaged',
'WorkbookPaged',
'MyWorkbookPaged',
'ApplicationType',
'FlowType',
'RequestSource',
'IngestionMode',
'PurgeState',
'FavoriteType',
'WebTestKind',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ class RequestSource(str, Enum):
rest = "rest"


class IngestionMode(str, Enum):

application_insights = "ApplicationInsights"
application_insights_with_diagnostic_settings = "ApplicationInsightsWithDiagnosticSettings"
log_analytics = "LogAnalytics"


class PurgeState(str, Enum):

pending = "pending"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,12 @@ class ApplicationInsightsComponent(ComponentsResource):
resources.
:vartype private_link_scoped_resources:
list[~azure.mgmt.applicationinsights.v2015_05_01.models.PrivateLinkScopedResource]
:param ingestion_mode: Indicates the flow of the ingestion. Possible
values include: 'ApplicationInsights',
'ApplicationInsightsWithDiagnosticSettings', 'LogAnalytics'. Default
value: "ApplicationInsights" .
:type ingestion_mode: str or
~azure.mgmt.applicationinsights.v2015_05_01.models.IngestionMode
"""

_validation = {
Expand Down Expand Up @@ -280,6 +286,7 @@ class ApplicationInsightsComponent(ComponentsResource):
'disable_ip_masking': {'key': 'properties.DisableIpMasking', 'type': 'bool'},
'immediate_purge_data_on30_days': {'key': 'properties.ImmediatePurgeDataOn30Days', 'type': 'bool'},
'private_link_scoped_resources': {'key': 'properties.PrivateLinkScopedResources', 'type': '[PrivateLinkScopedResource]'},
'ingestion_mode': {'key': 'properties.IngestionMode', 'type': 'str'},
}

def __init__(self, **kwargs):
Expand All @@ -302,6 +309,7 @@ def __init__(self, **kwargs):
self.disable_ip_masking = kwargs.get('disable_ip_masking', None)
self.immediate_purge_data_on30_days = kwargs.get('immediate_purge_data_on30_days', None)
self.private_link_scoped_resources = None
self.ingestion_mode = kwargs.get('ingestion_mode', "ApplicationInsights")


class ApplicationInsightsComponentAnalyticsItem(Model):
Expand Down Expand Up @@ -1381,6 +1389,162 @@ def __init__(self, **kwargs):
self.category = kwargs.get('category', None)


class MyWorkbookResource(Model):
"""An azure resource object.
:param id: Azure resource Id
:type id: str
:param name: Azure resource name
:type name: str
:param type: Azure resource type
:type type: str
:param location: Resource location
:type location: str
:param tags: Resource tags
:type tags: dict[str, str]
"""

_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}'},
}

def __init__(self, **kwargs):
super(MyWorkbookResource, self).__init__(**kwargs)
self.id = kwargs.get('id', None)
self.name = kwargs.get('name', None)
self.type = kwargs.get('type', None)
self.location = kwargs.get('location', None)
self.tags = kwargs.get('tags', None)


class MyWorkbook(MyWorkbookResource):
"""An Application Insights private workbook definition.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:param id: Azure resource Id
:type id: str
:param name: Azure resource name
:type name: str
:param type: Azure resource type
:type 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.v2015_05_01.models.SharedTypeKind
:param display_name: Required. The user-defined name of the private
workbook.
:type display_name: str
:param serialized_data: Required. Configuration of this particular private
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 private workbook.
:type version: str
:ivar time_modified: Date and time in UTC of the last modification that
was made to this private workbook definition.
:vartype time_modified: str
:param category: Required. Workbook category, as defined by the user at
creation time.
:type category: str
:param my_workbook_tags: A list of 0 or more tags that are associated with
this private workbook definition
:type my_workbook_tags: list[str]
:ivar user_id: Unique user id of the specific user that owns this private
workbook.
:vartype user_id: str
:param source_id: Optional resourceId for a source resource.
:type source_id: str
"""

_validation = {
'display_name': {'required': True},
'serialized_data': {'required': True},
'time_modified': {'readonly': True},
'category': {'required': True},
'user_id': {'readonly': 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'},
'display_name': {'key': 'properties.displayName', 'type': 'str'},
'serialized_data': {'key': 'properties.serializedData', 'type': 'str'},
'version': {'key': 'properties.version', 'type': 'str'},
'time_modified': {'key': 'properties.timeModified', 'type': 'str'},
'category': {'key': 'properties.category', 'type': 'str'},
'my_workbook_tags': {'key': 'properties.tags', 'type': '[str]'},
'user_id': {'key': 'properties.userId', 'type': 'str'},
'source_id': {'key': 'properties.sourceId', 'type': 'str'},
}

def __init__(self, **kwargs):
super(MyWorkbook, self).__init__(**kwargs)
self.kind = kwargs.get('kind', None)
self.display_name = kwargs.get('display_name', None)
self.serialized_data = kwargs.get('serialized_data', None)
self.version = kwargs.get('version', None)
self.time_modified = None
self.category = kwargs.get('category', None)
self.my_workbook_tags = kwargs.get('my_workbook_tags', None)
self.user_id = None
self.source_id = kwargs.get('source_id', None)


class MyWorkbookError(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.v2015_05_01.models.ErrorFieldContract]
"""

_attribute_map = {
'code': {'key': 'code', 'type': 'str'},
'message': {'key': 'message', 'type': 'str'},
'details': {'key': 'details', 'type': '[ErrorFieldContract]'},
}

def __init__(self, **kwargs):
super(MyWorkbookError, self).__init__(**kwargs)
self.code = kwargs.get('code', None)
self.message = kwargs.get('message', None)
self.details = kwargs.get('details', None)


class MyWorkbookErrorException(HttpOperationError):
"""Server responsed with exception of type: 'MyWorkbookError'.
:param deserialize: A deserializer
:param response: Server response to be deserialized.
"""

def __init__(self, deserialize, response, *args):

super(MyWorkbookErrorException, self).__init__(deserialize, response, 'MyWorkbookError', *args)


class Operation(Model):
"""CDN REST API operation.
Expand Down
Loading

0 comments on commit d8e4132

Please sign in to comment.