diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/__init__.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/__init__.py index 9a73494da9ba..28fa03f15cf7 100644 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/__init__.py +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .log_analytics_management_client import LogAnalyticsManagementClient -from .version import VERSION +from ._configuration import OperationalInsightsManagementClientConfiguration +from ._operational_insights_management_client import OperationalInsightsManagementClient +__all__ = ['OperationalInsightsManagementClient', 'OperationalInsightsManagementClientConfiguration'] -__all__ = ['LogAnalyticsManagementClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/_configuration.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/_configuration.py new file mode 100644 index 000000000000..47e6071adbe2 --- /dev/null +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/_configuration.py @@ -0,0 +1,50 @@ +# 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 msrestazure import AzureConfiguration + +from .version import VERSION + + +class OperationalInsightsManagementClientConfiguration(AzureConfiguration): + """Configuration for OperationalInsightsManagementClient + 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 subscription_id: Gets subscription credentials which uniquely + identify Microsoft Azure subscription. The subscription ID forms part of + the URI for every service call. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(OperationalInsightsManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-loganalytics/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/_operational_insights_management_client.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/_operational_insights_management_client.py new file mode 100644 index 000000000000..456c8fa3dd29 --- /dev/null +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/_operational_insights_management_client.py @@ -0,0 +1,66 @@ +# 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 ._configuration import OperationalInsightsManagementClientConfiguration +from .operations import LinkedServicesOperations +from .operations import DataSourcesOperations +from .operations import WorkspacesOperations +from .operations import Operations +from . import models + + +class OperationalInsightsManagementClient(SDKClient): + """Operational Insights Client + + :ivar config: Configuration for client. + :vartype config: OperationalInsightsManagementClientConfiguration + + :ivar linked_services: LinkedServices operations + :vartype linked_services: azure.mgmt.loganalytics.operations.LinkedServicesOperations + :ivar data_sources: DataSources operations + :vartype data_sources: azure.mgmt.loganalytics.operations.DataSourcesOperations + :ivar workspaces: Workspaces operations + :vartype workspaces: azure.mgmt.loganalytics.operations.WorkspacesOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.loganalytics.operations.Operations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Gets subscription credentials which uniquely + identify Microsoft Azure subscription. The subscription ID forms part of + the URI for every service call. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = OperationalInsightsManagementClientConfiguration(credentials, subscription_id, base_url) + super(OperationalInsightsManagementClient, 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 = '2015-11-01-preview' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.linked_services = LinkedServicesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.data_sources = DataSourcesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.workspaces = WorkspacesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/log_analytics_management_client.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/log_analytics_management_client.py deleted file mode 100644 index 25d5d8a10b9a..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/log_analytics_management_client.py +++ /dev/null @@ -1,109 +0,0 @@ -# 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 .operations.storage_insights_operations import StorageInsightsOperations -from .operations.workspaces_operations import WorkspacesOperations -from .operations.saved_searches_operations import SavedSearchesOperations -from .operations.linked_services_operations import LinkedServicesOperations -from .operations.data_sources_operations import DataSourcesOperations -from .operations.operations import Operations -from . import models - - -class LogAnalyticsManagementClientConfiguration(AzureConfiguration): - """Configuration for LogAnalyticsManagementClient - 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 subscription_id: Gets subscription credentials which uniquely - identify Microsoft Azure subscription. The subscription ID forms part of - the URI for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(LogAnalyticsManagementClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-loganalytics/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - - -class LogAnalyticsManagementClient(SDKClient): - """The Log Analytics Client. - - :ivar config: Configuration for client. - :vartype config: LogAnalyticsManagementClientConfiguration - - :ivar storage_insights: StorageInsights operations - :vartype storage_insights: azure.mgmt.loganalytics.operations.StorageInsightsOperations - :ivar workspaces: Workspaces operations - :vartype workspaces: azure.mgmt.loganalytics.operations.WorkspacesOperations - :ivar saved_searches: SavedSearches operations - :vartype saved_searches: azure.mgmt.loganalytics.operations.SavedSearchesOperations - :ivar linked_services: LinkedServices operations - :vartype linked_services: azure.mgmt.loganalytics.operations.LinkedServicesOperations - :ivar data_sources: DataSources operations - :vartype data_sources: azure.mgmt.loganalytics.operations.DataSourcesOperations - :ivar operations: Operations operations - :vartype operations: azure.mgmt.loganalytics.operations.Operations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Gets subscription credentials which uniquely - identify Microsoft Azure subscription. The subscription ID forms part of - the URI for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - self.config = LogAnalyticsManagementClientConfiguration(credentials, subscription_id, base_url) - super(LogAnalyticsManagementClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.storage_insights = StorageInsightsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.workspaces = WorkspacesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.saved_searches = SavedSearchesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.linked_services = LinkedServicesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.data_sources = DataSourcesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/__init__.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/__init__.py index 10363263f00d..231b84cd4ece 100644 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/__init__.py +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/__init__.py @@ -10,139 +10,68 @@ # -------------------------------------------------------------------------- try: - from .link_target_py3 import LinkTarget - from .tag_py3 import Tag - from .core_summary_py3 import CoreSummary - from .search_sort_py3 import SearchSort - from .search_metadata_schema_py3 import SearchMetadataSchema - from .search_metadata_py3 import SearchMetadata - from .saved_search_py3 import SavedSearch - from .saved_searches_list_result_py3 import SavedSearchesListResult - from .search_error_py3 import SearchError - from .search_results_response_py3 import SearchResultsResponse - from .search_schema_value_py3 import SearchSchemaValue - from .search_get_schema_response_py3 import SearchGetSchemaResponse - from .search_highlight_py3 import SearchHighlight - from .search_parameters_py3 import SearchParameters - from .storage_account_py3 import StorageAccount - from .storage_insight_status_py3 import StorageInsightStatus - from .storage_insight_py3 import StorageInsight - from .resource_py3 import Resource - from .proxy_resource_py3 import ProxyResource - from .workspace_purge_body_filters_py3 import WorkspacePurgeBodyFilters - from .workspace_purge_body_py3 import WorkspacePurgeBody - from .workspace_purge_response_py3 import WorkspacePurgeResponse - from .workspace_purge_status_response_py3 import WorkspacePurgeStatusResponse - from .operation_display_py3 import OperationDisplay - from .operation_py3 import Operation - from .linked_service_py3 import LinkedService - from .data_source_py3 import DataSource - from .data_source_filter_py3 import DataSourceFilter - from .intelligence_pack_py3 import IntelligencePack - from .shared_keys_py3 import SharedKeys - from .metric_name_py3 import MetricName - from .usage_metric_py3 import UsageMetric - from .management_group_py3 import ManagementGroup - from .sku_py3 import Sku - from .workspace_py3 import Workspace + from ._models_py3 import DataSource + from ._models_py3 import DataSourceFilter + from ._models_py3 import IntelligencePack + from ._models_py3 import LinkedService + from ._models_py3 import ManagementGroup + from ._models_py3 import MetricName + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import ProxyResource + from ._models_py3 import Resource + from ._models_py3 import SharedKeys + from ._models_py3 import Sku + from ._models_py3 import UsageMetric + from ._models_py3 import Workspace except (SyntaxError, ImportError): - from .link_target import LinkTarget - from .tag import Tag - from .core_summary import CoreSummary - from .search_sort import SearchSort - from .search_metadata_schema import SearchMetadataSchema - from .search_metadata import SearchMetadata - from .saved_search import SavedSearch - from .saved_searches_list_result import SavedSearchesListResult - from .search_error import SearchError - from .search_results_response import SearchResultsResponse - from .search_schema_value import SearchSchemaValue - from .search_get_schema_response import SearchGetSchemaResponse - from .search_highlight import SearchHighlight - from .search_parameters import SearchParameters - from .storage_account import StorageAccount - from .storage_insight_status import StorageInsightStatus - from .storage_insight import StorageInsight - from .resource import Resource - from .proxy_resource import ProxyResource - from .workspace_purge_body_filters import WorkspacePurgeBodyFilters - from .workspace_purge_body import WorkspacePurgeBody - from .workspace_purge_response import WorkspacePurgeResponse - from .workspace_purge_status_response import WorkspacePurgeStatusResponse - from .operation_display import OperationDisplay - from .operation import Operation - from .linked_service import LinkedService - from .data_source import DataSource - from .data_source_filter import DataSourceFilter - from .intelligence_pack import IntelligencePack - from .shared_keys import SharedKeys - from .metric_name import MetricName - from .usage_metric import UsageMetric - from .management_group import ManagementGroup - from .sku import Sku - from .workspace import Workspace -from .storage_insight_paged import StorageInsightPaged -from .usage_metric_paged import UsageMetricPaged -from .management_group_paged import ManagementGroupPaged -from .workspace_paged import WorkspacePaged -from .linked_service_paged import LinkedServicePaged -from .data_source_paged import DataSourcePaged -from .operation_paged import OperationPaged -from .log_analytics_management_client_enums import ( - SearchSortEnum, - StorageInsightState, - PurgeState, + from ._models import DataSource + from ._models import DataSourceFilter + from ._models import IntelligencePack + from ._models import LinkedService + from ._models import ManagementGroup + from ._models import MetricName + from ._models import Operation + from ._models import OperationDisplay + from ._models import ProxyResource + from ._models import Resource + from ._models import SharedKeys + from ._models import Sku + from ._models import UsageMetric + from ._models import Workspace +from ._paged_models import DataSourcePaged +from ._paged_models import LinkedServicePaged +from ._paged_models import ManagementGroupPaged +from ._paged_models import OperationPaged +from ._paged_models import UsageMetricPaged +from ._paged_models import WorkspacePaged +from ._operational_insights_management_client_enums import ( DataSourceKind, SkuNameEnum, EntityStatus, ) __all__ = [ - 'LinkTarget', - 'Tag', - 'CoreSummary', - 'SearchSort', - 'SearchMetadataSchema', - 'SearchMetadata', - 'SavedSearch', - 'SavedSearchesListResult', - 'SearchError', - 'SearchResultsResponse', - 'SearchSchemaValue', - 'SearchGetSchemaResponse', - 'SearchHighlight', - 'SearchParameters', - 'StorageAccount', - 'StorageInsightStatus', - 'StorageInsight', - 'Resource', - 'ProxyResource', - 'WorkspacePurgeBodyFilters', - 'WorkspacePurgeBody', - 'WorkspacePurgeResponse', - 'WorkspacePurgeStatusResponse', - 'OperationDisplay', - 'Operation', - 'LinkedService', 'DataSource', 'DataSourceFilter', 'IntelligencePack', - 'SharedKeys', - 'MetricName', - 'UsageMetric', + 'LinkedService', 'ManagementGroup', + 'MetricName', + 'Operation', + 'OperationDisplay', + 'ProxyResource', + 'Resource', + 'SharedKeys', 'Sku', + 'UsageMetric', 'Workspace', - 'StorageInsightPaged', + 'LinkedServicePaged', + 'DataSourcePaged', 'UsageMetricPaged', 'ManagementGroupPaged', 'WorkspacePaged', - 'LinkedServicePaged', - 'DataSourcePaged', 'OperationPaged', - 'SearchSortEnum', - 'StorageInsightState', - 'PurgeState', 'DataSourceKind', 'SkuNameEnum', 'EntityStatus', diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/_models.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/_models.py new file mode 100644 index 000000000000..34dd166ef0a4 --- /dev/null +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/_models.py @@ -0,0 +1,509 @@ +# 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 CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ProxyResource(Model): + """Common properties of proxy resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ProxyResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.tags = kwargs.get('tags', None) + + +class DataSource(ProxyResource): + """Datasources under OMS Workspace. + + 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. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param tags: Resource tags + :type tags: dict[str, str] + :param properties: Required. The data source properties in raw json + format, each kind of data source have it's own schema. + :type properties: object + :param e_tag: The ETag of the data source. + :type e_tag: str + :param kind: Required. Possible values include: 'AzureActivityLog', + 'ChangeTrackingPath', 'ChangeTrackingDefaultPath', + 'ChangeTrackingDefaultRegistry', 'ChangeTrackingCustomRegistry', + 'CustomLog', 'CustomLogCollection', 'GenericDataSource', 'IISLogs', + 'LinuxPerformanceObject', 'LinuxPerformanceCollection', 'LinuxSyslog', + 'LinuxSyslogCollection', 'WindowsEvent', 'WindowsPerformanceCounter' + :type kind: str or ~azure.mgmt.loganalytics.models.DataSourceKind + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'properties': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DataSource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.e_tag = kwargs.get('e_tag', None) + self.kind = kwargs.get('kind', None) + + +class DataSourceFilter(Model): + """DataSource filter. Right now, only filter by kind is supported. + + :param kind: Possible values include: 'AzureActivityLog', + 'ChangeTrackingPath', 'ChangeTrackingDefaultPath', + 'ChangeTrackingDefaultRegistry', 'ChangeTrackingCustomRegistry', + 'CustomLog', 'CustomLogCollection', 'GenericDataSource', 'IISLogs', + 'LinuxPerformanceObject', 'LinuxPerformanceCollection', 'LinuxSyslog', + 'LinuxSyslogCollection', 'WindowsEvent', 'WindowsPerformanceCounter' + :type kind: str or ~azure.mgmt.loganalytics.models.DataSourceKind + """ + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DataSourceFilter, self).__init__(**kwargs) + self.kind = kwargs.get('kind', None) + + +class IntelligencePack(Model): + """Intelligence Pack containing a string name and boolean indicating if it's + enabled. + + :param name: The name of the intelligence pack. + :type name: str + :param enabled: The enabled boolean for the intelligence pack. + :type enabled: bool + :param display_name: The display name of the intelligence pack. + :type display_name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IntelligencePack, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.enabled = kwargs.get('enabled', None) + self.display_name = kwargs.get('display_name', None) + + +class LinkedService(ProxyResource): + """The top level Linked service resource container. + + 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. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param tags: Resource tags + :type tags: dict[str, str] + :param resource_id: Required. The resource id of the resource that will be + linked to the workspace. + :type resource_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'resource_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LinkedService, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + + +class ManagementGroup(Model): + """A management group that is connected to a workspace. + + :param server_count: The number of servers connected to the management + group. + :type server_count: int + :param is_gateway: Gets or sets a value indicating whether the management + group is a gateway. + :type is_gateway: bool + :param name: The name of the management group. + :type name: str + :param id: The unique ID of the management group. + :type id: str + :param created: The datetime that the management group was created. + :type created: datetime + :param data_received: The last datetime that the management group received + data. + :type data_received: datetime + :param version: The version of System Center that is managing the + management group. + :type version: str + :param sku: The SKU of System Center that is managing the management + group. + :type sku: str + """ + + _attribute_map = { + 'server_count': {'key': 'properties.serverCount', 'type': 'int'}, + 'is_gateway': {'key': 'properties.isGateway', 'type': 'bool'}, + 'name': {'key': 'properties.name', 'type': 'str'}, + 'id': {'key': 'properties.id', 'type': 'str'}, + 'created': {'key': 'properties.created', 'type': 'iso-8601'}, + 'data_received': {'key': 'properties.dataReceived', 'type': 'iso-8601'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'sku': {'key': 'properties.sku', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagementGroup, self).__init__(**kwargs) + self.server_count = kwargs.get('server_count', None) + self.is_gateway = kwargs.get('is_gateway', None) + self.name = kwargs.get('name', None) + self.id = kwargs.get('id', None) + self.created = kwargs.get('created', None) + self.data_received = kwargs.get('data_received', None) + self.version = kwargs.get('version', None) + self.sku = kwargs.get('sku', None) + + +class MetricName(Model): + """The name of a metric. + + :param value: The system name of the metric. + :type value: str + :param localized_value: The localized name of the metric. + :type localized_value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MetricName, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.localized_value = kwargs.get('localized_value', None) + + +class Operation(Model): + """Supported operation of OperationalInsights resource provider. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param display: Display metadata associated with the operation. + :type display: ~azure.mgmt.loganalytics.models.OperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + + +class OperationDisplay(Model): + """Display metadata associated with the operation. + + :param provider: Service provider: Microsoft OperationsManagement. + :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 + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', '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) + + +class Resource(Model): + """The resource definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'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}'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class SharedKeys(Model): + """The shared keys for a workspace. + + :param primary_shared_key: The primary shared key of a workspace. + :type primary_shared_key: str + :param secondary_shared_key: The secondary shared key of a workspace. + :type secondary_shared_key: str + """ + + _attribute_map = { + 'primary_shared_key': {'key': 'primarySharedKey', 'type': 'str'}, + 'secondary_shared_key': {'key': 'secondarySharedKey', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SharedKeys, self).__init__(**kwargs) + self.primary_shared_key = kwargs.get('primary_shared_key', None) + self.secondary_shared_key = kwargs.get('secondary_shared_key', None) + + +class Sku(Model): + """The SKU (tier) of a workspace. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the SKU. Possible values include: + 'Free', 'Standard', 'Premium', 'PerNode', 'PerGB2018', 'Standalone' + :type name: str or ~azure.mgmt.loganalytics.models.SkuNameEnum + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + + +class UsageMetric(Model): + """A metric describing the usage of a resource. + + :param name: The name of the metric. + :type name: ~azure.mgmt.loganalytics.models.MetricName + :param unit: The units used for the metric. + :type unit: str + :param current_value: The current value of the metric. + :type current_value: float + :param limit: The quota limit for the metric. + :type limit: float + :param next_reset_time: The time that the metric's value will reset. + :type next_reset_time: datetime + :param quota_period: The quota period that determines the length of time + between value resets. + :type quota_period: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'MetricName'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'float'}, + 'limit': {'key': 'limit', 'type': 'float'}, + 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, + 'quota_period': {'key': 'quotaPeriod', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UsageMetric, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.unit = kwargs.get('unit', None) + self.current_value = kwargs.get('current_value', None) + self.limit = kwargs.get('limit', None) + self.next_reset_time = kwargs.get('next_reset_time', None) + self.quota_period = kwargs.get('quota_period', None) + + +class Workspace(Resource): + """The top level Workspace resource container. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param provisioning_state: The provisioning state of the workspace. + Possible values include: 'Creating', 'Succeeded', 'Failed', 'Canceled', + 'Deleting', 'ProvisioningAccount' + :type provisioning_state: str or + ~azure.mgmt.loganalytics.models.EntityStatus + :ivar source: This is a read-only legacy property. It is always set to + 'Azure' by the service. Kept here for backward compatibility. + :vartype source: str + :ivar customer_id: This is a read-only property. Represents the ID + associated with the workspace. + :vartype customer_id: str + :ivar portal_url: This is a legacy property and is not used anymore. Kept + here for backward compatibility. + :vartype portal_url: str + :param sku: The SKU of the workspace. + :type sku: ~azure.mgmt.loganalytics.models.Sku + :param retention_in_days: The workspace data retention in days. -1 means + Unlimited retention for the Unlimited Sku. 730 days is the maximum allowed + for all other Skus. + :type retention_in_days: int + :param e_tag: The ETag of the workspace. + :type e_tag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'source': {'readonly': True}, + 'customer_id': {'readonly': True}, + 'portal_url': {'readonly': True}, + 'retention_in_days': {'maximum': 730, 'minimum': -1}, + } + + _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}'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'source': {'key': 'properties.source', 'type': 'str'}, + 'customer_id': {'key': 'properties.customerId', 'type': 'str'}, + 'portal_url': {'key': 'properties.portalUrl', 'type': 'str'}, + 'sku': {'key': 'properties.sku', 'type': 'Sku'}, + 'retention_in_days': {'key': 'properties.retentionInDays', 'type': 'int'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Workspace, self).__init__(**kwargs) + self.provisioning_state = kwargs.get('provisioning_state', None) + self.source = None + self.customer_id = None + self.portal_url = None + self.sku = kwargs.get('sku', None) + self.retention_in_days = kwargs.get('retention_in_days', None) + self.e_tag = kwargs.get('e_tag', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/_models_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/_models_py3.py new file mode 100644 index 000000000000..6e6632fcd20c --- /dev/null +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/_models_py3.py @@ -0,0 +1,509 @@ +# 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 CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ProxyResource(Model): + """Common properties of proxy resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(ProxyResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.tags = tags + + +class DataSource(ProxyResource): + """Datasources under OMS Workspace. + + 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. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param tags: Resource tags + :type tags: dict[str, str] + :param properties: Required. The data source properties in raw json + format, each kind of data source have it's own schema. + :type properties: object + :param e_tag: The ETag of the data source. + :type e_tag: str + :param kind: Required. Possible values include: 'AzureActivityLog', + 'ChangeTrackingPath', 'ChangeTrackingDefaultPath', + 'ChangeTrackingDefaultRegistry', 'ChangeTrackingCustomRegistry', + 'CustomLog', 'CustomLogCollection', 'GenericDataSource', 'IISLogs', + 'LinuxPerformanceObject', 'LinuxPerformanceCollection', 'LinuxSyslog', + 'LinuxSyslogCollection', 'WindowsEvent', 'WindowsPerformanceCounter' + :type kind: str or ~azure.mgmt.loganalytics.models.DataSourceKind + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'properties': {'required': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, *, properties, kind, tags=None, e_tag: str=None, **kwargs) -> None: + super(DataSource, self).__init__(tags=tags, **kwargs) + self.properties = properties + self.e_tag = e_tag + self.kind = kind + + +class DataSourceFilter(Model): + """DataSource filter. Right now, only filter by kind is supported. + + :param kind: Possible values include: 'AzureActivityLog', + 'ChangeTrackingPath', 'ChangeTrackingDefaultPath', + 'ChangeTrackingDefaultRegistry', 'ChangeTrackingCustomRegistry', + 'CustomLog', 'CustomLogCollection', 'GenericDataSource', 'IISLogs', + 'LinuxPerformanceObject', 'LinuxPerformanceCollection', 'LinuxSyslog', + 'LinuxSyslogCollection', 'WindowsEvent', 'WindowsPerformanceCounter' + :type kind: str or ~azure.mgmt.loganalytics.models.DataSourceKind + """ + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, *, kind=None, **kwargs) -> None: + super(DataSourceFilter, self).__init__(**kwargs) + self.kind = kind + + +class IntelligencePack(Model): + """Intelligence Pack containing a string name and boolean indicating if it's + enabled. + + :param name: The name of the intelligence pack. + :type name: str + :param enabled: The enabled boolean for the intelligence pack. + :type enabled: bool + :param display_name: The display name of the intelligence pack. + :type display_name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, enabled: bool=None, display_name: str=None, **kwargs) -> None: + super(IntelligencePack, self).__init__(**kwargs) + self.name = name + self.enabled = enabled + self.display_name = display_name + + +class LinkedService(ProxyResource): + """The top level Linked service resource container. + + 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. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param tags: Resource tags + :type tags: dict[str, str] + :param resource_id: Required. The resource id of the resource that will be + linked to the workspace. + :type resource_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'resource_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, + } + + def __init__(self, *, resource_id: str, tags=None, **kwargs) -> None: + super(LinkedService, self).__init__(tags=tags, **kwargs) + self.resource_id = resource_id + + +class ManagementGroup(Model): + """A management group that is connected to a workspace. + + :param server_count: The number of servers connected to the management + group. + :type server_count: int + :param is_gateway: Gets or sets a value indicating whether the management + group is a gateway. + :type is_gateway: bool + :param name: The name of the management group. + :type name: str + :param id: The unique ID of the management group. + :type id: str + :param created: The datetime that the management group was created. + :type created: datetime + :param data_received: The last datetime that the management group received + data. + :type data_received: datetime + :param version: The version of System Center that is managing the + management group. + :type version: str + :param sku: The SKU of System Center that is managing the management + group. + :type sku: str + """ + + _attribute_map = { + 'server_count': {'key': 'properties.serverCount', 'type': 'int'}, + 'is_gateway': {'key': 'properties.isGateway', 'type': 'bool'}, + 'name': {'key': 'properties.name', 'type': 'str'}, + 'id': {'key': 'properties.id', 'type': 'str'}, + 'created': {'key': 'properties.created', 'type': 'iso-8601'}, + 'data_received': {'key': 'properties.dataReceived', 'type': 'iso-8601'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'sku': {'key': 'properties.sku', 'type': 'str'}, + } + + def __init__(self, *, server_count: int=None, is_gateway: bool=None, name: str=None, id: str=None, created=None, data_received=None, version: str=None, sku: str=None, **kwargs) -> None: + super(ManagementGroup, self).__init__(**kwargs) + self.server_count = server_count + self.is_gateway = is_gateway + self.name = name + self.id = id + self.created = created + self.data_received = data_received + self.version = version + self.sku = sku + + +class MetricName(Model): + """The name of a metric. + + :param value: The system name of the metric. + :type value: str + :param localized_value: The localized name of the metric. + :type localized_value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, *, value: str=None, localized_value: str=None, **kwargs) -> None: + super(MetricName, self).__init__(**kwargs) + self.value = value + self.localized_value = localized_value + + +class Operation(Model): + """Supported operation of OperationalInsights resource provider. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param display: Display metadata associated with the operation. + :type display: ~azure.mgmt.loganalytics.models.OperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, *, name: str=None, display=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = name + self.display = display + + +class OperationDisplay(Model): + """Display metadata associated with the operation. + + :param provider: Service provider: Microsoft OperationsManagement. + :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 + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + + +class Resource(Model): + """The resource definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'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}'}, + } + + def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags + + +class SharedKeys(Model): + """The shared keys for a workspace. + + :param primary_shared_key: The primary shared key of a workspace. + :type primary_shared_key: str + :param secondary_shared_key: The secondary shared key of a workspace. + :type secondary_shared_key: str + """ + + _attribute_map = { + 'primary_shared_key': {'key': 'primarySharedKey', 'type': 'str'}, + 'secondary_shared_key': {'key': 'secondarySharedKey', 'type': 'str'}, + } + + def __init__(self, *, primary_shared_key: str=None, secondary_shared_key: str=None, **kwargs) -> None: + super(SharedKeys, self).__init__(**kwargs) + self.primary_shared_key = primary_shared_key + self.secondary_shared_key = secondary_shared_key + + +class Sku(Model): + """The SKU (tier) of a workspace. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the SKU. Possible values include: + 'Free', 'Standard', 'Premium', 'PerNode', 'PerGB2018', 'Standalone' + :type name: str or ~azure.mgmt.loganalytics.models.SkuNameEnum + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, name, **kwargs) -> None: + super(Sku, self).__init__(**kwargs) + self.name = name + + +class UsageMetric(Model): + """A metric describing the usage of a resource. + + :param name: The name of the metric. + :type name: ~azure.mgmt.loganalytics.models.MetricName + :param unit: The units used for the metric. + :type unit: str + :param current_value: The current value of the metric. + :type current_value: float + :param limit: The quota limit for the metric. + :type limit: float + :param next_reset_time: The time that the metric's value will reset. + :type next_reset_time: datetime + :param quota_period: The quota period that determines the length of time + between value resets. + :type quota_period: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'MetricName'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'float'}, + 'limit': {'key': 'limit', 'type': 'float'}, + 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, + 'quota_period': {'key': 'quotaPeriod', 'type': 'str'}, + } + + def __init__(self, *, name=None, unit: str=None, current_value: float=None, limit: float=None, next_reset_time=None, quota_period: str=None, **kwargs) -> None: + super(UsageMetric, self).__init__(**kwargs) + self.name = name + self.unit = unit + self.current_value = current_value + self.limit = limit + self.next_reset_time = next_reset_time + self.quota_period = quota_period + + +class Workspace(Resource): + """The top level Workspace resource container. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param provisioning_state: The provisioning state of the workspace. + Possible values include: 'Creating', 'Succeeded', 'Failed', 'Canceled', + 'Deleting', 'ProvisioningAccount' + :type provisioning_state: str or + ~azure.mgmt.loganalytics.models.EntityStatus + :ivar source: This is a read-only legacy property. It is always set to + 'Azure' by the service. Kept here for backward compatibility. + :vartype source: str + :ivar customer_id: This is a read-only property. Represents the ID + associated with the workspace. + :vartype customer_id: str + :ivar portal_url: This is a legacy property and is not used anymore. Kept + here for backward compatibility. + :vartype portal_url: str + :param sku: The SKU of the workspace. + :type sku: ~azure.mgmt.loganalytics.models.Sku + :param retention_in_days: The workspace data retention in days. -1 means + Unlimited retention for the Unlimited Sku. 730 days is the maximum allowed + for all other Skus. + :type retention_in_days: int + :param e_tag: The ETag of the workspace. + :type e_tag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'source': {'readonly': True}, + 'customer_id': {'readonly': True}, + 'portal_url': {'readonly': True}, + 'retention_in_days': {'maximum': 730, 'minimum': -1}, + } + + _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}'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'source': {'key': 'properties.source', 'type': 'str'}, + 'customer_id': {'key': 'properties.customerId', 'type': 'str'}, + 'portal_url': {'key': 'properties.portalUrl', 'type': 'str'}, + 'sku': {'key': 'properties.sku', 'type': 'Sku'}, + 'retention_in_days': {'key': 'properties.retentionInDays', 'type': 'int'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, provisioning_state=None, sku=None, retention_in_days: int=None, e_tag: str=None, **kwargs) -> None: + super(Workspace, self).__init__(location=location, tags=tags, **kwargs) + self.provisioning_state = provisioning_state + self.source = None + self.customer_id = None + self.portal_url = None + self.sku = sku + self.retention_in_days = retention_in_days + self.e_tag = e_tag diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/log_analytics_management_client_enums.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/_operational_insights_management_client_enums.py similarity index 86% rename from sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/log_analytics_management_client_enums.py rename to sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/_operational_insights_management_client_enums.py index 22641d5bc333..2e5fba5de75d 100644 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/log_analytics_management_client_enums.py +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/_operational_insights_management_client_enums.py @@ -12,24 +12,6 @@ from enum import Enum -class SearchSortEnum(str, Enum): - - asc = "asc" - desc = "desc" - - -class StorageInsightState(str, Enum): - - ok = "OK" - error = "ERROR" - - -class PurgeState(str, Enum): - - pending = "Pending" - completed = "Completed" - - class DataSourceKind(str, Enum): azure_activity_log = "AzureActivityLog" @@ -54,7 +36,6 @@ class SkuNameEnum(str, Enum): free = "Free" standard = "Standard" premium = "Premium" - unlimited = "Unlimited" per_node = "PerNode" per_gb2018 = "PerGB2018" standalone = "Standalone" diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/_paged_models.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/_paged_models.py new file mode 100644 index 000000000000..c3c3221078d9 --- /dev/null +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/_paged_models.py @@ -0,0 +1,92 @@ +# 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 LinkedServicePaged(Paged): + """ + A paging container for iterating over a list of :class:`LinkedService ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[LinkedService]'} + } + + def __init__(self, *args, **kwargs): + + super(LinkedServicePaged, self).__init__(*args, **kwargs) +class DataSourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`DataSource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DataSource]'} + } + + def __init__(self, *args, **kwargs): + + super(DataSourcePaged, self).__init__(*args, **kwargs) +class UsageMetricPaged(Paged): + """ + A paging container for iterating over a list of :class:`UsageMetric ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[UsageMetric]'} + } + + def __init__(self, *args, **kwargs): + + super(UsageMetricPaged, self).__init__(*args, **kwargs) +class ManagementGroupPaged(Paged): + """ + A paging container for iterating over a list of :class:`ManagementGroup ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ManagementGroup]'} + } + + def __init__(self, *args, **kwargs): + + super(ManagementGroupPaged, self).__init__(*args, **kwargs) +class WorkspacePaged(Paged): + """ + A paging container for iterating over a list of :class:`Workspace ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Workspace]'} + } + + def __init__(self, *args, **kwargs): + + super(WorkspacePaged, self).__init__(*args, **kwargs) +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/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/core_summary.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/core_summary.py deleted file mode 100644 index 8facbdb80089..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/core_summary.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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 CoreSummary(Model): - """The core summary of a search. - - All required parameters must be populated in order to send to Azure. - - :param status: The status of a core summary. - :type status: str - :param number_of_documents: Required. The number of documents of a core - summary. - :type number_of_documents: long - """ - - _validation = { - 'number_of_documents': {'required': True}, - } - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'number_of_documents': {'key': 'numberOfDocuments', 'type': 'long'}, - } - - def __init__(self, **kwargs): - super(CoreSummary, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.number_of_documents = kwargs.get('number_of_documents', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/core_summary_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/core_summary_py3.py deleted file mode 100644 index adb9e80f5479..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/core_summary_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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 CoreSummary(Model): - """The core summary of a search. - - All required parameters must be populated in order to send to Azure. - - :param status: The status of a core summary. - :type status: str - :param number_of_documents: Required. The number of documents of a core - summary. - :type number_of_documents: long - """ - - _validation = { - 'number_of_documents': {'required': True}, - } - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'number_of_documents': {'key': 'numberOfDocuments', 'type': 'long'}, - } - - def __init__(self, *, number_of_documents: int, status: str=None, **kwargs) -> None: - super(CoreSummary, self).__init__(**kwargs) - self.status = status - self.number_of_documents = number_of_documents diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/data_source.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/data_source.py deleted file mode 100644 index 025239663f3c..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/data_source.py +++ /dev/null @@ -1,67 +0,0 @@ -# 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 .proxy_resource import ProxyResource - - -class DataSource(ProxyResource): - """Datasources under OMS Workspace. - - 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. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param tags: Resource tags - :type tags: dict[str, str] - :param properties: Required. The data source properties in raw json - format, each kind of data source have it's own schema. - :type properties: object - :param e_tag: The ETag of the data source. - :type e_tag: str - :param kind: Required. Possible values include: 'AzureActivityLog', - 'ChangeTrackingPath', 'ChangeTrackingDefaultPath', - 'ChangeTrackingDefaultRegistry', 'ChangeTrackingCustomRegistry', - 'CustomLog', 'CustomLogCollection', 'GenericDataSource', 'IISLogs', - 'LinuxPerformanceObject', 'LinuxPerformanceCollection', 'LinuxSyslog', - 'LinuxSyslogCollection', 'WindowsEvent', 'WindowsPerformanceCounter' - :type kind: str or ~azure.mgmt.loganalytics.models.DataSourceKind - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'properties': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': 'object'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DataSource, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - self.e_tag = kwargs.get('e_tag', None) - self.kind = kwargs.get('kind', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/data_source_filter.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/data_source_filter.py deleted file mode 100644 index 8a45a5250d77..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/data_source_filter.py +++ /dev/null @@ -1,33 +0,0 @@ -# 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 DataSourceFilter(Model): - """DataSource filter. Right now, only filter by kind is supported. - - :param kind: Possible values include: 'AzureActivityLog', - 'ChangeTrackingPath', 'ChangeTrackingDefaultPath', - 'ChangeTrackingDefaultRegistry', 'ChangeTrackingCustomRegistry', - 'CustomLog', 'CustomLogCollection', 'GenericDataSource', 'IISLogs', - 'LinuxPerformanceObject', 'LinuxPerformanceCollection', 'LinuxSyslog', - 'LinuxSyslogCollection', 'WindowsEvent', 'WindowsPerformanceCounter' - :type kind: str or ~azure.mgmt.loganalytics.models.DataSourceKind - """ - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DataSourceFilter, self).__init__(**kwargs) - self.kind = kwargs.get('kind', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/data_source_filter_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/data_source_filter_py3.py deleted file mode 100644 index e597802b8392..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/data_source_filter_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# 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 DataSourceFilter(Model): - """DataSource filter. Right now, only filter by kind is supported. - - :param kind: Possible values include: 'AzureActivityLog', - 'ChangeTrackingPath', 'ChangeTrackingDefaultPath', - 'ChangeTrackingDefaultRegistry', 'ChangeTrackingCustomRegistry', - 'CustomLog', 'CustomLogCollection', 'GenericDataSource', 'IISLogs', - 'LinuxPerformanceObject', 'LinuxPerformanceCollection', 'LinuxSyslog', - 'LinuxSyslogCollection', 'WindowsEvent', 'WindowsPerformanceCounter' - :type kind: str or ~azure.mgmt.loganalytics.models.DataSourceKind - """ - - _attribute_map = { - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, *, kind=None, **kwargs) -> None: - super(DataSourceFilter, self).__init__(**kwargs) - self.kind = kind diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/data_source_paged.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/data_source_paged.py deleted file mode 100644 index 9ee8cc141555..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/data_source_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 DataSourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`DataSource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DataSource]'} - } - - def __init__(self, *args, **kwargs): - - super(DataSourcePaged, self).__init__(*args, **kwargs) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/data_source_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/data_source_py3.py deleted file mode 100644 index d0f5e0bd78b6..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/data_source_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# 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 .proxy_resource_py3 import ProxyResource - - -class DataSource(ProxyResource): - """Datasources under OMS Workspace. - - 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. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param tags: Resource tags - :type tags: dict[str, str] - :param properties: Required. The data source properties in raw json - format, each kind of data source have it's own schema. - :type properties: object - :param e_tag: The ETag of the data source. - :type e_tag: str - :param kind: Required. Possible values include: 'AzureActivityLog', - 'ChangeTrackingPath', 'ChangeTrackingDefaultPath', - 'ChangeTrackingDefaultRegistry', 'ChangeTrackingCustomRegistry', - 'CustomLog', 'CustomLogCollection', 'GenericDataSource', 'IISLogs', - 'LinuxPerformanceObject', 'LinuxPerformanceCollection', 'LinuxSyslog', - 'LinuxSyslogCollection', 'WindowsEvent', 'WindowsPerformanceCounter' - :type kind: str or ~azure.mgmt.loganalytics.models.DataSourceKind - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'properties': {'required': True}, - 'kind': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': 'object'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - } - - def __init__(self, *, properties, kind, tags=None, e_tag: str=None, **kwargs) -> None: - super(DataSource, self).__init__(tags=tags, **kwargs) - self.properties = properties - self.e_tag = e_tag - self.kind = kind diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/intelligence_pack.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/intelligence_pack.py deleted file mode 100644 index d65fb7ef0989..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/intelligence_pack.py +++ /dev/null @@ -1,37 +0,0 @@ -# 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 IntelligencePack(Model): - """Intelligence Pack containing a string name and boolean indicating if it's - enabled. - - :param name: The name of the intelligence pack. - :type name: str - :param enabled: The enabled boolean for the intelligence pack. - :type enabled: bool - :param display_name: The display name of the intelligence pack. - :type display_name: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(IntelligencePack, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.enabled = kwargs.get('enabled', None) - self.display_name = kwargs.get('display_name', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/intelligence_pack_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/intelligence_pack_py3.py deleted file mode 100644 index 0cc4b30790a1..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/intelligence_pack_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# 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 IntelligencePack(Model): - """Intelligence Pack containing a string name and boolean indicating if it's - enabled. - - :param name: The name of the intelligence pack. - :type name: str - :param enabled: The enabled boolean for the intelligence pack. - :type enabled: bool - :param display_name: The display name of the intelligence pack. - :type display_name: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, enabled: bool=None, display_name: str=None, **kwargs) -> None: - super(IntelligencePack, self).__init__(**kwargs) - self.name = name - self.enabled = enabled - self.display_name = display_name diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/link_target.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/link_target.py deleted file mode 100644 index bd3839982bd6..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/link_target.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 LinkTarget(Model): - """Metadata for a workspace that isn't linked to an Azure subscription. - - :param customer_id: The GUID that uniquely identifies the workspace. - :type customer_id: str - :param display_name: The display name of the workspace. - :type display_name: str - :param workspace_name: The DNS valid workspace name. - :type workspace_name: str - :param location: The location of the workspace. - :type location: str - """ - - _attribute_map = { - 'customer_id': {'key': 'customerId', 'type': 'str'}, - 'display_name': {'key': 'accountName', 'type': 'str'}, - 'workspace_name': {'key': 'workspaceName', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LinkTarget, self).__init__(**kwargs) - self.customer_id = kwargs.get('customer_id', None) - self.display_name = kwargs.get('display_name', None) - self.workspace_name = kwargs.get('workspace_name', None) - self.location = kwargs.get('location', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/link_target_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/link_target_py3.py deleted file mode 100644 index cbc600ad0573..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/link_target_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 LinkTarget(Model): - """Metadata for a workspace that isn't linked to an Azure subscription. - - :param customer_id: The GUID that uniquely identifies the workspace. - :type customer_id: str - :param display_name: The display name of the workspace. - :type display_name: str - :param workspace_name: The DNS valid workspace name. - :type workspace_name: str - :param location: The location of the workspace. - :type location: str - """ - - _attribute_map = { - 'customer_id': {'key': 'customerId', 'type': 'str'}, - 'display_name': {'key': 'accountName', 'type': 'str'}, - 'workspace_name': {'key': 'workspaceName', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, *, customer_id: str=None, display_name: str=None, workspace_name: str=None, location: str=None, **kwargs) -> None: - super(LinkTarget, self).__init__(**kwargs) - self.customer_id = customer_id - self.display_name = display_name - self.workspace_name = workspace_name - self.location = location diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/linked_service.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/linked_service.py deleted file mode 100644 index 3ffe0205654e..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/linked_service.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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 .proxy_resource import ProxyResource - - -class LinkedService(ProxyResource): - """The top level Linked service resource container. - - 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. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param tags: Resource tags - :type tags: dict[str, str] - :param resource_id: Required. The resource id of the resource that will be - linked to the workspace. - :type resource_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'resource_id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LinkedService, self).__init__(**kwargs) - self.resource_id = kwargs.get('resource_id', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/linked_service_paged.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/linked_service_paged.py deleted file mode 100644 index 92f1945e8f28..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/linked_service_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 LinkedServicePaged(Paged): - """ - A paging container for iterating over a list of :class:`LinkedService ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[LinkedService]'} - } - - def __init__(self, *args, **kwargs): - - super(LinkedServicePaged, self).__init__(*args, **kwargs) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/linked_service_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/linked_service_py3.py deleted file mode 100644 index 2717ac4bd8a6..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/linked_service_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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 .proxy_resource_py3 import ProxyResource - - -class LinkedService(ProxyResource): - """The top level Linked service resource container. - - 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. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param tags: Resource tags - :type tags: dict[str, str] - :param resource_id: Required. The resource id of the resource that will be - linked to the workspace. - :type resource_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'resource_id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str, tags=None, **kwargs) -> None: - super(LinkedService, self).__init__(tags=tags, **kwargs) - self.resource_id = resource_id diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/management_group.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/management_group.py deleted file mode 100644 index 1b79c460ce45..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/management_group.py +++ /dev/null @@ -1,61 +0,0 @@ -# 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 ManagementGroup(Model): - """A management group that is connected to a workspace. - - :param server_count: The number of servers connected to the management - group. - :type server_count: int - :param is_gateway: Gets or sets a value indicating whether the management - group is a gateway. - :type is_gateway: bool - :param name: The name of the management group. - :type name: str - :param id: The unique ID of the management group. - :type id: str - :param created: The datetime that the management group was created. - :type created: datetime - :param data_received: The last datetime that the management group received - data. - :type data_received: datetime - :param version: The version of System Center that is managing the - management group. - :type version: str - :param sku: The SKU of System Center that is managing the management - group. - :type sku: str - """ - - _attribute_map = { - 'server_count': {'key': 'properties.serverCount', 'type': 'int'}, - 'is_gateway': {'key': 'properties.isGateway', 'type': 'bool'}, - 'name': {'key': 'properties.name', 'type': 'str'}, - 'id': {'key': 'properties.id', 'type': 'str'}, - 'created': {'key': 'properties.created', 'type': 'iso-8601'}, - 'data_received': {'key': 'properties.dataReceived', 'type': 'iso-8601'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'sku': {'key': 'properties.sku', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagementGroup, self).__init__(**kwargs) - self.server_count = kwargs.get('server_count', None) - self.is_gateway = kwargs.get('is_gateway', None) - self.name = kwargs.get('name', None) - self.id = kwargs.get('id', None) - self.created = kwargs.get('created', None) - self.data_received = kwargs.get('data_received', None) - self.version = kwargs.get('version', None) - self.sku = kwargs.get('sku', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/management_group_paged.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/management_group_paged.py deleted file mode 100644 index 04ad8581510f..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/management_group_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 ManagementGroupPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagementGroup ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagementGroup]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagementGroupPaged, self).__init__(*args, **kwargs) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/management_group_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/management_group_py3.py deleted file mode 100644 index 5a0d9a535bfe..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/management_group_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# 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 ManagementGroup(Model): - """A management group that is connected to a workspace. - - :param server_count: The number of servers connected to the management - group. - :type server_count: int - :param is_gateway: Gets or sets a value indicating whether the management - group is a gateway. - :type is_gateway: bool - :param name: The name of the management group. - :type name: str - :param id: The unique ID of the management group. - :type id: str - :param created: The datetime that the management group was created. - :type created: datetime - :param data_received: The last datetime that the management group received - data. - :type data_received: datetime - :param version: The version of System Center that is managing the - management group. - :type version: str - :param sku: The SKU of System Center that is managing the management - group. - :type sku: str - """ - - _attribute_map = { - 'server_count': {'key': 'properties.serverCount', 'type': 'int'}, - 'is_gateway': {'key': 'properties.isGateway', 'type': 'bool'}, - 'name': {'key': 'properties.name', 'type': 'str'}, - 'id': {'key': 'properties.id', 'type': 'str'}, - 'created': {'key': 'properties.created', 'type': 'iso-8601'}, - 'data_received': {'key': 'properties.dataReceived', 'type': 'iso-8601'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'sku': {'key': 'properties.sku', 'type': 'str'}, - } - - def __init__(self, *, server_count: int=None, is_gateway: bool=None, name: str=None, id: str=None, created=None, data_received=None, version: str=None, sku: str=None, **kwargs) -> None: - super(ManagementGroup, self).__init__(**kwargs) - self.server_count = server_count - self.is_gateway = is_gateway - self.name = name - self.id = id - self.created = created - self.data_received = data_received - self.version = version - self.sku = sku diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/metric_name.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/metric_name.py deleted file mode 100644 index 36482f58ac5f..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/metric_name.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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 MetricName(Model): - """The name of a metric. - - :param value: The system name of the metric. - :type value: str - :param localized_value: The localized name of the metric. - :type localized_value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MetricName, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.localized_value = kwargs.get('localized_value', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/metric_name_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/metric_name_py3.py deleted file mode 100644 index 515822cf3d47..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/metric_name_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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 MetricName(Model): - """The name of a metric. - - :param value: The system name of the metric. - :type value: str - :param localized_value: The localized name of the metric. - :type localized_value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__(self, *, value: str=None, localized_value: str=None, **kwargs) -> None: - super(MetricName, self).__init__(**kwargs) - self.value = value - self.localized_value = localized_value diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation.py deleted file mode 100644 index 26d84d4315aa..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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): - """Supported operation of OperationalInsights resource provider. - - :param name: Operation name: {provider}/{resource}/{operation} - :type name: str - :param display: Display metadata associated with the operation. - :type display: ~azure.mgmt.loganalytics.models.OperationDisplay - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display = kwargs.get('display', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation_display.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation_display.py deleted file mode 100644 index 97f173941c27..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation_display.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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 OperationsManagement. - :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 - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', '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) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation_display_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation_display_py3.py deleted file mode 100644 index c5c2afad0bef..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation_display_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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 OperationsManagement. - :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 - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - } - - def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, **kwargs) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = provider - self.resource = resource - self.operation = operation diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation_paged.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation_paged.py deleted file mode 100644 index e9cb0c61e3f6..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation_py3.py deleted file mode 100644 index 22e7ddff5ccf..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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): - """Supported operation of OperationalInsights resource provider. - - :param name: Operation name: {provider}/{resource}/{operation} - :type name: str - :param display: Display metadata associated with the operation. - :type display: ~azure.mgmt.loganalytics.models.OperationDisplay - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, *, name: str=None, display=None, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = name - self.display = display diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/proxy_resource.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/proxy_resource.py deleted file mode 100644 index e15c31fdd01f..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/proxy_resource.py +++ /dev/null @@ -1,49 +0,0 @@ -# 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 ProxyResource(Model): - """Common properties of proxy resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ProxyResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.tags = kwargs.get('tags', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/proxy_resource_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/proxy_resource_py3.py deleted file mode 100644 index 89cd0dab699f..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/proxy_resource_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# 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 ProxyResource(Model): - """Common properties of proxy resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(ProxyResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.tags = tags diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/resource.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/resource.py deleted file mode 100644 index 8e4d6b9bdb23..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/resource.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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 Resource(Model): - """The resource definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'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}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/resource_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/resource_py3.py deleted file mode 100644 index 95d57d535d37..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/resource_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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 Resource(Model): - """The resource definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'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}'}, - } - - def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/saved_search.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/saved_search.py deleted file mode 100644 index 7617dcd99070..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/saved_search.py +++ /dev/null @@ -1,80 +0,0 @@ -# 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 SavedSearch(Model): - """Value object for saved search results. - - 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. - - :ivar id: The id of the saved search. - :vartype id: str - :ivar name: The name of the saved search. - :vartype name: str - :ivar type: The type of the saved search. - :vartype type: str - :param e_tag: The etag of the saved search. - :type e_tag: str - :param category: Required. The category of the saved search. This helps - the user to find a saved search faster. - :type category: str - :param display_name: Required. Saved search display name. - :type display_name: str - :param query: Required. The query expression for the saved search. Please - see - https://docs.microsoft.com/en-us/azure/log-analytics/log-analytics-search-reference - for reference. - :type query: str - :param version: Required. The version number of the query lanuage. Only - verion 1 is allowed here. - :type version: long - :param tags: The tags attached to the saved search. - :type tags: list[~azure.mgmt.loganalytics.models.Tag] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'category': {'required': True}, - 'display_name': {'required': True}, - 'query': {'required': True}, - 'version': {'required': True, 'maximum': 1, 'minimum': 1}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - 'category': {'key': 'properties.category', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'query': {'key': 'properties.query', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'long'}, - 'tags': {'key': 'properties.tags', 'type': '[Tag]'}, - } - - def __init__(self, **kwargs): - super(SavedSearch, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.e_tag = kwargs.get('e_tag', None) - self.category = kwargs.get('category', None) - self.display_name = kwargs.get('display_name', None) - self.query = kwargs.get('query', None) - self.version = kwargs.get('version', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/saved_search_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/saved_search_py3.py deleted file mode 100644 index a994394bfc7a..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/saved_search_py3.py +++ /dev/null @@ -1,80 +0,0 @@ -# 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 SavedSearch(Model): - """Value object for saved search results. - - 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. - - :ivar id: The id of the saved search. - :vartype id: str - :ivar name: The name of the saved search. - :vartype name: str - :ivar type: The type of the saved search. - :vartype type: str - :param e_tag: The etag of the saved search. - :type e_tag: str - :param category: Required. The category of the saved search. This helps - the user to find a saved search faster. - :type category: str - :param display_name: Required. Saved search display name. - :type display_name: str - :param query: Required. The query expression for the saved search. Please - see - https://docs.microsoft.com/en-us/azure/log-analytics/log-analytics-search-reference - for reference. - :type query: str - :param version: Required. The version number of the query lanuage. Only - verion 1 is allowed here. - :type version: long - :param tags: The tags attached to the saved search. - :type tags: list[~azure.mgmt.loganalytics.models.Tag] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'category': {'required': True}, - 'display_name': {'required': True}, - 'query': {'required': True}, - 'version': {'required': True, 'maximum': 1, 'minimum': 1}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - 'category': {'key': 'properties.category', 'type': 'str'}, - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'query': {'key': 'properties.query', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'long'}, - 'tags': {'key': 'properties.tags', 'type': '[Tag]'}, - } - - def __init__(self, *, category: str, display_name: str, query: str, version: int, e_tag: str=None, tags=None, **kwargs) -> None: - super(SavedSearch, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.e_tag = e_tag - self.category = category - self.display_name = display_name - self.query = query - self.version = version - self.tags = tags diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/saved_searches_list_result.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/saved_searches_list_result.py deleted file mode 100644 index 74509ad4e0d2..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/saved_searches_list_result.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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 SavedSearchesListResult(Model): - """The saved search operation response. - - :param metadata: The metadata from search results. - :type metadata: ~azure.mgmt.loganalytics.models.SearchMetadata - :param value: The array of result values. - :type value: list[~azure.mgmt.loganalytics.models.SavedSearch] - """ - - _attribute_map = { - 'metadata': {'key': 'metaData', 'type': 'SearchMetadata'}, - 'value': {'key': 'value', 'type': '[SavedSearch]'}, - } - - def __init__(self, **kwargs): - super(SavedSearchesListResult, self).__init__(**kwargs) - self.metadata = kwargs.get('metadata', None) - self.value = kwargs.get('value', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/saved_searches_list_result_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/saved_searches_list_result_py3.py deleted file mode 100644 index 10f174732fdc..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/saved_searches_list_result_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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 SavedSearchesListResult(Model): - """The saved search operation response. - - :param metadata: The metadata from search results. - :type metadata: ~azure.mgmt.loganalytics.models.SearchMetadata - :param value: The array of result values. - :type value: list[~azure.mgmt.loganalytics.models.SavedSearch] - """ - - _attribute_map = { - 'metadata': {'key': 'metaData', 'type': 'SearchMetadata'}, - 'value': {'key': 'value', 'type': '[SavedSearch]'}, - } - - def __init__(self, *, metadata=None, value=None, **kwargs) -> None: - super(SavedSearchesListResult, self).__init__(**kwargs) - self.metadata = metadata - self.value = value diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_error.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_error.py deleted file mode 100644 index 159823f38749..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_error.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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 SearchError(Model): - """Details for a search error. - - :param type: The error type. - :type type: str - :param message: The error message. - :type message: str - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SearchError, self).__init__(**kwargs) - self.type = kwargs.get('type', None) - self.message = kwargs.get('message', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_error_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_error_py3.py deleted file mode 100644 index 9b093afea61d..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_error_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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 SearchError(Model): - """Details for a search error. - - :param type: The error type. - :type type: str - :param message: The error message. - :type message: str - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, type: str=None, message: str=None, **kwargs) -> None: - super(SearchError, self).__init__(**kwargs) - self.type = type - self.message = message diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_get_schema_response.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_get_schema_response.py deleted file mode 100644 index 91e914734fc0..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_get_schema_response.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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 SearchGetSchemaResponse(Model): - """The get schema operation response. - - :param metadata: The metadata from search results. - :type metadata: ~azure.mgmt.loganalytics.models.SearchMetadata - :param value: The array of result values. - :type value: list[~azure.mgmt.loganalytics.models.SearchSchemaValue] - """ - - _attribute_map = { - 'metadata': {'key': 'metadata', 'type': 'SearchMetadata'}, - 'value': {'key': 'value', 'type': '[SearchSchemaValue]'}, - } - - def __init__(self, **kwargs): - super(SearchGetSchemaResponse, self).__init__(**kwargs) - self.metadata = kwargs.get('metadata', None) - self.value = kwargs.get('value', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_get_schema_response_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_get_schema_response_py3.py deleted file mode 100644 index 7d64e05b18df..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_get_schema_response_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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 SearchGetSchemaResponse(Model): - """The get schema operation response. - - :param metadata: The metadata from search results. - :type metadata: ~azure.mgmt.loganalytics.models.SearchMetadata - :param value: The array of result values. - :type value: list[~azure.mgmt.loganalytics.models.SearchSchemaValue] - """ - - _attribute_map = { - 'metadata': {'key': 'metadata', 'type': 'SearchMetadata'}, - 'value': {'key': 'value', 'type': '[SearchSchemaValue]'}, - } - - def __init__(self, *, metadata=None, value=None, **kwargs) -> None: - super(SearchGetSchemaResponse, self).__init__(**kwargs) - self.metadata = metadata - self.value = value diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_highlight.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_highlight.py deleted file mode 100644 index d4b7b292cb1c..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_highlight.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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 SearchHighlight(Model): - """Highlight details. - - :param pre: The string that is put before a matched result. - :type pre: str - :param post: The string that is put after a matched result. - :type post: str - """ - - _attribute_map = { - 'pre': {'key': 'pre', 'type': 'str'}, - 'post': {'key': 'post', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SearchHighlight, self).__init__(**kwargs) - self.pre = kwargs.get('pre', None) - self.post = kwargs.get('post', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_highlight_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_highlight_py3.py deleted file mode 100644 index d427d47c3824..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_highlight_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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 SearchHighlight(Model): - """Highlight details. - - :param pre: The string that is put before a matched result. - :type pre: str - :param post: The string that is put after a matched result. - :type post: str - """ - - _attribute_map = { - 'pre': {'key': 'pre', 'type': 'str'}, - 'post': {'key': 'post', 'type': 'str'}, - } - - def __init__(self, *, pre: str=None, post: str=None, **kwargs) -> None: - super(SearchHighlight, self).__init__(**kwargs) - self.pre = pre - self.post = post diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_metadata.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_metadata.py deleted file mode 100644 index ba7f7a3dcffc..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_metadata.py +++ /dev/null @@ -1,92 +0,0 @@ -# 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 SearchMetadata(Model): - """Metadata for search results. - - :param search_id: The request id of the search. - :type search_id: str - :param result_type: The search result type. - :type result_type: str - :param total: The total number of search results. - :type total: long - :param top: The number of top search results. - :type top: long - :param id: The id of the search results request. - :type id: str - :param core_summaries: The core summaries. - :type core_summaries: list[~azure.mgmt.loganalytics.models.CoreSummary] - :param status: The status of the search results. - :type status: str - :param start_time: The start time for the search. - :type start_time: datetime - :param last_updated: The time of last update. - :type last_updated: datetime - :param e_tag: The ETag of the search results. - :type e_tag: str - :param sort: How the results are sorted. - :type sort: list[~azure.mgmt.loganalytics.models.SearchSort] - :param request_time: The request time. - :type request_time: long - :param aggregated_value_field: The aggregated value field. - :type aggregated_value_field: str - :param aggregated_grouping_fields: The aggregated grouping fields. - :type aggregated_grouping_fields: str - :param sum: The sum of all aggregates returned in the result set. - :type sum: long - :param max: The max of all aggregates returned in the result set. - :type max: long - :param schema: The schema. - :type schema: ~azure.mgmt.loganalytics.models.SearchMetadataSchema - """ - - _attribute_map = { - 'search_id': {'key': 'requestId', 'type': 'str'}, - 'result_type': {'key': 'resultType', 'type': 'str'}, - 'total': {'key': 'total', 'type': 'long'}, - 'top': {'key': 'top', 'type': 'long'}, - 'id': {'key': 'id', 'type': 'str'}, - 'core_summaries': {'key': 'coreSummaries', 'type': '[CoreSummary]'}, - 'status': {'key': 'status', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'last_updated': {'key': 'lastUpdated', 'type': 'iso-8601'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - 'sort': {'key': 'sort', 'type': '[SearchSort]'}, - 'request_time': {'key': 'requestTime', 'type': 'long'}, - 'aggregated_value_field': {'key': 'aggregatedValueField', 'type': 'str'}, - 'aggregated_grouping_fields': {'key': 'aggregatedGroupingFields', 'type': 'str'}, - 'sum': {'key': 'sum', 'type': 'long'}, - 'max': {'key': 'max', 'type': 'long'}, - 'schema': {'key': 'schema', 'type': 'SearchMetadataSchema'}, - } - - def __init__(self, **kwargs): - super(SearchMetadata, self).__init__(**kwargs) - self.search_id = kwargs.get('search_id', None) - self.result_type = kwargs.get('result_type', None) - self.total = kwargs.get('total', None) - self.top = kwargs.get('top', None) - self.id = kwargs.get('id', None) - self.core_summaries = kwargs.get('core_summaries', None) - self.status = kwargs.get('status', None) - self.start_time = kwargs.get('start_time', None) - self.last_updated = kwargs.get('last_updated', None) - self.e_tag = kwargs.get('e_tag', None) - self.sort = kwargs.get('sort', None) - self.request_time = kwargs.get('request_time', None) - self.aggregated_value_field = kwargs.get('aggregated_value_field', None) - self.aggregated_grouping_fields = kwargs.get('aggregated_grouping_fields', None) - self.sum = kwargs.get('sum', None) - self.max = kwargs.get('max', None) - self.schema = kwargs.get('schema', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_metadata_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_metadata_py3.py deleted file mode 100644 index 11793a3e9b88..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_metadata_py3.py +++ /dev/null @@ -1,92 +0,0 @@ -# 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 SearchMetadata(Model): - """Metadata for search results. - - :param search_id: The request id of the search. - :type search_id: str - :param result_type: The search result type. - :type result_type: str - :param total: The total number of search results. - :type total: long - :param top: The number of top search results. - :type top: long - :param id: The id of the search results request. - :type id: str - :param core_summaries: The core summaries. - :type core_summaries: list[~azure.mgmt.loganalytics.models.CoreSummary] - :param status: The status of the search results. - :type status: str - :param start_time: The start time for the search. - :type start_time: datetime - :param last_updated: The time of last update. - :type last_updated: datetime - :param e_tag: The ETag of the search results. - :type e_tag: str - :param sort: How the results are sorted. - :type sort: list[~azure.mgmt.loganalytics.models.SearchSort] - :param request_time: The request time. - :type request_time: long - :param aggregated_value_field: The aggregated value field. - :type aggregated_value_field: str - :param aggregated_grouping_fields: The aggregated grouping fields. - :type aggregated_grouping_fields: str - :param sum: The sum of all aggregates returned in the result set. - :type sum: long - :param max: The max of all aggregates returned in the result set. - :type max: long - :param schema: The schema. - :type schema: ~azure.mgmt.loganalytics.models.SearchMetadataSchema - """ - - _attribute_map = { - 'search_id': {'key': 'requestId', 'type': 'str'}, - 'result_type': {'key': 'resultType', 'type': 'str'}, - 'total': {'key': 'total', 'type': 'long'}, - 'top': {'key': 'top', 'type': 'long'}, - 'id': {'key': 'id', 'type': 'str'}, - 'core_summaries': {'key': 'coreSummaries', 'type': '[CoreSummary]'}, - 'status': {'key': 'status', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'last_updated': {'key': 'lastUpdated', 'type': 'iso-8601'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - 'sort': {'key': 'sort', 'type': '[SearchSort]'}, - 'request_time': {'key': 'requestTime', 'type': 'long'}, - 'aggregated_value_field': {'key': 'aggregatedValueField', 'type': 'str'}, - 'aggregated_grouping_fields': {'key': 'aggregatedGroupingFields', 'type': 'str'}, - 'sum': {'key': 'sum', 'type': 'long'}, - 'max': {'key': 'max', 'type': 'long'}, - 'schema': {'key': 'schema', 'type': 'SearchMetadataSchema'}, - } - - def __init__(self, *, search_id: str=None, result_type: str=None, total: int=None, top: int=None, id: str=None, core_summaries=None, status: str=None, start_time=None, last_updated=None, e_tag: str=None, sort=None, request_time: int=None, aggregated_value_field: str=None, aggregated_grouping_fields: str=None, sum: int=None, max: int=None, schema=None, **kwargs) -> None: - super(SearchMetadata, self).__init__(**kwargs) - self.search_id = search_id - self.result_type = result_type - self.total = total - self.top = top - self.id = id - self.core_summaries = core_summaries - self.status = status - self.start_time = start_time - self.last_updated = last_updated - self.e_tag = e_tag - self.sort = sort - self.request_time = request_time - self.aggregated_value_field = aggregated_value_field - self.aggregated_grouping_fields = aggregated_grouping_fields - self.sum = sum - self.max = max - self.schema = schema diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_metadata_schema.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_metadata_schema.py deleted file mode 100644 index 81238273f963..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_metadata_schema.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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 SearchMetadataSchema(Model): - """Schema metadata for search. - - :param name: The name of the metadata schema. - :type name: str - :param version: The version of the metadata schema. - :type version: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(SearchMetadataSchema, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.version = kwargs.get('version', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_metadata_schema_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_metadata_schema_py3.py deleted file mode 100644 index 530524c2606d..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_metadata_schema_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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 SearchMetadataSchema(Model): - """Schema metadata for search. - - :param name: The name of the metadata schema. - :type name: str - :param version: The version of the metadata schema. - :type version: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'int'}, - } - - def __init__(self, *, name: str=None, version: int=None, **kwargs) -> None: - super(SearchMetadataSchema, self).__init__(**kwargs) - self.name = name - self.version = version diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_parameters.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_parameters.py deleted file mode 100644 index 721438021b2d..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_parameters.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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 SearchParameters(Model): - """Parameters specifying the search query and range. - - All required parameters must be populated in order to send to Azure. - - :param top: The number to get from the top. - :type top: long - :param highlight: The highlight that looks for all occurences of a string. - :type highlight: ~azure.mgmt.loganalytics.models.SearchHighlight - :param query: Required. The query to search. - :type query: str - :param start: The start date filter, so the only query results returned - are after this date. - :type start: datetime - :param end: The end date filter, so the only query results returned are - before this date. - :type end: datetime - """ - - _validation = { - 'query': {'required': True}, - } - - _attribute_map = { - 'top': {'key': 'top', 'type': 'long'}, - 'highlight': {'key': 'highlight', 'type': 'SearchHighlight'}, - 'query': {'key': 'query', 'type': 'str'}, - 'start': {'key': 'start', 'type': 'iso-8601'}, - 'end': {'key': 'end', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(SearchParameters, self).__init__(**kwargs) - self.top = kwargs.get('top', None) - self.highlight = kwargs.get('highlight', None) - self.query = kwargs.get('query', None) - self.start = kwargs.get('start', None) - self.end = kwargs.get('end', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_parameters_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_parameters_py3.py deleted file mode 100644 index 8789f694abfc..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_parameters_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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 SearchParameters(Model): - """Parameters specifying the search query and range. - - All required parameters must be populated in order to send to Azure. - - :param top: The number to get from the top. - :type top: long - :param highlight: The highlight that looks for all occurences of a string. - :type highlight: ~azure.mgmt.loganalytics.models.SearchHighlight - :param query: Required. The query to search. - :type query: str - :param start: The start date filter, so the only query results returned - are after this date. - :type start: datetime - :param end: The end date filter, so the only query results returned are - before this date. - :type end: datetime - """ - - _validation = { - 'query': {'required': True}, - } - - _attribute_map = { - 'top': {'key': 'top', 'type': 'long'}, - 'highlight': {'key': 'highlight', 'type': 'SearchHighlight'}, - 'query': {'key': 'query', 'type': 'str'}, - 'start': {'key': 'start', 'type': 'iso-8601'}, - 'end': {'key': 'end', 'type': 'iso-8601'}, - } - - def __init__(self, *, query: str, top: int=None, highlight=None, start=None, end=None, **kwargs) -> None: - super(SearchParameters, self).__init__(**kwargs) - self.top = top - self.highlight = highlight - self.query = query - self.start = start - self.end = end diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_results_response.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_results_response.py deleted file mode 100644 index 88b9f99bcfe0..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_results_response.py +++ /dev/null @@ -1,47 +0,0 @@ -# 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 SearchResultsResponse(Model): - """The get search result operation response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The id of the search, which includes the full url. - :vartype id: str - :param metadata: The metadata from search results. - :type metadata: ~azure.mgmt.loganalytics.models.SearchMetadata - :param value: The array of result values. - :type value: list[object] - :param error: The error. - :type error: ~azure.mgmt.loganalytics.models.SearchError - """ - - _validation = { - 'id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'metadata': {'key': 'metaData', 'type': 'SearchMetadata'}, - 'value': {'key': 'value', 'type': '[object]'}, - 'error': {'key': 'error', 'type': 'SearchError'}, - } - - def __init__(self, **kwargs): - super(SearchResultsResponse, self).__init__(**kwargs) - self.id = None - self.metadata = kwargs.get('metadata', None) - self.value = kwargs.get('value', None) - self.error = kwargs.get('error', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_results_response_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_results_response_py3.py deleted file mode 100644 index 414d2aae709b..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_results_response_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# 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 SearchResultsResponse(Model): - """The get search result operation response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The id of the search, which includes the full url. - :vartype id: str - :param metadata: The metadata from search results. - :type metadata: ~azure.mgmt.loganalytics.models.SearchMetadata - :param value: The array of result values. - :type value: list[object] - :param error: The error. - :type error: ~azure.mgmt.loganalytics.models.SearchError - """ - - _validation = { - 'id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'metadata': {'key': 'metaData', 'type': 'SearchMetadata'}, - 'value': {'key': 'value', 'type': '[object]'}, - 'error': {'key': 'error', 'type': 'SearchError'}, - } - - def __init__(self, *, metadata=None, value=None, error=None, **kwargs) -> None: - super(SearchResultsResponse, self).__init__(**kwargs) - self.id = None - self.metadata = metadata - self.value = value - self.error = error diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_schema_value.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_schema_value.py deleted file mode 100644 index 56fe3e7089a6..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_schema_value.py +++ /dev/null @@ -1,63 +0,0 @@ -# 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 SearchSchemaValue(Model): - """Value object for schema results. - - All required parameters must be populated in order to send to Azure. - - :param name: The name of the schema. - :type name: str - :param display_name: The display name of the schema. - :type display_name: str - :param type: The type. - :type type: str - :param indexed: Required. The boolean that indicates the field is - searchable as free text. - :type indexed: bool - :param stored: Required. The boolean that indicates whether or not the - field is stored. - :type stored: bool - :param facet: Required. The boolean that indicates whether or not the - field is a facet. - :type facet: bool - :param owner_type: The array of workflows containing the field. - :type owner_type: list[str] - """ - - _validation = { - 'indexed': {'required': True}, - 'stored': {'required': True}, - 'facet': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'indexed': {'key': 'indexed', 'type': 'bool'}, - 'stored': {'key': 'stored', 'type': 'bool'}, - 'facet': {'key': 'facet', 'type': 'bool'}, - 'owner_type': {'key': 'ownerType', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(SearchSchemaValue, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display_name = kwargs.get('display_name', None) - self.type = kwargs.get('type', None) - self.indexed = kwargs.get('indexed', None) - self.stored = kwargs.get('stored', None) - self.facet = kwargs.get('facet', None) - self.owner_type = kwargs.get('owner_type', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_schema_value_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_schema_value_py3.py deleted file mode 100644 index f29fd92f0aa4..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_schema_value_py3.py +++ /dev/null @@ -1,63 +0,0 @@ -# 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 SearchSchemaValue(Model): - """Value object for schema results. - - All required parameters must be populated in order to send to Azure. - - :param name: The name of the schema. - :type name: str - :param display_name: The display name of the schema. - :type display_name: str - :param type: The type. - :type type: str - :param indexed: Required. The boolean that indicates the field is - searchable as free text. - :type indexed: bool - :param stored: Required. The boolean that indicates whether or not the - field is stored. - :type stored: bool - :param facet: Required. The boolean that indicates whether or not the - field is a facet. - :type facet: bool - :param owner_type: The array of workflows containing the field. - :type owner_type: list[str] - """ - - _validation = { - 'indexed': {'required': True}, - 'stored': {'required': True}, - 'facet': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'indexed': {'key': 'indexed', 'type': 'bool'}, - 'stored': {'key': 'stored', 'type': 'bool'}, - 'facet': {'key': 'facet', 'type': 'bool'}, - 'owner_type': {'key': 'ownerType', 'type': '[str]'}, - } - - def __init__(self, *, indexed: bool, stored: bool, facet: bool, name: str=None, display_name: str=None, type: str=None, owner_type=None, **kwargs) -> None: - super(SearchSchemaValue, self).__init__(**kwargs) - self.name = name - self.display_name = display_name - self.type = type - self.indexed = indexed - self.stored = stored - self.facet = facet - self.owner_type = owner_type diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_sort.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_sort.py deleted file mode 100644 index 2abb299ee3fd..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_sort.py +++ /dev/null @@ -1,33 +0,0 @@ -# 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 SearchSort(Model): - """The sort parameters for search. - - :param name: The name of the field the search query is sorted on. - :type name: str - :param order: The sort order of the search. Possible values include: - 'asc', 'desc' - :type order: str or ~azure.mgmt.loganalytics.models.SearchSortEnum - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'order': {'key': 'order', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SearchSort, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.order = kwargs.get('order', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_sort_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_sort_py3.py deleted file mode 100644 index 2e6c85535685..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_sort_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# 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 SearchSort(Model): - """The sort parameters for search. - - :param name: The name of the field the search query is sorted on. - :type name: str - :param order: The sort order of the search. Possible values include: - 'asc', 'desc' - :type order: str or ~azure.mgmt.loganalytics.models.SearchSortEnum - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'order': {'key': 'order', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, order=None, **kwargs) -> None: - super(SearchSort, self).__init__(**kwargs) - self.name = name - self.order = order diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/shared_keys.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/shared_keys.py deleted file mode 100644 index 416c872cbbfe..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/shared_keys.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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 SharedKeys(Model): - """The shared keys for a workspace. - - :param primary_shared_key: The primary shared key of a workspace. - :type primary_shared_key: str - :param secondary_shared_key: The secondary shared key of a workspace. - :type secondary_shared_key: str - """ - - _attribute_map = { - 'primary_shared_key': {'key': 'primarySharedKey', 'type': 'str'}, - 'secondary_shared_key': {'key': 'secondarySharedKey', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SharedKeys, self).__init__(**kwargs) - self.primary_shared_key = kwargs.get('primary_shared_key', None) - self.secondary_shared_key = kwargs.get('secondary_shared_key', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/shared_keys_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/shared_keys_py3.py deleted file mode 100644 index 922f0b31cd8e..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/shared_keys_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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 SharedKeys(Model): - """The shared keys for a workspace. - - :param primary_shared_key: The primary shared key of a workspace. - :type primary_shared_key: str - :param secondary_shared_key: The secondary shared key of a workspace. - :type secondary_shared_key: str - """ - - _attribute_map = { - 'primary_shared_key': {'key': 'primarySharedKey', 'type': 'str'}, - 'secondary_shared_key': {'key': 'secondarySharedKey', 'type': 'str'}, - } - - def __init__(self, *, primary_shared_key: str=None, secondary_shared_key: str=None, **kwargs) -> None: - super(SharedKeys, self).__init__(**kwargs) - self.primary_shared_key = primary_shared_key - self.secondary_shared_key = secondary_shared_key diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/sku.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/sku.py deleted file mode 100644 index 73f09793dec9..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/sku.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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 Sku(Model): - """The SKU (tier) of a workspace. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the SKU. Possible values include: - 'Free', 'Standard', 'Premium', 'Unlimited', 'PerNode', 'PerGB2018', - 'Standalone' - :type name: str or ~azure.mgmt.loganalytics.models.SkuNameEnum - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Sku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/sku_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/sku_py3.py deleted file mode 100644 index 41a0c3d4b36b..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/sku_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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 Sku(Model): - """The SKU (tier) of a workspace. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the SKU. Possible values include: - 'Free', 'Standard', 'Premium', 'Unlimited', 'PerNode', 'PerGB2018', - 'Standalone' - :type name: str or ~azure.mgmt.loganalytics.models.SkuNameEnum - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, name, **kwargs) -> None: - super(Sku, self).__init__(**kwargs) - self.name = name diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_account.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_account.py deleted file mode 100644 index d336824ca20c..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_account.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 StorageAccount(Model): - """Describes a storage account connection. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. The Azure Resource Manager ID of the storage account - resource. - :type id: str - :param key: Required. The storage account key. - :type key: str - """ - - _validation = { - 'id': {'required': True}, - 'key': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'key': {'key': 'key', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(StorageAccount, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.key = kwargs.get('key', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_account_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_account_py3.py deleted file mode 100644 index 1df1cc8e83bb..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_account_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 StorageAccount(Model): - """Describes a storage account connection. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. The Azure Resource Manager ID of the storage account - resource. - :type id: str - :param key: Required. The storage account key. - :type key: str - """ - - _validation = { - 'id': {'required': True}, - 'key': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'key': {'key': 'key', 'type': 'str'}, - } - - def __init__(self, *, id: str, key: str, **kwargs) -> None: - super(StorageAccount, self).__init__(**kwargs) - self.id = id - self.key = key diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight.py deleted file mode 100644 index ce9b749756c2..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight.py +++ /dev/null @@ -1,71 +0,0 @@ -# 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 .proxy_resource import ProxyResource - - -class StorageInsight(ProxyResource): - """The top level storage insight resource container. - - 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. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param tags: Resource tags - :type tags: dict[str, str] - :param containers: The names of the blob containers that the workspace - should read - :type containers: list[str] - :param tables: The names of the Azure tables that the workspace should - read - :type tables: list[str] - :param storage_account: Required. The storage account connection details - :type storage_account: ~azure.mgmt.loganalytics.models.StorageAccount - :ivar status: The status of the storage insight - :vartype status: ~azure.mgmt.loganalytics.models.StorageInsightStatus - :param e_tag: The ETag of the storage insight. - :type e_tag: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'storage_account': {'required': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'containers': {'key': 'properties.containers', 'type': '[str]'}, - 'tables': {'key': 'properties.tables', 'type': '[str]'}, - 'storage_account': {'key': 'properties.storageAccount', 'type': 'StorageAccount'}, - 'status': {'key': 'properties.status', 'type': 'StorageInsightStatus'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(StorageInsight, self).__init__(**kwargs) - self.containers = kwargs.get('containers', None) - self.tables = kwargs.get('tables', None) - self.storage_account = kwargs.get('storage_account', None) - self.status = None - self.e_tag = kwargs.get('e_tag', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight_paged.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight_paged.py deleted file mode 100644 index 8aa6b40efaa4..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 StorageInsightPaged(Paged): - """ - A paging container for iterating over a list of :class:`StorageInsight ` object - """ - - _attribute_map = { - 'next_link': {'key': '@odata\\.nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[StorageInsight]'} - } - - def __init__(self, *args, **kwargs): - - super(StorageInsightPaged, self).__init__(*args, **kwargs) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight_py3.py deleted file mode 100644 index 17c3f9624aa9..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight_py3.py +++ /dev/null @@ -1,71 +0,0 @@ -# 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 .proxy_resource_py3 import ProxyResource - - -class StorageInsight(ProxyResource): - """The top level storage insight resource container. - - 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. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param tags: Resource tags - :type tags: dict[str, str] - :param containers: The names of the blob containers that the workspace - should read - :type containers: list[str] - :param tables: The names of the Azure tables that the workspace should - read - :type tables: list[str] - :param storage_account: Required. The storage account connection details - :type storage_account: ~azure.mgmt.loganalytics.models.StorageAccount - :ivar status: The status of the storage insight - :vartype status: ~azure.mgmt.loganalytics.models.StorageInsightStatus - :param e_tag: The ETag of the storage insight. - :type e_tag: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'storage_account': {'required': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'containers': {'key': 'properties.containers', 'type': '[str]'}, - 'tables': {'key': 'properties.tables', 'type': '[str]'}, - 'storage_account': {'key': 'properties.storageAccount', 'type': 'StorageAccount'}, - 'status': {'key': 'properties.status', 'type': 'StorageInsightStatus'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - } - - def __init__(self, *, storage_account, tags=None, containers=None, tables=None, e_tag: str=None, **kwargs) -> None: - super(StorageInsight, self).__init__(tags=tags, **kwargs) - self.containers = containers - self.tables = tables - self.storage_account = storage_account - self.status = None - self.e_tag = e_tag diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight_status.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight_status.py deleted file mode 100644 index 06af6f749f74..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight_status.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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 StorageInsightStatus(Model): - """The status of the storage insight. - - All required parameters must be populated in order to send to Azure. - - :param state: Required. The state of the storage insight connection to the - workspace. Possible values include: 'OK', 'ERROR' - :type state: str or ~azure.mgmt.loganalytics.models.StorageInsightState - :param description: Description of the state of the storage insight. - :type description: str - """ - - _validation = { - 'state': {'required': True}, - } - - _attribute_map = { - 'state': {'key': 'state', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(StorageInsightStatus, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.description = kwargs.get('description', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight_status_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight_status_py3.py deleted file mode 100644 index b30d58481193..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight_status_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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 StorageInsightStatus(Model): - """The status of the storage insight. - - All required parameters must be populated in order to send to Azure. - - :param state: Required. The state of the storage insight connection to the - workspace. Possible values include: 'OK', 'ERROR' - :type state: str or ~azure.mgmt.loganalytics.models.StorageInsightState - :param description: Description of the state of the storage insight. - :type description: str - """ - - _validation = { - 'state': {'required': True}, - } - - _attribute_map = { - 'state': {'key': 'state', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, state, description: str=None, **kwargs) -> None: - super(StorageInsightStatus, self).__init__(**kwargs) - self.state = state - self.description = description diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/tag.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/tag.py deleted file mode 100644 index 416b195fd329..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/tag.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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 Tag(Model): - """A tag of a saved search. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The tag name. - :type name: str - :param value: Required. The tag value. - :type value: str - """ - - _validation = { - 'name': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Tag, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/tag_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/tag_py3.py deleted file mode 100644 index cf70eba079bb..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/tag_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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 Tag(Model): - """A tag of a saved search. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The tag name. - :type name: str - :param value: Required. The tag value. - :type value: str - """ - - _validation = { - 'name': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, name: str, value: str, **kwargs) -> None: - super(Tag, self).__init__(**kwargs) - self.name = name - self.value = value diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/usage_metric.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/usage_metric.py deleted file mode 100644 index 816554809aba..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/usage_metric.py +++ /dev/null @@ -1,49 +0,0 @@ -# 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 UsageMetric(Model): - """A metric describing the usage of a resource. - - :param name: The name of the metric. - :type name: ~azure.mgmt.loganalytics.models.MetricName - :param unit: The units used for the metric. - :type unit: str - :param current_value: The current value of the metric. - :type current_value: float - :param limit: The quota limit for the metric. - :type limit: float - :param next_reset_time: The time that the metric's value will reset. - :type next_reset_time: datetime - :param quota_period: The quota period that determines the length of time - between value resets. - :type quota_period: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'MetricName'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'float'}, - 'limit': {'key': 'limit', 'type': 'float'}, - 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, - 'quota_period': {'key': 'quotaPeriod', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UsageMetric, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.unit = kwargs.get('unit', None) - self.current_value = kwargs.get('current_value', None) - self.limit = kwargs.get('limit', None) - self.next_reset_time = kwargs.get('next_reset_time', None) - self.quota_period = kwargs.get('quota_period', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/usage_metric_paged.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/usage_metric_paged.py deleted file mode 100644 index 7b7714ec814f..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/usage_metric_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 UsageMetricPaged(Paged): - """ - A paging container for iterating over a list of :class:`UsageMetric ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[UsageMetric]'} - } - - def __init__(self, *args, **kwargs): - - super(UsageMetricPaged, self).__init__(*args, **kwargs) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/usage_metric_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/usage_metric_py3.py deleted file mode 100644 index bb30a63af48e..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/usage_metric_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# 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 UsageMetric(Model): - """A metric describing the usage of a resource. - - :param name: The name of the metric. - :type name: ~azure.mgmt.loganalytics.models.MetricName - :param unit: The units used for the metric. - :type unit: str - :param current_value: The current value of the metric. - :type current_value: float - :param limit: The quota limit for the metric. - :type limit: float - :param next_reset_time: The time that the metric's value will reset. - :type next_reset_time: datetime - :param quota_period: The quota period that determines the length of time - between value resets. - :type quota_period: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'MetricName'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'float'}, - 'limit': {'key': 'limit', 'type': 'float'}, - 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, - 'quota_period': {'key': 'quotaPeriod', 'type': 'str'}, - } - - def __init__(self, *, name=None, unit: str=None, current_value: float=None, limit: float=None, next_reset_time=None, quota_period: str=None, **kwargs) -> None: - super(UsageMetric, self).__init__(**kwargs) - self.name = name - self.unit = unit - self.current_value = current_value - self.limit = limit - self.next_reset_time = next_reset_time - self.quota_period = quota_period diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace.py deleted file mode 100644 index 1fc5acd6142e..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace.py +++ /dev/null @@ -1,89 +0,0 @@ -# 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 Workspace(Resource): - """The top level Workspace resource container. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param provisioning_state: The provisioning state of the workspace. - Possible values include: 'Creating', 'Succeeded', 'Failed', 'Canceled', - 'Deleting', 'ProvisioningAccount' - :type provisioning_state: str or - ~azure.mgmt.loganalytics.models.EntityStatus - :param source: The source of the workspace. Source defines where the - workspace was created. 'Azure' implies it was created in Azure. - 'External' implies it was created via the Operational Insights Portal. - This value is set on the service side and read-only on the client side. - :type source: str - :param customer_id: The ID associated with the workspace. Setting this - value at creation time allows the workspace being created to be linked to - an existing workspace. - :type customer_id: str - :param portal_url: The URL of the Operational Insights portal for this - workspace. This value is set on the service side and read-only on the - client side. - :type portal_url: str - :param sku: The SKU of the workspace. - :type sku: ~azure.mgmt.loganalytics.models.Sku - :param retention_in_days: The workspace data retention in days. -1 means - Unlimited retention for the Unlimited Sku. 730 days is the maximum allowed - for all other Skus. - :type retention_in_days: int - :param e_tag: The ETag of the workspace. - :type e_tag: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'retention_in_days': {'maximum': 730, 'minimum': -1}, - } - - _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}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'source': {'key': 'properties.source', 'type': 'str'}, - 'customer_id': {'key': 'properties.customerId', 'type': 'str'}, - 'portal_url': {'key': 'properties.portalUrl', 'type': 'str'}, - 'sku': {'key': 'properties.sku', 'type': 'Sku'}, - 'retention_in_days': {'key': 'properties.retentionInDays', 'type': 'int'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Workspace, self).__init__(**kwargs) - self.provisioning_state = kwargs.get('provisioning_state', None) - self.source = kwargs.get('source', None) - self.customer_id = kwargs.get('customer_id', None) - self.portal_url = kwargs.get('portal_url', None) - self.sku = kwargs.get('sku', None) - self.retention_in_days = kwargs.get('retention_in_days', None) - self.e_tag = kwargs.get('e_tag', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_paged.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_paged.py deleted file mode 100644 index f37caf804c88..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 WorkspacePaged(Paged): - """ - A paging container for iterating over a list of :class:`Workspace ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Workspace]'} - } - - def __init__(self, *args, **kwargs): - - super(WorkspacePaged, self).__init__(*args, **kwargs) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_body.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_body.py deleted file mode 100644 index 8b5c2ccb6aa9..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_body.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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 WorkspacePurgeBody(Model): - """Describes the body of a purge request for an App Insights Workspace. - - All required parameters must be populated in order to send to Azure. - - :param table: Required. Table from which to purge data. - :type table: str - :param filters: Required. The set of columns and filters (queries) to run - over them to purge the resulting data. - :type filters: - list[~azure.mgmt.loganalytics.models.WorkspacePurgeBodyFilters] - """ - - _validation = { - 'table': {'required': True}, - 'filters': {'required': True}, - } - - _attribute_map = { - 'table': {'key': 'table', 'type': 'str'}, - 'filters': {'key': 'filters', 'type': '[WorkspacePurgeBodyFilters]'}, - } - - def __init__(self, **kwargs): - super(WorkspacePurgeBody, self).__init__(**kwargs) - self.table = kwargs.get('table', None) - self.filters = kwargs.get('filters', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_body_filters.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_body_filters.py deleted file mode 100644 index 0a9672178f6a..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_body_filters.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 WorkspacePurgeBodyFilters(Model): - """User-defined filters to return data which will be purged from the table. - - :param column: The column of the table over which the given query should - run - :type column: str - :param operator: A query operator to evaluate over the provided column and - value(s). - :type operator: str - :param value: the value for the operator to function over. This can be a - number (e.g., > 100), a string (timestamp >= '2017-09-01') or array of - values. - :type value: object - """ - - _attribute_map = { - 'column': {'key': 'column', 'type': 'str'}, - 'operator': {'key': 'operator', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(WorkspacePurgeBodyFilters, self).__init__(**kwargs) - self.column = kwargs.get('column', None) - self.operator = kwargs.get('operator', None) - self.value = kwargs.get('value', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_body_filters_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_body_filters_py3.py deleted file mode 100644 index e5813d8d8c71..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_body_filters_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 WorkspacePurgeBodyFilters(Model): - """User-defined filters to return data which will be purged from the table. - - :param column: The column of the table over which the given query should - run - :type column: str - :param operator: A query operator to evaluate over the provided column and - value(s). - :type operator: str - :param value: the value for the operator to function over. This can be a - number (e.g., > 100), a string (timestamp >= '2017-09-01') or array of - values. - :type value: object - """ - - _attribute_map = { - 'column': {'key': 'column', 'type': 'str'}, - 'operator': {'key': 'operator', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'object'}, - } - - def __init__(self, *, column: str=None, operator: str=None, value=None, **kwargs) -> None: - super(WorkspacePurgeBodyFilters, self).__init__(**kwargs) - self.column = column - self.operator = operator - self.value = value diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_body_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_body_py3.py deleted file mode 100644 index 5112daee22c5..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_body_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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 WorkspacePurgeBody(Model): - """Describes the body of a purge request for an App Insights Workspace. - - All required parameters must be populated in order to send to Azure. - - :param table: Required. Table from which to purge data. - :type table: str - :param filters: Required. The set of columns and filters (queries) to run - over them to purge the resulting data. - :type filters: - list[~azure.mgmt.loganalytics.models.WorkspacePurgeBodyFilters] - """ - - _validation = { - 'table': {'required': True}, - 'filters': {'required': True}, - } - - _attribute_map = { - 'table': {'key': 'table', 'type': 'str'}, - 'filters': {'key': 'filters', 'type': '[WorkspacePurgeBodyFilters]'}, - } - - def __init__(self, *, table: str, filters, **kwargs) -> None: - super(WorkspacePurgeBody, self).__init__(**kwargs) - self.table = table - self.filters = filters diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_response.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_response.py deleted file mode 100644 index 35d54f2167a6..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_response.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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 WorkspacePurgeResponse(Model): - """Response containing operationId for a specific purge action. - - All required parameters must be populated in order to send to Azure. - - :param operation_id: Required. Id to use when querying for status for a - particular purge operation. - :type operation_id: str - """ - - _validation = { - 'operation_id': {'required': True}, - } - - _attribute_map = { - 'operation_id': {'key': 'operationId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WorkspacePurgeResponse, self).__init__(**kwargs) - self.operation_id = kwargs.get('operation_id', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_response_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_response_py3.py deleted file mode 100644 index 26f7fbc448ae..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_response_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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 WorkspacePurgeResponse(Model): - """Response containing operationId for a specific purge action. - - All required parameters must be populated in order to send to Azure. - - :param operation_id: Required. Id to use when querying for status for a - particular purge operation. - :type operation_id: str - """ - - _validation = { - 'operation_id': {'required': True}, - } - - _attribute_map = { - 'operation_id': {'key': 'operationId', 'type': 'str'}, - } - - def __init__(self, *, operation_id: str, **kwargs) -> None: - super(WorkspacePurgeResponse, self).__init__(**kwargs) - self.operation_id = operation_id diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_status_response.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_status_response.py deleted file mode 100644 index 52216b115125..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_status_response.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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 WorkspacePurgeStatusResponse(Model): - """Response containing status for a specific purge operation. - - All required parameters must be populated in order to send to Azure. - - :param status: Required. Status of the operation represented by the - requested Id. Possible values include: 'Pending', 'Completed' - :type status: str or ~azure.mgmt.loganalytics.models.PurgeState - """ - - _validation = { - 'status': {'required': True}, - } - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WorkspacePurgeStatusResponse, self).__init__(**kwargs) - self.status = kwargs.get('status', None) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_status_response_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_status_response_py3.py deleted file mode 100644 index 09c2dcb4410f..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_status_response_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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 WorkspacePurgeStatusResponse(Model): - """Response containing status for a specific purge operation. - - All required parameters must be populated in order to send to Azure. - - :param status: Required. Status of the operation represented by the - requested Id. Possible values include: 'Pending', 'Completed' - :type status: str or ~azure.mgmt.loganalytics.models.PurgeState - """ - - _validation = { - 'status': {'required': True}, - } - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - } - - def __init__(self, *, status, **kwargs) -> None: - super(WorkspacePurgeStatusResponse, self).__init__(**kwargs) - self.status = status diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_py3.py deleted file mode 100644 index 6c9f42e6d975..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_py3.py +++ /dev/null @@ -1,89 +0,0 @@ -# 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_py3 import Resource - - -class Workspace(Resource): - """The top level Workspace resource container. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param provisioning_state: The provisioning state of the workspace. - Possible values include: 'Creating', 'Succeeded', 'Failed', 'Canceled', - 'Deleting', 'ProvisioningAccount' - :type provisioning_state: str or - ~azure.mgmt.loganalytics.models.EntityStatus - :param source: The source of the workspace. Source defines where the - workspace was created. 'Azure' implies it was created in Azure. - 'External' implies it was created via the Operational Insights Portal. - This value is set on the service side and read-only on the client side. - :type source: str - :param customer_id: The ID associated with the workspace. Setting this - value at creation time allows the workspace being created to be linked to - an existing workspace. - :type customer_id: str - :param portal_url: The URL of the Operational Insights portal for this - workspace. This value is set on the service side and read-only on the - client side. - :type portal_url: str - :param sku: The SKU of the workspace. - :type sku: ~azure.mgmt.loganalytics.models.Sku - :param retention_in_days: The workspace data retention in days. -1 means - Unlimited retention for the Unlimited Sku. 730 days is the maximum allowed - for all other Skus. - :type retention_in_days: int - :param e_tag: The ETag of the workspace. - :type e_tag: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'retention_in_days': {'maximum': 730, 'minimum': -1}, - } - - _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}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'source': {'key': 'properties.source', 'type': 'str'}, - 'customer_id': {'key': 'properties.customerId', 'type': 'str'}, - 'portal_url': {'key': 'properties.portalUrl', 'type': 'str'}, - 'sku': {'key': 'properties.sku', 'type': 'Sku'}, - 'retention_in_days': {'key': 'properties.retentionInDays', 'type': 'int'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, provisioning_state=None, source: str=None, customer_id: str=None, portal_url: str=None, sku=None, retention_in_days: int=None, e_tag: str=None, **kwargs) -> None: - super(Workspace, self).__init__(location=location, tags=tags, **kwargs) - self.provisioning_state = provisioning_state - self.source = source - self.customer_id = customer_id - self.portal_url = portal_url - self.sku = sku - self.retention_in_days = retention_in_days - self.e_tag = e_tag diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/__init__.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/__init__.py index c5ba8a2e6ecf..77a9369d2baa 100644 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/__init__.py +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/__init__.py @@ -9,18 +9,14 @@ # regenerated. # -------------------------------------------------------------------------- -from .storage_insights_operations import StorageInsightsOperations -from .workspaces_operations import WorkspacesOperations -from .saved_searches_operations import SavedSearchesOperations -from .linked_services_operations import LinkedServicesOperations -from .data_sources_operations import DataSourcesOperations -from .operations import Operations +from ._linked_services_operations import LinkedServicesOperations +from ._data_sources_operations import DataSourcesOperations +from ._workspaces_operations import WorkspacesOperations +from ._operations import Operations __all__ = [ - 'StorageInsightsOperations', - 'WorkspacesOperations', - 'SavedSearchesOperations', 'LinkedServicesOperations', 'DataSourcesOperations', + 'WorkspacesOperations', 'Operations', ] diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/data_sources_operations.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_data_sources_operations.py similarity index 92% rename from sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/data_sources_operations.py rename to sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_data_sources_operations.py index 24b70947dd5b..82d1f4f174f5 100644 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/data_sources_operations.py +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_data_sources_operations.py @@ -19,6 +19,8 @@ class DataSourcesOperations(object): """DataSourcesOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -78,6 +80,7 @@ def create_or_update( # 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()) @@ -90,9 +93,8 @@ def create_or_update( body_content = self._serialize.body(parameters, 'DataSource') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -100,7 +102,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DataSource', response) if response.status_code == 201: @@ -150,7 +151,6 @@ def delete( # Construct headers header_parameters = {} - 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: @@ -159,8 +159,8 @@ def delete( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -210,7 +210,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -219,8 +219,8 @@ def get( 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) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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) @@ -228,7 +228,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('DataSource', response) @@ -264,8 +263,7 @@ def list_by_workspace( ~azure.mgmt.loganalytics.models.DataSourcePaged[~azure.mgmt.loganalytics.models.DataSource] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_workspace.metadata['url'] @@ -289,7 +287,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -298,9 +296,13 @@ def internal_paging(next_link=None, raw=False): 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) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -310,12 +312,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.DataSourcePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.DataSourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.DataSourcePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_workspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources'} diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/linked_services_operations.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_linked_services_operations.py similarity index 92% rename from sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/linked_services_operations.py rename to sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_linked_services_operations.py index 397183f80a36..4d07263a233c 100644 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/linked_services_operations.py +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_linked_services_operations.py @@ -19,6 +19,8 @@ class LinkedServicesOperations(object): """LinkedServicesOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -82,6 +84,7 @@ def create_or_update( # 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()) @@ -94,9 +97,8 @@ def create_or_update( body_content = self._serialize.body(parameters, 'LinkedService') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -104,7 +106,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('LinkedService', response) if response.status_code == 201: @@ -154,7 +155,6 @@ def delete( # Construct headers header_parameters = {} - 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: @@ -163,8 +163,8 @@ def delete( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -214,7 +214,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -223,8 +223,8 @@ def get( 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) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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) @@ -232,7 +232,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('LinkedService', response) @@ -263,8 +262,7 @@ def list_by_workspace( ~azure.mgmt.loganalytics.models.LinkedServicePaged[~azure.mgmt.loganalytics.models.LinkedService] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_workspace.metadata['url'] @@ -285,7 +283,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -294,9 +292,13 @@ def internal_paging(next_link=None, raw=False): 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) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -306,12 +308,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.LinkedServicePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.LinkedServicePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.LinkedServicePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_workspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices'} diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/operations.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_operations.py similarity index 84% rename from sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/operations.py rename to sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_operations.py index 42e218c978a0..fd61c0707ba3 100644 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/operations.py +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_operations.py @@ -19,6 +19,8 @@ class Operations(object): """Operations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -51,8 +53,7 @@ def list( ~azure.mgmt.loganalytics.models.OperationPaged[~azure.mgmt.loganalytics.models.Operation] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -67,7 +68,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -76,9 +77,13 @@ def internal_paging(next_link=None, raw=False): 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) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -88,12 +93,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/providers/Microsoft.OperationalInsights/operations'} diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/workspaces_operations.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_workspaces_operations.py similarity index 60% rename from sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/workspaces_operations.py rename to sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_workspaces_operations.py index 50f97070acc1..08630a7d686c 100644 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/workspaces_operations.py +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_workspaces_operations.py @@ -21,10 +21,13 @@ class WorkspacesOperations(object): """WorkspacesOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :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: Client Api Version. Constant value: "2015-11-01-preview". """ models = models @@ -34,420 +37,10 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer + self.api_version = "2015-11-01-preview" self.config = config - def list_link_targets( - self, custom_headers=None, raw=False, **operation_config): - """Get a list of workspaces which the current user has administrator - privileges and are not associated with an Azure Subscription. The - subscriptionId parameter in the Url is ignored. - - :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: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.loganalytics.models.LinkTarget] or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - api_version = "2015-03-20" - - # Construct URL - url = self.list_link_targets.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - 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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, 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 - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[LinkTarget]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_link_targets.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/linkTargets'} - - def get_schema( - self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): - """Gets the schema for a given workspace. - - :param resource_group_name: The name of the resource group to get. The - name is case insensitive. - :type resource_group_name: str - :param workspace_name: Log Analytics workspace name - :type workspace_name: str - :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: SearchGetSchemaResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.loganalytics.models.SearchGetSchemaResponse or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - api_version = "2015-03-20" - - # Construct URL - url = self.get_schema.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - 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 and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, 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 - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SearchGetSchemaResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_schema.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/schema'} - - - def _get_search_results_initial( - self, resource_group_name, workspace_name, parameters, custom_headers=None, raw=False, **operation_config): - api_version = "2015-03-20" - - # Construct URL - url = self.get_search_results.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - 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(parameters, 'SearchParameters') - - # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SearchResultsResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def get_search_results( - self, resource_group_name, workspace_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Submit a search for a given workspace. The response will contain an id - to track the search. User can use the id to poll the search status and - get the full search result later if the search takes long time to - finish. . - - :param resource_group_name: The name of the resource group to get. The - name is case insensitive. - :type resource_group_name: str - :param workspace_name: Log Analytics workspace name - :type workspace_name: str - :param parameters: The parameters required to execute a search query. - :type parameters: ~azure.mgmt.loganalytics.models.SearchParameters - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns SearchResultsResponse - or ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.loganalytics.models.SearchResultsResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.loganalytics.models.SearchResultsResponse]] - :raises: :class:`CloudError` - """ - raw_result = self._get_search_results_initial( - resource_group_name=resource_group_name, - workspace_name=workspace_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('SearchResultsResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - get_search_results.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/search'} - - def update_search_results( - self, resource_group_name, workspace_name, id, custom_headers=None, raw=False, **operation_config): - """Gets updated search results for a given search query. - - :param resource_group_name: The name of the resource group to get. The - name is case insensitive. - :type resource_group_name: str - :param workspace_name: Log Analytics workspace name - :type workspace_name: str - :param id: The id of the search that will have results updated. You - can get the id from the response of the GetResults call. - :type id: str - :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: SearchResultsResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.loganalytics.models.SearchResultsResponse or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - api_version = "2015-03-20" - - # Construct URL - url = self.update_search_results.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), - 'id': self._serialize.url("id", id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - 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 and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, 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 - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SearchResultsResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update_search_results.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/search/{id}'} - - - def _purge_initial( - self, resource_group_name, workspace_name, table, filters, custom_headers=None, raw=False, **operation_config): - body = models.WorkspacePurgeBody(table=table, filters=filters) - - api_version = "2015-03-20" - - # Construct URL - url = self.purge.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - 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(body, 'WorkspacePurgeBody') - - # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WorkspacePurgeStatusResponse', response) - if response.status_code == 202: - deserialized = self._deserialize('WorkspacePurgeResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def purge( - self, resource_group_name, workspace_name, table, filters, custom_headers=None, raw=False, polling=True, **operation_config): - """Purges data in an Log Analytics workspace by a set of user-defined - filters. - - :param resource_group_name: The name of the resource group to get. The - name is case insensitive. - :type resource_group_name: str - :param workspace_name: Log Analytics workspace name - :type workspace_name: str - :param table: Table from which to purge data. - :type table: str - :param filters: The set of columns and filters (queries) to run over - them to purge the resulting data. - :type filters: - list[~azure.mgmt.loganalytics.models.WorkspacePurgeBodyFilters] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns object or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[object] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[object]] - :raises: :class:`CloudError` - """ - raw_result = self._purge_initial( - resource_group_name=resource_group_name, - workspace_name=workspace_name, - table=table, - filters=filters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('object', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - purge.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/purge'} - def disable_intelligence_pack( self, resource_group_name, workspace_name, intelligence_pack_name, custom_headers=None, raw=False, **operation_config): """Disables an intelligence pack for a given workspace. @@ -469,8 +62,6 @@ def disable_intelligence_pack( :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - api_version = "2015-11-01-preview" - # Construct URL url = self.disable_intelligence_pack.metadata['url'] path_format_arguments = { @@ -483,11 +74,10 @@ def disable_intelligence_pack( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers header_parameters = {} - 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: @@ -496,8 +86,8 @@ def disable_intelligence_pack( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -530,8 +120,6 @@ def enable_intelligence_pack( :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - api_version = "2015-11-01-preview" - # Construct URL url = self.enable_intelligence_pack.metadata['url'] path_format_arguments = { @@ -544,11 +132,10 @@ def enable_intelligence_pack( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers header_parameters = {} - 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: @@ -557,8 +144,8 @@ def enable_intelligence_pack( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -590,8 +177,6 @@ def list_intelligence_packs( ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - api_version = "2015-11-01-preview" - # Construct URL url = self.list_intelligence_packs.metadata['url'] path_format_arguments = { @@ -603,11 +188,11 @@ def list_intelligence_packs( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -616,8 +201,8 @@ def list_intelligence_packs( 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) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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) @@ -625,7 +210,6 @@ def list_intelligence_packs( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('[IntelligencePack]', response) @@ -655,8 +239,6 @@ def get_shared_keys( ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - api_version = "2015-11-01-preview" - # Construct URL url = self.get_shared_keys.metadata['url'] path_format_arguments = { @@ -668,11 +250,11 @@ def get_shared_keys( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -681,8 +263,8 @@ def get_shared_keys( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -690,7 +272,6 @@ def get_shared_keys( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SharedKeys', response) @@ -720,10 +301,7 @@ def list_usages( ~azure.mgmt.loganalytics.models.UsageMetricPaged[~azure.mgmt.loganalytics.models.UsageMetric] :raises: :class:`CloudError` """ - api_version = "2015-11-01-preview" - - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_usages.metadata['url'] @@ -736,7 +314,7 @@ def internal_paging(next_link=None, raw=False): # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link @@ -744,7 +322,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -753,9 +331,13 @@ def internal_paging(next_link=None, raw=False): 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) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -765,12 +347,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.UsageMetricPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.UsageMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.UsageMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/usages'} @@ -794,10 +374,7 @@ def list_management_groups( ~azure.mgmt.loganalytics.models.ManagementGroupPaged[~azure.mgmt.loganalytics.models.ManagementGroup] :raises: :class:`CloudError` """ - api_version = "2015-11-01-preview" - - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_management_groups.metadata['url'] @@ -810,7 +387,7 @@ def internal_paging(next_link=None, raw=False): # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link @@ -818,7 +395,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -827,9 +404,13 @@ def internal_paging(next_link=None, raw=False): 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) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -839,12 +420,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ManagementGroupPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ManagementGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ManagementGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_management_groups.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/managementGroups'} @@ -866,10 +445,7 @@ def list_by_resource_group( ~azure.mgmt.loganalytics.models.WorkspacePaged[~azure.mgmt.loganalytics.models.Workspace] :raises: :class:`CloudError` """ - api_version = "2015-11-01-preview" - - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_resource_group.metadata['url'] @@ -881,7 +457,7 @@ def internal_paging(next_link=None, raw=False): # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link @@ -889,7 +465,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -898,9 +474,13 @@ def internal_paging(next_link=None, raw=False): 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) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -910,12 +490,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.WorkspacePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.WorkspacePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.WorkspacePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces'} @@ -934,10 +512,7 @@ def list( ~azure.mgmt.loganalytics.models.WorkspacePaged[~azure.mgmt.loganalytics.models.Workspace] :raises: :class:`CloudError` """ - api_version = "2015-11-01-preview" - - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -948,7 +523,7 @@ def internal_paging(next_link=None, raw=False): # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link @@ -956,7 +531,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -965,9 +540,13 @@ def internal_paging(next_link=None, raw=False): 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) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -977,12 +556,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.WorkspacePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.WorkspacePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.WorkspacePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/workspaces'} @@ -990,8 +567,6 @@ def internal_paging(next_link=None, raw=False): def _create_or_update_initial( self, resource_group_name, workspace_name, parameters, custom_headers=None, raw=False, **operation_config): - api_version = "2015-11-01-preview" - # Construct URL url = self.create_or_update.metadata['url'] path_format_arguments = { @@ -1003,10 +578,11 @@ def _create_or_update_initial( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + 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()) @@ -1019,9 +595,8 @@ def _create_or_update_initial( body_content = self._serialize.body(parameters, 'Workspace') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -1109,8 +684,6 @@ def delete( :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - api_version = "2015-11-01-preview" - # Construct URL url = self.delete.metadata['url'] path_format_arguments = { @@ -1122,11 +695,10 @@ def delete( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers header_parameters = {} - 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: @@ -1135,8 +707,8 @@ def delete( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -1166,8 +738,6 @@ def get( ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - api_version = "2015-11-01-preview" - # Construct URL url = self.get.metadata['url'] path_format_arguments = { @@ -1179,11 +749,11 @@ def get( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -1192,8 +762,8 @@ def get( 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) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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) @@ -1201,7 +771,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Workspace', response) @@ -1232,8 +801,6 @@ def update( ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - api_version = "2015-11-01-preview" - # Construct URL url = self.update.metadata['url'] path_format_arguments = { @@ -1245,10 +812,11 @@ def update( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + 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()) @@ -1261,9 +829,8 @@ def update( body_content = self._serialize.body(parameters, 'Workspace') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -1271,7 +838,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Workspace', response) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/saved_searches_operations.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/saved_searches_operations.py deleted file mode 100644 index 95bbe17347cb..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/saved_searches_operations.py +++ /dev/null @@ -1,363 +0,0 @@ -# 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 SavedSearchesOperations(object): - """SavedSearchesOperations 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: Client Api Version. Constant value: "2015-03-20". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-03-20" - - self.config = config - - def delete( - self, resource_group_name, workspace_name, saved_search_name, custom_headers=None, raw=False, **operation_config): - """Deletes the specified saved search in a given workspace. - - :param resource_group_name: The name of the resource group to get. The - name is case insensitive. - :type resource_group_name: str - :param workspace_name: Log Analytics workspace name - :type workspace_name: str - :param saved_search_name: Name of the saved search. - :type saved_search_name: str - :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: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), - 'savedSearchName': self._serialize.url("saved_search_name", saved_search_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - 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 and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, 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 - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchName}'} - - def create_or_update( - self, resource_group_name, workspace_name, saved_search_name, parameters, custom_headers=None, raw=False, **operation_config): - """Creates or updates a saved search for a given workspace. - - :param resource_group_name: The name of the resource group to get. The - name is case insensitive. - :type resource_group_name: str - :param workspace_name: Log Analytics workspace name - :type workspace_name: str - :param saved_search_name: The id of the saved search. - :type saved_search_name: str - :param parameters: The parameters required to save a search. - :type parameters: ~azure.mgmt.loganalytics.models.SavedSearch - :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: SavedSearch or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.loganalytics.models.SavedSearch or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), - 'savedSearchName': self._serialize.url("saved_search_name", saved_search_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - 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(parameters, 'SavedSearch') - - # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, 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 - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SavedSearch', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchName}'} - - def get( - self, resource_group_name, workspace_name, saved_search_name, custom_headers=None, raw=False, **operation_config): - """Gets the specified saved search for a given workspace. - - :param resource_group_name: The name of the resource group to get. The - name is case insensitive. - :type resource_group_name: str - :param workspace_name: Log Analytics workspace name - :type workspace_name: str - :param saved_search_name: The id of the saved search. - :type saved_search_name: str - :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: SavedSearch or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.loganalytics.models.SavedSearch or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), - 'savedSearchName': self._serialize.url("saved_search_name", saved_search_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - 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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, 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 - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SavedSearch', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchName}'} - - def list_by_workspace( - self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): - """Gets the saved searches for a given Log Analytics Workspace. - - :param resource_group_name: The name of the resource group to get. The - name is case insensitive. - :type resource_group_name: str - :param workspace_name: Log Analytics workspace name - :type workspace_name: str - :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: SavedSearchesListResult or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.loganalytics.models.SavedSearchesListResult or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_by_workspace.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - 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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, 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 - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SavedSearchesListResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_by_workspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches'} - - def get_results( - self, resource_group_name, workspace_name, saved_search_name, custom_headers=None, raw=False, **operation_config): - """Gets the results from a saved search for a given workspace. - - :param resource_group_name: The name of the resource group to get. The - name is case insensitive. - :type resource_group_name: str - :param workspace_name: Log Analytics workspace name - :type workspace_name: str - :param saved_search_name: The name of the saved search. - :type saved_search_name: str - :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: SearchResultsResponse or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.loganalytics.models.SearchResultsResponse or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_results.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), - 'savedSearchName': self._serialize.url("saved_search_name", saved_search_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - 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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, 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 - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SearchResultsResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_results.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchName}/results'} diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/storage_insights_operations.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/storage_insights_operations.py deleted file mode 100644 index 3cd3adc2ed36..000000000000 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/storage_insights_operations.py +++ /dev/null @@ -1,316 +0,0 @@ -# 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 StorageInsightsOperations(object): - """StorageInsightsOperations 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: Client Api Version. Constant value: "2015-03-20". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-03-20" - - self.config = config - - def create_or_update( - self, resource_group_name, workspace_name, storage_insight_name, parameters, custom_headers=None, raw=False, **operation_config): - """Create or update a storage insight. - - :param resource_group_name: The name of the resource group to get. The - name is case insensitive. - :type resource_group_name: str - :param workspace_name: Log Analytics Workspace name that will contain - the storageInsightsConfigs resource - :type workspace_name: str - :param storage_insight_name: Name of the storageInsightsConfigs - resource - :type storage_insight_name: str - :param parameters: The parameters required to create or update a - storage insight. - :type parameters: ~azure.mgmt.loganalytics.models.StorageInsight - :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: StorageInsight or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.loganalytics.models.StorageInsight or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), - 'storageInsightName': self._serialize.url("storage_insight_name", storage_insight_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - 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(parameters, 'StorageInsight') - - # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('StorageInsight', response) - if response.status_code == 201: - deserialized = self._deserialize('StorageInsight', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/storageInsightConfigs/{storageInsightName}'} - - def get( - self, resource_group_name, workspace_name, storage_insight_name, custom_headers=None, raw=False, **operation_config): - """Gets a storage insight instance. - - :param resource_group_name: The name of the resource group to get. The - name is case insensitive. - :type resource_group_name: str - :param workspace_name: Log Analytics Workspace name that contains the - storageInsightsConfigs resource - :type workspace_name: str - :param storage_insight_name: Name of the storageInsightsConfigs - resource - :type storage_insight_name: str - :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: StorageInsight or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.loganalytics.models.StorageInsight or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), - 'storageInsightName': self._serialize.url("storage_insight_name", storage_insight_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - 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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, 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 - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('StorageInsight', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/storageInsightConfigs/{storageInsightName}'} - - def delete( - self, resource_group_name, workspace_name, storage_insight_name, custom_headers=None, raw=False, **operation_config): - """Deletes a storageInsightsConfigs resource. - - :param resource_group_name: The name of the resource group to get. The - name is case insensitive. - :type resource_group_name: str - :param workspace_name: Log Analytics Workspace name that contains the - storageInsightsConfigs resource - :type workspace_name: str - :param storage_insight_name: Name of the storageInsightsConfigs - resource - :type storage_insight_name: str - :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: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), - 'storageInsightName': self._serialize.url("storage_insight_name", storage_insight_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - 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 and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/storageInsightConfigs/{storageInsightName}'} - - def list_by_workspace( - self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): - """Lists the storage insight instances within a workspace. - - :param resource_group_name: The name of the resource group to get. The - name is case insensitive. - :type resource_group_name: str - :param workspace_name: Log Analytics Workspace name that will contain - the storageInsightsConfigs resource - :type workspace_name: str - :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 StorageInsight - :rtype: - ~azure.mgmt.loganalytics.models.StorageInsightPaged[~azure.mgmt.loganalytics.models.StorageInsight] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_workspace.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # 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['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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, 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.StorageInsightPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.StorageInsightPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_workspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/storageInsightConfigs'}