diff --git a/sdk/eventgrid/azure-eventgrid/README.md b/sdk/eventgrid/azure-eventgrid/README.md index daec8a164692..caf8f211fcb4 100644 --- a/sdk/eventgrid/azure-eventgrid/README.md +++ b/sdk/eventgrid/azure-eventgrid/README.md @@ -1,22 +1,21 @@ -## Microsoft Azure SDK for Python +# Microsoft Azure SDK for Python This is the Microsoft Azure Event Grid Client Library. +This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8. +For a more complete view of Azure libraries, see the [Github repo](https://github.com/Azure/azure-sdk-for-python/) -This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. -For a more complete set of Azure libraries, see the -[azure](https://pypi.python.org/pypi/azure) bundle package. +# Usage -## Usage - -For code examples, see [Event -Grid](https://docs.microsoft.com/python/api/overview/azure/event-grid) +For code examples, see [Event Grid](https://docs.microsoft.com/python/api/overview/azure/event-grid) on docs.microsoft.com. -## Provide Feedback -If you encounter any bugs or have suggestions, please file an issue in -the [Issues](https://github.com/Azure/azure-sdk-for-python/issues) +# Provide Feedback + +If you encounter any bugs or have suggestions, please file an issue in the +[Issues](https://github.com/Azure/azure-sdk-for-python/issues) section of the project. -![image](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-eventgrid%2FREADME.png) + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-eventgrid%2FREADME.png) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/__init__.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/__init__.py index b530f01b3fd4..4ee83cbbaa14 100644 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/__init__.py +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/__init__.py @@ -12,6 +12,8 @@ try: from ._models_py3 import AppConfigurationKeyValueDeletedEventData from ._models_py3 import AppConfigurationKeyValueModifiedEventData + from ._models_py3 import AppEventTypeDetail + from ._models_py3 import AppServicePlanEventTypeDetail from ._models_py3 import ContainerRegistryArtifactEventData from ._models_py3 import ContainerRegistryArtifactEventTarget from ._models_py3 import ContainerRegistryChartDeletedEventData @@ -112,9 +114,25 @@ from ._models_py3 import SubscriptionDeletedEventData from ._models_py3 import SubscriptionValidationEventData from ._models_py3 import SubscriptionValidationResponse + from ._models_py3 import WebAppServicePlanUpdatedEventData + from ._models_py3 import WebAppServicePlanUpdatedEventDataSku + from ._models_py3 import WebAppUpdatedEventData + from ._models_py3 import WebBackupOperationCompletedEventData + from ._models_py3 import WebBackupOperationFailedEventData + from ._models_py3 import WebBackupOperationStartedEventData + from ._models_py3 import WebRestoreOperationCompletedEventData + from ._models_py3 import WebRestoreOperationFailedEventData + from ._models_py3 import WebRestoreOperationStartedEventData + from ._models_py3 import WebSlotSwapCompletedEventData + from ._models_py3 import WebSlotSwapFailedEventData + from ._models_py3 import WebSlotSwapStartedEventData + from ._models_py3 import WebSlotSwapWithPreviewCancelledEventData + from ._models_py3 import WebSlotSwapWithPreviewStartedEventData except (SyntaxError, ImportError): from ._models import AppConfigurationKeyValueDeletedEventData from ._models import AppConfigurationKeyValueModifiedEventData + from ._models import AppEventTypeDetail + from ._models import AppServicePlanEventTypeDetail from ._models import ContainerRegistryArtifactEventData from ._models import ContainerRegistryArtifactEventTarget from ._models import ContainerRegistryChartDeletedEventData @@ -215,16 +233,36 @@ from ._models import SubscriptionDeletedEventData from ._models import SubscriptionValidationEventData from ._models import SubscriptionValidationResponse + from ._models import WebAppServicePlanUpdatedEventData + from ._models import WebAppServicePlanUpdatedEventDataSku + from ._models import WebAppUpdatedEventData + from ._models import WebBackupOperationCompletedEventData + from ._models import WebBackupOperationFailedEventData + from ._models import WebBackupOperationStartedEventData + from ._models import WebRestoreOperationCompletedEventData + from ._models import WebRestoreOperationFailedEventData + from ._models import WebRestoreOperationStartedEventData + from ._models import WebSlotSwapCompletedEventData + from ._models import WebSlotSwapFailedEventData + from ._models import WebSlotSwapStartedEventData + from ._models import WebSlotSwapWithPreviewCancelledEventData + from ._models import WebSlotSwapWithPreviewStartedEventData from ._event_grid_client_enums import ( + AppAction, + AppServicePlanAction, + AsyncStatus, MediaJobErrorCategory, MediaJobErrorCode, MediaJobRetry, MediaJobState, + StampKind, ) __all__ = [ 'AppConfigurationKeyValueDeletedEventData', 'AppConfigurationKeyValueModifiedEventData', + 'AppEventTypeDetail', + 'AppServicePlanEventTypeDetail', 'ContainerRegistryArtifactEventData', 'ContainerRegistryArtifactEventTarget', 'ContainerRegistryChartDeletedEventData', @@ -325,8 +363,26 @@ 'SubscriptionDeletedEventData', 'SubscriptionValidationEventData', 'SubscriptionValidationResponse', + 'WebAppServicePlanUpdatedEventData', + 'WebAppServicePlanUpdatedEventDataSku', + 'WebAppUpdatedEventData', + 'WebBackupOperationCompletedEventData', + 'WebBackupOperationFailedEventData', + 'WebBackupOperationStartedEventData', + 'WebRestoreOperationCompletedEventData', + 'WebRestoreOperationFailedEventData', + 'WebRestoreOperationStartedEventData', + 'WebSlotSwapCompletedEventData', + 'WebSlotSwapFailedEventData', + 'WebSlotSwapStartedEventData', + 'WebSlotSwapWithPreviewCancelledEventData', + 'WebSlotSwapWithPreviewStartedEventData', 'MediaJobState', 'MediaJobErrorCode', 'MediaJobErrorCategory', 'MediaJobRetry', + 'AppAction', + 'StampKind', + 'AppServicePlanAction', + 'AsyncStatus', ] diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/_event_grid_client_enums.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/_event_grid_client_enums.py index eabef54f1c86..af514983ff3a 100644 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/_event_grid_client_enums.py +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/_event_grid_client_enums.py @@ -49,3 +49,32 @@ class MediaJobRetry(str, Enum): do_not_retry = "DoNotRetry" #: Issue needs to be investigated and then the job resubmitted with corrections or retried once the underlying issue has been corrected. may_retry = "MayRetry" #: Issue may be resolved after waiting for a period of time and resubmitting the same Job. + + +class AppAction(str, Enum): + + restarted = "Restarted" #: Web app was restarted. + stopped = "Stopped" #: Web app was stopped. + changed_app_settings = "ChangedAppSettings" #: There was an operation to change app setting on the web app. + started = "Started" #: The job has started. + completed = "Completed" #: The job has completed. + failed = "Failed" #: The job has failed to complete. + + +class StampKind(str, Enum): + + public = "Public" #: App Service Plan is running on a public stamp. + ase_v1 = "AseV1" #: App Service Plan is running on an App Service Environment V1. + ase_v2 = "AseV2" #: App Service Plan is running on an App Service Environment V2. + + +class AppServicePlanAction(str, Enum): + + updated = "Updated" #: App Service plan is being updated. + + +class AsyncStatus(str, Enum): + + started = "Started" #: Async operation has started. + completed = "Completed" #: Async operation has completed. + failed = "Failed" #: Async operation failed to complete. diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/_models.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/_models.py index 5355e29642cd..54e88ce82b9e 100644 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/_models.py +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/_models.py @@ -64,6 +64,50 @@ def __init__(self, **kwargs): self.etag = kwargs.get('etag', None) +class AppEventTypeDetail(Model): + """Detail of action on the app. + + :param action: Type of action of the operation. Possible values include: + 'Restarted', 'Stopped', 'ChangedAppSettings', 'Started', 'Completed', + 'Failed' + :type action: str or ~azure.eventgrid.models.AppAction + """ + + _attribute_map = { + 'action': {'key': 'action', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AppEventTypeDetail, self).__init__(**kwargs) + self.action = kwargs.get('action', None) + + +class AppServicePlanEventTypeDetail(Model): + """Detail of action on the app service plan. + + :param stamp_kind: Kind of environment where app service plan is. Possible + values include: 'Public', 'AseV1', 'AseV2' + :type stamp_kind: str or ~azure.eventgrid.models.StampKind + :param action: Type of action on the app service plan. Possible values + include: 'Updated' + :type action: str or ~azure.eventgrid.models.AppServicePlanAction + :param status: Possible values include: 'Started', 'Completed', 'Failed' + :type status: str or ~azure.eventgrid.models.AsyncStatus + """ + + _attribute_map = { + 'stamp_kind': {'key': 'stampKind', 'type': 'str'}, + 'action': {'key': 'action', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AppServicePlanEventTypeDetail, self).__init__(**kwargs) + self.stamp_kind = kwargs.get('stamp_kind', None) + self.action = kwargs.get('action', None) + self.status = kwargs.get('status', None) + + class ContainerRegistryArtifactEventData(Model): """The content of the event request message. @@ -3984,3 +4028,613 @@ class SubscriptionValidationResponse(Model): def __init__(self, **kwargs): super(SubscriptionValidationResponse, self).__init__(**kwargs) self.validation_response = kwargs.get('validation_response', None) + + +class WebAppServicePlanUpdatedEventData(Model): + """Schema of the Data property of an EventGridEvent for an + Microsoft.Web.AppServicePlanUpdated event. + + :param app_service_plan_event_type_detail: + :type app_service_plan_event_type_detail: + ~azure.eventgrid.models.AppServicePlanEventTypeDetail + :param sku: sku of app service plan. + :type sku: ~azure.eventgrid.models.WebAppServicePlanUpdatedEventDataSku + :param name: name of the app service plan that had this event. + :type name: str + :param client_request_id: The client request id generated by the app + service for the app service plan API operation that triggered this event. + :type client_request_id: str + :param correlation_request_id: The correlation request id generated by the + app service for the app service plan API operation that triggered this + event. + :type correlation_request_id: str + :param request_id: The request id generated by the app service for the app + service plan API operation that triggered this event. + :type request_id: str + :param address: HTTP request URL of this operation. + :type address: str + :param verb: HTTP verb of this operation. + :type verb: str + """ + + _attribute_map = { + 'app_service_plan_event_type_detail': {'key': 'appServicePlanEventTypeDetail', 'type': 'AppServicePlanEventTypeDetail'}, + 'sku': {'key': 'sku', 'type': 'WebAppServicePlanUpdatedEventDataSku'}, + 'name': {'key': 'name', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'correlation_request_id': {'key': 'correlationRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'verb': {'key': 'verb', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WebAppServicePlanUpdatedEventData, self).__init__(**kwargs) + self.app_service_plan_event_type_detail = kwargs.get('app_service_plan_event_type_detail', None) + self.sku = kwargs.get('sku', None) + self.name = kwargs.get('name', None) + self.client_request_id = kwargs.get('client_request_id', None) + self.correlation_request_id = kwargs.get('correlation_request_id', None) + self.request_id = kwargs.get('request_id', None) + self.address = kwargs.get('address', None) + self.verb = kwargs.get('verb', None) + + +class WebAppServicePlanUpdatedEventDataSku(Model): + """sku of app service plan. + + :param name: name of app service plan sku. + :type name: str + :param tier: tier of app service plan sku. + :type tier: str + :param size: size of app service plan sku. + :type size: str + :param family: family of app service plan sku. + :type family: str + :param capacity: capacity of app service plan sku. + :type capacity: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'Tier', 'type': 'str'}, + 'size': {'key': 'Size', 'type': 'str'}, + 'family': {'key': 'Family', 'type': 'str'}, + 'capacity': {'key': 'Capacity', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WebAppServicePlanUpdatedEventDataSku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = kwargs.get('tier', None) + self.size = kwargs.get('size', None) + self.family = kwargs.get('family', None) + self.capacity = kwargs.get('capacity', None) + + +class WebAppUpdatedEventData(Model): + """Schema of the Data property of an EventGridEvent for an + Microsoft.Web.AppUpdated event. + + :param app_event_type_detail: + :type app_event_type_detail: ~azure.eventgrid.models.AppEventTypeDetail + :param name: name of the web site that had this event. + :type name: str + :param client_request_id: The client request id generated by the app + service for the site API operation that triggered this event. + :type client_request_id: str + :param correlation_request_id: The correlation request id generated by the + app service for the site API operation that triggered this event. + :type correlation_request_id: str + :param request_id: The request id generated by the app service for the + site API operation that triggered this event. + :type request_id: str + :param address: HTTP request URL of this operation. + :type address: str + :param verb: HTTP verb of this operation. + :type verb: str + """ + + _attribute_map = { + 'app_event_type_detail': {'key': 'appEventTypeDetail', 'type': 'AppEventTypeDetail'}, + 'name': {'key': 'name', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'correlation_request_id': {'key': 'correlationRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'verb': {'key': 'verb', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WebAppUpdatedEventData, self).__init__(**kwargs) + self.app_event_type_detail = kwargs.get('app_event_type_detail', None) + self.name = kwargs.get('name', None) + self.client_request_id = kwargs.get('client_request_id', None) + self.correlation_request_id = kwargs.get('correlation_request_id', None) + self.request_id = kwargs.get('request_id', None) + self.address = kwargs.get('address', None) + self.verb = kwargs.get('verb', None) + + +class WebBackupOperationCompletedEventData(Model): + """Schema of the Data property of an EventGridEvent for an + Microsoft.Web.BackupOperationCompleted event. + + :param app_event_type_detail: + :type app_event_type_detail: ~azure.eventgrid.models.AppEventTypeDetail + :param name: name of the web site that had this event. + :type name: str + :param client_request_id: The client request id generated by the app + service for the site API operation that triggered this event. + :type client_request_id: str + :param correlation_request_id: The correlation request id generated by the + app service for the site API operation that triggered this event. + :type correlation_request_id: str + :param request_id: The request id generated by the app service for the + site API operation that triggered this event. + :type request_id: str + :param address: HTTP request URL of this operation. + :type address: str + :param verb: HTTP verb of this operation. + :type verb: str + """ + + _attribute_map = { + 'app_event_type_detail': {'key': 'appEventTypeDetail', 'type': 'AppEventTypeDetail'}, + 'name': {'key': 'name', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'correlation_request_id': {'key': 'correlationRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'verb': {'key': 'verb', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WebBackupOperationCompletedEventData, self).__init__(**kwargs) + self.app_event_type_detail = kwargs.get('app_event_type_detail', None) + self.name = kwargs.get('name', None) + self.client_request_id = kwargs.get('client_request_id', None) + self.correlation_request_id = kwargs.get('correlation_request_id', None) + self.request_id = kwargs.get('request_id', None) + self.address = kwargs.get('address', None) + self.verb = kwargs.get('verb', None) + + +class WebBackupOperationFailedEventData(Model): + """Schema of the Data property of an EventGridEvent for an + Microsoft.Web.BackupOperationFailed event. + + :param app_event_type_detail: + :type app_event_type_detail: ~azure.eventgrid.models.AppEventTypeDetail + :param name: name of the web site that had this event. + :type name: str + :param client_request_id: The client request id generated by the app + service for the site API operation that triggered this event. + :type client_request_id: str + :param correlation_request_id: The correlation request id generated by the + app service for the site API operation that triggered this event. + :type correlation_request_id: str + :param request_id: The request id generated by the app service for the + site API operation that triggered this event. + :type request_id: str + :param address: HTTP request URL of this operation. + :type address: str + :param verb: HTTP verb of this operation. + :type verb: str + """ + + _attribute_map = { + 'app_event_type_detail': {'key': 'appEventTypeDetail', 'type': 'AppEventTypeDetail'}, + 'name': {'key': 'name', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'correlation_request_id': {'key': 'correlationRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'verb': {'key': 'verb', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WebBackupOperationFailedEventData, self).__init__(**kwargs) + self.app_event_type_detail = kwargs.get('app_event_type_detail', None) + self.name = kwargs.get('name', None) + self.client_request_id = kwargs.get('client_request_id', None) + self.correlation_request_id = kwargs.get('correlation_request_id', None) + self.request_id = kwargs.get('request_id', None) + self.address = kwargs.get('address', None) + self.verb = kwargs.get('verb', None) + + +class WebBackupOperationStartedEventData(Model): + """Schema of the Data property of an EventGridEvent for an + Microsoft.Web.BackupOperationStarted event. + + :param app_event_type_detail: + :type app_event_type_detail: ~azure.eventgrid.models.AppEventTypeDetail + :param name: name of the web site that had this event. + :type name: str + :param client_request_id: The client request id generated by the app + service for the site API operation that triggered this event. + :type client_request_id: str + :param correlation_request_id: The correlation request id generated by the + app service for the site API operation that triggered this event. + :type correlation_request_id: str + :param request_id: The request id generated by the app service for the + site API operation that triggered this event. + :type request_id: str + :param address: HTTP request URL of this operation. + :type address: str + :param verb: HTTP verb of this operation. + :type verb: str + """ + + _attribute_map = { + 'app_event_type_detail': {'key': 'appEventTypeDetail', 'type': 'AppEventTypeDetail'}, + 'name': {'key': 'name', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'correlation_request_id': {'key': 'correlationRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'verb': {'key': 'verb', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WebBackupOperationStartedEventData, self).__init__(**kwargs) + self.app_event_type_detail = kwargs.get('app_event_type_detail', None) + self.name = kwargs.get('name', None) + self.client_request_id = kwargs.get('client_request_id', None) + self.correlation_request_id = kwargs.get('correlation_request_id', None) + self.request_id = kwargs.get('request_id', None) + self.address = kwargs.get('address', None) + self.verb = kwargs.get('verb', None) + + +class WebRestoreOperationCompletedEventData(Model): + """Schema of the Data property of an EventGridEvent for an + Microsoft.Web.RestoreOperationCompleted event. + + :param app_event_type_detail: + :type app_event_type_detail: ~azure.eventgrid.models.AppEventTypeDetail + :param name: name of the web site that had this event. + :type name: str + :param client_request_id: The client request id generated by the app + service for the site API operation that triggered this event. + :type client_request_id: str + :param correlation_request_id: The correlation request id generated by the + app service for the site API operation that triggered this event. + :type correlation_request_id: str + :param request_id: The request id generated by the app service for the + site API operation that triggered this event. + :type request_id: str + :param address: HTTP request URL of this operation. + :type address: str + :param verb: HTTP verb of this operation. + :type verb: str + """ + + _attribute_map = { + 'app_event_type_detail': {'key': 'appEventTypeDetail', 'type': 'AppEventTypeDetail'}, + 'name': {'key': 'name', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'correlation_request_id': {'key': 'correlationRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'verb': {'key': 'verb', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WebRestoreOperationCompletedEventData, self).__init__(**kwargs) + self.app_event_type_detail = kwargs.get('app_event_type_detail', None) + self.name = kwargs.get('name', None) + self.client_request_id = kwargs.get('client_request_id', None) + self.correlation_request_id = kwargs.get('correlation_request_id', None) + self.request_id = kwargs.get('request_id', None) + self.address = kwargs.get('address', None) + self.verb = kwargs.get('verb', None) + + +class WebRestoreOperationFailedEventData(Model): + """Schema of the Data property of an EventGridEvent for an + Microsoft.Web.RestoreOperationFailed event. + + :param app_event_type_detail: + :type app_event_type_detail: ~azure.eventgrid.models.AppEventTypeDetail + :param name: name of the web site that had this event. + :type name: str + :param client_request_id: The client request id generated by the app + service for the site API operation that triggered this event. + :type client_request_id: str + :param correlation_request_id: The correlation request id generated by the + app service for the site API operation that triggered this event. + :type correlation_request_id: str + :param request_id: The request id generated by the app service for the + site API operation that triggered this event. + :type request_id: str + :param address: HTTP request URL of this operation. + :type address: str + :param verb: HTTP verb of this operation. + :type verb: str + """ + + _attribute_map = { + 'app_event_type_detail': {'key': 'appEventTypeDetail', 'type': 'AppEventTypeDetail'}, + 'name': {'key': 'name', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'correlation_request_id': {'key': 'correlationRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'verb': {'key': 'verb', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WebRestoreOperationFailedEventData, self).__init__(**kwargs) + self.app_event_type_detail = kwargs.get('app_event_type_detail', None) + self.name = kwargs.get('name', None) + self.client_request_id = kwargs.get('client_request_id', None) + self.correlation_request_id = kwargs.get('correlation_request_id', None) + self.request_id = kwargs.get('request_id', None) + self.address = kwargs.get('address', None) + self.verb = kwargs.get('verb', None) + + +class WebRestoreOperationStartedEventData(Model): + """Schema of the Data property of an EventGridEvent for an + Microsoft.Web.RestoreOperationStarted event. + + :param app_event_type_detail: + :type app_event_type_detail: ~azure.eventgrid.models.AppEventTypeDetail + :param name: name of the web site that had this event. + :type name: str + :param client_request_id: The client request id generated by the app + service for the site API operation that triggered this event. + :type client_request_id: str + :param correlation_request_id: The correlation request id generated by the + app service for the site API operation that triggered this event. + :type correlation_request_id: str + :param request_id: The request id generated by the app service for the + site API operation that triggered this event. + :type request_id: str + :param address: HTTP request URL of this operation. + :type address: str + :param verb: HTTP verb of this operation. + :type verb: str + """ + + _attribute_map = { + 'app_event_type_detail': {'key': 'appEventTypeDetail', 'type': 'AppEventTypeDetail'}, + 'name': {'key': 'name', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'correlation_request_id': {'key': 'correlationRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'verb': {'key': 'verb', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WebRestoreOperationStartedEventData, self).__init__(**kwargs) + self.app_event_type_detail = kwargs.get('app_event_type_detail', None) + self.name = kwargs.get('name', None) + self.client_request_id = kwargs.get('client_request_id', None) + self.correlation_request_id = kwargs.get('correlation_request_id', None) + self.request_id = kwargs.get('request_id', None) + self.address = kwargs.get('address', None) + self.verb = kwargs.get('verb', None) + + +class WebSlotSwapCompletedEventData(Model): + """Schema of the Data property of an EventGridEvent for an + Microsoft.Web.SlotSwapCompleted event. + + :param app_event_type_detail: + :type app_event_type_detail: ~azure.eventgrid.models.AppEventTypeDetail + :param name: name of the web site that had this event. + :type name: str + :param client_request_id: The client request id generated by the app + service for the site API operation that triggered this event. + :type client_request_id: str + :param correlation_request_id: The correlation request id generated by the + app service for the site API operation that triggered this event. + :type correlation_request_id: str + :param request_id: The request id generated by the app service for the + site API operation that triggered this event. + :type request_id: str + :param address: HTTP request URL of this operation. + :type address: str + :param verb: HTTP verb of this operation. + :type verb: str + """ + + _attribute_map = { + 'app_event_type_detail': {'key': 'appEventTypeDetail', 'type': 'AppEventTypeDetail'}, + 'name': {'key': 'name', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'correlation_request_id': {'key': 'correlationRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'verb': {'key': 'verb', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WebSlotSwapCompletedEventData, self).__init__(**kwargs) + self.app_event_type_detail = kwargs.get('app_event_type_detail', None) + self.name = kwargs.get('name', None) + self.client_request_id = kwargs.get('client_request_id', None) + self.correlation_request_id = kwargs.get('correlation_request_id', None) + self.request_id = kwargs.get('request_id', None) + self.address = kwargs.get('address', None) + self.verb = kwargs.get('verb', None) + + +class WebSlotSwapFailedEventData(Model): + """Schema of the Data property of an EventGridEvent for an + Microsoft.Web.SlotSwapFailed event. + + :param app_event_type_detail: + :type app_event_type_detail: ~azure.eventgrid.models.AppEventTypeDetail + :param name: name of the web site that had this event. + :type name: str + :param client_request_id: The client request id generated by the app + service for the site API operation that triggered this event. + :type client_request_id: str + :param correlation_request_id: The correlation request id generated by the + app service for the site API operation that triggered this event. + :type correlation_request_id: str + :param request_id: The request id generated by the app service for the + site API operation that triggered this event. + :type request_id: str + :param address: HTTP request URL of this operation. + :type address: str + :param verb: HTTP verb of this operation. + :type verb: str + """ + + _attribute_map = { + 'app_event_type_detail': {'key': 'appEventTypeDetail', 'type': 'AppEventTypeDetail'}, + 'name': {'key': 'name', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'correlation_request_id': {'key': 'correlationRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'verb': {'key': 'verb', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WebSlotSwapFailedEventData, self).__init__(**kwargs) + self.app_event_type_detail = kwargs.get('app_event_type_detail', None) + self.name = kwargs.get('name', None) + self.client_request_id = kwargs.get('client_request_id', None) + self.correlation_request_id = kwargs.get('correlation_request_id', None) + self.request_id = kwargs.get('request_id', None) + self.address = kwargs.get('address', None) + self.verb = kwargs.get('verb', None) + + +class WebSlotSwapStartedEventData(Model): + """Schema of the Data property of an EventGridEvent for an + Microsoft.Web.SlotSwapStarted event. + + :param app_event_type_detail: + :type app_event_type_detail: ~azure.eventgrid.models.AppEventTypeDetail + :param name: name of the web site that had this event. + :type name: str + :param client_request_id: The client request id generated by the app + service for the site API operation that triggered this event. + :type client_request_id: str + :param correlation_request_id: The correlation request id generated by the + app service for the site API operation that triggered this event. + :type correlation_request_id: str + :param request_id: The request id generated by the app service for the + site API operation that triggered this event. + :type request_id: str + :param address: HTTP request URL of this operation. + :type address: str + :param verb: HTTP verb of this operation. + :type verb: str + """ + + _attribute_map = { + 'app_event_type_detail': {'key': 'appEventTypeDetail', 'type': 'AppEventTypeDetail'}, + 'name': {'key': 'name', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'correlation_request_id': {'key': 'correlationRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'verb': {'key': 'verb', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WebSlotSwapStartedEventData, self).__init__(**kwargs) + self.app_event_type_detail = kwargs.get('app_event_type_detail', None) + self.name = kwargs.get('name', None) + self.client_request_id = kwargs.get('client_request_id', None) + self.correlation_request_id = kwargs.get('correlation_request_id', None) + self.request_id = kwargs.get('request_id', None) + self.address = kwargs.get('address', None) + self.verb = kwargs.get('verb', None) + + +class WebSlotSwapWithPreviewCancelledEventData(Model): + """Schema of the Data property of an EventGridEvent for an + Microsoft.Web.SlotSwapWithPreviewCancelled event. + + :param app_event_type_detail: + :type app_event_type_detail: ~azure.eventgrid.models.AppEventTypeDetail + :param name: name of the web site that had this event. + :type name: str + :param client_request_id: The client request id generated by the app + service for the site API operation that triggered this event. + :type client_request_id: str + :param correlation_request_id: The correlation request id generated by the + app service for the site API operation that triggered this event. + :type correlation_request_id: str + :param request_id: The request id generated by the app service for the + site API operation that triggered this event. + :type request_id: str + :param address: HTTP request URL of this operation. + :type address: str + :param verb: HTTP verb of this operation. + :type verb: str + """ + + _attribute_map = { + 'app_event_type_detail': {'key': 'appEventTypeDetail', 'type': 'AppEventTypeDetail'}, + 'name': {'key': 'name', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'correlation_request_id': {'key': 'correlationRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'verb': {'key': 'verb', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WebSlotSwapWithPreviewCancelledEventData, self).__init__(**kwargs) + self.app_event_type_detail = kwargs.get('app_event_type_detail', None) + self.name = kwargs.get('name', None) + self.client_request_id = kwargs.get('client_request_id', None) + self.correlation_request_id = kwargs.get('correlation_request_id', None) + self.request_id = kwargs.get('request_id', None) + self.address = kwargs.get('address', None) + self.verb = kwargs.get('verb', None) + + +class WebSlotSwapWithPreviewStartedEventData(Model): + """Schema of the Data property of an EventGridEvent for an + Microsoft.Web.SlotSwapWithPreviewStarted event. + + :param app_event_type_detail: + :type app_event_type_detail: ~azure.eventgrid.models.AppEventTypeDetail + :param name: name of the web site that had this event. + :type name: str + :param client_request_id: The client request id generated by the app + service for the site API operation that triggered this event. + :type client_request_id: str + :param correlation_request_id: The correlation request id generated by the + app service for the site API operation that triggered this event. + :type correlation_request_id: str + :param request_id: The request id generated by the app service for the + site API operation that triggered this event. + :type request_id: str + :param address: HTTP request URL of this operation. + :type address: str + :param verb: HTTP verb of this operation. + :type verb: str + """ + + _attribute_map = { + 'app_event_type_detail': {'key': 'appEventTypeDetail', 'type': 'AppEventTypeDetail'}, + 'name': {'key': 'name', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'correlation_request_id': {'key': 'correlationRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'verb': {'key': 'verb', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WebSlotSwapWithPreviewStartedEventData, self).__init__(**kwargs) + self.app_event_type_detail = kwargs.get('app_event_type_detail', None) + self.name = kwargs.get('name', None) + self.client_request_id = kwargs.get('client_request_id', None) + self.correlation_request_id = kwargs.get('correlation_request_id', None) + self.request_id = kwargs.get('request_id', None) + self.address = kwargs.get('address', None) + self.verb = kwargs.get('verb', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/_models_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/_models_py3.py index 4784b9f57511..2cecbe20db8e 100644 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/_models_py3.py +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/_models_py3.py @@ -64,6 +64,50 @@ def __init__(self, *, key: str=None, label: str=None, etag: str=None, **kwargs) self.etag = etag +class AppEventTypeDetail(Model): + """Detail of action on the app. + + :param action: Type of action of the operation. Possible values include: + 'Restarted', 'Stopped', 'ChangedAppSettings', 'Started', 'Completed', + 'Failed' + :type action: str or ~azure.eventgrid.models.AppAction + """ + + _attribute_map = { + 'action': {'key': 'action', 'type': 'str'}, + } + + def __init__(self, *, action=None, **kwargs) -> None: + super(AppEventTypeDetail, self).__init__(**kwargs) + self.action = action + + +class AppServicePlanEventTypeDetail(Model): + """Detail of action on the app service plan. + + :param stamp_kind: Kind of environment where app service plan is. Possible + values include: 'Public', 'AseV1', 'AseV2' + :type stamp_kind: str or ~azure.eventgrid.models.StampKind + :param action: Type of action on the app service plan. Possible values + include: 'Updated' + :type action: str or ~azure.eventgrid.models.AppServicePlanAction + :param status: Possible values include: 'Started', 'Completed', 'Failed' + :type status: str or ~azure.eventgrid.models.AsyncStatus + """ + + _attribute_map = { + 'stamp_kind': {'key': 'stampKind', 'type': 'str'}, + 'action': {'key': 'action', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, *, stamp_kind=None, action=None, status=None, **kwargs) -> None: + super(AppServicePlanEventTypeDetail, self).__init__(**kwargs) + self.stamp_kind = stamp_kind + self.action = action + self.status = status + + class ContainerRegistryArtifactEventData(Model): """The content of the event request message. @@ -3984,3 +4028,613 @@ class SubscriptionValidationResponse(Model): def __init__(self, *, validation_response: str=None, **kwargs) -> None: super(SubscriptionValidationResponse, self).__init__(**kwargs) self.validation_response = validation_response + + +class WebAppServicePlanUpdatedEventData(Model): + """Schema of the Data property of an EventGridEvent for an + Microsoft.Web.AppServicePlanUpdated event. + + :param app_service_plan_event_type_detail: + :type app_service_plan_event_type_detail: + ~azure.eventgrid.models.AppServicePlanEventTypeDetail + :param sku: sku of app service plan. + :type sku: ~azure.eventgrid.models.WebAppServicePlanUpdatedEventDataSku + :param name: name of the app service plan that had this event. + :type name: str + :param client_request_id: The client request id generated by the app + service for the app service plan API operation that triggered this event. + :type client_request_id: str + :param correlation_request_id: The correlation request id generated by the + app service for the app service plan API operation that triggered this + event. + :type correlation_request_id: str + :param request_id: The request id generated by the app service for the app + service plan API operation that triggered this event. + :type request_id: str + :param address: HTTP request URL of this operation. + :type address: str + :param verb: HTTP verb of this operation. + :type verb: str + """ + + _attribute_map = { + 'app_service_plan_event_type_detail': {'key': 'appServicePlanEventTypeDetail', 'type': 'AppServicePlanEventTypeDetail'}, + 'sku': {'key': 'sku', 'type': 'WebAppServicePlanUpdatedEventDataSku'}, + 'name': {'key': 'name', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'correlation_request_id': {'key': 'correlationRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'verb': {'key': 'verb', 'type': 'str'}, + } + + def __init__(self, *, app_service_plan_event_type_detail=None, sku=None, name: str=None, client_request_id: str=None, correlation_request_id: str=None, request_id: str=None, address: str=None, verb: str=None, **kwargs) -> None: + super(WebAppServicePlanUpdatedEventData, self).__init__(**kwargs) + self.app_service_plan_event_type_detail = app_service_plan_event_type_detail + self.sku = sku + self.name = name + self.client_request_id = client_request_id + self.correlation_request_id = correlation_request_id + self.request_id = request_id + self.address = address + self.verb = verb + + +class WebAppServicePlanUpdatedEventDataSku(Model): + """sku of app service plan. + + :param name: name of app service plan sku. + :type name: str + :param tier: tier of app service plan sku. + :type tier: str + :param size: size of app service plan sku. + :type size: str + :param family: family of app service plan sku. + :type family: str + :param capacity: capacity of app service plan sku. + :type capacity: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'Tier', 'type': 'str'}, + 'size': {'key': 'Size', 'type': 'str'}, + 'family': {'key': 'Family', 'type': 'str'}, + 'capacity': {'key': 'Capacity', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, tier: str=None, size: str=None, family: str=None, capacity: str=None, **kwargs) -> None: + super(WebAppServicePlanUpdatedEventDataSku, self).__init__(**kwargs) + self.name = name + self.tier = tier + self.size = size + self.family = family + self.capacity = capacity + + +class WebAppUpdatedEventData(Model): + """Schema of the Data property of an EventGridEvent for an + Microsoft.Web.AppUpdated event. + + :param app_event_type_detail: + :type app_event_type_detail: ~azure.eventgrid.models.AppEventTypeDetail + :param name: name of the web site that had this event. + :type name: str + :param client_request_id: The client request id generated by the app + service for the site API operation that triggered this event. + :type client_request_id: str + :param correlation_request_id: The correlation request id generated by the + app service for the site API operation that triggered this event. + :type correlation_request_id: str + :param request_id: The request id generated by the app service for the + site API operation that triggered this event. + :type request_id: str + :param address: HTTP request URL of this operation. + :type address: str + :param verb: HTTP verb of this operation. + :type verb: str + """ + + _attribute_map = { + 'app_event_type_detail': {'key': 'appEventTypeDetail', 'type': 'AppEventTypeDetail'}, + 'name': {'key': 'name', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'correlation_request_id': {'key': 'correlationRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'verb': {'key': 'verb', 'type': 'str'}, + } + + def __init__(self, *, app_event_type_detail=None, name: str=None, client_request_id: str=None, correlation_request_id: str=None, request_id: str=None, address: str=None, verb: str=None, **kwargs) -> None: + super(WebAppUpdatedEventData, self).__init__(**kwargs) + self.app_event_type_detail = app_event_type_detail + self.name = name + self.client_request_id = client_request_id + self.correlation_request_id = correlation_request_id + self.request_id = request_id + self.address = address + self.verb = verb + + +class WebBackupOperationCompletedEventData(Model): + """Schema of the Data property of an EventGridEvent for an + Microsoft.Web.BackupOperationCompleted event. + + :param app_event_type_detail: + :type app_event_type_detail: ~azure.eventgrid.models.AppEventTypeDetail + :param name: name of the web site that had this event. + :type name: str + :param client_request_id: The client request id generated by the app + service for the site API operation that triggered this event. + :type client_request_id: str + :param correlation_request_id: The correlation request id generated by the + app service for the site API operation that triggered this event. + :type correlation_request_id: str + :param request_id: The request id generated by the app service for the + site API operation that triggered this event. + :type request_id: str + :param address: HTTP request URL of this operation. + :type address: str + :param verb: HTTP verb of this operation. + :type verb: str + """ + + _attribute_map = { + 'app_event_type_detail': {'key': 'appEventTypeDetail', 'type': 'AppEventTypeDetail'}, + 'name': {'key': 'name', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'correlation_request_id': {'key': 'correlationRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'verb': {'key': 'verb', 'type': 'str'}, + } + + def __init__(self, *, app_event_type_detail=None, name: str=None, client_request_id: str=None, correlation_request_id: str=None, request_id: str=None, address: str=None, verb: str=None, **kwargs) -> None: + super(WebBackupOperationCompletedEventData, self).__init__(**kwargs) + self.app_event_type_detail = app_event_type_detail + self.name = name + self.client_request_id = client_request_id + self.correlation_request_id = correlation_request_id + self.request_id = request_id + self.address = address + self.verb = verb + + +class WebBackupOperationFailedEventData(Model): + """Schema of the Data property of an EventGridEvent for an + Microsoft.Web.BackupOperationFailed event. + + :param app_event_type_detail: + :type app_event_type_detail: ~azure.eventgrid.models.AppEventTypeDetail + :param name: name of the web site that had this event. + :type name: str + :param client_request_id: The client request id generated by the app + service for the site API operation that triggered this event. + :type client_request_id: str + :param correlation_request_id: The correlation request id generated by the + app service for the site API operation that triggered this event. + :type correlation_request_id: str + :param request_id: The request id generated by the app service for the + site API operation that triggered this event. + :type request_id: str + :param address: HTTP request URL of this operation. + :type address: str + :param verb: HTTP verb of this operation. + :type verb: str + """ + + _attribute_map = { + 'app_event_type_detail': {'key': 'appEventTypeDetail', 'type': 'AppEventTypeDetail'}, + 'name': {'key': 'name', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'correlation_request_id': {'key': 'correlationRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'verb': {'key': 'verb', 'type': 'str'}, + } + + def __init__(self, *, app_event_type_detail=None, name: str=None, client_request_id: str=None, correlation_request_id: str=None, request_id: str=None, address: str=None, verb: str=None, **kwargs) -> None: + super(WebBackupOperationFailedEventData, self).__init__(**kwargs) + self.app_event_type_detail = app_event_type_detail + self.name = name + self.client_request_id = client_request_id + self.correlation_request_id = correlation_request_id + self.request_id = request_id + self.address = address + self.verb = verb + + +class WebBackupOperationStartedEventData(Model): + """Schema of the Data property of an EventGridEvent for an + Microsoft.Web.BackupOperationStarted event. + + :param app_event_type_detail: + :type app_event_type_detail: ~azure.eventgrid.models.AppEventTypeDetail + :param name: name of the web site that had this event. + :type name: str + :param client_request_id: The client request id generated by the app + service for the site API operation that triggered this event. + :type client_request_id: str + :param correlation_request_id: The correlation request id generated by the + app service for the site API operation that triggered this event. + :type correlation_request_id: str + :param request_id: The request id generated by the app service for the + site API operation that triggered this event. + :type request_id: str + :param address: HTTP request URL of this operation. + :type address: str + :param verb: HTTP verb of this operation. + :type verb: str + """ + + _attribute_map = { + 'app_event_type_detail': {'key': 'appEventTypeDetail', 'type': 'AppEventTypeDetail'}, + 'name': {'key': 'name', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'correlation_request_id': {'key': 'correlationRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'verb': {'key': 'verb', 'type': 'str'}, + } + + def __init__(self, *, app_event_type_detail=None, name: str=None, client_request_id: str=None, correlation_request_id: str=None, request_id: str=None, address: str=None, verb: str=None, **kwargs) -> None: + super(WebBackupOperationStartedEventData, self).__init__(**kwargs) + self.app_event_type_detail = app_event_type_detail + self.name = name + self.client_request_id = client_request_id + self.correlation_request_id = correlation_request_id + self.request_id = request_id + self.address = address + self.verb = verb + + +class WebRestoreOperationCompletedEventData(Model): + """Schema of the Data property of an EventGridEvent for an + Microsoft.Web.RestoreOperationCompleted event. + + :param app_event_type_detail: + :type app_event_type_detail: ~azure.eventgrid.models.AppEventTypeDetail + :param name: name of the web site that had this event. + :type name: str + :param client_request_id: The client request id generated by the app + service for the site API operation that triggered this event. + :type client_request_id: str + :param correlation_request_id: The correlation request id generated by the + app service for the site API operation that triggered this event. + :type correlation_request_id: str + :param request_id: The request id generated by the app service for the + site API operation that triggered this event. + :type request_id: str + :param address: HTTP request URL of this operation. + :type address: str + :param verb: HTTP verb of this operation. + :type verb: str + """ + + _attribute_map = { + 'app_event_type_detail': {'key': 'appEventTypeDetail', 'type': 'AppEventTypeDetail'}, + 'name': {'key': 'name', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'correlation_request_id': {'key': 'correlationRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'verb': {'key': 'verb', 'type': 'str'}, + } + + def __init__(self, *, app_event_type_detail=None, name: str=None, client_request_id: str=None, correlation_request_id: str=None, request_id: str=None, address: str=None, verb: str=None, **kwargs) -> None: + super(WebRestoreOperationCompletedEventData, self).__init__(**kwargs) + self.app_event_type_detail = app_event_type_detail + self.name = name + self.client_request_id = client_request_id + self.correlation_request_id = correlation_request_id + self.request_id = request_id + self.address = address + self.verb = verb + + +class WebRestoreOperationFailedEventData(Model): + """Schema of the Data property of an EventGridEvent for an + Microsoft.Web.RestoreOperationFailed event. + + :param app_event_type_detail: + :type app_event_type_detail: ~azure.eventgrid.models.AppEventTypeDetail + :param name: name of the web site that had this event. + :type name: str + :param client_request_id: The client request id generated by the app + service for the site API operation that triggered this event. + :type client_request_id: str + :param correlation_request_id: The correlation request id generated by the + app service for the site API operation that triggered this event. + :type correlation_request_id: str + :param request_id: The request id generated by the app service for the + site API operation that triggered this event. + :type request_id: str + :param address: HTTP request URL of this operation. + :type address: str + :param verb: HTTP verb of this operation. + :type verb: str + """ + + _attribute_map = { + 'app_event_type_detail': {'key': 'appEventTypeDetail', 'type': 'AppEventTypeDetail'}, + 'name': {'key': 'name', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'correlation_request_id': {'key': 'correlationRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'verb': {'key': 'verb', 'type': 'str'}, + } + + def __init__(self, *, app_event_type_detail=None, name: str=None, client_request_id: str=None, correlation_request_id: str=None, request_id: str=None, address: str=None, verb: str=None, **kwargs) -> None: + super(WebRestoreOperationFailedEventData, self).__init__(**kwargs) + self.app_event_type_detail = app_event_type_detail + self.name = name + self.client_request_id = client_request_id + self.correlation_request_id = correlation_request_id + self.request_id = request_id + self.address = address + self.verb = verb + + +class WebRestoreOperationStartedEventData(Model): + """Schema of the Data property of an EventGridEvent for an + Microsoft.Web.RestoreOperationStarted event. + + :param app_event_type_detail: + :type app_event_type_detail: ~azure.eventgrid.models.AppEventTypeDetail + :param name: name of the web site that had this event. + :type name: str + :param client_request_id: The client request id generated by the app + service for the site API operation that triggered this event. + :type client_request_id: str + :param correlation_request_id: The correlation request id generated by the + app service for the site API operation that triggered this event. + :type correlation_request_id: str + :param request_id: The request id generated by the app service for the + site API operation that triggered this event. + :type request_id: str + :param address: HTTP request URL of this operation. + :type address: str + :param verb: HTTP verb of this operation. + :type verb: str + """ + + _attribute_map = { + 'app_event_type_detail': {'key': 'appEventTypeDetail', 'type': 'AppEventTypeDetail'}, + 'name': {'key': 'name', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'correlation_request_id': {'key': 'correlationRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'verb': {'key': 'verb', 'type': 'str'}, + } + + def __init__(self, *, app_event_type_detail=None, name: str=None, client_request_id: str=None, correlation_request_id: str=None, request_id: str=None, address: str=None, verb: str=None, **kwargs) -> None: + super(WebRestoreOperationStartedEventData, self).__init__(**kwargs) + self.app_event_type_detail = app_event_type_detail + self.name = name + self.client_request_id = client_request_id + self.correlation_request_id = correlation_request_id + self.request_id = request_id + self.address = address + self.verb = verb + + +class WebSlotSwapCompletedEventData(Model): + """Schema of the Data property of an EventGridEvent for an + Microsoft.Web.SlotSwapCompleted event. + + :param app_event_type_detail: + :type app_event_type_detail: ~azure.eventgrid.models.AppEventTypeDetail + :param name: name of the web site that had this event. + :type name: str + :param client_request_id: The client request id generated by the app + service for the site API operation that triggered this event. + :type client_request_id: str + :param correlation_request_id: The correlation request id generated by the + app service for the site API operation that triggered this event. + :type correlation_request_id: str + :param request_id: The request id generated by the app service for the + site API operation that triggered this event. + :type request_id: str + :param address: HTTP request URL of this operation. + :type address: str + :param verb: HTTP verb of this operation. + :type verb: str + """ + + _attribute_map = { + 'app_event_type_detail': {'key': 'appEventTypeDetail', 'type': 'AppEventTypeDetail'}, + 'name': {'key': 'name', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'correlation_request_id': {'key': 'correlationRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'verb': {'key': 'verb', 'type': 'str'}, + } + + def __init__(self, *, app_event_type_detail=None, name: str=None, client_request_id: str=None, correlation_request_id: str=None, request_id: str=None, address: str=None, verb: str=None, **kwargs) -> None: + super(WebSlotSwapCompletedEventData, self).__init__(**kwargs) + self.app_event_type_detail = app_event_type_detail + self.name = name + self.client_request_id = client_request_id + self.correlation_request_id = correlation_request_id + self.request_id = request_id + self.address = address + self.verb = verb + + +class WebSlotSwapFailedEventData(Model): + """Schema of the Data property of an EventGridEvent for an + Microsoft.Web.SlotSwapFailed event. + + :param app_event_type_detail: + :type app_event_type_detail: ~azure.eventgrid.models.AppEventTypeDetail + :param name: name of the web site that had this event. + :type name: str + :param client_request_id: The client request id generated by the app + service for the site API operation that triggered this event. + :type client_request_id: str + :param correlation_request_id: The correlation request id generated by the + app service for the site API operation that triggered this event. + :type correlation_request_id: str + :param request_id: The request id generated by the app service for the + site API operation that triggered this event. + :type request_id: str + :param address: HTTP request URL of this operation. + :type address: str + :param verb: HTTP verb of this operation. + :type verb: str + """ + + _attribute_map = { + 'app_event_type_detail': {'key': 'appEventTypeDetail', 'type': 'AppEventTypeDetail'}, + 'name': {'key': 'name', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'correlation_request_id': {'key': 'correlationRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'verb': {'key': 'verb', 'type': 'str'}, + } + + def __init__(self, *, app_event_type_detail=None, name: str=None, client_request_id: str=None, correlation_request_id: str=None, request_id: str=None, address: str=None, verb: str=None, **kwargs) -> None: + super(WebSlotSwapFailedEventData, self).__init__(**kwargs) + self.app_event_type_detail = app_event_type_detail + self.name = name + self.client_request_id = client_request_id + self.correlation_request_id = correlation_request_id + self.request_id = request_id + self.address = address + self.verb = verb + + +class WebSlotSwapStartedEventData(Model): + """Schema of the Data property of an EventGridEvent for an + Microsoft.Web.SlotSwapStarted event. + + :param app_event_type_detail: + :type app_event_type_detail: ~azure.eventgrid.models.AppEventTypeDetail + :param name: name of the web site that had this event. + :type name: str + :param client_request_id: The client request id generated by the app + service for the site API operation that triggered this event. + :type client_request_id: str + :param correlation_request_id: The correlation request id generated by the + app service for the site API operation that triggered this event. + :type correlation_request_id: str + :param request_id: The request id generated by the app service for the + site API operation that triggered this event. + :type request_id: str + :param address: HTTP request URL of this operation. + :type address: str + :param verb: HTTP verb of this operation. + :type verb: str + """ + + _attribute_map = { + 'app_event_type_detail': {'key': 'appEventTypeDetail', 'type': 'AppEventTypeDetail'}, + 'name': {'key': 'name', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'correlation_request_id': {'key': 'correlationRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'verb': {'key': 'verb', 'type': 'str'}, + } + + def __init__(self, *, app_event_type_detail=None, name: str=None, client_request_id: str=None, correlation_request_id: str=None, request_id: str=None, address: str=None, verb: str=None, **kwargs) -> None: + super(WebSlotSwapStartedEventData, self).__init__(**kwargs) + self.app_event_type_detail = app_event_type_detail + self.name = name + self.client_request_id = client_request_id + self.correlation_request_id = correlation_request_id + self.request_id = request_id + self.address = address + self.verb = verb + + +class WebSlotSwapWithPreviewCancelledEventData(Model): + """Schema of the Data property of an EventGridEvent for an + Microsoft.Web.SlotSwapWithPreviewCancelled event. + + :param app_event_type_detail: + :type app_event_type_detail: ~azure.eventgrid.models.AppEventTypeDetail + :param name: name of the web site that had this event. + :type name: str + :param client_request_id: The client request id generated by the app + service for the site API operation that triggered this event. + :type client_request_id: str + :param correlation_request_id: The correlation request id generated by the + app service for the site API operation that triggered this event. + :type correlation_request_id: str + :param request_id: The request id generated by the app service for the + site API operation that triggered this event. + :type request_id: str + :param address: HTTP request URL of this operation. + :type address: str + :param verb: HTTP verb of this operation. + :type verb: str + """ + + _attribute_map = { + 'app_event_type_detail': {'key': 'appEventTypeDetail', 'type': 'AppEventTypeDetail'}, + 'name': {'key': 'name', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'correlation_request_id': {'key': 'correlationRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'verb': {'key': 'verb', 'type': 'str'}, + } + + def __init__(self, *, app_event_type_detail=None, name: str=None, client_request_id: str=None, correlation_request_id: str=None, request_id: str=None, address: str=None, verb: str=None, **kwargs) -> None: + super(WebSlotSwapWithPreviewCancelledEventData, self).__init__(**kwargs) + self.app_event_type_detail = app_event_type_detail + self.name = name + self.client_request_id = client_request_id + self.correlation_request_id = correlation_request_id + self.request_id = request_id + self.address = address + self.verb = verb + + +class WebSlotSwapWithPreviewStartedEventData(Model): + """Schema of the Data property of an EventGridEvent for an + Microsoft.Web.SlotSwapWithPreviewStarted event. + + :param app_event_type_detail: + :type app_event_type_detail: ~azure.eventgrid.models.AppEventTypeDetail + :param name: name of the web site that had this event. + :type name: str + :param client_request_id: The client request id generated by the app + service for the site API operation that triggered this event. + :type client_request_id: str + :param correlation_request_id: The correlation request id generated by the + app service for the site API operation that triggered this event. + :type correlation_request_id: str + :param request_id: The request id generated by the app service for the + site API operation that triggered this event. + :type request_id: str + :param address: HTTP request URL of this operation. + :type address: str + :param verb: HTTP verb of this operation. + :type verb: str + """ + + _attribute_map = { + 'app_event_type_detail': {'key': 'appEventTypeDetail', 'type': 'AppEventTypeDetail'}, + 'name': {'key': 'name', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'correlation_request_id': {'key': 'correlationRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'verb': {'key': 'verb', 'type': 'str'}, + } + + def __init__(self, *, app_event_type_detail=None, name: str=None, client_request_id: str=None, correlation_request_id: str=None, request_id: str=None, address: str=None, verb: str=None, **kwargs) -> None: + super(WebSlotSwapWithPreviewStartedEventData, self).__init__(**kwargs) + self.app_event_type_detail = app_event_type_detail + self.name = name + self.client_request_id = client_request_id + self.correlation_request_id = correlation_request_id + self.request_id = request_id + self.address = address + self.verb = verb diff --git a/sdk/eventgrid/azure-eventgrid/setup.py b/sdk/eventgrid/azure-eventgrid/setup.py index cf7a6fb13dad..d4ec25da8bc3 100644 --- a/sdk/eventgrid/azure-eventgrid/setup.py +++ b/sdk/eventgrid/azure-eventgrid/setup.py @@ -36,7 +36,9 @@ pass # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: +with open(os.path.join(package_folder_path, 'version.py') + if os.path.exists(os.path.join(package_folder_path, 'version.py')) + else os.path.join(package_folder_path, '_version.py'), 'r') as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) @@ -64,10 +66,10 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', 'License :: OSI Approved :: MIT License', ], zip_safe=False,