diff --git a/azure-eventgrid/HISTORY.rst b/azure-eventgrid/HISTORY.rst index 36513a5ab0ad..5b774d604112 100644 --- a/azure-eventgrid/HISTORY.rst +++ b/azure-eventgrid/HISTORY.rst @@ -3,6 +3,11 @@ Release History =============== +1.1.0 (2018-05-24) +++++++++++++++++++ + +- Event Schemas for EventGrid subscription validation event, Azure Media events, and ServiceBus events. + 1.0.0 (2018-04-26) ++++++++++++++++++ diff --git a/azure-eventgrid/azure/eventgrid/models/__init__.py b/azure-eventgrid/azure/eventgrid/models/__init__.py index ddea8d9d1677..57ba4b413989 100644 --- a/azure-eventgrid/azure/eventgrid/models/__init__.py +++ b/azure-eventgrid/azure/eventgrid/models/__init__.py @@ -20,6 +20,9 @@ from .resource_delete_failure_data_py3 import ResourceDeleteFailureData from .resource_delete_cancel_data_py3 import ResourceDeleteCancelData from .event_grid_event_py3 import EventGridEvent + from .subscription_validation_event_data_py3 import SubscriptionValidationEventData + from .subscription_validation_response_py3 import SubscriptionValidationResponse + from .subscription_deleted_event_data_py3 import SubscriptionDeletedEventData from .iot_hub_device_created_event_data_py3 import IotHubDeviceCreatedEventData from .iot_hub_device_deleted_event_data_py3 import IotHubDeviceDeletedEventData from .device_twin_metadata_py3 import DeviceTwinMetadata @@ -35,6 +38,9 @@ from .container_registry_event_actor_py3 import ContainerRegistryEventActor from .container_registry_event_source_py3 import ContainerRegistryEventSource from .container_registry_event_data_py3 import ContainerRegistryEventData + from .service_bus_active_messages_available_with_no_listeners_event_data_py3 import ServiceBusActiveMessagesAvailableWithNoListenersEventData + from .service_bus_deadletter_messages_available_with_no_listeners_event_data_py3 import ServiceBusDeadletterMessagesAvailableWithNoListenersEventData + from .media_job_state_change_event_data_py3 import MediaJobStateChangeEventData except (SyntaxError, ImportError): from .storage_blob_created_event_data import StorageBlobCreatedEventData from .storage_blob_deleted_event_data import StorageBlobDeletedEventData @@ -46,6 +52,9 @@ from .resource_delete_failure_data import ResourceDeleteFailureData from .resource_delete_cancel_data import ResourceDeleteCancelData from .event_grid_event import EventGridEvent + from .subscription_validation_event_data import SubscriptionValidationEventData + from .subscription_validation_response import SubscriptionValidationResponse + from .subscription_deleted_event_data import SubscriptionDeletedEventData from .iot_hub_device_created_event_data import IotHubDeviceCreatedEventData from .iot_hub_device_deleted_event_data import IotHubDeviceDeletedEventData from .device_twin_metadata import DeviceTwinMetadata @@ -61,6 +70,12 @@ from .container_registry_event_actor import ContainerRegistryEventActor from .container_registry_event_source import ContainerRegistryEventSource from .container_registry_event_data import ContainerRegistryEventData + from .service_bus_active_messages_available_with_no_listeners_event_data import ServiceBusActiveMessagesAvailableWithNoListenersEventData + from .service_bus_deadletter_messages_available_with_no_listeners_event_data import ServiceBusDeadletterMessagesAvailableWithNoListenersEventData + from .media_job_state_change_event_data import MediaJobStateChangeEventData +from .event_grid_client_enums import ( + JobState, +) __all__ = [ 'StorageBlobCreatedEventData', @@ -73,6 +88,9 @@ 'ResourceDeleteFailureData', 'ResourceDeleteCancelData', 'EventGridEvent', + 'SubscriptionValidationEventData', + 'SubscriptionValidationResponse', + 'SubscriptionDeletedEventData', 'IotHubDeviceCreatedEventData', 'IotHubDeviceDeletedEventData', 'DeviceTwinMetadata', @@ -88,4 +106,8 @@ 'ContainerRegistryEventActor', 'ContainerRegistryEventSource', 'ContainerRegistryEventData', + 'ServiceBusActiveMessagesAvailableWithNoListenersEventData', + 'ServiceBusDeadletterMessagesAvailableWithNoListenersEventData', + 'MediaJobStateChangeEventData', + 'JobState', ] diff --git a/azure-eventgrid/azure/eventgrid/models/container_registry_image_deleted_event_data_py3.py b/azure-eventgrid/azure/eventgrid/models/container_registry_image_deleted_event_data_py3.py index dc8924583b50..7365ea5c6a98 100644 --- a/azure-eventgrid/azure/eventgrid/models/container_registry_image_deleted_event_data_py3.py +++ b/azure-eventgrid/azure/eventgrid/models/container_registry_image_deleted_event_data_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .container_registry_event_data import ContainerRegistryEventData +from .container_registry_event_data_py3 import ContainerRegistryEventData class ContainerRegistryImageDeletedEventData(ContainerRegistryEventData): diff --git a/azure-eventgrid/azure/eventgrid/models/container_registry_image_pushed_event_data_py3.py b/azure-eventgrid/azure/eventgrid/models/container_registry_image_pushed_event_data_py3.py index 0eb8a68e9462..f12aa21fc809 100644 --- a/azure-eventgrid/azure/eventgrid/models/container_registry_image_pushed_event_data_py3.py +++ b/azure-eventgrid/azure/eventgrid/models/container_registry_image_pushed_event_data_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .container_registry_event_data import ContainerRegistryEventData +from .container_registry_event_data_py3 import ContainerRegistryEventData class ContainerRegistryImagePushedEventData(ContainerRegistryEventData): diff --git a/azure-eventgrid/azure/eventgrid/models/event_grid_client_enums.py b/azure-eventgrid/azure/eventgrid/models/event_grid_client_enums.py new file mode 100644 index 000000000000..f76069221076 --- /dev/null +++ b/azure-eventgrid/azure/eventgrid/models/event_grid_client_enums.py @@ -0,0 +1,23 @@ +# 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 enum import Enum + + +class JobState(str, Enum): + + canceled = "Canceled" #: The job was canceled. This is a final state for the job. + canceling = "Canceling" #: The job is in the process of being canceled. This is a transient state for the job. + error = "Error" #: The job has encountered an error. This is a final state for the job. + finished = "Finished" #: The job is finished. This is a final state for the job. + processing = "Processing" #: The job is processing. This is a transient state for the job. + queued = "Queued" #: The job is in a queued state, waiting for resources to become available. This is a transient state. + scheduled = "Scheduled" #: The job is being scheduled to run on an available resource. This is a transient state, between queued and processing states. diff --git a/azure-eventgrid/azure/eventgrid/models/iot_hub_device_created_event_data_py3.py b/azure-eventgrid/azure/eventgrid/models/iot_hub_device_created_event_data_py3.py index 8ddc99f32782..8c739a8e7724 100644 --- a/azure-eventgrid/azure/eventgrid/models/iot_hub_device_created_event_data_py3.py +++ b/azure-eventgrid/azure/eventgrid/models/iot_hub_device_created_event_data_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .device_life_cycle_event_properties import DeviceLifeCycleEventProperties +from .device_life_cycle_event_properties_py3 import DeviceLifeCycleEventProperties class IotHubDeviceCreatedEventData(DeviceLifeCycleEventProperties): diff --git a/azure-eventgrid/azure/eventgrid/models/iot_hub_device_deleted_event_data_py3.py b/azure-eventgrid/azure/eventgrid/models/iot_hub_device_deleted_event_data_py3.py index 7d4745272f77..070953804e30 100644 --- a/azure-eventgrid/azure/eventgrid/models/iot_hub_device_deleted_event_data_py3.py +++ b/azure-eventgrid/azure/eventgrid/models/iot_hub_device_deleted_event_data_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .device_life_cycle_event_properties import DeviceLifeCycleEventProperties +from .device_life_cycle_event_properties_py3 import DeviceLifeCycleEventProperties class IotHubDeviceDeletedEventData(DeviceLifeCycleEventProperties): diff --git a/azure-eventgrid/azure/eventgrid/models/media_job_state_change_event_data.py b/azure-eventgrid/azure/eventgrid/models/media_job_state_change_event_data.py new file mode 100644 index 000000000000..02f704f2ca2b --- /dev/null +++ b/azure-eventgrid/azure/eventgrid/models/media_job_state_change_event_data.py @@ -0,0 +1,45 @@ +# 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 MediaJobStateChangeEventData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.Media.JobStateChange event. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar previous_state: The previous state of the Job. Possible values + include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', + 'Queued', 'Scheduled' + :vartype previous_state: str or ~azure.eventgrid.models.JobState + :ivar state: The new state of the Job. Possible values include: + 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', + 'Scheduled' + :vartype state: str or ~azure.eventgrid.models.JobState + """ + + _validation = { + 'previous_state': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'JobState'}, + 'state': {'key': 'state', 'type': 'JobState'}, + } + + def __init__(self, **kwargs): + super(MediaJobStateChangeEventData, self).__init__(**kwargs) + self.previous_state = None + self.state = None diff --git a/azure-eventgrid/azure/eventgrid/models/media_job_state_change_event_data_py3.py b/azure-eventgrid/azure/eventgrid/models/media_job_state_change_event_data_py3.py new file mode 100644 index 000000000000..ce69d00211eb --- /dev/null +++ b/azure-eventgrid/azure/eventgrid/models/media_job_state_change_event_data_py3.py @@ -0,0 +1,45 @@ +# 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 MediaJobStateChangeEventData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.Media.JobStateChange event. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar previous_state: The previous state of the Job. Possible values + include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', + 'Queued', 'Scheduled' + :vartype previous_state: str or ~azure.eventgrid.models.JobState + :ivar state: The new state of the Job. Possible values include: + 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', + 'Scheduled' + :vartype state: str or ~azure.eventgrid.models.JobState + """ + + _validation = { + 'previous_state': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'JobState'}, + 'state': {'key': 'state', 'type': 'JobState'}, + } + + def __init__(self, **kwargs) -> None: + super(MediaJobStateChangeEventData, self).__init__(**kwargs) + self.previous_state = None + self.state = None diff --git a/azure-eventgrid/azure/eventgrid/models/service_bus_active_messages_available_with_no_listeners_event_data.py b/azure-eventgrid/azure/eventgrid/models/service_bus_active_messages_available_with_no_listeners_event_data.py new file mode 100644 index 000000000000..c409c8396a05 --- /dev/null +++ b/azure-eventgrid/azure/eventgrid/models/service_bus_active_messages_available_with_no_listeners_event_data.py @@ -0,0 +1,55 @@ +# 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 ServiceBusActiveMessagesAvailableWithNoListenersEventData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.ServiceBus.ActiveMessagesAvailableWithNoListeners event. + + :param namespace_name: The namespace name of the Microsoft.ServiceBus + resource. + :type namespace_name: str + :param request_uri: The endpoint of the Microsoft.ServiceBus resource. + :type request_uri: str + :param entity_type: The entity type of the Microsoft.ServiceBus resource. + Could be one of 'queue' or 'subscriber'. + :type entity_type: str + :param queue_name: The name of the Microsoft.ServiceBus queue. If the + entity type is of type 'subscriber', then this value will be null. + :type queue_name: str + :param topic_name: The name of the Microsoft.ServiceBus topic. If the + entity type is of type 'queue', then this value will be null. + :type topic_name: str + :param subscription_name: The name of the Microsoft.ServiceBus topic's + subscription. If the entity type is of type 'queue', then this value will + be null. + :type subscription_name: str + """ + + _attribute_map = { + 'namespace_name': {'key': 'namespaceName', 'type': 'str'}, + 'request_uri': {'key': 'requestUri', 'type': 'str'}, + 'entity_type': {'key': 'entityType', 'type': 'str'}, + 'queue_name': {'key': 'queueName', 'type': 'str'}, + 'topic_name': {'key': 'topicName', 'type': 'str'}, + 'subscription_name': {'key': 'subscriptionName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceBusActiveMessagesAvailableWithNoListenersEventData, self).__init__(**kwargs) + self.namespace_name = kwargs.get('namespace_name', None) + self.request_uri = kwargs.get('request_uri', None) + self.entity_type = kwargs.get('entity_type', None) + self.queue_name = kwargs.get('queue_name', None) + self.topic_name = kwargs.get('topic_name', None) + self.subscription_name = kwargs.get('subscription_name', None) diff --git a/azure-eventgrid/azure/eventgrid/models/service_bus_active_messages_available_with_no_listeners_event_data_py3.py b/azure-eventgrid/azure/eventgrid/models/service_bus_active_messages_available_with_no_listeners_event_data_py3.py new file mode 100644 index 000000000000..35a4108ae4d9 --- /dev/null +++ b/azure-eventgrid/azure/eventgrid/models/service_bus_active_messages_available_with_no_listeners_event_data_py3.py @@ -0,0 +1,55 @@ +# 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 ServiceBusActiveMessagesAvailableWithNoListenersEventData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.ServiceBus.ActiveMessagesAvailableWithNoListeners event. + + :param namespace_name: The namespace name of the Microsoft.ServiceBus + resource. + :type namespace_name: str + :param request_uri: The endpoint of the Microsoft.ServiceBus resource. + :type request_uri: str + :param entity_type: The entity type of the Microsoft.ServiceBus resource. + Could be one of 'queue' or 'subscriber'. + :type entity_type: str + :param queue_name: The name of the Microsoft.ServiceBus queue. If the + entity type is of type 'subscriber', then this value will be null. + :type queue_name: str + :param topic_name: The name of the Microsoft.ServiceBus topic. If the + entity type is of type 'queue', then this value will be null. + :type topic_name: str + :param subscription_name: The name of the Microsoft.ServiceBus topic's + subscription. If the entity type is of type 'queue', then this value will + be null. + :type subscription_name: str + """ + + _attribute_map = { + 'namespace_name': {'key': 'namespaceName', 'type': 'str'}, + 'request_uri': {'key': 'requestUri', 'type': 'str'}, + 'entity_type': {'key': 'entityType', 'type': 'str'}, + 'queue_name': {'key': 'queueName', 'type': 'str'}, + 'topic_name': {'key': 'topicName', 'type': 'str'}, + 'subscription_name': {'key': 'subscriptionName', 'type': 'str'}, + } + + def __init__(self, *, namespace_name: str=None, request_uri: str=None, entity_type: str=None, queue_name: str=None, topic_name: str=None, subscription_name: str=None, **kwargs) -> None: + super(ServiceBusActiveMessagesAvailableWithNoListenersEventData, self).__init__(**kwargs) + self.namespace_name = namespace_name + self.request_uri = request_uri + self.entity_type = entity_type + self.queue_name = queue_name + self.topic_name = topic_name + self.subscription_name = subscription_name diff --git a/azure-eventgrid/azure/eventgrid/models/service_bus_deadletter_messages_available_with_no_listeners_event_data.py b/azure-eventgrid/azure/eventgrid/models/service_bus_deadletter_messages_available_with_no_listeners_event_data.py new file mode 100644 index 000000000000..60310de45628 --- /dev/null +++ b/azure-eventgrid/azure/eventgrid/models/service_bus_deadletter_messages_available_with_no_listeners_event_data.py @@ -0,0 +1,55 @@ +# 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 ServiceBusDeadletterMessagesAvailableWithNoListenersEventData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.ServiceBus.DeadletterMessagesAvailableWithNoListenersEvent event. + + :param namespace_name: The namespace name of the Microsoft.ServiceBus + resource. + :type namespace_name: str + :param request_uri: The endpoint of the Microsoft.ServiceBus resource. + :type request_uri: str + :param entity_type: The entity type of the Microsoft.ServiceBus resource. + Could be one of 'queue' or 'subscriber'. + :type entity_type: str + :param queue_name: The name of the Microsoft.ServiceBus queue. If the + entity type is of type 'subscriber', then this value will be null. + :type queue_name: str + :param topic_name: The name of the Microsoft.ServiceBus topic. If the + entity type is of type 'queue', then this value will be null. + :type topic_name: str + :param subscription_name: The name of the Microsoft.ServiceBus topic's + subscription. If the entity type is of type 'queue', then this value will + be null. + :type subscription_name: str + """ + + _attribute_map = { + 'namespace_name': {'key': 'namespaceName', 'type': 'str'}, + 'request_uri': {'key': 'requestUri', 'type': 'str'}, + 'entity_type': {'key': 'entityType', 'type': 'str'}, + 'queue_name': {'key': 'queueName', 'type': 'str'}, + 'topic_name': {'key': 'topicName', 'type': 'str'}, + 'subscription_name': {'key': 'subscriptionName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceBusDeadletterMessagesAvailableWithNoListenersEventData, self).__init__(**kwargs) + self.namespace_name = kwargs.get('namespace_name', None) + self.request_uri = kwargs.get('request_uri', None) + self.entity_type = kwargs.get('entity_type', None) + self.queue_name = kwargs.get('queue_name', None) + self.topic_name = kwargs.get('topic_name', None) + self.subscription_name = kwargs.get('subscription_name', None) diff --git a/azure-eventgrid/azure/eventgrid/models/service_bus_deadletter_messages_available_with_no_listeners_event_data_py3.py b/azure-eventgrid/azure/eventgrid/models/service_bus_deadletter_messages_available_with_no_listeners_event_data_py3.py new file mode 100644 index 000000000000..3f8afafc482c --- /dev/null +++ b/azure-eventgrid/azure/eventgrid/models/service_bus_deadletter_messages_available_with_no_listeners_event_data_py3.py @@ -0,0 +1,55 @@ +# 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 ServiceBusDeadletterMessagesAvailableWithNoListenersEventData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.ServiceBus.DeadletterMessagesAvailableWithNoListenersEvent event. + + :param namespace_name: The namespace name of the Microsoft.ServiceBus + resource. + :type namespace_name: str + :param request_uri: The endpoint of the Microsoft.ServiceBus resource. + :type request_uri: str + :param entity_type: The entity type of the Microsoft.ServiceBus resource. + Could be one of 'queue' or 'subscriber'. + :type entity_type: str + :param queue_name: The name of the Microsoft.ServiceBus queue. If the + entity type is of type 'subscriber', then this value will be null. + :type queue_name: str + :param topic_name: The name of the Microsoft.ServiceBus topic. If the + entity type is of type 'queue', then this value will be null. + :type topic_name: str + :param subscription_name: The name of the Microsoft.ServiceBus topic's + subscription. If the entity type is of type 'queue', then this value will + be null. + :type subscription_name: str + """ + + _attribute_map = { + 'namespace_name': {'key': 'namespaceName', 'type': 'str'}, + 'request_uri': {'key': 'requestUri', 'type': 'str'}, + 'entity_type': {'key': 'entityType', 'type': 'str'}, + 'queue_name': {'key': 'queueName', 'type': 'str'}, + 'topic_name': {'key': 'topicName', 'type': 'str'}, + 'subscription_name': {'key': 'subscriptionName', 'type': 'str'}, + } + + def __init__(self, *, namespace_name: str=None, request_uri: str=None, entity_type: str=None, queue_name: str=None, topic_name: str=None, subscription_name: str=None, **kwargs) -> None: + super(ServiceBusDeadletterMessagesAvailableWithNoListenersEventData, self).__init__(**kwargs) + self.namespace_name = namespace_name + self.request_uri = request_uri + self.entity_type = entity_type + self.queue_name = queue_name + self.topic_name = topic_name + self.subscription_name = subscription_name diff --git a/azure-eventgrid/azure/eventgrid/models/subscription_deleted_event_data.py b/azure-eventgrid/azure/eventgrid/models/subscription_deleted_event_data.py new file mode 100644 index 000000000000..2aa366646706 --- /dev/null +++ b/azure-eventgrid/azure/eventgrid/models/subscription_deleted_event_data.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SubscriptionDeletedEventData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.EventGrid.SubscriptionDeletedEvent. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar event_subscription_id: The Azure resource ID of the deleted event + subscription. + :vartype event_subscription_id: str + """ + + _validation = { + 'event_subscription_id': {'readonly': True}, + } + + _attribute_map = { + 'event_subscription_id': {'key': 'eventSubscriptionId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubscriptionDeletedEventData, self).__init__(**kwargs) + self.event_subscription_id = None diff --git a/azure-eventgrid/azure/eventgrid/models/subscription_deleted_event_data_py3.py b/azure-eventgrid/azure/eventgrid/models/subscription_deleted_event_data_py3.py new file mode 100644 index 000000000000..133338d9d112 --- /dev/null +++ b/azure-eventgrid/azure/eventgrid/models/subscription_deleted_event_data_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SubscriptionDeletedEventData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.EventGrid.SubscriptionDeletedEvent. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar event_subscription_id: The Azure resource ID of the deleted event + subscription. + :vartype event_subscription_id: str + """ + + _validation = { + 'event_subscription_id': {'readonly': True}, + } + + _attribute_map = { + 'event_subscription_id': {'key': 'eventSubscriptionId', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SubscriptionDeletedEventData, self).__init__(**kwargs) + self.event_subscription_id = None diff --git a/azure-eventgrid/azure/eventgrid/models/subscription_validation_event_data.py b/azure-eventgrid/azure/eventgrid/models/subscription_validation_event_data.py new file mode 100644 index 000000000000..f9d0bfe7c431 --- /dev/null +++ b/azure-eventgrid/azure/eventgrid/models/subscription_validation_event_data.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 msrest.serialization import Model + + +class SubscriptionValidationEventData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.EventGrid.SubscriptionValidationEvent. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar validation_code: The validation code sent by Azure Event Grid to + validate an event subscription. To complete the validation handshake, the + subscriber must either respond with this validation code as part of the + validation response, or perform a GET request on the validationUrl + (available starting version 2018-05-01-preview). + :vartype validation_code: str + :ivar validation_url: The validation URL sent by Azure Event Grid + (available starting version 2018-05-01-preview). To complete the + validation handshake, the subscriber must either respond with the + validationCode as part of the validation response, or perform a GET + request on the validationUrl (available starting version + 2018-05-01-preview). + :vartype validation_url: str + """ + + _validation = { + 'validation_code': {'readonly': True}, + 'validation_url': {'readonly': True}, + } + + _attribute_map = { + 'validation_code': {'key': 'validationCode', 'type': 'str'}, + 'validation_url': {'key': 'validationUrl', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubscriptionValidationEventData, self).__init__(**kwargs) + self.validation_code = None + self.validation_url = None diff --git a/azure-eventgrid/azure/eventgrid/models/subscription_validation_event_data_py3.py b/azure-eventgrid/azure/eventgrid/models/subscription_validation_event_data_py3.py new file mode 100644 index 000000000000..b4302b98927b --- /dev/null +++ b/azure-eventgrid/azure/eventgrid/models/subscription_validation_event_data_py3.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 msrest.serialization import Model + + +class SubscriptionValidationEventData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.EventGrid.SubscriptionValidationEvent. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar validation_code: The validation code sent by Azure Event Grid to + validate an event subscription. To complete the validation handshake, the + subscriber must either respond with this validation code as part of the + validation response, or perform a GET request on the validationUrl + (available starting version 2018-05-01-preview). + :vartype validation_code: str + :ivar validation_url: The validation URL sent by Azure Event Grid + (available starting version 2018-05-01-preview). To complete the + validation handshake, the subscriber must either respond with the + validationCode as part of the validation response, or perform a GET + request on the validationUrl (available starting version + 2018-05-01-preview). + :vartype validation_url: str + """ + + _validation = { + 'validation_code': {'readonly': True}, + 'validation_url': {'readonly': True}, + } + + _attribute_map = { + 'validation_code': {'key': 'validationCode', 'type': 'str'}, + 'validation_url': {'key': 'validationUrl', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SubscriptionValidationEventData, self).__init__(**kwargs) + self.validation_code = None + self.validation_url = None diff --git a/azure-eventgrid/azure/eventgrid/models/subscription_validation_response.py b/azure-eventgrid/azure/eventgrid/models/subscription_validation_response.py new file mode 100644 index 000000000000..034d55d1faf1 --- /dev/null +++ b/azure-eventgrid/azure/eventgrid/models/subscription_validation_response.py @@ -0,0 +1,32 @@ +# 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 SubscriptionValidationResponse(Model): + """To complete an event subscription validation handshake, a subscriber can + use either the validationCode or the validationUrl received in a + SubscriptionValidationEvent. When the validationCode is used, the + SubscriptionValidationResponse can be used to build the response. + + :param validation_response: The validation response sent by the subscriber + to Azure Event Grid to complete the validation of an event subscription. + :type validation_response: str + """ + + _attribute_map = { + 'validation_response': {'key': 'validationResponse', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubscriptionValidationResponse, self).__init__(**kwargs) + self.validation_response = kwargs.get('validation_response', None) diff --git a/azure-eventgrid/azure/eventgrid/models/subscription_validation_response_py3.py b/azure-eventgrid/azure/eventgrid/models/subscription_validation_response_py3.py new file mode 100644 index 000000000000..dc76e2a5ca6f --- /dev/null +++ b/azure-eventgrid/azure/eventgrid/models/subscription_validation_response_py3.py @@ -0,0 +1,32 @@ +# 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 SubscriptionValidationResponse(Model): + """To complete an event subscription validation handshake, a subscriber can + use either the validationCode or the validationUrl received in a + SubscriptionValidationEvent. When the validationCode is used, the + SubscriptionValidationResponse can be used to build the response. + + :param validation_response: The validation response sent by the subscriber + to Azure Event Grid to complete the validation of an event subscription. + :type validation_response: str + """ + + _attribute_map = { + 'validation_response': {'key': 'validationResponse', 'type': 'str'}, + } + + def __init__(self, *, validation_response: str=None, **kwargs) -> None: + super(SubscriptionValidationResponse, self).__init__(**kwargs) + self.validation_response = validation_response diff --git a/azure-eventgrid/azure/eventgrid/version.py b/azure-eventgrid/azure/eventgrid/version.py index a39916c162ce..24b9de3384da 100644 --- a/azure-eventgrid/azure/eventgrid/version.py +++ b/azure-eventgrid/azure/eventgrid/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0" +VERSION = "1.1.0" diff --git a/azure-keyvault/README.rst b/azure-keyvault/README.rst index 63151a88017a..6b7b5ab5bc08 100644 --- a/azure-keyvault/README.rst +++ b/azure-keyvault/README.rst @@ -3,13 +3,7 @@ Microsoft Azure SDK for Python This is the Microsoft Azure Key Vault Client Library. -Azure Resource Manager (ARM) is the next generation of management APIs that -replace the old Azure Service Management (ASM). - -This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. - -For the older Azure Service Management (ASM) libraries, see -`azure-servicemanagement-legacy `__ library. +This package has been tested with Python 2.7, 3.4, 3.5 and 3.6. For a more complete set of Azure libraries, see the `azure `__ bundle package. @@ -37,8 +31,8 @@ Usage ===== For code examples, see `Key Vault -`__ -on readthedocs.org. +`__ +on docs.microsoft.com. Provide Feedback diff --git a/azure-keyvault/sdk_packaging.toml b/azure-keyvault/sdk_packaging.toml new file mode 100644 index 000000000000..5c2041749c30 --- /dev/null +++ b/azure-keyvault/sdk_packaging.toml @@ -0,0 +1,5 @@ +[packaging] +package_name = "azure-keyvault" +package_pprint_name = "Key Vault" +package_doc_id = "key-vault" +is_stable = false diff --git a/azure-keyvault/setup.py b/azure-keyvault/setup.py index 432dbfcbc4e2..389f8d1575a6 100644 --- a/azure-keyvault/setup.py +++ b/azure-keyvault/setup.py @@ -69,17 +69,15 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'License :: OSI Approved :: MIT License', ], zip_safe=False, - packages=find_packages(), + packages=find_packages(exclude=["tests"]), install_requires=[ - 'msrestazure>=0.4.15', - 'msrest>=0.4.17', + 'msrestazure>=0.4.27,<2.0.0', 'azure-common~=1.1', 'cryptography>=2.1.4', 'requests>=2.18.4' diff --git a/azure-mgmt-batch/HISTORY.rst b/azure-mgmt-batch/HISTORY.rst index 82c13322b2c3..0b76e6da402a 100644 --- a/azure-mgmt-batch/HISTORY.rst +++ b/azure-mgmt-batch/HISTORY.rst @@ -3,6 +3,14 @@ Release History =============== +5.0.1 (2018-05-25) +++++++++++++++++++ + +**Bugfixes** + +- Compatibility of the sdist with wheel 0.31.0 +- msrestazure dependency version range + 5.0.0 (2017-11-13) ++++++++++++++++++ diff --git a/azure-mgmt-batch/azure/mgmt/batch/version.py b/azure-mgmt-batch/azure/mgmt/batch/version.py index 654c55a24205..40eafbac8cab 100644 --- a/azure-mgmt-batch/azure/mgmt/batch/version.py +++ b/azure-mgmt-batch/azure/mgmt/batch/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "5.0.0" +VERSION = "5.0.1" diff --git a/azure-mgmt-batch/build.json b/azure-mgmt-batch/build.json deleted file mode 100644 index 6a04d53159e4..000000000000 --- a/azure-mgmt-batch/build.json +++ /dev/null @@ -1,424 +0,0 @@ -{ - "autorest": [ - { - "resolvedInfo": null, - "packageMetadata": { - "name": "@microsoft.azure/autorest-core", - "version": "2.0.4216", - "engines": { - "node": ">=7.10.0" - }, - "dependencies": {}, - "optionalDependencies": {}, - "devDependencies": { - "@types/commonmark": "^0.27.0", - "@types/js-yaml": "^3.10.0", - "@types/jsonpath": "^0.1.29", - "@types/node": "^8.0.53", - "@types/source-map": "^0.5.0", - "@types/yargs": "^8.0.2", - "dts-generator": "^2.1.0", - "mocha": "^4.0.1", - "mocha-typescript": "^1.1.7", - "shx": "0.2.2", - "static-link": "^0.2.3", - "vscode-jsonrpc": "^3.3.1" - }, - "bundleDependencies": false, - "peerDependencies": {}, - "deprecated": false, - "_resolved": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core", - "_shasum": "f6b97454df552dfa54bd0df23f8309665be5fd4c", - "_shrinkwrap": null, - "bin": { - "autorest-core": "./dist/app.js", - "autorest-language-service": "dist/language-service/language-service.js" - }, - "_id": "@microsoft.azure/autorest-core@2.0.4216", - "_from": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core", - "_requested": { - "type": "directory", - "where": "/git-restapi", - "raw": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core", - "rawSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core", - "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core", - "fetchSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core" - }, - "_spec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core", - "_where": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core" - }, - "extensionManager": { - "installationPath": "/root/.autorest", - "sharedLock": { - "name": "/root/.autorest", - "exclusiveLock": { - "name": "_root_.autorest.exclusive-lock", - "options": { - "port": 45234, - "host": "2130706813", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" - }, - "busyLock": { - "name": "_root_.autorest.busy-lock", - "options": { - "port": 37199, - "host": "2130756895", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" - }, - "personalLock": { - "name": "_root_.autorest.1835.1988216098603.personal-lock", - "options": { - "port": 54439, - "host": "2130759828", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.1835.1988216098603.personal-lock:54439" - }, - "file": "/tmp/_root_.autorest.lock" - }, - "dotnetPath": "/root/.dotnet" - }, - "installationPath": "/root/.autorest" - }, - { - "resolvedInfo": null, - "packageMetadata": { - "name": "@microsoft.azure/autorest-core", - "version": "2.0.4227", - "engines": { - "node": ">=7.10.0" - }, - "dependencies": {}, - "optionalDependencies": {}, - "devDependencies": { - "@types/commonmark": "^0.27.0", - "@types/js-yaml": "^3.10.0", - "@types/jsonpath": "^0.1.29", - "@types/node": "^8.0.53", - "@types/source-map": "^0.5.0", - "@types/yargs": "^8.0.2", - "@types/z-schema": "^3.16.31", - "dts-generator": "^2.1.0", - "mocha": "^4.0.1", - "mocha-typescript": "^1.1.7", - "shx": "0.2.2", - "static-link": "^0.2.3", - "vscode-jsonrpc": "^3.3.1" - }, - "bundleDependencies": false, - "peerDependencies": {}, - "deprecated": false, - "_resolved": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4227/node_modules/@microsoft.azure/autorest-core", - "_shasum": "d29217f10a534571f15f28ad2556c308726c5e0e", - "_shrinkwrap": null, - "bin": { - "autorest-core": "./dist/app.js", - "autorest-language-service": "dist/language-service/language-service.js" - }, - "_id": "@microsoft.azure/autorest-core@2.0.4227", - "_from": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4227/node_modules/@microsoft.azure/autorest-core", - "_requested": { - "type": "directory", - "where": "/git-restapi", - "raw": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4227/node_modules/@microsoft.azure/autorest-core", - "rawSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4227/node_modules/@microsoft.azure/autorest-core", - "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4227/node_modules/@microsoft.azure/autorest-core", - "fetchSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4227/node_modules/@microsoft.azure/autorest-core" - }, - "_spec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4227/node_modules/@microsoft.azure/autorest-core", - "_where": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4227/node_modules/@microsoft.azure/autorest-core" - }, - "extensionManager": { - "installationPath": "/root/.autorest", - "sharedLock": { - "name": "/root/.autorest", - "exclusiveLock": { - "name": "_root_.autorest.exclusive-lock", - "options": { - "port": 45234, - "host": "2130706813", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" - }, - "busyLock": { - "name": "_root_.autorest.busy-lock", - "options": { - "port": 37199, - "host": "2130756895", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" - }, - "personalLock": { - "name": "_root_.autorest.1835.1988216098603.personal-lock", - "options": { - "port": 54439, - "host": "2130759828", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.1835.1988216098603.personal-lock:54439" - }, - "file": "/tmp/_root_.autorest.lock" - }, - "dotnetPath": "/root/.dotnet" - }, - "installationPath": "/root/.autorest" - }, - { - "resolvedInfo": null, - "packageMetadata": { - "name": "@microsoft.azure/autorest.modeler", - "version": "2.0.21", - "dependencies": { - "dotnet-2.0.0": "^1.3.2" - }, - "optionalDependencies": {}, - "devDependencies": { - "coffee-script": "^1.11.1", - "dotnet-sdk-2.0.0": "^1.1.1", - "gulp": "^3.9.1", - "gulp-filter": "^5.0.0", - "gulp-line-ending-corrector": "^1.0.1", - "iced-coffee-script": "^108.0.11", - "marked": "^0.3.6", - "marked-terminal": "^2.0.0", - "moment": "^2.17.1", - "run-sequence": "*", - "shx": "^0.2.2", - "through2-parallel": "^0.1.3", - "yargs": "^8.0.2", - "yarn": "^1.0.2" - }, - "bundleDependencies": false, - "peerDependencies": {}, - "deprecated": false, - "_resolved": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", - "_shasum": "3ce7d3939124b31830be15e5de99b9b7768afb90", - "_shrinkwrap": null, - "bin": null, - "_id": "@microsoft.azure/autorest.modeler@2.0.21", - "_from": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", - "_requested": { - "type": "directory", - "where": "/git-restapi", - "raw": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", - "rawSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", - "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", - "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler" - }, - "_spec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", - "_where": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler" - }, - "extensionManager": { - "installationPath": "/root/.autorest", - "sharedLock": { - "name": "/root/.autorest", - "exclusiveLock": { - "name": "_root_.autorest.exclusive-lock", - "options": { - "port": 45234, - "host": "2130706813", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" - }, - "busyLock": { - "name": "_root_.autorest.busy-lock", - "options": { - "port": 37199, - "host": "2130756895", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" - }, - "personalLock": { - "name": "_root_.autorest.1835.1988216098603.personal-lock", - "options": { - "port": 54439, - "host": "2130759828", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.1835.1988216098603.personal-lock:54439" - }, - "file": "/tmp/_root_.autorest.lock" - }, - "dotnetPath": "/root/.dotnet" - }, - "installationPath": "/root/.autorest" - }, - { - "resolvedInfo": null, - "packageMetadata": { - "name": "@microsoft.azure/autorest.modeler", - "version": "2.3.38", - "dependencies": { - "dotnet-2.0.0": "^1.4.4" - }, - "optionalDependencies": {}, - "devDependencies": { - "@microsoft.azure/autorest.testserver": "2.3.1", - "autorest": "^2.0.4201", - "coffee-script": "^1.11.1", - "dotnet-sdk-2.0.0": "^1.4.4", - "gulp": "^3.9.1", - "gulp-filter": "^5.0.0", - "gulp-line-ending-corrector": "^1.0.1", - "iced-coffee-script": "^108.0.11", - "marked": "^0.3.6", - "marked-terminal": "^2.0.0", - "moment": "^2.17.1", - "run-sequence": "*", - "shx": "^0.2.2", - "through2-parallel": "^0.1.3", - "yargs": "^8.0.2", - "yarn": "^1.0.2" - }, - "bundleDependencies": false, - "peerDependencies": {}, - "deprecated": false, - "_resolved": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", - "_shasum": "903bb77932e4ed1b8bc3b25cc39b167143494f6c", - "_shrinkwrap": null, - "bin": null, - "_id": "@microsoft.azure/autorest.modeler@2.3.38", - "_from": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", - "_requested": { - "type": "directory", - "where": "/git-restapi", - "raw": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", - "rawSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", - "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", - "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler" - }, - "_spec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", - "_where": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler" - }, - "extensionManager": { - "installationPath": "/root/.autorest", - "sharedLock": { - "name": "/root/.autorest", - "exclusiveLock": { - "name": "_root_.autorest.exclusive-lock", - "options": { - "port": 45234, - "host": "2130706813", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" - }, - "busyLock": { - "name": "_root_.autorest.busy-lock", - "options": { - "port": 37199, - "host": "2130756895", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" - }, - "personalLock": { - "name": "_root_.autorest.1835.1988216098603.personal-lock", - "options": { - "port": 54439, - "host": "2130759828", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.1835.1988216098603.personal-lock:54439" - }, - "file": "/tmp/_root_.autorest.lock" - }, - "dotnetPath": "/root/.dotnet" - }, - "installationPath": "/root/.autorest" - }, - { - "resolvedInfo": null, - "packageMetadata": { - "name": "@microsoft.azure/autorest.python", - "version": "2.1.28", - "dependencies": { - "dotnet-2.0.0": "^1.4.4" - }, - "optionalDependencies": {}, - "devDependencies": { - "@microsoft.azure/autorest.testserver": "^2.3.13", - "autorest": "^2.0.4203", - "coffee-script": "^1.11.1", - "dotnet-sdk-2.0.0": "^1.4.4", - "gulp": "^3.9.1", - "gulp-filter": "^5.0.0", - "gulp-line-ending-corrector": "^1.0.1", - "iced-coffee-script": "^108.0.11", - "marked": "^0.3.6", - "marked-terminal": "^2.0.0", - "moment": "^2.17.1", - "run-sequence": "*", - "shx": "^0.2.2", - "through2-parallel": "^0.1.3", - "yargs": "^8.0.2", - "yarn": "^1.0.2" - }, - "bundleDependencies": false, - "peerDependencies": {}, - "deprecated": false, - "_resolved": "/root/.autorest/@microsoft.azure_autorest.python@2.1.28/node_modules/@microsoft.azure/autorest.python", - "_shasum": "864acf40daff5c5e073f0e7da55597c3a7994469", - "_shrinkwrap": null, - "bin": null, - "_id": "@microsoft.azure/autorest.python@2.1.28", - "_from": "file:/root/.autorest/@microsoft.azure_autorest.python@2.1.28/node_modules/@microsoft.azure/autorest.python", - "_requested": { - "type": "directory", - "where": "/git-restapi", - "raw": "/root/.autorest/@microsoft.azure_autorest.python@2.1.28/node_modules/@microsoft.azure/autorest.python", - "rawSpec": "/root/.autorest/@microsoft.azure_autorest.python@2.1.28/node_modules/@microsoft.azure/autorest.python", - "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.python@2.1.28/node_modules/@microsoft.azure/autorest.python", - "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.python@2.1.28/node_modules/@microsoft.azure/autorest.python" - }, - "_spec": "/root/.autorest/@microsoft.azure_autorest.python@2.1.28/node_modules/@microsoft.azure/autorest.python", - "_where": "/root/.autorest/@microsoft.azure_autorest.python@2.1.28/node_modules/@microsoft.azure/autorest.python" - }, - "extensionManager": { - "installationPath": "/root/.autorest", - "sharedLock": { - "name": "/root/.autorest", - "exclusiveLock": { - "name": "_root_.autorest.exclusive-lock", - "options": { - "port": 45234, - "host": "2130706813", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" - }, - "busyLock": { - "name": "_root_.autorest.busy-lock", - "options": { - "port": 37199, - "host": "2130756895", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" - }, - "personalLock": { - "name": "_root_.autorest.1835.1988216098603.personal-lock", - "options": { - "port": 54439, - "host": "2130759828", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.1835.1988216098603.personal-lock:54439" - }, - "file": "/tmp/_root_.autorest.lock" - }, - "dotnetPath": "/root/.dotnet" - }, - "installationPath": "/root/.autorest" - } - ], - "autorest_bootstrap": {} -} \ No newline at end of file diff --git a/azure-mgmt-batch/sdk_packaging.toml b/azure-mgmt-batch/sdk_packaging.toml new file mode 100644 index 000000000000..5d112a76b6b5 --- /dev/null +++ b/azure-mgmt-batch/sdk_packaging.toml @@ -0,0 +1,5 @@ +[packaging] +package_name = "azure-mgmt-batch" +package_pprint_name = "Batch Management" +package_doc_id = "batch" +is_stable = true diff --git a/azure-mgmt-batch/setup.cfg b/azure-mgmt-batch/setup.cfg index 0be29eb3bc63..856f4164982c 100644 --- a/azure-mgmt-batch/setup.cfg +++ b/azure-mgmt-batch/setup.cfg @@ -1,3 +1,3 @@ [bdist_wheel] universal=1 -azure-namespace-package=azure-mgmt-nspkg +azure-namespace-package=azure-mgmt-nspkg \ No newline at end of file diff --git a/azure-mgmt-batch/setup.py b/azure-mgmt-batch/setup.py index a5cd0b216608..3498c2e0f75c 100644 --- a/azure-mgmt-batch/setup.py +++ b/azure-mgmt-batch/setup.py @@ -69,7 +69,6 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', @@ -78,7 +77,7 @@ zip_safe=False, packages=find_packages(exclude=["tests"]), install_requires=[ - 'msrestazure~=0.4.11', + 'msrestazure>=0.4.27,<2.0.0', 'azure-common~=1.1', ], cmdclass=cmdclass diff --git a/azure-mgmt-cdn/HISTORY.rst b/azure-mgmt-cdn/HISTORY.rst index e5efca86d3ed..cabe733fd844 100644 --- a/azure-mgmt-cdn/HISTORY.rst +++ b/azure-mgmt-cdn/HISTORY.rst @@ -3,6 +3,46 @@ Release History =============== +3.0.0 (2018-05-25) +++++++++++++++++++ + +**Features** + +- Add client method check_name_availability_with_subscription +- Model EndpointUpdateParameters has a new parameter delivery_policy +- Model Endpoint has a new parameter delivery_policy +- Client class can be used as a context manager to keep the underlying HTTP session open for performance + +**General Breaking changes** + +This version uses a next-generation code generator that *might* introduce breaking changes. + +- Model signatures now use only keyword-argument syntax. All positional arguments must be re-written as keyword-arguments. + To keep auto-completion in most cases, models are now generated for Python 2 and Python 3. Python 3 uses the "*" syntax for keyword-only arguments. +- Enum types now use the "str" mixin (class AzureEnum(str, Enum)) to improve the behavior when unrecognized enum values are encountered. + While this is not a breaking change, the distinctions are important, and are documented here: + https://docs.python.org/3/library/enum.html#others + At a glance: + + - "is" should not be used at all. + - "format" will return the string value, where "%s" string formatting will return `NameOfEnum.stringvalue`. Format syntax should be prefered. + +- New Long Running Operation: + + - Return type changes from `msrestazure.azure_operation.AzureOperationPoller` to `msrest.polling.LROPoller`. External API is the same. + - Return type is now **always** a `msrest.polling.LROPoller`, regardless of the optional parameters used. + - The behavior has changed when using `raw=True`. Instead of returning the initial call result as `ClientRawResponse`, + without polling, now this returns an LROPoller. After polling, the final resource will be returned as a `ClientRawResponse`. + - New `polling` parameter. The default behavior is `Polling=True` which will poll using ARM algorithm. When `Polling=False`, + the response of the initial call will be returned without polling. + - `polling` parameter accepts instances of subclasses of `msrest.polling.PollingMethod`. + - `add_done_callback` will no longer raise if called after polling is finished, but will instead execute the callback right away. + +**Bugfixes** + +- Compatibility of the sdist with wheel 0.31.0 + + 2.0.0 (2017-10-26) ++++++++++++++++++ diff --git a/azure-mgmt-cdn/README.rst b/azure-mgmt-cdn/README.rst index 3fa0733220fa..3943e79785f4 100644 --- a/azure-mgmt-cdn/README.rst +++ b/azure-mgmt-cdn/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure CDN Management Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. +This package has been tested with Python 2.7, 3.4, 3.5 and 3.6. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. @@ -36,9 +36,9 @@ If you see azure==0.11.0 (or any version below 1.0), uninstall it first: Usage ===== -For code examples, see `CDN Resource Management -`__ -on readthedocs.org. +For code examples, see `CDN Management +`__ +on docs.microsoft.com. Provide Feedback diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/cdn_management_client.py b/azure-mgmt-cdn/azure/mgmt/cdn/cdn_management_client.py index 31fb6353d261..afba70d709ab 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/cdn_management_client.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/cdn_management_client.py @@ -9,12 +9,13 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import ServiceClient +from msrest.service_client import SDKClient from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION from msrest.pipeline import ClientRawResponse -from msrestazure.azure_operation import AzureOperationPoller +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling import uuid from .operations.profiles_operations import ProfilesOperations from .operations.endpoints_operations import EndpointsOperations @@ -58,7 +59,7 @@ def __init__( self.subscription_id = subscription_id -class CdnManagementClient(object): +class CdnManagementClient(SDKClient): """Use these APIs to manage Azure CDN resources through the Azure Resource Manager. You must make sure that requests made to these resources are secure. :ivar config: Configuration for client. @@ -91,10 +92,10 @@ def __init__( self, credentials, subscription_id, base_url=None): self.config = CdnManagementClientConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) + super(CdnManagementClient, 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 = '2017-04-02' + self.api_version = '2017-10-12' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) @@ -173,6 +174,70 @@ def check_name_availability( return deserialized check_name_availability.metadata = {'url': '/providers/Microsoft.Cdn/checkNameAvailability'} + def check_name_availability_with_subscription( + self, name, custom_headers=None, raw=False, **operation_config): + """Check the availability of a resource name. This is needed for resources + where name is globally unique, such as a CDN endpoint. + + :param name: The resource name to validate. + :type 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: CheckNameAvailabilityOutput or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + check_name_availability_input = models.CheckNameAvailabilityInput(name=name) + + # Construct URL + url = self.check_name_availability_with_subscription.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("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(check_name_availability_input, 'CheckNameAvailabilityInput') + + # 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]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('CheckNameAvailabilityOutput', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + check_name_availability_with_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/checkNameAvailability'} + def validate_probe( self, probe_url, custom_headers=None, raw=False, **operation_config): """Check if the probe path is a valid path and the file can be accessed. diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/__init__.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/__init__.py index 9d21eedae8cb..4c839265f66b 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/__init__.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/__init__.py @@ -9,37 +9,90 @@ # regenerated. # -------------------------------------------------------------------------- -from .sku import Sku -from .profile import Profile -from .profile_update_parameters import ProfileUpdateParameters -from .sso_uri import SsoUri -from .supported_optimization_types_list_result import SupportedOptimizationTypesListResult -from .deep_created_origin import DeepCreatedOrigin -from .endpoint import Endpoint -from .geo_filter import GeoFilter -from .endpoint_update_parameters import EndpointUpdateParameters -from .purge_parameters import PurgeParameters -from .load_parameters import LoadParameters -from .origin import Origin -from .origin_update_parameters import OriginUpdateParameters -from .custom_domain import CustomDomain -from .custom_domain_parameters import CustomDomainParameters -from .validate_custom_domain_input import ValidateCustomDomainInput -from .validate_custom_domain_output import ValidateCustomDomainOutput -from .check_name_availability_input import CheckNameAvailabilityInput -from .check_name_availability_output import CheckNameAvailabilityOutput -from .validate_probe_input import ValidateProbeInput -from .validate_probe_output import ValidateProbeOutput -from .resource_usage import ResourceUsage -from .operation_display import OperationDisplay -from .operation import Operation -from .cidr_ip_address import CidrIpAddress -from .ip_address_group import IpAddressGroup -from .edge_node import EdgeNode -from .resource import Resource -from .tracked_resource import TrackedResource -from .proxy_resource import ProxyResource -from .error_response import ErrorResponse, ErrorResponseException +try: + from .sku_py3 import Sku + from .profile_py3 import Profile + from .profile_update_parameters_py3 import ProfileUpdateParameters + from .sso_uri_py3 import SsoUri + from .supported_optimization_types_list_result_py3 import SupportedOptimizationTypesListResult + from .deep_created_origin_py3 import DeepCreatedOrigin + from .endpoint_py3 import Endpoint + from .geo_filter_py3 import GeoFilter + from .delivery_rule_action_py3 import DeliveryRuleAction + from .delivery_rule_condition_py3 import DeliveryRuleCondition + from .delivery_rule_py3 import DeliveryRule + from .endpoint_properties_update_parameters_delivery_policy_py3 import EndpointPropertiesUpdateParametersDeliveryPolicy + from .endpoint_update_parameters_py3 import EndpointUpdateParameters + from .url_path_condition_parameters_py3 import UrlPathConditionParameters + from .delivery_rule_url_path_condition_py3 import DeliveryRuleUrlPathCondition + from .url_file_extension_condition_parameters_py3 import UrlFileExtensionConditionParameters + from .delivery_rule_url_file_extension_condition_py3 import DeliveryRuleUrlFileExtensionCondition + from .cache_expiration_action_parameters_py3 import CacheExpirationActionParameters + from .delivery_rule_cache_expiration_action_py3 import DeliveryRuleCacheExpirationAction + from .purge_parameters_py3 import PurgeParameters + from .load_parameters_py3 import LoadParameters + from .origin_py3 import Origin + from .origin_update_parameters_py3 import OriginUpdateParameters + from .custom_domain_py3 import CustomDomain + from .custom_domain_parameters_py3 import CustomDomainParameters + from .validate_custom_domain_input_py3 import ValidateCustomDomainInput + from .validate_custom_domain_output_py3 import ValidateCustomDomainOutput + from .check_name_availability_input_py3 import CheckNameAvailabilityInput + from .check_name_availability_output_py3 import CheckNameAvailabilityOutput + from .validate_probe_input_py3 import ValidateProbeInput + from .validate_probe_output_py3 import ValidateProbeOutput + from .resource_usage_py3 import ResourceUsage + from .operation_display_py3 import OperationDisplay + from .operation_py3 import Operation + from .cidr_ip_address_py3 import CidrIpAddress + from .ip_address_group_py3 import IpAddressGroup + from .edge_node_py3 import EdgeNode + from .resource_py3 import Resource + from .tracked_resource_py3 import TrackedResource + from .proxy_resource_py3 import ProxyResource + from .error_response_py3 import ErrorResponse, ErrorResponseException +except (SyntaxError, ImportError): + from .sku import Sku + from .profile import Profile + from .profile_update_parameters import ProfileUpdateParameters + from .sso_uri import SsoUri + from .supported_optimization_types_list_result import SupportedOptimizationTypesListResult + from .deep_created_origin import DeepCreatedOrigin + from .endpoint import Endpoint + from .geo_filter import GeoFilter + from .delivery_rule_action import DeliveryRuleAction + from .delivery_rule_condition import DeliveryRuleCondition + from .delivery_rule import DeliveryRule + from .endpoint_properties_update_parameters_delivery_policy import EndpointPropertiesUpdateParametersDeliveryPolicy + from .endpoint_update_parameters import EndpointUpdateParameters + from .url_path_condition_parameters import UrlPathConditionParameters + from .delivery_rule_url_path_condition import DeliveryRuleUrlPathCondition + from .url_file_extension_condition_parameters import UrlFileExtensionConditionParameters + from .delivery_rule_url_file_extension_condition import DeliveryRuleUrlFileExtensionCondition + from .cache_expiration_action_parameters import CacheExpirationActionParameters + from .delivery_rule_cache_expiration_action import DeliveryRuleCacheExpirationAction + from .purge_parameters import PurgeParameters + from .load_parameters import LoadParameters + from .origin import Origin + from .origin_update_parameters import OriginUpdateParameters + from .custom_domain import CustomDomain + from .custom_domain_parameters import CustomDomainParameters + from .validate_custom_domain_input import ValidateCustomDomainInput + from .validate_custom_domain_output import ValidateCustomDomainOutput + from .check_name_availability_input import CheckNameAvailabilityInput + from .check_name_availability_output import CheckNameAvailabilityOutput + from .validate_probe_input import ValidateProbeInput + from .validate_probe_output import ValidateProbeOutput + from .resource_usage import ResourceUsage + from .operation_display import OperationDisplay + from .operation import Operation + from .cidr_ip_address import CidrIpAddress + from .ip_address_group import IpAddressGroup + from .edge_node import EdgeNode + from .resource import Resource + from .tracked_resource import TrackedResource + from .proxy_resource import ProxyResource + from .error_response import ErrorResponse, ErrorResponseException from .profile_paged import ProfilePaged from .resource_usage_paged import ResourceUsagePaged from .endpoint_paged import EndpointPaged @@ -70,7 +123,17 @@ 'DeepCreatedOrigin', 'Endpoint', 'GeoFilter', + 'DeliveryRuleAction', + 'DeliveryRuleCondition', + 'DeliveryRule', + 'EndpointPropertiesUpdateParametersDeliveryPolicy', 'EndpointUpdateParameters', + 'UrlPathConditionParameters', + 'DeliveryRuleUrlPathCondition', + 'UrlFileExtensionConditionParameters', + 'DeliveryRuleUrlFileExtensionCondition', + 'CacheExpirationActionParameters', + 'DeliveryRuleCacheExpirationAction', 'PurgeParameters', 'LoadParameters', 'Origin', diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/cache_expiration_action_parameters.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/cache_expiration_action_parameters.py new file mode 100644 index 000000000000..733f37ee6e40 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/cache_expiration_action_parameters.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CacheExpirationActionParameters(Model): + """Defines the parameters for the cache expiration action. + + 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 odatatype: Required. Default value: + "Microsoft.Azure.Cdn.Models.DeliveryRuleCacheExpirationActionParameters" . + :vartype odatatype: str + :param cache_behavior: Required. Caching behavior for the requests that + include query strings. Possible values include: 'BypassCache', 'Override', + 'SetIfMissing' + :type cache_behavior: str or ~azure.mgmt.cdn.models.enum + :ivar cache_type: Required. The level at which the content needs to be + cached. Default value: "All" . + :vartype cache_type: str + :param cache_duration: The duration for which the the content needs to be + cached. Allowed format is [d.]hh:mm:ss + :type cache_duration: str + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'cache_behavior': {'required': True}, + 'cache_type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'cache_behavior': {'key': 'cacheBehavior', 'type': 'str'}, + 'cache_type': {'key': 'cacheType', 'type': 'str'}, + 'cache_duration': {'key': 'cacheDuration', 'type': 'str'}, + } + + odatatype = "Microsoft.Azure.Cdn.Models.DeliveryRuleCacheExpirationActionParameters" + + cache_type = "All" + + def __init__(self, **kwargs): + super(CacheExpirationActionParameters, self).__init__(**kwargs) + self.cache_behavior = kwargs.get('cache_behavior', None) + self.cache_duration = kwargs.get('cache_duration', None) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/cache_expiration_action_parameters_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/cache_expiration_action_parameters_py3.py new file mode 100644 index 000000000000..b962f37e0b09 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/cache_expiration_action_parameters_py3.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CacheExpirationActionParameters(Model): + """Defines the parameters for the cache expiration action. + + 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 odatatype: Required. Default value: + "Microsoft.Azure.Cdn.Models.DeliveryRuleCacheExpirationActionParameters" . + :vartype odatatype: str + :param cache_behavior: Required. Caching behavior for the requests that + include query strings. Possible values include: 'BypassCache', 'Override', + 'SetIfMissing' + :type cache_behavior: str or ~azure.mgmt.cdn.models.enum + :ivar cache_type: Required. The level at which the content needs to be + cached. Default value: "All" . + :vartype cache_type: str + :param cache_duration: The duration for which the the content needs to be + cached. Allowed format is [d.]hh:mm:ss + :type cache_duration: str + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'cache_behavior': {'required': True}, + 'cache_type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'cache_behavior': {'key': 'cacheBehavior', 'type': 'str'}, + 'cache_type': {'key': 'cacheType', 'type': 'str'}, + 'cache_duration': {'key': 'cacheDuration', 'type': 'str'}, + } + + odatatype = "Microsoft.Azure.Cdn.Models.DeliveryRuleCacheExpirationActionParameters" + + cache_type = "All" + + def __init__(self, *, cache_behavior, cache_duration: str=None, **kwargs) -> None: + super(CacheExpirationActionParameters, self).__init__(**kwargs) + self.cache_behavior = cache_behavior + self.cache_duration = cache_duration diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/cdn_management_client_enums.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/cdn_management_client_enums.py index 2f443d08b56e..591e7b58f03e 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/cdn_management_client_enums.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/cdn_management_client_enums.py @@ -12,7 +12,7 @@ from enum import Enum -class SkuName(Enum): +class SkuName(str, Enum): standard_verizon = "Standard_Verizon" premium_verizon = "Premium_Verizon" @@ -21,7 +21,7 @@ class SkuName(Enum): standard_china_cdn = "Standard_ChinaCdn" -class ProfileResourceState(Enum): +class ProfileResourceState(str, Enum): creating = "Creating" active = "Active" @@ -29,7 +29,7 @@ class ProfileResourceState(Enum): disabled = "Disabled" -class OptimizationType(Enum): +class OptimizationType(str, Enum): general_web_delivery = "GeneralWebDelivery" general_media_streaming = "GeneralMediaStreaming" @@ -38,7 +38,7 @@ class OptimizationType(Enum): dynamic_site_acceleration = "DynamicSiteAcceleration" -class EndpointResourceState(Enum): +class EndpointResourceState(str, Enum): creating = "Creating" deleting = "Deleting" @@ -48,7 +48,7 @@ class EndpointResourceState(Enum): stopping = "Stopping" -class QueryStringCachingBehavior(Enum): +class QueryStringCachingBehavior(str, Enum): ignore_query_string = "IgnoreQueryString" bypass_caching = "BypassCaching" @@ -56,27 +56,27 @@ class QueryStringCachingBehavior(Enum): not_set = "NotSet" -class GeoFilterActions(Enum): +class GeoFilterActions(str, Enum): block = "Block" allow = "Allow" -class OriginResourceState(Enum): +class OriginResourceState(str, Enum): creating = "Creating" active = "Active" deleting = "Deleting" -class CustomDomainResourceState(Enum): +class CustomDomainResourceState(str, Enum): creating = "Creating" active = "Active" deleting = "Deleting" -class CustomHttpsProvisioningState(Enum): +class CustomHttpsProvisioningState(str, Enum): enabling = "Enabling" enabled = "Enabled" @@ -85,7 +85,7 @@ class CustomHttpsProvisioningState(Enum): failed = "Failed" -class CustomHttpsProvisioningSubstate(Enum): +class CustomHttpsProvisioningSubstate(str, Enum): submitting_domain_control_validation_request = "SubmittingDomainControlValidationRequest" pending_domain_control_validation_request_approval = "PendingDomainControlValidationREquestApproval" @@ -99,6 +99,6 @@ class CustomHttpsProvisioningSubstate(Enum): certificate_deleted = "CertificateDeleted" -class ResourceType(Enum): +class ResourceType(str, Enum): microsoft_cdn_profiles_endpoints = "Microsoft.Cdn/Profiles/Endpoints" diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/check_name_availability_input.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/check_name_availability_input.py index 5496f2db2544..4a6593482eb8 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/check_name_availability_input.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/check_name_availability_input.py @@ -18,10 +18,12 @@ class CheckNameAvailabilityInput(Model): Variables are only populated by the server, and will be ignored when sending a request. - :param name: The resource name to validate. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The resource name to validate. :type name: str - :ivar type: The type of the resource whose name is to be validated. - Default value: "Microsoft.Cdn/Profiles/Endpoints" . + :ivar type: Required. The type of the resource whose name is to be + validated. Default value: "Microsoft.Cdn/Profiles/Endpoints" . :vartype type: str """ @@ -37,6 +39,6 @@ class CheckNameAvailabilityInput(Model): type = "Microsoft.Cdn/Profiles/Endpoints" - def __init__(self, name): - super(CheckNameAvailabilityInput, self).__init__() - self.name = name + def __init__(self, **kwargs): + super(CheckNameAvailabilityInput, self).__init__(**kwargs) + self.name = kwargs.get('name', None) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/check_name_availability_input_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/check_name_availability_input_py3.py new file mode 100644 index 000000000000..42eab59591f1 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/check_name_availability_input_py3.py @@ -0,0 +1,44 @@ +# 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 CheckNameAvailabilityInput(Model): + """Input of CheckNameAvailability API. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The resource name to validate. + :type name: str + :ivar type: Required. The type of the resource whose name is to be + validated. Default value: "Microsoft.Cdn/Profiles/Endpoints" . + :vartype type: str + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + type = "Microsoft.Cdn/Profiles/Endpoints" + + def __init__(self, *, name: str, **kwargs) -> None: + super(CheckNameAvailabilityInput, self).__init__(**kwargs) + self.name = name diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/check_name_availability_output.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/check_name_availability_output.py index b24761c2f8e3..7ec032b77912 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/check_name_availability_output.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/check_name_availability_output.py @@ -39,8 +39,8 @@ class CheckNameAvailabilityOutput(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self): - super(CheckNameAvailabilityOutput, self).__init__() + def __init__(self, **kwargs): + super(CheckNameAvailabilityOutput, self).__init__(**kwargs) self.name_available = None self.reason = None self.message = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/check_name_availability_output_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/check_name_availability_output_py3.py new file mode 100644 index 000000000000..4ed87f02d7d7 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/check_name_availability_output_py3.py @@ -0,0 +1,46 @@ +# 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 CheckNameAvailabilityOutput(Model): + """Output of check name availability API. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name_available: Indicates whether the name is available. + :vartype name_available: bool + :ivar reason: The reason why the name is not available. + :vartype reason: str + :ivar message: The detailed error message describing why the name is not + available. + :vartype message: str + """ + + _validation = { + 'name_available': {'readonly': True}, + 'reason': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CheckNameAvailabilityOutput, self).__init__(**kwargs) + self.name_available = None + self.reason = None + self.message = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/cidr_ip_address.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/cidr_ip_address.py index 32461c4c9c59..c37e0ac9b254 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/cidr_ip_address.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/cidr_ip_address.py @@ -26,7 +26,7 @@ class CidrIpAddress(Model): 'prefix_length': {'key': 'prefixLength', 'type': 'int'}, } - def __init__(self, base_ip_address=None, prefix_length=None): - super(CidrIpAddress, self).__init__() - self.base_ip_address = base_ip_address - self.prefix_length = prefix_length + def __init__(self, **kwargs): + super(CidrIpAddress, self).__init__(**kwargs) + self.base_ip_address = kwargs.get('base_ip_address', None) + self.prefix_length = kwargs.get('prefix_length', None) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/cidr_ip_address_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/cidr_ip_address_py3.py new file mode 100644 index 000000000000..6eba08681803 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/cidr_ip_address_py3.py @@ -0,0 +1,32 @@ +# 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 CidrIpAddress(Model): + """CIDR Ip address. + + :param base_ip_address: Ip adress itself. + :type base_ip_address: str + :param prefix_length: The length of the prefix of the ip address. + :type prefix_length: int + """ + + _attribute_map = { + 'base_ip_address': {'key': 'baseIpAddress', 'type': 'str'}, + 'prefix_length': {'key': 'prefixLength', 'type': 'int'}, + } + + def __init__(self, *, base_ip_address: str=None, prefix_length: int=None, **kwargs) -> None: + super(CidrIpAddress, self).__init__(**kwargs) + self.base_ip_address = base_ip_address + self.prefix_length = prefix_length diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain.py index ea3df9faa471..06bfef84aca2 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain.py @@ -19,14 +19,16 @@ class CustomDomain(ProxyResource): 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 host_name: The host name of the custom domain. Must be a domain - name. + :param host_name: Required. The host name of the custom domain. Must be a + domain name. :type host_name: str :ivar resource_state: Resource status of the custom domain. Possible values include: 'Creating', 'Active', 'Deleting' @@ -79,11 +81,11 @@ class CustomDomain(ProxyResource): 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } - def __init__(self, host_name, validation_data=None): - super(CustomDomain, self).__init__() - self.host_name = host_name + def __init__(self, **kwargs): + super(CustomDomain, self).__init__(**kwargs) + self.host_name = kwargs.get('host_name', None) self.resource_state = None self.custom_https_provisioning_state = None self.custom_https_provisioning_substate = None - self.validation_data = validation_data + self.validation_data = kwargs.get('validation_data', None) self.provisioning_state = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain_parameters.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain_parameters.py index 2b21bd7e011c..07ac9c4ea739 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain_parameters.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain_parameters.py @@ -15,8 +15,10 @@ class CustomDomainParameters(Model): """The customDomain JSON object required for custom domain creation or update. - :param host_name: The host name of the custom domain. Must be a domain - name. + All required parameters must be populated in order to send to Azure. + + :param host_name: Required. The host name of the custom domain. Must be a + domain name. :type host_name: str """ @@ -28,6 +30,6 @@ class CustomDomainParameters(Model): 'host_name': {'key': 'properties.hostName', 'type': 'str'}, } - def __init__(self, host_name): - super(CustomDomainParameters, self).__init__() - self.host_name = host_name + def __init__(self, **kwargs): + super(CustomDomainParameters, self).__init__(**kwargs) + self.host_name = kwargs.get('host_name', None) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain_parameters_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain_parameters_py3.py new file mode 100644 index 000000000000..3830c7b64c75 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain_parameters_py3.py @@ -0,0 +1,35 @@ +# 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 CustomDomainParameters(Model): + """The customDomain JSON object required for custom domain creation or update. + + All required parameters must be populated in order to send to Azure. + + :param host_name: Required. The host name of the custom domain. Must be a + domain name. + :type host_name: str + """ + + _validation = { + 'host_name': {'required': True}, + } + + _attribute_map = { + 'host_name': {'key': 'properties.hostName', 'type': 'str'}, + } + + def __init__(self, *, host_name: str, **kwargs) -> None: + super(CustomDomainParameters, self).__init__(**kwargs) + self.host_name = host_name diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain_py3.py new file mode 100644 index 000000000000..e0679e355d60 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain_py3.py @@ -0,0 +1,91 @@ +# 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 CustomDomain(ProxyResource): + """Friendly domain name mapping to the endpoint hostname that the customer + provides for branding purposes, e.g. www.consoto.com. + + 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 host_name: Required. The host name of the custom domain. Must be a + domain name. + :type host_name: str + :ivar resource_state: Resource status of the custom domain. Possible + values include: 'Creating', 'Active', 'Deleting' + :vartype resource_state: str or + ~azure.mgmt.cdn.models.CustomDomainResourceState + :ivar custom_https_provisioning_state: Provisioning status of Custom Https + of the custom domain. Possible values include: 'Enabling', 'Enabled', + 'Disabling', 'Disabled', 'Failed' + :vartype custom_https_provisioning_state: str or + ~azure.mgmt.cdn.models.CustomHttpsProvisioningState + :ivar custom_https_provisioning_substate: Provisioning substate shows the + progress of custom HTTPS enabling/disabling process step by step. Possible + values include: 'SubmittingDomainControlValidationRequest', + 'PendingDomainControlValidationREquestApproval', + 'DomainControlValidationRequestApproved', + 'DomainControlValidationRequestRejected', + 'DomainControlValidationRequestTimedOut', 'IssuingCertificate', + 'DeployingCertificate', 'CertificateDeployed', 'DeletingCertificate', + 'CertificateDeleted' + :vartype custom_https_provisioning_substate: str or + ~azure.mgmt.cdn.models.CustomHttpsProvisioningSubstate + :param validation_data: Special validation or data may be required when + delivering CDN to some regions due to local compliance reasons. E.g. ICP + license number of a custom domain is required to deliver content in China. + :type validation_data: str + :ivar provisioning_state: Provisioning status of the custom domain. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'host_name': {'required': True}, + 'resource_state': {'readonly': True}, + 'custom_https_provisioning_state': {'readonly': True}, + 'custom_https_provisioning_substate': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'host_name': {'key': 'properties.hostName', 'type': 'str'}, + 'resource_state': {'key': 'properties.resourceState', 'type': 'str'}, + 'custom_https_provisioning_state': {'key': 'properties.customHttpsProvisioningState', 'type': 'str'}, + 'custom_https_provisioning_substate': {'key': 'properties.customHttpsProvisioningSubstate', 'type': 'str'}, + 'validation_data': {'key': 'properties.validationData', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, host_name: str, validation_data: str=None, **kwargs) -> None: + super(CustomDomain, self).__init__(**kwargs) + self.host_name = host_name + self.resource_state = None + self.custom_https_provisioning_state = None + self.custom_https_provisioning_substate = None + self.validation_data = validation_data + self.provisioning_state = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/deep_created_origin.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/deep_created_origin.py index 1320dd04d9ce..16ff46a21a21 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/deep_created_origin.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/deep_created_origin.py @@ -15,10 +15,12 @@ class DeepCreatedOrigin(Model): """The main origin of CDN content which is added when creating a CDN endpoint. - :param name: Origin name + All required parameters must be populated in order to send to Azure. + + :param name: Required. Origin name :type name: str - :param host_name: The address of the origin. It can be a domain name, IPv4 - address, or IPv6 address. + :param host_name: Required. The address of the origin. It can be a domain + name, IPv4 address, or IPv6 address. :type host_name: str :param http_port: The value of the HTTP port. Must be between 1 and 65535 :type http_port: int @@ -41,9 +43,9 @@ class DeepCreatedOrigin(Model): 'https_port': {'key': 'properties.httpsPort', 'type': 'int'}, } - def __init__(self, name, host_name, http_port=None, https_port=None): - super(DeepCreatedOrigin, self).__init__() - self.name = name - self.host_name = host_name - self.http_port = http_port - self.https_port = https_port + def __init__(self, **kwargs): + super(DeepCreatedOrigin, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.host_name = kwargs.get('host_name', None) + self.http_port = kwargs.get('http_port', None) + self.https_port = kwargs.get('https_port', None) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/deep_created_origin_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/deep_created_origin_py3.py new file mode 100644 index 000000000000..1de34bb5580a --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/deep_created_origin_py3.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DeepCreatedOrigin(Model): + """The main origin of CDN content which is added when creating a CDN endpoint. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Origin name + :type name: str + :param host_name: Required. The address of the origin. It can be a domain + name, IPv4 address, or IPv6 address. + :type host_name: str + :param http_port: The value of the HTTP port. Must be between 1 and 65535 + :type http_port: int + :param https_port: The value of the HTTPS port. Must be between 1 and + 65535 + :type https_port: int + """ + + _validation = { + 'name': {'required': True}, + 'host_name': {'required': True}, + 'http_port': {'maximum': 65535, 'minimum': 1}, + 'https_port': {'maximum': 65535, 'minimum': 1}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'host_name': {'key': 'properties.hostName', 'type': 'str'}, + 'http_port': {'key': 'properties.httpPort', 'type': 'int'}, + 'https_port': {'key': 'properties.httpsPort', 'type': 'int'}, + } + + def __init__(self, *, name: str, host_name: str, http_port: int=None, https_port: int=None, **kwargs) -> None: + super(DeepCreatedOrigin, self).__init__(**kwargs) + self.name = name + self.host_name = host_name + self.http_port = http_port + self.https_port = https_port diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule.py new file mode 100644 index 000000000000..63f57602843d --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DeliveryRule(Model): + """A rule that specifies a set of actions and conditions. + + All required parameters must be populated in order to send to Azure. + + :param order: Required. The order in which the rules are applied for the + endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will + be applied before a rule with a greater order. Rule with order 0 is a + special rule. It does not require any condition and actions listed in it + will always be applied. + :type order: int + :param actions: Required. A list of actions that are executed when all the + conditions of a rule are satisfied. + :type actions: list[~azure.mgmt.cdn.models.DeliveryRuleAction] + :param conditions: A list of conditions that must be matched for the + actions to be executed + :type conditions: list[~azure.mgmt.cdn.models.DeliveryRuleCondition] + """ + + _validation = { + 'order': {'required': True}, + 'actions': {'required': True}, + } + + _attribute_map = { + 'order': {'key': 'order', 'type': 'int'}, + 'actions': {'key': 'actions', 'type': '[DeliveryRuleAction]'}, + 'conditions': {'key': 'conditions', 'type': '[DeliveryRuleCondition]'}, + } + + def __init__(self, **kwargs): + super(DeliveryRule, self).__init__(**kwargs) + self.order = kwargs.get('order', None) + self.actions = kwargs.get('actions', None) + self.conditions = kwargs.get('conditions', None) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_action.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_action.py new file mode 100644 index 000000000000..c3bd94a0ea7e --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_action.py @@ -0,0 +1,41 @@ +# 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 DeliveryRuleAction(Model): + """An action for the delivery rule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DeliveryRuleCacheExpirationAction + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + _subtype_map = { + 'name': {'CacheExpiration': 'DeliveryRuleCacheExpirationAction'} + } + + def __init__(self, **kwargs): + super(DeliveryRuleAction, self).__init__(**kwargs) + self.name = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_action_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_action_py3.py new file mode 100644 index 000000000000..10d60ce7ce31 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_action_py3.py @@ -0,0 +1,41 @@ +# 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 DeliveryRuleAction(Model): + """An action for the delivery rule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DeliveryRuleCacheExpirationAction + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + _subtype_map = { + 'name': {'CacheExpiration': 'DeliveryRuleCacheExpirationAction'} + } + + def __init__(self, **kwargs) -> None: + super(DeliveryRuleAction, self).__init__(**kwargs) + self.name = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_cache_expiration_action.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_cache_expiration_action.py new file mode 100644 index 000000000000..7a52d1019a6b --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_cache_expiration_action.py @@ -0,0 +1,39 @@ +# 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 .delivery_rule_action import DeliveryRuleAction + + +class DeliveryRuleCacheExpirationAction(DeliveryRuleAction): + """Defines the cache expiration action for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the action. + :type parameters: ~azure.mgmt.cdn.models.CacheExpirationActionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'CacheExpirationActionParameters'}, + } + + def __init__(self, **kwargs): + super(DeliveryRuleCacheExpirationAction, self).__init__(**kwargs) + self.parameters = kwargs.get('parameters', None) + self.name = 'CacheExpiration' diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_cache_expiration_action_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_cache_expiration_action_py3.py new file mode 100644 index 000000000000..9074de9c66ad --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_cache_expiration_action_py3.py @@ -0,0 +1,39 @@ +# 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 .delivery_rule_action_py3 import DeliveryRuleAction + + +class DeliveryRuleCacheExpirationAction(DeliveryRuleAction): + """Defines the cache expiration action for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the action. + :type parameters: ~azure.mgmt.cdn.models.CacheExpirationActionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'CacheExpirationActionParameters'}, + } + + def __init__(self, *, parameters, **kwargs) -> None: + super(DeliveryRuleCacheExpirationAction, self).__init__(**kwargs) + self.parameters = parameters + self.name = 'CacheExpiration' diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_condition.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_condition.py new file mode 100644 index 000000000000..ad81c9f7b533 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_condition.py @@ -0,0 +1,42 @@ +# 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 DeliveryRuleCondition(Model): + """A condition for the delivery rule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DeliveryRuleUrlPathCondition, + DeliveryRuleUrlFileExtensionCondition + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + _subtype_map = { + 'name': {'UrlPath': 'DeliveryRuleUrlPathCondition', 'UrlFileExtension': 'DeliveryRuleUrlFileExtensionCondition'} + } + + def __init__(self, **kwargs): + super(DeliveryRuleCondition, self).__init__(**kwargs) + self.name = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_condition_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_condition_py3.py new file mode 100644 index 000000000000..e50925b7db4f --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_condition_py3.py @@ -0,0 +1,42 @@ +# 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 DeliveryRuleCondition(Model): + """A condition for the delivery rule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DeliveryRuleUrlPathCondition, + DeliveryRuleUrlFileExtensionCondition + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + _subtype_map = { + 'name': {'UrlPath': 'DeliveryRuleUrlPathCondition', 'UrlFileExtension': 'DeliveryRuleUrlFileExtensionCondition'} + } + + def __init__(self, **kwargs) -> None: + super(DeliveryRuleCondition, self).__init__(**kwargs) + self.name = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_py3.py new file mode 100644 index 000000000000..b6f1c33b003e --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DeliveryRule(Model): + """A rule that specifies a set of actions and conditions. + + All required parameters must be populated in order to send to Azure. + + :param order: Required. The order in which the rules are applied for the + endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will + be applied before a rule with a greater order. Rule with order 0 is a + special rule. It does not require any condition and actions listed in it + will always be applied. + :type order: int + :param actions: Required. A list of actions that are executed when all the + conditions of a rule are satisfied. + :type actions: list[~azure.mgmt.cdn.models.DeliveryRuleAction] + :param conditions: A list of conditions that must be matched for the + actions to be executed + :type conditions: list[~azure.mgmt.cdn.models.DeliveryRuleCondition] + """ + + _validation = { + 'order': {'required': True}, + 'actions': {'required': True}, + } + + _attribute_map = { + 'order': {'key': 'order', 'type': 'int'}, + 'actions': {'key': 'actions', 'type': '[DeliveryRuleAction]'}, + 'conditions': {'key': 'conditions', 'type': '[DeliveryRuleCondition]'}, + } + + def __init__(self, *, order: int, actions, conditions=None, **kwargs) -> None: + super(DeliveryRule, self).__init__(**kwargs) + self.order = order + self.actions = actions + self.conditions = conditions diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_file_extension_condition.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_file_extension_condition.py new file mode 100644 index 000000000000..d215d3cd4b2d --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_file_extension_condition.py @@ -0,0 +1,40 @@ +# 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 .delivery_rule_condition import DeliveryRuleCondition + + +class DeliveryRuleUrlFileExtensionCondition(DeliveryRuleCondition): + """Defines the URL file extension condition for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the condition. + :type parameters: + ~azure.mgmt.cdn.models.UrlFileExtensionConditionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'UrlFileExtensionConditionParameters'}, + } + + def __init__(self, **kwargs): + super(DeliveryRuleUrlFileExtensionCondition, self).__init__(**kwargs) + self.parameters = kwargs.get('parameters', None) + self.name = 'UrlFileExtension' diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_file_extension_condition_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_file_extension_condition_py3.py new file mode 100644 index 000000000000..f97f2cac2d0f --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_file_extension_condition_py3.py @@ -0,0 +1,40 @@ +# 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 .delivery_rule_condition_py3 import DeliveryRuleCondition + + +class DeliveryRuleUrlFileExtensionCondition(DeliveryRuleCondition): + """Defines the URL file extension condition for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the condition. + :type parameters: + ~azure.mgmt.cdn.models.UrlFileExtensionConditionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'UrlFileExtensionConditionParameters'}, + } + + def __init__(self, *, parameters, **kwargs) -> None: + super(DeliveryRuleUrlFileExtensionCondition, self).__init__(**kwargs) + self.parameters = parameters + self.name = 'UrlFileExtension' diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_path_condition.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_path_condition.py new file mode 100644 index 000000000000..b3eb2578b72e --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_path_condition.py @@ -0,0 +1,39 @@ +# 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 .delivery_rule_condition import DeliveryRuleCondition + + +class DeliveryRuleUrlPathCondition(DeliveryRuleCondition): + """Defines the URL path condition for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the condition. + :type parameters: ~azure.mgmt.cdn.models.UrlPathConditionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'UrlPathConditionParameters'}, + } + + def __init__(self, **kwargs): + super(DeliveryRuleUrlPathCondition, self).__init__(**kwargs) + self.parameters = kwargs.get('parameters', None) + self.name = 'UrlPath' diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_path_condition_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_path_condition_py3.py new file mode 100644 index 000000000000..730fdcaec98a --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_path_condition_py3.py @@ -0,0 +1,39 @@ +# 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 .delivery_rule_condition_py3 import DeliveryRuleCondition + + +class DeliveryRuleUrlPathCondition(DeliveryRuleCondition): + """Defines the URL path condition for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the condition. + :type parameters: ~azure.mgmt.cdn.models.UrlPathConditionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'UrlPathConditionParameters'}, + } + + def __init__(self, *, parameters, **kwargs) -> None: + super(DeliveryRuleUrlPathCondition, self).__init__(**kwargs) + self.parameters = parameters + self.name = 'UrlPath' diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/edge_node.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/edge_node.py index 591913291670..bd3e8b15c596 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/edge_node.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/edge_node.py @@ -19,13 +19,15 @@ class EdgeNode(ProxyResource): 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 ip_address_groups: List of ip address groups. + :param ip_address_groups: Required. List of ip address groups. :type ip_address_groups: list[~azure.mgmt.cdn.models.IpAddressGroup] """ @@ -43,6 +45,6 @@ class EdgeNode(ProxyResource): 'ip_address_groups': {'key': 'properties.ipAddressGroups', 'type': '[IpAddressGroup]'}, } - def __init__(self, ip_address_groups): - super(EdgeNode, self).__init__() - self.ip_address_groups = ip_address_groups + def __init__(self, **kwargs): + super(EdgeNode, self).__init__(**kwargs) + self.ip_address_groups = kwargs.get('ip_address_groups', None) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/edge_node_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/edge_node_py3.py new file mode 100644 index 000000000000..8c0f7f60121a --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/edge_node_py3.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 .proxy_resource_py3 import ProxyResource + + +class EdgeNode(ProxyResource): + """Edgenode is a global Point of Presence (POP) location used to deliver CDN + content to end users. + + 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 ip_address_groups: Required. List of ip address groups. + :type ip_address_groups: list[~azure.mgmt.cdn.models.IpAddressGroup] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'ip_address_groups': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'ip_address_groups': {'key': 'properties.ipAddressGroups', 'type': '[IpAddressGroup]'}, + } + + def __init__(self, *, ip_address_groups, **kwargs) -> None: + super(EdgeNode, self).__init__(**kwargs) + self.ip_address_groups = ip_address_groups diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint.py index 254a295a45a8..ae5f039a3f00 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint.py @@ -21,13 +21,15 @@ class Endpoint(TrackedResource): 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 location: Resource location. + :param location: Required. Resource location. :type location: str :param tags: Resource tags. :type tags: dict[str, str] @@ -79,10 +81,15 @@ class Endpoint(TrackedResource): CDN endpoint. Each geo filter defines an acess rule to a specified path or content, e.g. block APAC for path /pictures/ :type geo_filters: list[~azure.mgmt.cdn.models.GeoFilter] + :param delivery_policy: A policy that specifies the delivery rules to be + used for an endpoint. + :type delivery_policy: + ~azure.mgmt.cdn.models.EndpointPropertiesUpdateParametersDeliveryPolicy :ivar host_name: The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. consoto.azureedge.net :vartype host_name: str - :param origins: The source of the content being delivered via CDN. + :param origins: Required. The source of the content being delivered via + CDN. :type origins: list[~azure.mgmt.cdn.models.DeepCreatedOrigin] :ivar resource_state: Resource status of the endpoint. Possible values include: 'Creating', 'Deleting', 'Running', 'Starting', 'Stopped', @@ -120,25 +127,27 @@ class Endpoint(TrackedResource): 'optimization_type': {'key': 'properties.optimizationType', 'type': 'str'}, 'probe_path': {'key': 'properties.probePath', 'type': 'str'}, 'geo_filters': {'key': 'properties.geoFilters', 'type': '[GeoFilter]'}, + 'delivery_policy': {'key': 'properties.deliveryPolicy', 'type': 'EndpointPropertiesUpdateParametersDeliveryPolicy'}, 'host_name': {'key': 'properties.hostName', 'type': 'str'}, 'origins': {'key': 'properties.origins', 'type': '[DeepCreatedOrigin]'}, 'resource_state': {'key': 'properties.resourceState', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } - def __init__(self, location, origins, tags=None, origin_host_header=None, origin_path=None, content_types_to_compress=None, is_compression_enabled=None, is_http_allowed=None, is_https_allowed=None, query_string_caching_behavior=None, optimization_type=None, probe_path=None, geo_filters=None): - super(Endpoint, self).__init__(location=location, tags=tags) - self.origin_host_header = origin_host_header - self.origin_path = origin_path - self.content_types_to_compress = content_types_to_compress - self.is_compression_enabled = is_compression_enabled - self.is_http_allowed = is_http_allowed - self.is_https_allowed = is_https_allowed - self.query_string_caching_behavior = query_string_caching_behavior - self.optimization_type = optimization_type - self.probe_path = probe_path - self.geo_filters = geo_filters + def __init__(self, **kwargs): + super(Endpoint, self).__init__(**kwargs) + self.origin_host_header = kwargs.get('origin_host_header', None) + self.origin_path = kwargs.get('origin_path', None) + self.content_types_to_compress = kwargs.get('content_types_to_compress', None) + self.is_compression_enabled = kwargs.get('is_compression_enabled', None) + self.is_http_allowed = kwargs.get('is_http_allowed', None) + self.is_https_allowed = kwargs.get('is_https_allowed', None) + self.query_string_caching_behavior = kwargs.get('query_string_caching_behavior', None) + self.optimization_type = kwargs.get('optimization_type', None) + self.probe_path = kwargs.get('probe_path', None) + self.geo_filters = kwargs.get('geo_filters', None) + self.delivery_policy = kwargs.get('delivery_policy', None) self.host_name = None - self.origins = origins + self.origins = kwargs.get('origins', None) self.resource_state = None self.provisioning_state = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_properties_update_parameters_delivery_policy.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_properties_update_parameters_delivery_policy.py new file mode 100644 index 000000000000..aa35c0e0c09d --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_properties_update_parameters_delivery_policy.py @@ -0,0 +1,38 @@ +# 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 EndpointPropertiesUpdateParametersDeliveryPolicy(Model): + """A policy that specifies the delivery rules to be used for an endpoint. + + All required parameters must be populated in order to send to Azure. + + :param description: User-friendly description of the policy. + :type description: str + :param rules: Required. A list of the delivery rules. + :type rules: list[~azure.mgmt.cdn.models.DeliveryRule] + """ + + _validation = { + 'rules': {'required': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'rules': {'key': 'rules', 'type': '[DeliveryRule]'}, + } + + def __init__(self, **kwargs): + super(EndpointPropertiesUpdateParametersDeliveryPolicy, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.rules = kwargs.get('rules', None) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_properties_update_parameters_delivery_policy_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_properties_update_parameters_delivery_policy_py3.py new file mode 100644 index 000000000000..efd432c3fc53 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_properties_update_parameters_delivery_policy_py3.py @@ -0,0 +1,38 @@ +# 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 EndpointPropertiesUpdateParametersDeliveryPolicy(Model): + """A policy that specifies the delivery rules to be used for an endpoint. + + All required parameters must be populated in order to send to Azure. + + :param description: User-friendly description of the policy. + :type description: str + :param rules: Required. A list of the delivery rules. + :type rules: list[~azure.mgmt.cdn.models.DeliveryRule] + """ + + _validation = { + 'rules': {'required': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'rules': {'key': 'rules', 'type': '[DeliveryRule]'}, + } + + def __init__(self, *, rules, description: str=None, **kwargs) -> None: + super(EndpointPropertiesUpdateParametersDeliveryPolicy, self).__init__(**kwargs) + self.description = description + self.rules = rules diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_py3.py new file mode 100644 index 000000000000..2f44460c0f4b --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_py3.py @@ -0,0 +1,153 @@ +# 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 .tracked_resource_py3 import TrackedResource + + +class Endpoint(TrackedResource): + """CDN endpoint is the entity within a CDN profile containing configuration + information such as origin, protocol, content caching and delivery + behavior. The CDN endpoint uses the URL format + .azureedge.net. + + 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 location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param origin_host_header: The host header value sent to the origin with + each request. If you leave this blank, the request hostname determines + this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud + Services require this host header value to match the origin hostname by + default. + :type origin_host_header: str + :param origin_path: A directory path on the origin that CDN can use to + retreive content from, e.g. contoso.cloudapp.net/originpath. + :type origin_path: str + :param content_types_to_compress: List of content types on which + compression applies. The value should be a valid MIME type. + :type content_types_to_compress: list[str] + :param is_compression_enabled: Indicates whether content compression is + enabled on CDN. Default value is false. If compression is enabled, content + will be served as compressed if user requests for a compressed version. + Content won't be compressed on CDN when requested content is smaller than + 1 byte or larger than 1 MB. + :type is_compression_enabled: bool + :param is_http_allowed: Indicates whether HTTP traffic is allowed on the + endpoint. Default value is true. At least one protocol (HTTP or HTTPS) + must be allowed. + :type is_http_allowed: bool + :param is_https_allowed: Indicates whether HTTPS traffic is allowed on the + endpoint. Default value is true. At least one protocol (HTTP or HTTPS) + must be allowed. + :type is_https_allowed: bool + :param query_string_caching_behavior: Defines how CDN caches requests that + include query strings. You can ignore any query strings when caching, + bypass caching to prevent requests that contain query strings from being + cached, or cache every request with a unique URL. Possible values include: + 'IgnoreQueryString', 'BypassCaching', 'UseQueryString', 'NotSet' + :type query_string_caching_behavior: str or + ~azure.mgmt.cdn.models.QueryStringCachingBehavior + :param optimization_type: Specifies what scenario the customer wants this + CDN endpoint to optimize for, e.g. Download, Media services. With this + information, CDN can apply scenario driven optimization. Possible values + include: 'GeneralWebDelivery', 'GeneralMediaStreaming', + 'VideoOnDemandMediaStreaming', 'LargeFileDownload', + 'DynamicSiteAcceleration' + :type optimization_type: str or ~azure.mgmt.cdn.models.OptimizationType + :param probe_path: Path to a file hosted on the origin which helps + accelerate delivery of the dynamic content and calculate the most optimal + routes for the CDN. This is relative to the origin path. + :type probe_path: str + :param geo_filters: List of rules defining the user's geo access within a + CDN endpoint. Each geo filter defines an acess rule to a specified path or + content, e.g. block APAC for path /pictures/ + :type geo_filters: list[~azure.mgmt.cdn.models.GeoFilter] + :param delivery_policy: A policy that specifies the delivery rules to be + used for an endpoint. + :type delivery_policy: + ~azure.mgmt.cdn.models.EndpointPropertiesUpdateParametersDeliveryPolicy + :ivar host_name: The host name of the endpoint structured as + {endpointName}.{DNSZone}, e.g. consoto.azureedge.net + :vartype host_name: str + :param origins: Required. The source of the content being delivered via + CDN. + :type origins: list[~azure.mgmt.cdn.models.DeepCreatedOrigin] + :ivar resource_state: Resource status of the endpoint. Possible values + include: 'Creating', 'Deleting', 'Running', 'Starting', 'Stopped', + 'Stopping' + :vartype resource_state: str or + ~azure.mgmt.cdn.models.EndpointResourceState + :ivar provisioning_state: Provisioning status of the endpoint. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'host_name': {'readonly': True}, + 'origins': {'required': True}, + 'resource_state': {'readonly': True}, + 'provisioning_state': {'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}'}, + 'origin_host_header': {'key': 'properties.originHostHeader', 'type': 'str'}, + 'origin_path': {'key': 'properties.originPath', 'type': 'str'}, + 'content_types_to_compress': {'key': 'properties.contentTypesToCompress', 'type': '[str]'}, + 'is_compression_enabled': {'key': 'properties.isCompressionEnabled', 'type': 'bool'}, + 'is_http_allowed': {'key': 'properties.isHttpAllowed', 'type': 'bool'}, + 'is_https_allowed': {'key': 'properties.isHttpsAllowed', 'type': 'bool'}, + 'query_string_caching_behavior': {'key': 'properties.queryStringCachingBehavior', 'type': 'QueryStringCachingBehavior'}, + 'optimization_type': {'key': 'properties.optimizationType', 'type': 'str'}, + 'probe_path': {'key': 'properties.probePath', 'type': 'str'}, + 'geo_filters': {'key': 'properties.geoFilters', 'type': '[GeoFilter]'}, + 'delivery_policy': {'key': 'properties.deliveryPolicy', 'type': 'EndpointPropertiesUpdateParametersDeliveryPolicy'}, + 'host_name': {'key': 'properties.hostName', 'type': 'str'}, + 'origins': {'key': 'properties.origins', 'type': '[DeepCreatedOrigin]'}, + 'resource_state': {'key': 'properties.resourceState', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, location: str, origins, tags=None, origin_host_header: str=None, origin_path: str=None, content_types_to_compress=None, is_compression_enabled: bool=None, is_http_allowed: bool=None, is_https_allowed: bool=None, query_string_caching_behavior=None, optimization_type=None, probe_path: str=None, geo_filters=None, delivery_policy=None, **kwargs) -> None: + super(Endpoint, self).__init__(location=location, tags=tags, **kwargs) + self.origin_host_header = origin_host_header + self.origin_path = origin_path + self.content_types_to_compress = content_types_to_compress + self.is_compression_enabled = is_compression_enabled + self.is_http_allowed = is_http_allowed + self.is_https_allowed = is_https_allowed + self.query_string_caching_behavior = query_string_caching_behavior + self.optimization_type = optimization_type + self.probe_path = probe_path + self.geo_filters = geo_filters + self.delivery_policy = delivery_policy + self.host_name = None + self.origins = origins + self.resource_state = None + self.provisioning_state = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_update_parameters.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_update_parameters.py index d4002dc577d3..36ec115ceb78 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_update_parameters.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_update_parameters.py @@ -65,6 +65,10 @@ class EndpointUpdateParameters(Model): CDN endpoint. Each geo filter defines an acess rule to a specified path or content, e.g. block APAC for path /pictures/ :type geo_filters: list[~azure.mgmt.cdn.models.GeoFilter] + :param delivery_policy: A policy that specifies the delivery rules to be + used for an endpoint. + :type delivery_policy: + ~azure.mgmt.cdn.models.EndpointPropertiesUpdateParametersDeliveryPolicy """ _attribute_map = { @@ -79,18 +83,20 @@ class EndpointUpdateParameters(Model): 'optimization_type': {'key': 'properties.optimizationType', 'type': 'str'}, 'probe_path': {'key': 'properties.probePath', 'type': 'str'}, 'geo_filters': {'key': 'properties.geoFilters', 'type': '[GeoFilter]'}, + 'delivery_policy': {'key': 'properties.deliveryPolicy', 'type': 'EndpointPropertiesUpdateParametersDeliveryPolicy'}, } - def __init__(self, tags=None, origin_host_header=None, origin_path=None, content_types_to_compress=None, is_compression_enabled=None, is_http_allowed=None, is_https_allowed=None, query_string_caching_behavior=None, optimization_type=None, probe_path=None, geo_filters=None): - super(EndpointUpdateParameters, self).__init__() - self.tags = tags - self.origin_host_header = origin_host_header - self.origin_path = origin_path - self.content_types_to_compress = content_types_to_compress - self.is_compression_enabled = is_compression_enabled - self.is_http_allowed = is_http_allowed - self.is_https_allowed = is_https_allowed - self.query_string_caching_behavior = query_string_caching_behavior - self.optimization_type = optimization_type - self.probe_path = probe_path - self.geo_filters = geo_filters + def __init__(self, **kwargs): + super(EndpointUpdateParameters, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.origin_host_header = kwargs.get('origin_host_header', None) + self.origin_path = kwargs.get('origin_path', None) + self.content_types_to_compress = kwargs.get('content_types_to_compress', None) + self.is_compression_enabled = kwargs.get('is_compression_enabled', None) + self.is_http_allowed = kwargs.get('is_http_allowed', None) + self.is_https_allowed = kwargs.get('is_https_allowed', None) + self.query_string_caching_behavior = kwargs.get('query_string_caching_behavior', None) + self.optimization_type = kwargs.get('optimization_type', None) + self.probe_path = kwargs.get('probe_path', None) + self.geo_filters = kwargs.get('geo_filters', None) + self.delivery_policy = kwargs.get('delivery_policy', None) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_update_parameters_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_update_parameters_py3.py new file mode 100644 index 000000000000..ed4a7fdd9d60 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_update_parameters_py3.py @@ -0,0 +1,102 @@ +# 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 EndpointUpdateParameters(Model): + """Properties required to create or update an endpoint. + + :param tags: Endpoint tags. + :type tags: dict[str, str] + :param origin_host_header: The host header value sent to the origin with + each request. If you leave this blank, the request hostname determines + this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud + Services require this host header value to match the origin hostname by + default. + :type origin_host_header: str + :param origin_path: A directory path on the origin that CDN can use to + retreive content from, e.g. contoso.cloudapp.net/originpath. + :type origin_path: str + :param content_types_to_compress: List of content types on which + compression applies. The value should be a valid MIME type. + :type content_types_to_compress: list[str] + :param is_compression_enabled: Indicates whether content compression is + enabled on CDN. Default value is false. If compression is enabled, content + will be served as compressed if user requests for a compressed version. + Content won't be compressed on CDN when requested content is smaller than + 1 byte or larger than 1 MB. + :type is_compression_enabled: bool + :param is_http_allowed: Indicates whether HTTP traffic is allowed on the + endpoint. Default value is true. At least one protocol (HTTP or HTTPS) + must be allowed. + :type is_http_allowed: bool + :param is_https_allowed: Indicates whether HTTPS traffic is allowed on the + endpoint. Default value is true. At least one protocol (HTTP or HTTPS) + must be allowed. + :type is_https_allowed: bool + :param query_string_caching_behavior: Defines how CDN caches requests that + include query strings. You can ignore any query strings when caching, + bypass caching to prevent requests that contain query strings from being + cached, or cache every request with a unique URL. Possible values include: + 'IgnoreQueryString', 'BypassCaching', 'UseQueryString', 'NotSet' + :type query_string_caching_behavior: str or + ~azure.mgmt.cdn.models.QueryStringCachingBehavior + :param optimization_type: Specifies what scenario the customer wants this + CDN endpoint to optimize for, e.g. Download, Media services. With this + information, CDN can apply scenario driven optimization. Possible values + include: 'GeneralWebDelivery', 'GeneralMediaStreaming', + 'VideoOnDemandMediaStreaming', 'LargeFileDownload', + 'DynamicSiteAcceleration' + :type optimization_type: str or ~azure.mgmt.cdn.models.OptimizationType + :param probe_path: Path to a file hosted on the origin which helps + accelerate delivery of the dynamic content and calculate the most optimal + routes for the CDN. This is relative to the origin path. + :type probe_path: str + :param geo_filters: List of rules defining the user's geo access within a + CDN endpoint. Each geo filter defines an acess rule to a specified path or + content, e.g. block APAC for path /pictures/ + :type geo_filters: list[~azure.mgmt.cdn.models.GeoFilter] + :param delivery_policy: A policy that specifies the delivery rules to be + used for an endpoint. + :type delivery_policy: + ~azure.mgmt.cdn.models.EndpointPropertiesUpdateParametersDeliveryPolicy + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'origin_host_header': {'key': 'properties.originHostHeader', 'type': 'str'}, + 'origin_path': {'key': 'properties.originPath', 'type': 'str'}, + 'content_types_to_compress': {'key': 'properties.contentTypesToCompress', 'type': '[str]'}, + 'is_compression_enabled': {'key': 'properties.isCompressionEnabled', 'type': 'bool'}, + 'is_http_allowed': {'key': 'properties.isHttpAllowed', 'type': 'bool'}, + 'is_https_allowed': {'key': 'properties.isHttpsAllowed', 'type': 'bool'}, + 'query_string_caching_behavior': {'key': 'properties.queryStringCachingBehavior', 'type': 'QueryStringCachingBehavior'}, + 'optimization_type': {'key': 'properties.optimizationType', 'type': 'str'}, + 'probe_path': {'key': 'properties.probePath', 'type': 'str'}, + 'geo_filters': {'key': 'properties.geoFilters', 'type': '[GeoFilter]'}, + 'delivery_policy': {'key': 'properties.deliveryPolicy', 'type': 'EndpointPropertiesUpdateParametersDeliveryPolicy'}, + } + + def __init__(self, *, tags=None, origin_host_header: str=None, origin_path: str=None, content_types_to_compress=None, is_compression_enabled: bool=None, is_http_allowed: bool=None, is_https_allowed: bool=None, query_string_caching_behavior=None, optimization_type=None, probe_path: str=None, geo_filters=None, delivery_policy=None, **kwargs) -> None: + super(EndpointUpdateParameters, self).__init__(**kwargs) + self.tags = tags + self.origin_host_header = origin_host_header + self.origin_path = origin_path + self.content_types_to_compress = content_types_to_compress + self.is_compression_enabled = is_compression_enabled + self.is_http_allowed = is_http_allowed + self.is_https_allowed = is_https_allowed + self.query_string_caching_behavior = query_string_caching_behavior + self.optimization_type = optimization_type + self.probe_path = probe_path + self.geo_filters = geo_filters + self.delivery_policy = delivery_policy diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/error_response.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/error_response.py index 9148d5b7d058..2e1c74ac09c5 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/error_response.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/error_response.py @@ -36,8 +36,8 @@ class ErrorResponse(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self): - super(ErrorResponse, self).__init__() + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) self.code = None self.message = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/error_response_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/error_response_py3.py new file mode 100644 index 000000000000..89e755f309dc --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/error_response_py3.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class ErrorResponse(Model): + """Error reponse indicates CDN service is not able to process the incoming + request. The reason is provided in the error message. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Error code. + :vartype code: str + :ivar message: Error message indicating why the operation failed. + :vartype message: str + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.code = None + self.message = None + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/geo_filter.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/geo_filter.py index 563f16a6cd1d..414d0579d275 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/geo_filter.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/geo_filter.py @@ -15,14 +15,16 @@ class GeoFilter(Model): """Rules defining user's geo access within a CDN endpoint. - :param relative_path: Relative path applicable to geo filter. (e.g. - '/mypictures', '/mypicture/kitty.jpg', and etc.) + All required parameters must be populated in order to send to Azure. + + :param relative_path: Required. Relative path applicable to geo filter. + (e.g. '/mypictures', '/mypicture/kitty.jpg', and etc.) :type relative_path: str - :param action: Action of the geo filter, i.e. allow or block access. - Possible values include: 'Block', 'Allow' + :param action: Required. Action of the geo filter, i.e. allow or block + access. Possible values include: 'Block', 'Allow' :type action: str or ~azure.mgmt.cdn.models.GeoFilterActions - :param country_codes: Two letter country codes defining user country - access in a geo filter, e.g. AU, MX, US. + :param country_codes: Required. Two letter country codes defining user + country access in a geo filter, e.g. AU, MX, US. :type country_codes: list[str] """ @@ -38,8 +40,8 @@ class GeoFilter(Model): 'country_codes': {'key': 'countryCodes', 'type': '[str]'}, } - def __init__(self, relative_path, action, country_codes): - super(GeoFilter, self).__init__() - self.relative_path = relative_path - self.action = action - self.country_codes = country_codes + def __init__(self, **kwargs): + super(GeoFilter, self).__init__(**kwargs) + self.relative_path = kwargs.get('relative_path', None) + self.action = kwargs.get('action', None) + self.country_codes = kwargs.get('country_codes', None) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/geo_filter_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/geo_filter_py3.py new file mode 100644 index 000000000000..43449273efa5 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/geo_filter_py3.py @@ -0,0 +1,47 @@ +# 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 GeoFilter(Model): + """Rules defining user's geo access within a CDN endpoint. + + All required parameters must be populated in order to send to Azure. + + :param relative_path: Required. Relative path applicable to geo filter. + (e.g. '/mypictures', '/mypicture/kitty.jpg', and etc.) + :type relative_path: str + :param action: Required. Action of the geo filter, i.e. allow or block + access. Possible values include: 'Block', 'Allow' + :type action: str or ~azure.mgmt.cdn.models.GeoFilterActions + :param country_codes: Required. Two letter country codes defining user + country access in a geo filter, e.g. AU, MX, US. + :type country_codes: list[str] + """ + + _validation = { + 'relative_path': {'required': True}, + 'action': {'required': True}, + 'country_codes': {'required': True}, + } + + _attribute_map = { + 'relative_path': {'key': 'relativePath', 'type': 'str'}, + 'action': {'key': 'action', 'type': 'GeoFilterActions'}, + 'country_codes': {'key': 'countryCodes', 'type': '[str]'}, + } + + def __init__(self, *, relative_path: str, action, country_codes, **kwargs) -> None: + super(GeoFilter, self).__init__(**kwargs) + self.relative_path = relative_path + self.action = action + self.country_codes = country_codes diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/ip_address_group.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/ip_address_group.py index 0cfa23c22699..3c376a9670cc 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/ip_address_group.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/ip_address_group.py @@ -29,8 +29,8 @@ class IpAddressGroup(Model): 'ipv6_addresses': {'key': 'ipv6Addresses', 'type': '[CidrIpAddress]'}, } - def __init__(self, delivery_region=None, ipv4_addresses=None, ipv6_addresses=None): - super(IpAddressGroup, self).__init__() - self.delivery_region = delivery_region - self.ipv4_addresses = ipv4_addresses - self.ipv6_addresses = ipv6_addresses + def __init__(self, **kwargs): + super(IpAddressGroup, self).__init__(**kwargs) + self.delivery_region = kwargs.get('delivery_region', None) + self.ipv4_addresses = kwargs.get('ipv4_addresses', None) + self.ipv6_addresses = kwargs.get('ipv6_addresses', None) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/ip_address_group_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/ip_address_group_py3.py new file mode 100644 index 000000000000..9f9e71f411ea --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/ip_address_group_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class IpAddressGroup(Model): + """CDN Ip address group. + + :param delivery_region: The delivery region of the ip address group + :type delivery_region: str + :param ipv4_addresses: The list of ip v4 addresses. + :type ipv4_addresses: list[~azure.mgmt.cdn.models.CidrIpAddress] + :param ipv6_addresses: The list of ip v6 addresses. + :type ipv6_addresses: list[~azure.mgmt.cdn.models.CidrIpAddress] + """ + + _attribute_map = { + 'delivery_region': {'key': 'deliveryRegion', 'type': 'str'}, + 'ipv4_addresses': {'key': 'ipv4Addresses', 'type': '[CidrIpAddress]'}, + 'ipv6_addresses': {'key': 'ipv6Addresses', 'type': '[CidrIpAddress]'}, + } + + def __init__(self, *, delivery_region: str=None, ipv4_addresses=None, ipv6_addresses=None, **kwargs) -> None: + super(IpAddressGroup, self).__init__(**kwargs) + self.delivery_region = delivery_region + self.ipv4_addresses = ipv4_addresses + self.ipv6_addresses = ipv6_addresses diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/load_parameters.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/load_parameters.py index c4a0f2bd97a8..d265e3eec5ec 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/load_parameters.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/load_parameters.py @@ -15,8 +15,10 @@ class LoadParameters(Model): """Parameters required for content load. - :param content_paths: The path to the content to be loaded. Path should be - a relative file URL of the origin. + All required parameters must be populated in order to send to Azure. + + :param content_paths: Required. The path to the content to be loaded. Path + should be a relative file URL of the origin. :type content_paths: list[str] """ @@ -28,6 +30,6 @@ class LoadParameters(Model): 'content_paths': {'key': 'contentPaths', 'type': '[str]'}, } - def __init__(self, content_paths): - super(LoadParameters, self).__init__() - self.content_paths = content_paths + def __init__(self, **kwargs): + super(LoadParameters, self).__init__(**kwargs) + self.content_paths = kwargs.get('content_paths', None) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/load_parameters_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/load_parameters_py3.py new file mode 100644 index 000000000000..78ba0d9e5e19 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/load_parameters_py3.py @@ -0,0 +1,35 @@ +# 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 LoadParameters(Model): + """Parameters required for content load. + + All required parameters must be populated in order to send to Azure. + + :param content_paths: Required. The path to the content to be loaded. Path + should be a relative file URL of the origin. + :type content_paths: list[str] + """ + + _validation = { + 'content_paths': {'required': True}, + } + + _attribute_map = { + 'content_paths': {'key': 'contentPaths', 'type': '[str]'}, + } + + def __init__(self, *, content_paths, **kwargs) -> None: + super(LoadParameters, self).__init__(**kwargs) + self.content_paths = content_paths diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/operation.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/operation.py index 71f7a8be9ac6..1c874210ed7f 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/operation.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/operation.py @@ -33,7 +33,7 @@ class Operation(Model): 'display': {'key': 'display', 'type': 'OperationDisplay'}, } - def __init__(self, display=None): - super(Operation, self).__init__() + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) self.name = None - self.display = display + self.display = kwargs.get('display', None) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/operation_display.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/operation_display.py index 687c9f952b18..581b161945af 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/operation_display.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/operation_display.py @@ -39,8 +39,8 @@ class OperationDisplay(Model): 'operation': {'key': 'operation', 'type': 'str'}, } - def __init__(self): - super(OperationDisplay, self).__init__() + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) self.provider = None self.resource = None self.operation = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/operation_display_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/operation_display_py3.py new file mode 100644 index 000000000000..b36de399b412 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/operation_display_py3.py @@ -0,0 +1,46 @@ +# 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): + """The object that represents the operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: Service provider: Microsoft.Cdn + :vartype provider: str + :ivar resource: Resource on which the operation is performed: Profile, + endpoint, etc. + :vartype resource: str + :ivar operation: Operation type: Read, write, delete, etc. + :vartype operation: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/operation_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/operation_py3.py new file mode 100644 index 000000000000..b061aa952e3b --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/operation_py3.py @@ -0,0 +1,39 @@ +# 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): + """CDN REST API operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Operation name: {provider}/{resource}/{operation} + :vartype name: str + :param display: The object that represents the operation. + :type display: ~azure.mgmt.cdn.models.OperationDisplay + """ + + _validation = { + 'name': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, *, display=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = display diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/origin.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/origin.py index 57ccdc35e7a4..c8d08d32e39c 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/origin.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/origin.py @@ -21,18 +21,20 @@ class Origin(TrackedResource): 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 location: Resource location. + :param location: Required. Resource location. :type location: str :param tags: Resource tags. :type tags: dict[str, str] - :param host_name: The address of the origin. Domain names, IPv4 addresses, - and IPv6 addresses are supported. + :param host_name: Required. The address of the origin. Domain names, IPv4 + addresses, and IPv6 addresses are supported. :type host_name: str :param http_port: The value of the HTTP port. Must be between 1 and 65535. :type http_port: int @@ -71,10 +73,10 @@ class Origin(TrackedResource): 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } - def __init__(self, location, host_name, tags=None, http_port=None, https_port=None): - super(Origin, self).__init__(location=location, tags=tags) - self.host_name = host_name - self.http_port = http_port - self.https_port = https_port + def __init__(self, **kwargs): + super(Origin, self).__init__(**kwargs) + self.host_name = kwargs.get('host_name', None) + self.http_port = kwargs.get('http_port', None) + self.https_port = kwargs.get('https_port', None) self.resource_state = None self.provisioning_state = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/origin_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/origin_py3.py new file mode 100644 index 000000000000..11d56f13d920 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/origin_py3.py @@ -0,0 +1,82 @@ +# 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 .tracked_resource_py3 import TrackedResource + + +class Origin(TrackedResource): + """CDN origin is the source of the content being delivered via CDN. When the + edge nodes represented by an endpoint do not have the requested content + cached, they attempt to fetch it from one or more of the configured + origins. + + 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 location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param host_name: Required. The address of the origin. Domain names, IPv4 + addresses, and IPv6 addresses are supported. + :type host_name: str + :param http_port: The value of the HTTP port. Must be between 1 and 65535. + :type http_port: int + :param https_port: The value of the https port. Must be between 1 and + 65535. + :type https_port: int + :ivar resource_state: Resource status of the origin. Possible values + include: 'Creating', 'Active', 'Deleting' + :vartype resource_state: str or ~azure.mgmt.cdn.models.OriginResourceState + :ivar provisioning_state: Provisioning status of the origin. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'host_name': {'required': True}, + 'http_port': {'maximum': 65535, 'minimum': 1}, + 'https_port': {'maximum': 65535, 'minimum': 1}, + 'resource_state': {'readonly': True}, + 'provisioning_state': {'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}'}, + 'host_name': {'key': 'properties.hostName', 'type': 'str'}, + 'http_port': {'key': 'properties.httpPort', 'type': 'int'}, + 'https_port': {'key': 'properties.httpsPort', 'type': 'int'}, + 'resource_state': {'key': 'properties.resourceState', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, location: str, host_name: str, tags=None, http_port: int=None, https_port: int=None, **kwargs) -> None: + super(Origin, self).__init__(location=location, tags=tags, **kwargs) + self.host_name = host_name + self.http_port = http_port + self.https_port = https_port + self.resource_state = None + self.provisioning_state = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/origin_update_parameters.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/origin_update_parameters.py index c850ee4a2116..605a78e80f8b 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/origin_update_parameters.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/origin_update_parameters.py @@ -36,8 +36,8 @@ class OriginUpdateParameters(Model): 'https_port': {'key': 'properties.httpsPort', 'type': 'int'}, } - def __init__(self, host_name=None, http_port=None, https_port=None): - super(OriginUpdateParameters, self).__init__() - self.host_name = host_name - self.http_port = http_port - self.https_port = https_port + def __init__(self, **kwargs): + super(OriginUpdateParameters, self).__init__(**kwargs) + self.host_name = kwargs.get('host_name', None) + self.http_port = kwargs.get('http_port', None) + self.https_port = kwargs.get('https_port', None) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/origin_update_parameters_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/origin_update_parameters_py3.py new file mode 100644 index 000000000000..29be582b9a42 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/origin_update_parameters_py3.py @@ -0,0 +1,43 @@ +# 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 OriginUpdateParameters(Model): + """Origin properties needed for origin creation or update. + + :param host_name: The address of the origin. Domain names, IPv4 addresses, + and IPv6 addresses are supported. + :type host_name: str + :param http_port: The value of the HTTP port. Must be between 1 and 65535. + :type http_port: int + :param https_port: The value of the HTTPS port. Must be between 1 and + 65535. + :type https_port: int + """ + + _validation = { + 'http_port': {'maximum': 65535, 'minimum': 1}, + 'https_port': {'maximum': 65535, 'minimum': 1}, + } + + _attribute_map = { + 'host_name': {'key': 'properties.hostName', 'type': 'str'}, + 'http_port': {'key': 'properties.httpPort', 'type': 'int'}, + 'https_port': {'key': 'properties.httpsPort', 'type': 'int'}, + } + + def __init__(self, *, host_name: str=None, http_port: int=None, https_port: int=None, **kwargs) -> None: + super(OriginUpdateParameters, self).__init__(**kwargs) + self.host_name = host_name + self.http_port = http_port + self.https_port = https_port diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/profile.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/profile.py index 410b143880ac..1f9b83f67bae 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/profile.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/profile.py @@ -19,18 +19,20 @@ class Profile(TrackedResource): 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 location: Resource location. + :param location: Required. Resource location. :type location: str :param tags: Resource tags. :type tags: dict[str, str] - :param sku: The pricing tier (defines a CDN provider, feature list and - rate) of the CDN profile. + :param sku: Required. The pricing tier (defines a CDN provider, feature + list and rate) of the CDN profile. :type sku: ~azure.mgmt.cdn.models.Sku :ivar resource_state: Resource status of the profile. Possible values include: 'Creating', 'Active', 'Deleting', 'Disabled' @@ -61,8 +63,8 @@ class Profile(TrackedResource): 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } - def __init__(self, location, sku, tags=None): - super(Profile, self).__init__(location=location, tags=tags) - self.sku = sku + def __init__(self, **kwargs): + super(Profile, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) self.resource_state = None self.provisioning_state = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/profile_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/profile_py3.py new file mode 100644 index 000000000000..189f3d9cb4cc --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/profile_py3.py @@ -0,0 +1,70 @@ +# 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 .tracked_resource_py3 import TrackedResource + + +class Profile(TrackedResource): + """CDN profile is a logical grouping of endpoints that share the same + settings, such as CDN provider and pricing tier. + + 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 location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param sku: Required. The pricing tier (defines a CDN provider, feature + list and rate) of the CDN profile. + :type sku: ~azure.mgmt.cdn.models.Sku + :ivar resource_state: Resource status of the profile. Possible values + include: 'Creating', 'Active', 'Deleting', 'Disabled' + :vartype resource_state: str or + ~azure.mgmt.cdn.models.ProfileResourceState + :ivar provisioning_state: Provisioning status of the profile. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'sku': {'required': True}, + 'resource_state': {'readonly': True}, + 'provisioning_state': {'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}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'resource_state': {'key': 'properties.resourceState', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, location: str, sku, tags=None, **kwargs) -> None: + super(Profile, self).__init__(location=location, tags=tags, **kwargs) + self.sku = sku + self.resource_state = None + self.provisioning_state = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/profile_update_parameters.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/profile_update_parameters.py index fd0ef7f2c4c7..914f51eb2dff 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/profile_update_parameters.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/profile_update_parameters.py @@ -23,6 +23,6 @@ class ProfileUpdateParameters(Model): 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, tags=None): - super(ProfileUpdateParameters, self).__init__() - self.tags = tags + def __init__(self, **kwargs): + super(ProfileUpdateParameters, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/profile_update_parameters_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/profile_update_parameters_py3.py new file mode 100644 index 000000000000..fbf2f8090603 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/profile_update_parameters_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ProfileUpdateParameters(Model): + """Properties required to update a profile. + + :param tags: Profile tags + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(ProfileUpdateParameters, self).__init__(**kwargs) + self.tags = tags diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/proxy_resource.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/proxy_resource.py index 867983bc956d..012ff087a08b 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/proxy_resource.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/proxy_resource.py @@ -33,5 +33,11 @@ class ProxyResource(Resource): 'type': {'readonly': True}, } - def __init__(self): - super(ProxyResource, self).__init__() + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ProxyResource, self).__init__(**kwargs) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/proxy_resource_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/proxy_resource_py3.py new file mode 100644 index 000000000000..63938413f36c --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/proxy_resource_py3.py @@ -0,0 +1,43 @@ +# 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 ProxyResource(Resource): + """The resource model definition for a ARM proxy resource. It will have + everything other than required location and tags. + + 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 + """ + + _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'}, + } + + def __init__(self, **kwargs) -> None: + super(ProxyResource, self).__init__(**kwargs) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/purge_parameters.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/purge_parameters.py index 824a1909a4f4..4731664fed6a 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/purge_parameters.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/purge_parameters.py @@ -15,8 +15,10 @@ class PurgeParameters(Model): """Parameters required for content purge. - :param content_paths: The path to the content to be purged. Can describe a - file path or a wild card directory. + All required parameters must be populated in order to send to Azure. + + :param content_paths: Required. The path to the content to be purged. Can + describe a file path or a wild card directory. :type content_paths: list[str] """ @@ -28,6 +30,6 @@ class PurgeParameters(Model): 'content_paths': {'key': 'contentPaths', 'type': '[str]'}, } - def __init__(self, content_paths): - super(PurgeParameters, self).__init__() - self.content_paths = content_paths + def __init__(self, **kwargs): + super(PurgeParameters, self).__init__(**kwargs) + self.content_paths = kwargs.get('content_paths', None) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/purge_parameters_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/purge_parameters_py3.py new file mode 100644 index 000000000000..31cdefb06e5b --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/purge_parameters_py3.py @@ -0,0 +1,35 @@ +# 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 PurgeParameters(Model): + """Parameters required for content purge. + + All required parameters must be populated in order to send to Azure. + + :param content_paths: Required. The path to the content to be purged. Can + describe a file path or a wild card directory. + :type content_paths: list[str] + """ + + _validation = { + 'content_paths': {'required': True}, + } + + _attribute_map = { + 'content_paths': {'key': 'contentPaths', 'type': '[str]'}, + } + + def __init__(self, *, content_paths, **kwargs) -> None: + super(PurgeParameters, self).__init__(**kwargs) + self.content_paths = content_paths diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/resource.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/resource.py index d4619be996a7..67c78c7fb464 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/resource.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/resource.py @@ -38,8 +38,8 @@ class Resource(Model): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self): - super(Resource, self).__init__() + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) self.id = None self.name = None self.type = None diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/check_name_availability_request_parameters.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/resource_py3.py similarity index 58% rename from azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/check_name_availability_request_parameters.py rename to azure-mgmt-cdn/azure/mgmt/cdn/models/resource_py3.py index da9ddbfb0370..ee416b984937 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/check_name_availability_request_parameters.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/resource_py3.py @@ -12,29 +12,34 @@ from msrest.serialization import Model -class CheckNameAvailabilityRequestParameters(Model): - """Parameters supplied to the Check Name Availability for Namespace and - NotificationHubs. +class Resource(Model): + """The core properties of ARM resources. Variables are only populated by the server, and will be ignored when sending a request. - :param name: Resource name - :type name: str - :ivar type: Resource type + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. :vartype type: str """ _validation = { - 'name': {'required': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, 'type': {'readonly': True}, } _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'type': {'key': 'Type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, name): - self.name = name + def __init__(self, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None self.type = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/resource_usage.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/resource_usage.py index 2fa7f31f4971..ba216e259427 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/resource_usage.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/resource_usage.py @@ -42,8 +42,8 @@ class ResourceUsage(Model): 'limit': {'key': 'limit', 'type': 'int'}, } - def __init__(self): - super(ResourceUsage, self).__init__() + def __init__(self, **kwargs): + super(ResourceUsage, self).__init__(**kwargs) self.resource_type = None self.unit = None self.current_value = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/resource_usage_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/resource_usage_py3.py new file mode 100644 index 000000000000..a7f557b5ecae --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/resource_usage_py3.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 msrest.serialization import Model + + +class ResourceUsage(Model): + """Output of check resource usage API. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_type: Resource type for which the usage is provided. + :vartype resource_type: str + :ivar unit: Unit of the usage. e.g. Count. + :vartype unit: str + :ivar current_value: Actual value of usage on the specified resource type. + :vartype current_value: int + :ivar limit: Quota of the specified resource type. + :vartype limit: int + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'unit': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'int'}, + 'limit': {'key': 'limit', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceUsage, self).__init__(**kwargs) + self.resource_type = None + self.unit = None + self.current_value = None + self.limit = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/sku.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/sku.py index b6c090159405..88b809ac026f 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/sku.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/sku.py @@ -26,6 +26,6 @@ class Sku(Model): 'name': {'key': 'name', 'type': 'str'}, } - def __init__(self, name=None): - super(Sku, self).__init__() - self.name = name + def __init__(self, **kwargs): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/sku_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/sku_py3.py new file mode 100644 index 000000000000..d4471b8a4dd4 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/sku_py3.py @@ -0,0 +1,31 @@ +# 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 pricing tier (defines a CDN provider, feature list and rate) of the CDN + profile. + + :param name: Name of the pricing tier. Possible values include: + 'Standard_Verizon', 'Premium_Verizon', 'Custom_Verizon', + 'Standard_Akamai', 'Standard_ChinaCdn' + :type name: str or ~azure.mgmt.cdn.models.SkuName + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, name=None, **kwargs) -> None: + super(Sku, self).__init__(**kwargs) + self.name = name diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/sso_uri.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/sso_uri.py index f27d2e633ba4..1a2f7c408e19 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/sso_uri.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/sso_uri.py @@ -30,6 +30,6 @@ class SsoUri(Model): 'sso_uri_value': {'key': 'ssoUriValue', 'type': 'str'}, } - def __init__(self): - super(SsoUri, self).__init__() + def __init__(self, **kwargs): + super(SsoUri, self).__init__(**kwargs) self.sso_uri_value = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/sso_uri_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/sso_uri_py3.py new file mode 100644 index 000000000000..269f00d84d24 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/sso_uri_py3.py @@ -0,0 +1,35 @@ +# 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 SsoUri(Model): + """The URI required to login to the supplemental portal from the Azure portal. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar sso_uri_value: The URI used to login to the supplemental portal. + :vartype sso_uri_value: str + """ + + _validation = { + 'sso_uri_value': {'readonly': True}, + } + + _attribute_map = { + 'sso_uri_value': {'key': 'ssoUriValue', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SsoUri, self).__init__(**kwargs) + self.sso_uri_value = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/supported_optimization_types_list_result.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/supported_optimization_types_list_result.py index 4bc86dc0282c..cfe69fb01272 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/supported_optimization_types_list_result.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/supported_optimization_types_list_result.py @@ -32,6 +32,6 @@ class SupportedOptimizationTypesListResult(Model): 'supported_optimization_types': {'key': 'supportedOptimizationTypes', 'type': '[str]'}, } - def __init__(self): - super(SupportedOptimizationTypesListResult, self).__init__() + def __init__(self, **kwargs): + super(SupportedOptimizationTypesListResult, self).__init__(**kwargs) self.supported_optimization_types = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/supported_optimization_types_list_result_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/supported_optimization_types_list_result_py3.py new file mode 100644 index 000000000000..e8056adcb936 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/supported_optimization_types_list_result_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SupportedOptimizationTypesListResult(Model): + """The result of the GetSupportedOptimizationTypes API. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar supported_optimization_types: Supported optimization types for a + profile. + :vartype supported_optimization_types: list[str or + ~azure.mgmt.cdn.models.OptimizationType] + """ + + _validation = { + 'supported_optimization_types': {'readonly': True}, + } + + _attribute_map = { + 'supported_optimization_types': {'key': 'supportedOptimizationTypes', 'type': '[str]'}, + } + + def __init__(self, **kwargs) -> None: + super(SupportedOptimizationTypesListResult, self).__init__(**kwargs) + self.supported_optimization_types = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/tracked_resource.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/tracked_resource.py index 89da055e8f69..0cc6df63f05b 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/tracked_resource.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/tracked_resource.py @@ -18,13 +18,15 @@ class TrackedResource(Resource): 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 location: Resource location. + :param location: Required. Resource location. :type location: str :param tags: Resource tags. :type tags: dict[str, str] @@ -45,7 +47,7 @@ class TrackedResource(Resource): 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, location, tags=None): - super(TrackedResource, self).__init__() - self.location = location - self.tags = tags + def __init__(self, **kwargs): + super(TrackedResource, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/tracked_resource_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/tracked_resource_py3.py new file mode 100644 index 000000000000..32b78c0d83f2 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/tracked_resource_py3.py @@ -0,0 +1,53 @@ +# 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 TrackedResource(Resource): + """The resource model definition for a ARM tracked top level resource. + + 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 location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(TrackedResource, self).__init__(**kwargs) + self.location = location + self.tags = tags diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/url_file_extension_condition_parameters.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/url_file_extension_condition_parameters.py new file mode 100644 index 000000000000..d94baf881a31 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/url_file_extension_condition_parameters.py @@ -0,0 +1,46 @@ +# 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 UrlFileExtensionConditionParameters(Model): + """Defines the parameters for the URL file extension condition. + + 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 odatatype: Required. Default value: + "Microsoft.Azure.Cdn.Models.DeliveryRuleUrlFileExtensionConditionParameters" + . + :vartype odatatype: str + :param extensions: Required. A list of extensions for the condition of the + delivery rule. + :type extensions: list[str] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'extensions': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'extensions': {'key': 'extensions', 'type': '[str]'}, + } + + odatatype = "Microsoft.Azure.Cdn.Models.DeliveryRuleUrlFileExtensionConditionParameters" + + def __init__(self, **kwargs): + super(UrlFileExtensionConditionParameters, self).__init__(**kwargs) + self.extensions = kwargs.get('extensions', None) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/url_file_extension_condition_parameters_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/url_file_extension_condition_parameters_py3.py new file mode 100644 index 000000000000..450c880794ce --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/url_file_extension_condition_parameters_py3.py @@ -0,0 +1,46 @@ +# 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 UrlFileExtensionConditionParameters(Model): + """Defines the parameters for the URL file extension condition. + + 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 odatatype: Required. Default value: + "Microsoft.Azure.Cdn.Models.DeliveryRuleUrlFileExtensionConditionParameters" + . + :vartype odatatype: str + :param extensions: Required. A list of extensions for the condition of the + delivery rule. + :type extensions: list[str] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'extensions': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'extensions': {'key': 'extensions', 'type': '[str]'}, + } + + odatatype = "Microsoft.Azure.Cdn.Models.DeliveryRuleUrlFileExtensionConditionParameters" + + def __init__(self, *, extensions, **kwargs) -> None: + super(UrlFileExtensionConditionParameters, self).__init__(**kwargs) + self.extensions = extensions diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/url_path_condition_parameters.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/url_path_condition_parameters.py new file mode 100644 index 000000000000..06b005be5c26 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/url_path_condition_parameters.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 msrest.serialization import Model + + +class UrlPathConditionParameters(Model): + """Defines the parameters for the URL path condition. + + 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 odatatype: Required. Default value: + "Microsoft.Azure.Cdn.Models.DeliveryRuleUrlPathConditionParameters" . + :vartype odatatype: str + :param path: Required. A URL path for the condition of the delivery rule + :type path: str + :param match_type: Required. The match type for the condition of the + delivery rule. Possible values include: 'Literal', 'Wildcard' + :type match_type: str or ~azure.mgmt.cdn.models.enum + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'path': {'required': True}, + 'match_type': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, + 'match_type': {'key': 'matchType', 'type': 'str'}, + } + + odatatype = "Microsoft.Azure.Cdn.Models.DeliveryRuleUrlPathConditionParameters" + + def __init__(self, **kwargs): + super(UrlPathConditionParameters, self).__init__(**kwargs) + self.path = kwargs.get('path', None) + self.match_type = kwargs.get('match_type', None) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/url_path_condition_parameters_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/url_path_condition_parameters_py3.py new file mode 100644 index 000000000000..c1049a0260d9 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/url_path_condition_parameters_py3.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 msrest.serialization import Model + + +class UrlPathConditionParameters(Model): + """Defines the parameters for the URL path condition. + + 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 odatatype: Required. Default value: + "Microsoft.Azure.Cdn.Models.DeliveryRuleUrlPathConditionParameters" . + :vartype odatatype: str + :param path: Required. A URL path for the condition of the delivery rule + :type path: str + :param match_type: Required. The match type for the condition of the + delivery rule. Possible values include: 'Literal', 'Wildcard' + :type match_type: str or ~azure.mgmt.cdn.models.enum + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'path': {'required': True}, + 'match_type': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, + 'match_type': {'key': 'matchType', 'type': 'str'}, + } + + odatatype = "Microsoft.Azure.Cdn.Models.DeliveryRuleUrlPathConditionParameters" + + def __init__(self, *, path: str, match_type, **kwargs) -> None: + super(UrlPathConditionParameters, self).__init__(**kwargs) + self.path = path + self.match_type = match_type diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/validate_custom_domain_input.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/validate_custom_domain_input.py index 86eadac85045..5ccf7293966d 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/validate_custom_domain_input.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/validate_custom_domain_input.py @@ -15,8 +15,10 @@ class ValidateCustomDomainInput(Model): """Input of the custom domain to be validated for DNS mapping. - :param host_name: The host name of the custom domain. Must be a domain - name. + All required parameters must be populated in order to send to Azure. + + :param host_name: Required. The host name of the custom domain. Must be a + domain name. :type host_name: str """ @@ -28,6 +30,6 @@ class ValidateCustomDomainInput(Model): 'host_name': {'key': 'hostName', 'type': 'str'}, } - def __init__(self, host_name): - super(ValidateCustomDomainInput, self).__init__() - self.host_name = host_name + def __init__(self, **kwargs): + super(ValidateCustomDomainInput, self).__init__(**kwargs) + self.host_name = kwargs.get('host_name', None) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/validate_custom_domain_input_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/validate_custom_domain_input_py3.py new file mode 100644 index 000000000000..ad915548dba8 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/validate_custom_domain_input_py3.py @@ -0,0 +1,35 @@ +# 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 ValidateCustomDomainInput(Model): + """Input of the custom domain to be validated for DNS mapping. + + All required parameters must be populated in order to send to Azure. + + :param host_name: Required. The host name of the custom domain. Must be a + domain name. + :type host_name: str + """ + + _validation = { + 'host_name': {'required': True}, + } + + _attribute_map = { + 'host_name': {'key': 'hostName', 'type': 'str'}, + } + + def __init__(self, *, host_name: str, **kwargs) -> None: + super(ValidateCustomDomainInput, self).__init__(**kwargs) + self.host_name = host_name diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/validate_custom_domain_output.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/validate_custom_domain_output.py index 82c6a949d99a..d330e0f93521 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/validate_custom_domain_output.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/validate_custom_domain_output.py @@ -40,8 +40,8 @@ class ValidateCustomDomainOutput(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self): - super(ValidateCustomDomainOutput, self).__init__() + def __init__(self, **kwargs): + super(ValidateCustomDomainOutput, self).__init__(**kwargs) self.custom_domain_validated = None self.reason = None self.message = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/validate_custom_domain_output_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/validate_custom_domain_output_py3.py new file mode 100644 index 000000000000..a3d2b9339b9b --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/validate_custom_domain_output_py3.py @@ -0,0 +1,47 @@ +# 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 ValidateCustomDomainOutput(Model): + """Output of custom domain validation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar custom_domain_validated: Indicates whether the custom domain is + valid or not. + :vartype custom_domain_validated: bool + :ivar reason: The reason why the custom domain is not valid. + :vartype reason: str + :ivar message: Error message describing why the custom domain is not + valid. + :vartype message: str + """ + + _validation = { + 'custom_domain_validated': {'readonly': True}, + 'reason': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'custom_domain_validated': {'key': 'customDomainValidated', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ValidateCustomDomainOutput, self).__init__(**kwargs) + self.custom_domain_validated = None + self.reason = None + self.message = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/validate_probe_input.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/validate_probe_input.py index b3b7818b02d4..4df6dc0ae167 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/validate_probe_input.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/validate_probe_input.py @@ -15,7 +15,9 @@ class ValidateProbeInput(Model): """Input of the validate probe API. - :param probe_url: The probe URL to validate. + All required parameters must be populated in order to send to Azure. + + :param probe_url: Required. The probe URL to validate. :type probe_url: str """ @@ -27,6 +29,6 @@ class ValidateProbeInput(Model): 'probe_url': {'key': 'probeURL', 'type': 'str'}, } - def __init__(self, probe_url): - super(ValidateProbeInput, self).__init__() - self.probe_url = probe_url + def __init__(self, **kwargs): + super(ValidateProbeInput, self).__init__(**kwargs) + self.probe_url = kwargs.get('probe_url', None) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/validate_probe_input_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/validate_probe_input_py3.py new file mode 100644 index 000000000000..c82e5af3927c --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/validate_probe_input_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ValidateProbeInput(Model): + """Input of the validate probe API. + + All required parameters must be populated in order to send to Azure. + + :param probe_url: Required. The probe URL to validate. + :type probe_url: str + """ + + _validation = { + 'probe_url': {'required': True}, + } + + _attribute_map = { + 'probe_url': {'key': 'probeURL', 'type': 'str'}, + } + + def __init__(self, *, probe_url: str, **kwargs) -> None: + super(ValidateProbeInput, self).__init__(**kwargs) + self.probe_url = probe_url diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/validate_probe_output.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/validate_probe_output.py index dcbc8b9a6228..8bf0b4d5a9b1 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/validate_probe_output.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/validate_probe_output.py @@ -40,8 +40,8 @@ class ValidateProbeOutput(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self): - super(ValidateProbeOutput, self).__init__() + def __init__(self, **kwargs): + super(ValidateProbeOutput, self).__init__(**kwargs) self.is_valid = None self.error_code = None self.message = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/validate_probe_output_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/validate_probe_output_py3.py new file mode 100644 index 000000000000..b865a3a978b5 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/validate_probe_output_py3.py @@ -0,0 +1,47 @@ +# 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 ValidateProbeOutput(Model): + """Output of the validate probe API. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar is_valid: Indicates whether the probe URL is accepted or not. + :vartype is_valid: bool + :ivar error_code: Specifies the error code when the probe url is not + accepted. + :vartype error_code: str + :ivar message: The detailed error message describing why the probe URL is + not accepted. + :vartype message: str + """ + + _validation = { + 'is_valid': {'readonly': True}, + 'error_code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'is_valid': {'key': 'isValid', 'type': 'bool'}, + 'error_code': {'key': 'errorCode', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ValidateProbeOutput, self).__init__(**kwargs) + self.is_valid = None + self.error_code = None + self.message = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/operations/custom_domains_operations.py b/azure-mgmt-cdn/azure/mgmt/cdn/operations/custom_domains_operations.py index b94b84441fdf..581915ce50cf 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/operations/custom_domains_operations.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/operations/custom_domains_operations.py @@ -11,8 +11,8 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrest.exceptions import DeserializationError -from msrestazure.azure_operation import AzureOperationPoller +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -24,7 +24,7 @@ class CustomDomainsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2017-04-02". + :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2017-10-12". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-04-02" + self.api_version = "2017-10-12" self.config = config @@ -242,7 +242,7 @@ def _create_initial( return deserialized def create( - self, resource_group_name, profile_name, endpoint_name, custom_domain_name, host_name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, profile_name, endpoint_name, custom_domain_name, host_name, custom_headers=None, raw=False, polling=True, **operation_config): """Creates a new custom domain within an endpoint. :param resource_group_name: Name of the Resource group within the @@ -261,13 +261,16 @@ def create( name. :type host_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 - :return: An instance of AzureOperationPoller that returns CustomDomain - or ClientRawResponse if raw=true + :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 CustomDomain or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cdn.models.CustomDomain] - or ~msrest.pipeline.ClientRawResponse + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cdn.models.CustomDomain]] :raises: :class:`ErrorResponseException` """ @@ -281,28 +284,8 @@ def create( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 201, 202]: - raise models.ErrorResponseException(self._deserialize, response) - deserialized = self._deserialize('CustomDomain', response) if raw: @@ -311,12 +294,13 @@ def get_long_running_output(response): return deserialized - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, 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) create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}'} @@ -366,7 +350,7 @@ def _delete_initial( return deserialized def delete( - self, resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers=None, raw=False, polling=True, **operation_config): """Deletes an existing custom domain within an endpoint. :param resource_group_name: Name of the Resource group within the @@ -382,13 +366,16 @@ def delete( endpoint. :type custom_domain_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 - :return: An instance of AzureOperationPoller that returns CustomDomain - or ClientRawResponse if raw=true + :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 CustomDomain or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cdn.models.CustomDomain] - or ~msrest.pipeline.ClientRawResponse + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cdn.models.CustomDomain]] :raises: :class:`ErrorResponseException` """ @@ -401,28 +388,8 @@ def delete( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 202, 204]: - raise models.ErrorResponseException(self._deserialize, response) - deserialized = self._deserialize('CustomDomain', response) if raw: @@ -431,12 +398,13 @@ def get_long_running_output(response): return deserialized - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, 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) delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}'} def disable_custom_https( diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/operations/edge_nodes_operations.py b/azure-mgmt-cdn/azure/mgmt/cdn/operations/edge_nodes_operations.py index f700d35286f0..3d788cd2ce9f 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/operations/edge_nodes_operations.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/operations/edge_nodes_operations.py @@ -22,7 +22,7 @@ class EdgeNodesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2017-04-02". + :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2017-10-12". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-04-02" + self.api_version = "2017-10-12" self.config = config diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/operations/endpoints_operations.py b/azure-mgmt-cdn/azure/mgmt/cdn/operations/endpoints_operations.py index 906aace111dd..a363d2214d40 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/operations/endpoints_operations.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/operations/endpoints_operations.py @@ -11,8 +11,8 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrest.exceptions import DeserializationError -from msrestazure.azure_operation import AzureOperationPoller +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -24,7 +24,7 @@ class EndpointsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2017-04-02". + :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2017-10-12". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-04-02" + self.api_version = "2017-10-12" self.config = config @@ -232,7 +232,7 @@ def _create_initial( return deserialized def create( - self, resource_group_name, profile_name, endpoint_name, endpoint, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, profile_name, endpoint_name, endpoint, custom_headers=None, raw=False, polling=True, **operation_config): """Creates a new CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. @@ -248,13 +248,16 @@ def create( :param endpoint: Endpoint properties :type endpoint: ~azure.mgmt.cdn.models.Endpoint :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns Endpoint or - ClientRawResponse if raw=true + :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 Endpoint or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cdn.models.Endpoint] - or ~msrest.pipeline.ClientRawResponse + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cdn.models.Endpoint]] :raises: :class:`ErrorResponseException` """ @@ -267,28 +270,8 @@ def create( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 201, 202]: - raise models.ErrorResponseException(self._deserialize, response) - deserialized = self._deserialize('Endpoint', response) if raw: @@ -297,12 +280,13 @@ def get_long_running_output(response): return deserialized - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, 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) create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}'} @@ -357,7 +341,7 @@ def _update_initial( return deserialized def update( - self, resource_group_name, profile_name, endpoint_name, endpoint_update_properties, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, profile_name, endpoint_name, endpoint_update_properties, custom_headers=None, raw=False, polling=True, **operation_config): """Updates an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. Only tags and Origin HostHeader can be updated after creating an endpoint. To update @@ -377,13 +361,16 @@ def update( :type endpoint_update_properties: ~azure.mgmt.cdn.models.EndpointUpdateParameters :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns Endpoint or - ClientRawResponse if raw=true + :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 Endpoint or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cdn.models.Endpoint] - or ~msrest.pipeline.ClientRawResponse + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cdn.models.Endpoint]] :raises: :class:`ErrorResponseException` """ @@ -396,28 +383,8 @@ def update( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 202]: - raise models.ErrorResponseException(self._deserialize, response) - deserialized = self._deserialize('Endpoint', response) if raw: @@ -426,12 +393,13 @@ def get_long_running_output(response): return deserialized - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, 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) update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}'} @@ -473,7 +441,7 @@ def _delete_initial( return client_raw_response def delete( - self, resource_group_name, profile_name, endpoint_name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, profile_name, endpoint_name, custom_headers=None, raw=False, polling=True, **operation_config): """Deletes an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. @@ -487,12 +455,14 @@ def delete( unique globally. :type endpoint_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 - :return: An instance of AzureOperationPoller that returns None or - ClientRawResponse if raw=true + :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 None or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrest.pipeline.ClientRawResponse + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`ErrorResponseException` """ @@ -504,38 +474,19 @@ def delete( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [202, 204]: - raise models.ErrorResponseException(self._deserialize, response) - if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, 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) delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}'} @@ -586,7 +537,7 @@ def _start_initial( return deserialized def start( - self, resource_group_name, profile_name, endpoint_name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, profile_name, endpoint_name, custom_headers=None, raw=False, polling=True, **operation_config): """Starts an existing CDN endpoint that is on a stopped state. :param resource_group_name: Name of the Resource group within the @@ -599,13 +550,16 @@ def start( unique globally. :type endpoint_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 - :return: An instance of AzureOperationPoller that returns Endpoint or - ClientRawResponse if raw=true + :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 Endpoint or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cdn.models.Endpoint] - or ~msrest.pipeline.ClientRawResponse + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cdn.models.Endpoint]] :raises: :class:`ErrorResponseException` """ @@ -617,28 +571,8 @@ def start( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 202]: - raise models.ErrorResponseException(self._deserialize, response) - deserialized = self._deserialize('Endpoint', response) if raw: @@ -647,12 +581,13 @@ def get_long_running_output(response): return deserialized - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, 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) start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/start'} @@ -703,7 +638,7 @@ def _stop_initial( return deserialized def stop( - self, resource_group_name, profile_name, endpoint_name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, profile_name, endpoint_name, custom_headers=None, raw=False, polling=True, **operation_config): """Stops an existing running CDN endpoint. :param resource_group_name: Name of the Resource group within the @@ -716,13 +651,16 @@ def stop( unique globally. :type endpoint_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 - :return: An instance of AzureOperationPoller that returns Endpoint or - ClientRawResponse if raw=true + :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 Endpoint or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cdn.models.Endpoint] - or ~msrest.pipeline.ClientRawResponse + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cdn.models.Endpoint]] :raises: :class:`ErrorResponseException` """ @@ -734,28 +672,8 @@ def stop( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 202]: - raise models.ErrorResponseException(self._deserialize, response) - deserialized = self._deserialize('Endpoint', response) if raw: @@ -764,12 +682,13 @@ def get_long_running_output(response): return deserialized - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, 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) stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/stop'} @@ -817,7 +736,7 @@ def _purge_content_initial( return client_raw_response def purge_content( - self, resource_group_name, profile_name, endpoint_name, content_paths, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, profile_name, endpoint_name, content_paths, custom_headers=None, raw=False, polling=True, **operation_config): """Removes a content from CDN. :param resource_group_name: Name of the Resource group within the @@ -833,12 +752,14 @@ def purge_content( describe a file path or a wild card directory. :type content_paths: list[str] :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns None or - ClientRawResponse if raw=true + :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 None or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrest.pipeline.ClientRawResponse + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`ErrorResponseException` """ @@ -851,38 +772,19 @@ def purge_content( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 202]: - raise models.ErrorResponseException(self._deserialize, response) - if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, 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_content.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/purge'} @@ -930,7 +832,7 @@ def _load_content_initial( return client_raw_response def load_content( - self, resource_group_name, profile_name, endpoint_name, content_paths, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, profile_name, endpoint_name, content_paths, custom_headers=None, raw=False, polling=True, **operation_config): """Pre-loads a content to CDN. Available for Verizon Profiles. :param resource_group_name: Name of the Resource group within the @@ -946,12 +848,14 @@ def load_content( should be a relative file URL of the origin. :type content_paths: list[str] :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns None or - ClientRawResponse if raw=true + :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 None or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrest.pipeline.ClientRawResponse + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`ErrorResponseException` """ @@ -964,38 +868,19 @@ def load_content( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 202]: - raise models.ErrorResponseException(self._deserialize, response) - if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, 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) load_content.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/load'} def validate_custom_domain( diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/operations/operations.py b/azure-mgmt-cdn/azure/mgmt/cdn/operations/operations.py index bee028226c2b..07eb4c2795ff 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/operations/operations.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/operations/operations.py @@ -22,7 +22,7 @@ class Operations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2017-04-02". + :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2017-10-12". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-04-02" + self.api_version = "2017-10-12" self.config = config diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/operations/origins_operations.py b/azure-mgmt-cdn/azure/mgmt/cdn/operations/origins_operations.py index ab9ae02090af..e5a715ddacb5 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/operations/origins_operations.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/operations/origins_operations.py @@ -11,8 +11,8 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrest.exceptions import DeserializationError -from msrestazure.azure_operation import AzureOperationPoller +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -24,7 +24,7 @@ class OriginsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2017-04-02". + :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2017-10-12". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-04-02" + self.api_version = "2017-10-12" self.config = config @@ -238,7 +238,7 @@ def _update_initial( return deserialized def update( - self, resource_group_name, profile_name, endpoint_name, origin_name, origin_update_properties, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, profile_name, endpoint_name, origin_name, origin_update_properties, custom_headers=None, raw=False, polling=True, **operation_config): """Updates an existing origin within an endpoint. :param resource_group_name: Name of the Resource group within the @@ -257,13 +257,16 @@ def update( :type origin_update_properties: ~azure.mgmt.cdn.models.OriginUpdateParameters :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns Origin or - ClientRawResponse if raw=true + :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 Origin or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cdn.models.Origin] - or ~msrest.pipeline.ClientRawResponse + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cdn.models.Origin]] :raises: :class:`ErrorResponseException` """ @@ -277,28 +280,8 @@ def update( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 202]: - raise models.ErrorResponseException(self._deserialize, response) - deserialized = self._deserialize('Origin', response) if raw: @@ -307,10 +290,11 @@ def get_long_running_output(response): return deserialized - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, 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) update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}'} diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/operations/profiles_operations.py b/azure-mgmt-cdn/azure/mgmt/cdn/operations/profiles_operations.py index af12860c9eb5..438a69a9347d 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/operations/profiles_operations.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/operations/profiles_operations.py @@ -11,8 +11,8 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrest.exceptions import DeserializationError -from msrestazure.azure_operation import AzureOperationPoller +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -24,7 +24,7 @@ class ProfilesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2017-04-02". + :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2017-10-12". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-04-02" + self.api_version = "2017-10-12" self.config = config @@ -287,7 +287,7 @@ def _create_initial( return deserialized def create( - self, resource_group_name, profile_name, profile, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, profile_name, profile, custom_headers=None, raw=False, polling=True, **operation_config): """Creates a new CDN profile with a profile name under the specified subscription and resource group. @@ -300,13 +300,16 @@ def create( :param profile: Profile properties needed to create a new profile. :type profile: ~azure.mgmt.cdn.models.Profile :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns Profile or - ClientRawResponse if raw=true + :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 Profile or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cdn.models.Profile] - or ~msrest.pipeline.ClientRawResponse + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cdn.models.Profile]] :raises: :class:`ErrorResponseException` """ @@ -318,28 +321,8 @@ def create( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 201, 202]: - raise models.ErrorResponseException(self._deserialize, response) - deserialized = self._deserialize('Profile', response) if raw: @@ -348,12 +331,13 @@ def get_long_running_output(response): return deserialized - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, 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) create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}'} @@ -409,7 +393,7 @@ def _update_initial( return deserialized def update( - self, resource_group_name, profile_name, tags=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, profile_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): """Updates an existing CDN profile with the specified profile name under the specified subscription and resource group. @@ -422,13 +406,16 @@ def update( :param tags: Profile tags :type tags: dict[str, str] :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns Profile or - ClientRawResponse if raw=true + :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 Profile or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cdn.models.Profile] - or ~msrest.pipeline.ClientRawResponse + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cdn.models.Profile]] :raises: :class:`ErrorResponseException` """ @@ -440,28 +427,8 @@ def update( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [200, 202]: - raise models.ErrorResponseException(self._deserialize, response) - deserialized = self._deserialize('Profile', response) if raw: @@ -470,12 +437,13 @@ def get_long_running_output(response): return deserialized - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, 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) update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}'} @@ -516,7 +484,7 @@ def _delete_initial( return client_raw_response def delete( - self, resource_group_name, profile_name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, profile_name, custom_headers=None, raw=False, polling=True, **operation_config): """Deletes an existing CDN profile with the specified parameters. Deleting a profile will result in the deletion of all of the sub-resources including endpoints, origins and custom domains. @@ -528,12 +496,14 @@ def delete( the resource group. :type profile_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 - :return: An instance of AzureOperationPoller that returns None or - ClientRawResponse if raw=true + :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 None or + ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrest.pipeline.ClientRawResponse + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`ErrorResponseException` """ @@ -544,38 +514,19 @@ def delete( raw=True, **operation_config ) - if raw: - return raw_result - - # Construct and send request - def long_running_send(): - return raw_result.response - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - header_parameters = {} - header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] - return self._client.send( - request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - - if response.status_code not in [202, 204]: - raise models.ErrorResponseException(self._deserialize, response) - if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, 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) delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}'} def generate_sso_uri( diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/operations/resource_usage_operations.py b/azure-mgmt-cdn/azure/mgmt/cdn/operations/resource_usage_operations.py index 707e5e31e414..57aaa52c4506 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/operations/resource_usage_operations.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/operations/resource_usage_operations.py @@ -22,7 +22,7 @@ class ResourceUsageOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2017-04-02". + :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2017-10-12". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-04-02" + self.api_version = "2017-10-12" self.config = config diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/version.py b/azure-mgmt-cdn/azure/mgmt/cdn/version.py index 53c4c7ea05e8..7f225c6aab41 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/version.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "2.0.0" +VERSION = "3.0.0" diff --git a/azure-mgmt-cdn/sdk_packaging.toml b/azure-mgmt-cdn/sdk_packaging.toml new file mode 100644 index 000000000000..224bd7591a1c --- /dev/null +++ b/azure-mgmt-cdn/sdk_packaging.toml @@ -0,0 +1,5 @@ +[packaging] +package_name = "azure-mgmt-cdn" +package_pprint_name = "CDN Management" +package_doc_id = "cdn" +is_stable = true diff --git a/azure-mgmt-cdn/setup.py b/azure-mgmt-cdn/setup.py index 4deb2392c9d2..e2b7e3b2b712 100644 --- a/azure-mgmt-cdn/setup.py +++ b/azure-mgmt-cdn/setup.py @@ -64,12 +64,11 @@ author_email='azpysdkhelp@microsoft.com', url='https://github.com/Azure/azure-sdk-for-python', classifiers=[ - 'Development Status :: 4 - Beta', + 'Development Status :: 5 - Production/Stable', 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', @@ -78,7 +77,7 @@ zip_safe=False, packages=find_packages(exclude=["tests"]), install_requires=[ - 'msrestazure~=0.4.11', + 'msrestazure>=0.4.27,<2.0.0', 'azure-common~=1.1', ], cmdclass=cmdclass diff --git a/azure-mgmt-cdn/tests/recordings/test_mgmt_cdn.test_cdn.yaml b/azure-mgmt-cdn/tests/recordings/test_mgmt_cdn.test_cdn.yaml index f782fe48b0f7..4f63a59df587 100644 --- a/azure-mgmt-cdn/tests/recordings/test_mgmt_cdn.test_cdn.yaml +++ b/azure-mgmt-cdn/tests/recordings/test_mgmt_cdn.test_cdn.yaml @@ -7,11 +7,11 @@ interactions: Connection: [keep-alive] Content-Length: ['72'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.3 (Windows-10-10.0.15063-SP0) requests/2.18.4 msrest/0.4.17 - msrest_azure/0.4.15 cdnmanagementclient/2.0.0 Azure-SDK-For-Python] + User-Agent: [python/3.6.4 (Windows-10-10.0.17134-SP0) requests/2.18.4 msrest/0.4.28 + msrest_azure/0.4.31 azure-mgmt-cdn/3.0.0 Azure-SDK-For-Python] accept-language: [en-US] method: POST - uri: https://management.azure.com/providers/Microsoft.Cdn/checkNameAvailability?api-version=2017-04-02 + uri: https://management.azure.com/providers/Microsoft.Cdn/checkNameAvailability?api-version=2017-10-12 response: body: {string: "{\r\n \"nameAvailable\":true,\"reason\":null,\"message\":null\r\ \n}"} @@ -19,7 +19,7 @@ interactions: cache-control: [no-cache] content-length: ['57'] content-type: [application/json; odata.metadata=minimal] - date: ['Thu, 26 Oct 2017 16:58:01 GMT'] + date: ['Fri, 25 May 2018 19:24:53 GMT'] expires: ['-1'] odata-version: ['4.0'] pragma: [no-cache] @@ -28,6 +28,7 @@ interactions: transfer-encoding: [chunked] vary: [Accept-Encoding] x-aspnet-version: [4.0.30319] + x-content-type-options: [nosniff] x-ms-ratelimit-remaining-tenant-writes: ['1199'] x-powered-by: [ASP.NET] status: {code: 200, message: OK} diff --git a/azure-mgmt-cognitiveservices/HISTORY.rst b/azure-mgmt-cognitiveservices/HISTORY.rst index 6cd5432eb409..35db6bd3e84b 100644 --- a/azure-mgmt-cognitiveservices/HISTORY.rst +++ b/azure-mgmt-cognitiveservices/HISTORY.rst @@ -3,6 +3,45 @@ Release History =============== +3.0.0 (2018-05-21) +++++++++++++++++++ + +**General Breaking changes** + +This version uses a next-generation code generator that *might* introduce breaking changes. + +- Model signatures now use only keyword-argument syntax. All positional arguments must be re-written as keyword-arguments. + To keep auto-completion in most cases, models are now generated for Python 2 and Python 3. Python 3 uses the "*" syntax for keyword-only arguments. +- Enum types now use the "str" mixin (class AzureEnum(str, Enum)) to improve the behavior when unrecognized enum values are encountered. + While this is not a breaking change, the distinctions are important, and are documented here: + https://docs.python.org/3/library/enum.html#others + At a glance: + + - "is" should not be used at all. + - "format" will return the string value, where "%s" string formatting will return `NameOfEnum.stringvalue`. Format syntax should be prefered. + +- New Long Running Operation: + + - Return type changes from `msrestazure.azure_operation.AzureOperationPoller` to `msrest.polling.LROPoller`. External API is the same. + - Return type is now **always** a `msrest.polling.LROPoller`, regardless of the optional parameters used. + - The behavior has changed when using `raw=True`. Instead of returning the initial call result as `ClientRawResponse`, + without polling, now this returns an LROPoller. After polling, the final resource will be returned as a `ClientRawResponse`. + - New `polling` parameter. The default behavior is `Polling=True` which will poll using ARM algorithm. When `Polling=False`, + the response of the initial call will be returned without polling. + - `polling` parameter accepts instances of subclasses of `msrest.polling.PollingMethod`. + - `add_done_callback` will no longer raise if called after polling is finished, but will instead execute the callback right away. + +**Features** + +- Add "resource_skus" operation group +- Update SKU list +- Add "accounts.get_usages" operation +- Client class can be used as a context manager to keep the underlying HTTP session open for performance + +**Bugfixes** + +- Compatibility of the sdist with wheel 0.31.0 + 2.0.0 (2017-10-26) ++++++++++++++++++ diff --git a/azure-mgmt-cognitiveservices/README.rst b/azure-mgmt-cognitiveservices/README.rst index b1a303e28a96..0ea301b72b84 100644 --- a/azure-mgmt-cognitiveservices/README.rst +++ b/azure-mgmt-cognitiveservices/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Cognitive Services Management Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. +This package has been tested with Python 2.7, 3.4, 3.5 and 3.6. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. @@ -37,8 +37,8 @@ Usage ===== For code examples, see `Cognitive Services Management -`__ -on readthedocs.org. +`__ +on docs.microsoft.com. Provide Feedback diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/cognitive_services_management_client.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/cognitive_services_management_client.py index 4b2c6a87d068..e2c25cc61bb5 100644 --- a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/cognitive_services_management_client.py +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/cognitive_services_management_client.py @@ -9,11 +9,12 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import ServiceClient +from msrest.service_client import SDKClient from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION from .operations.accounts_operations import AccountsOperations +from .operations.resource_skus_operations import ResourceSkusOperations from .operations.operations import Operations from .operations.check_sku_availability_operations import CheckSkuAvailabilityOperations from . import models @@ -44,14 +45,14 @@ def __init__( super(CognitiveServicesManagementClientConfiguration, self).__init__(base_url) - self.add_user_agent('cognitiveservicesmanagementclient/{}'.format(VERSION)) + self.add_user_agent('azure-mgmt-cognitiveservices/{}'.format(VERSION)) self.add_user_agent('Azure-SDK-For-Python') self.credentials = credentials self.subscription_id = subscription_id -class CognitiveServicesManagementClient(object): +class CognitiveServicesManagementClient(SDKClient): """Cognitive Services Management Client :ivar config: Configuration for client. @@ -59,6 +60,8 @@ class CognitiveServicesManagementClient(object): :ivar accounts: Accounts operations :vartype accounts: azure.mgmt.cognitiveservices.operations.AccountsOperations + :ivar resource_skus: ResourceSkus operations + :vartype resource_skus: azure.mgmt.cognitiveservices.operations.ResourceSkusOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.cognitiveservices.operations.Operations :ivar check_sku_availability: CheckSkuAvailability operations @@ -76,7 +79,7 @@ def __init__( self, credentials, subscription_id, base_url=None): self.config = CognitiveServicesManagementClientConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) + super(CognitiveServicesManagementClient, 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 = '2017-04-18' @@ -85,6 +88,8 @@ def __init__( self.accounts = AccountsOperations( self._client, self.config, self._serialize, self._deserialize) + self.resource_skus = ResourceSkusOperations( + self._client, self.config, self._serialize, self._deserialize) self.operations = Operations( self._client, self.config, self._serialize, self._deserialize) self.check_sku_availability = CheckSkuAvailabilityOperations( diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/__init__.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/__init__.py index 7cf6378c4341..4ae2382d277f 100644 --- a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/__init__.py +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/__init__.py @@ -9,22 +9,52 @@ # regenerated. # -------------------------------------------------------------------------- -from .sku import Sku -from .cognitive_services_account_create_parameters import CognitiveServicesAccountCreateParameters -from .cognitive_services_account_update_parameters import CognitiveServicesAccountUpdateParameters -from .cognitive_services_account import CognitiveServicesAccount -from .cognitive_services_account_keys import CognitiveServicesAccountKeys -from .regenerate_key_parameters import RegenerateKeyParameters -from .cognitive_services_resource_and_sku import CognitiveServicesResourceAndSku -from .cognitive_services_account_enumerate_skus_result import CognitiveServicesAccountEnumerateSkusResult -from .error_body import ErrorBody -from .error import Error, ErrorException -from .operation_display_info import OperationDisplayInfo -from .operation_entity import OperationEntity -from .check_sku_availability_parameter import CheckSkuAvailabilityParameter -from .check_sku_availability_result import CheckSkuAvailabilityResult -from .check_sku_availability_result_list import CheckSkuAvailabilityResultList +try: + from .sku_py3 import Sku + from .cognitive_services_account_create_parameters_py3 import CognitiveServicesAccountCreateParameters + from .cognitive_services_account_update_parameters_py3 import CognitiveServicesAccountUpdateParameters + from .cognitive_services_account_py3 import CognitiveServicesAccount + from .cognitive_services_account_keys_py3 import CognitiveServicesAccountKeys + from .regenerate_key_parameters_py3 import RegenerateKeyParameters + from .cognitive_services_resource_and_sku_py3 import CognitiveServicesResourceAndSku + from .cognitive_services_account_enumerate_skus_result_py3 import CognitiveServicesAccountEnumerateSkusResult + from .metric_name_py3 import MetricName + from .usage_py3 import Usage + from .usages_result_py3 import UsagesResult + from .error_body_py3 import ErrorBody + from .error_py3 import Error, ErrorException + from .operation_display_info_py3 import OperationDisplayInfo + from .operation_entity_py3 import OperationEntity + from .check_sku_availability_parameter_py3 import CheckSkuAvailabilityParameter + from .check_sku_availability_result_py3 import CheckSkuAvailabilityResult + from .check_sku_availability_result_list_py3 import CheckSkuAvailabilityResultList + from .resource_sku_restriction_info_py3 import ResourceSkuRestrictionInfo + from .resource_sku_restrictions_py3 import ResourceSkuRestrictions + from .resource_sku_py3 import ResourceSku +except (SyntaxError, ImportError): + from .sku import Sku + from .cognitive_services_account_create_parameters import CognitiveServicesAccountCreateParameters + from .cognitive_services_account_update_parameters import CognitiveServicesAccountUpdateParameters + from .cognitive_services_account import CognitiveServicesAccount + from .cognitive_services_account_keys import CognitiveServicesAccountKeys + from .regenerate_key_parameters import RegenerateKeyParameters + from .cognitive_services_resource_and_sku import CognitiveServicesResourceAndSku + from .cognitive_services_account_enumerate_skus_result import CognitiveServicesAccountEnumerateSkusResult + from .metric_name import MetricName + from .usage import Usage + from .usages_result import UsagesResult + from .error_body import ErrorBody + from .error import Error, ErrorException + from .operation_display_info import OperationDisplayInfo + from .operation_entity import OperationEntity + from .check_sku_availability_parameter import CheckSkuAvailabilityParameter + from .check_sku_availability_result import CheckSkuAvailabilityResult + from .check_sku_availability_result_list import CheckSkuAvailabilityResultList + from .resource_sku_restriction_info import ResourceSkuRestrictionInfo + from .resource_sku_restrictions import ResourceSkuRestrictions + from .resource_sku import ResourceSku from .cognitive_services_account_paged import CognitiveServicesAccountPaged +from .resource_sku_paged import ResourceSkuPaged from .operation_entity_paged import OperationEntityPaged from .cognitive_services_management_client_enums import ( SkuName, @@ -32,6 +62,10 @@ Kind, ProvisioningState, KeyName, + UnitType, + QuotaUsageStatus, + ResourceSkuRestrictionsType, + ResourceSkuRestrictionsReasonCode, ) __all__ = [ @@ -43,6 +77,9 @@ 'RegenerateKeyParameters', 'CognitiveServicesResourceAndSku', 'CognitiveServicesAccountEnumerateSkusResult', + 'MetricName', + 'Usage', + 'UsagesResult', 'ErrorBody', 'Error', 'ErrorException', 'OperationDisplayInfo', @@ -50,11 +87,19 @@ 'CheckSkuAvailabilityParameter', 'CheckSkuAvailabilityResult', 'CheckSkuAvailabilityResultList', + 'ResourceSkuRestrictionInfo', + 'ResourceSkuRestrictions', + 'ResourceSku', 'CognitiveServicesAccountPaged', + 'ResourceSkuPaged', 'OperationEntityPaged', 'SkuName', 'SkuTier', 'Kind', 'ProvisioningState', 'KeyName', + 'UnitType', + 'QuotaUsageStatus', + 'ResourceSkuRestrictionsType', + 'ResourceSkuRestrictionsReasonCode', ] diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/check_sku_availability_parameter.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/check_sku_availability_parameter.py index c85269f48567..c476eb892a2b 100644 --- a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/check_sku_availability_parameter.py +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/check_sku_availability_parameter.py @@ -15,15 +15,18 @@ class CheckSkuAvailabilityParameter(Model): """Check SKU availability parameter. - :param skus: The SKU of the resource. + All required parameters must be populated in order to send to Azure. + + :param skus: Required. The SKU of the resource. :type skus: list[str or ~azure.mgmt.cognitiveservices.models.SkuName] - :param kind: The Kind of the resource. Possible values include: - 'Academic', 'Bing.Autosuggest', 'Bing.Search', 'Bing.Speech', - 'Bing.SpellCheck', 'ComputerVision', 'ContentModerator', 'CustomSpeech', - 'Emotion', 'Face', 'LUIS', 'Recommendations', 'SpeakerRecognition', - 'Speech', 'SpeechTranslation', 'TextAnalytics', 'TextTranslation', 'WebLM' + :param kind: Required. The Kind of the resource. Possible values include: + 'Bing.Autosuggest.v7', 'Bing.CustomSearch', 'Bing.Search.v7', + 'Bing.Speech', 'Bing.SpellCheck.v7', 'ComputerVision', 'ContentModerator', + 'CustomSpeech', 'CustomVision.Prediction', 'CustomVision.Training', + 'Emotion', 'Face', 'LUIS', 'QnAMaker', 'SpeakerRecognition', + 'SpeechTranslation', 'TextAnalytics', 'TextTranslation', 'WebLM' :type kind: str or ~azure.mgmt.cognitiveservices.models.Kind - :param type: The Type of the resource. + :param type: Required. The Type of the resource. :type type: str """ @@ -39,7 +42,8 @@ class CheckSkuAvailabilityParameter(Model): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, skus, kind, type): - self.skus = skus - self.kind = kind - self.type = type + def __init__(self, **kwargs): + super(CheckSkuAvailabilityParameter, self).__init__(**kwargs) + self.skus = kwargs.get('skus', None) + self.kind = kwargs.get('kind', None) + self.type = kwargs.get('type', None) diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/check_sku_availability_parameter_py3.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/check_sku_availability_parameter_py3.py new file mode 100644 index 000000000000..3deeb3c9c009 --- /dev/null +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/check_sku_availability_parameter_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CheckSkuAvailabilityParameter(Model): + """Check SKU availability parameter. + + All required parameters must be populated in order to send to Azure. + + :param skus: Required. The SKU of the resource. + :type skus: list[str or ~azure.mgmt.cognitiveservices.models.SkuName] + :param kind: Required. The Kind of the resource. Possible values include: + 'Bing.Autosuggest.v7', 'Bing.CustomSearch', 'Bing.Search.v7', + 'Bing.Speech', 'Bing.SpellCheck.v7', 'ComputerVision', 'ContentModerator', + 'CustomSpeech', 'CustomVision.Prediction', 'CustomVision.Training', + 'Emotion', 'Face', 'LUIS', 'QnAMaker', 'SpeakerRecognition', + 'SpeechTranslation', 'TextAnalytics', 'TextTranslation', 'WebLM' + :type kind: str or ~azure.mgmt.cognitiveservices.models.Kind + :param type: Required. The Type of the resource. + :type type: str + """ + + _validation = { + 'skus': {'required': True}, + 'kind': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'skus': {'key': 'skus', 'type': '[str]'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, skus, kind, type: str, **kwargs) -> None: + super(CheckSkuAvailabilityParameter, self).__init__(**kwargs) + self.skus = skus + self.kind = kind + self.type = type diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/check_sku_availability_result.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/check_sku_availability_result.py index 76d40c6f9fa7..e2ecedea825c 100644 --- a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/check_sku_availability_result.py +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/check_sku_availability_result.py @@ -16,10 +16,11 @@ class CheckSkuAvailabilityResult(Model): """Check SKU availability result. :param kind: The Kind of the resource. Possible values include: - 'Academic', 'Bing.Autosuggest', 'Bing.Search', 'Bing.Speech', - 'Bing.SpellCheck', 'ComputerVision', 'ContentModerator', 'CustomSpeech', - 'Emotion', 'Face', 'LUIS', 'Recommendations', 'SpeakerRecognition', - 'Speech', 'SpeechTranslation', 'TextAnalytics', 'TextTranslation', 'WebLM' + 'Bing.Autosuggest.v7', 'Bing.CustomSearch', 'Bing.Search.v7', + 'Bing.Speech', 'Bing.SpellCheck.v7', 'ComputerVision', 'ContentModerator', + 'CustomSpeech', 'CustomVision.Prediction', 'CustomVision.Training', + 'Emotion', 'Face', 'LUIS', 'QnAMaker', 'SpeakerRecognition', + 'SpeechTranslation', 'TextAnalytics', 'TextTranslation', 'WebLM' :type kind: str or ~azure.mgmt.cognitiveservices.models.Kind :param type: The Type of the resource. :type type: str @@ -43,10 +44,11 @@ class CheckSkuAvailabilityResult(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self, kind=None, type=None, sku_name=None, sku_available=None, reason=None, message=None): - self.kind = kind - self.type = type - self.sku_name = sku_name - self.sku_available = sku_available - self.reason = reason - self.message = message + def __init__(self, **kwargs): + super(CheckSkuAvailabilityResult, self).__init__(**kwargs) + self.kind = kwargs.get('kind', None) + self.type = kwargs.get('type', None) + self.sku_name = kwargs.get('sku_name', None) + self.sku_available = kwargs.get('sku_available', None) + self.reason = kwargs.get('reason', None) + self.message = kwargs.get('message', None) diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/check_sku_availability_result_list.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/check_sku_availability_result_list.py index 6fc35cfcb251..bb5d7bdb5aba 100644 --- a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/check_sku_availability_result_list.py +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/check_sku_availability_result_list.py @@ -24,5 +24,6 @@ class CheckSkuAvailabilityResultList(Model): 'value': {'key': 'value', 'type': '[CheckSkuAvailabilityResult]'}, } - def __init__(self, value=None): - self.value = value + def __init__(self, **kwargs): + super(CheckSkuAvailabilityResultList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/check_sku_availability_result_list_py3.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/check_sku_availability_result_list_py3.py new file mode 100644 index 000000000000..e5c1bee9636e --- /dev/null +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/check_sku_availability_result_list_py3.py @@ -0,0 +1,29 @@ +# 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 CheckSkuAvailabilityResultList(Model): + """Check SKU availability result list. + + :param value: Check SKU availability result list. + :type value: + list[~azure.mgmt.cognitiveservices.models.CheckSkuAvailabilityResult] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CheckSkuAvailabilityResult]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(CheckSkuAvailabilityResultList, self).__init__(**kwargs) + self.value = value diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/check_sku_availability_result_py3.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/check_sku_availability_result_py3.py new file mode 100644 index 000000000000..f7700f27a219 --- /dev/null +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/check_sku_availability_result_py3.py @@ -0,0 +1,54 @@ +# 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 CheckSkuAvailabilityResult(Model): + """Check SKU availability result. + + :param kind: The Kind of the resource. Possible values include: + 'Bing.Autosuggest.v7', 'Bing.CustomSearch', 'Bing.Search.v7', + 'Bing.Speech', 'Bing.SpellCheck.v7', 'ComputerVision', 'ContentModerator', + 'CustomSpeech', 'CustomVision.Prediction', 'CustomVision.Training', + 'Emotion', 'Face', 'LUIS', 'QnAMaker', 'SpeakerRecognition', + 'SpeechTranslation', 'TextAnalytics', 'TextTranslation', 'WebLM' + :type kind: str or ~azure.mgmt.cognitiveservices.models.Kind + :param type: The Type of the resource. + :type type: str + :param sku_name: The SKU of Cognitive Services account. Possible values + include: 'F0', 'P0', 'P1', 'P2', 'S0', 'S1', 'S2', 'S3', 'S4', 'S5', 'S6' + :type sku_name: str or ~azure.mgmt.cognitiveservices.models.SkuName + :param sku_available: Indicates the given SKU is available or not. + :type sku_available: bool + :param reason: Reason why the SKU is not available. + :type reason: str + :param message: Additional error message. + :type message: str + """ + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'sku_name': {'key': 'skuName', 'type': 'str'}, + 'sku_available': {'key': 'skuAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, kind=None, type: str=None, sku_name=None, sku_available: bool=None, reason: str=None, message: str=None, **kwargs) -> None: + super(CheckSkuAvailabilityResult, self).__init__(**kwargs) + self.kind = kind + self.type = type + self.sku_name = sku_name + self.sku_available = sku_available + self.reason = reason + self.message = message diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account.py index 19aeee889ac6..148b30e560b5 100644 --- a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account.py +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account.py @@ -31,7 +31,7 @@ class CognitiveServicesAccount(Model): :vartype name: str :ivar provisioning_state: Gets the status of the cognitive services account at the time the operation was called. Possible values include: - 'Creating', 'ResolvingDNS', 'Succeeded', 'Failed' + 'Creating', 'ResolvingDNS', 'Moving', 'Deleting', 'Succeeded', 'Failed' :vartype provisioning_state: str or ~azure.mgmt.cognitiveservices.models.ProvisioningState :param endpoint: Endpoint of the created account. @@ -63,7 +63,7 @@ class CognitiveServicesAccount(Model): 'kind': {'key': 'kind', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'endpoint': {'key': 'properties.endpoint', 'type': 'str'}, 'internal_id': {'key': 'properties.internalId', 'type': 'str'}, 'sku': {'key': 'sku', 'type': 'Sku'}, @@ -71,15 +71,16 @@ class CognitiveServicesAccount(Model): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, etag=None, kind=None, location=None, endpoint=None, internal_id=None, sku=None, tags=None): - self.etag = etag + def __init__(self, **kwargs): + super(CognitiveServicesAccount, self).__init__(**kwargs) + self.etag = kwargs.get('etag', None) self.id = None - self.kind = kind - self.location = location + self.kind = kwargs.get('kind', None) + self.location = kwargs.get('location', None) self.name = None self.provisioning_state = None - self.endpoint = endpoint - self.internal_id = internal_id - self.sku = sku - self.tags = tags + self.endpoint = kwargs.get('endpoint', None) + self.internal_id = kwargs.get('internal_id', None) + self.sku = kwargs.get('sku', None) + self.tags = kwargs.get('tags', None) self.type = None diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_create_parameters.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_create_parameters.py index f0c9bcec22d6..c12b8a0eca1e 100644 --- a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_create_parameters.py +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_create_parameters.py @@ -15,20 +15,23 @@ class CognitiveServicesAccountCreateParameters(Model): """The parameters to provide for the account. - :param sku: Required. Gets or sets the SKU of the resource. + All required parameters must be populated in order to send to Azure. + + :param sku: Required. Required. Gets or sets the SKU of the resource. :type sku: ~azure.mgmt.cognitiveservices.models.Sku - :param kind: Required. Gets or sets the Kind of the resource. Possible - values include: 'Academic', 'Bing.Autosuggest', 'Bing.Search', - 'Bing.Speech', 'Bing.SpellCheck', 'ComputerVision', 'ContentModerator', - 'CustomSpeech', 'Emotion', 'Face', 'LUIS', 'Recommendations', - 'SpeakerRecognition', 'Speech', 'SpeechTranslation', 'TextAnalytics', + :param kind: Required. Required. Gets or sets the Kind of the resource. + Possible values include: 'Bing.Autosuggest.v7', 'Bing.CustomSearch', + 'Bing.Search.v7', 'Bing.Speech', 'Bing.SpellCheck.v7', 'ComputerVision', + 'ContentModerator', 'CustomSpeech', 'CustomVision.Prediction', + 'CustomVision.Training', 'Emotion', 'Face', 'LUIS', 'QnAMaker', + 'SpeakerRecognition', 'SpeechTranslation', 'TextAnalytics', 'TextTranslation', 'WebLM' :type kind: str or ~azure.mgmt.cognitiveservices.models.Kind - :param location: Required. Gets or sets the location of the resource. This - will be one of the supported and registered Azure Geo Regions (e.g. West - US, East US, Southeast Asia, etc.). The geo region of a resource cannot be - changed once it is created, but if an identical geo region is specified on - update the request will succeed. + :param location: Required. Required. Gets or sets the location of the + resource. This will be one of the supported and registered Azure Geo + Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + resource cannot be changed once it is created, but if an identical geo + region is specified on update the request will succeed. :type location: str :param tags: Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource @@ -36,8 +39,8 @@ class CognitiveServicesAccountCreateParameters(Model): resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. :type tags: dict[str, str] - :param properties: Must exist in the request. Must be an empty object. - Must not be null. + :param properties: Required. Must exist in the request. Must be an empty + object. Must not be null. :type properties: object """ @@ -56,9 +59,10 @@ class CognitiveServicesAccountCreateParameters(Model): 'properties': {'key': 'properties', 'type': 'object'}, } - def __init__(self, sku, kind, location, properties, tags=None): - self.sku = sku - self.kind = kind - self.location = location - self.tags = tags - self.properties = properties + def __init__(self, **kwargs): + super(CognitiveServicesAccountCreateParameters, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.kind = kwargs.get('kind', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_create_parameters_py3.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_create_parameters_py3.py new file mode 100644 index 000000000000..bce9b69e99ed --- /dev/null +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_create_parameters_py3.py @@ -0,0 +1,68 @@ +# 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 CognitiveServicesAccountCreateParameters(Model): + """The parameters to provide for the account. + + All required parameters must be populated in order to send to Azure. + + :param sku: Required. Required. Gets or sets the SKU of the resource. + :type sku: ~azure.mgmt.cognitiveservices.models.Sku + :param kind: Required. Required. Gets or sets the Kind of the resource. + Possible values include: 'Bing.Autosuggest.v7', 'Bing.CustomSearch', + 'Bing.Search.v7', 'Bing.Speech', 'Bing.SpellCheck.v7', 'ComputerVision', + 'ContentModerator', 'CustomSpeech', 'CustomVision.Prediction', + 'CustomVision.Training', 'Emotion', 'Face', 'LUIS', 'QnAMaker', + 'SpeakerRecognition', 'SpeechTranslation', 'TextAnalytics', + 'TextTranslation', 'WebLM' + :type kind: str or ~azure.mgmt.cognitiveservices.models.Kind + :param location: Required. Required. Gets or sets the location of the + resource. This will be one of the supported and registered Azure Geo + Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + resource cannot be changed once it is created, but if an identical geo + region is specified on update the request will succeed. + :type location: str + :param tags: Gets or sets a list of key value pairs that describe the + resource. These tags can be used in viewing and grouping this resource + (across resource groups). A maximum of 15 tags can be provided for a + resource. Each tag must have a key no greater than 128 characters and + value no greater than 256 characters. + :type tags: dict[str, str] + :param properties: Required. Must exist in the request. Must be an empty + object. Must not be null. + :type properties: object + """ + + _validation = { + 'sku': {'required': True}, + 'kind': {'required': True}, + 'location': {'required': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'object'}, + } + + def __init__(self, *, sku, kind, location: str, properties, tags=None, **kwargs) -> None: + super(CognitiveServicesAccountCreateParameters, self).__init__(**kwargs) + self.sku = sku + self.kind = kind + self.location = location + self.tags = tags + self.properties = properties diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_enumerate_skus_result.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_enumerate_skus_result.py index 72ba70ee4686..96992c1e071d 100644 --- a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_enumerate_skus_result.py +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_enumerate_skus_result.py @@ -32,5 +32,6 @@ class CognitiveServicesAccountEnumerateSkusResult(Model): 'value': {'key': 'value', 'type': '[CognitiveServicesResourceAndSku]'}, } - def __init__(self): + def __init__(self, **kwargs): + super(CognitiveServicesAccountEnumerateSkusResult, self).__init__(**kwargs) self.value = None diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_enumerate_skus_result_py3.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_enumerate_skus_result_py3.py new file mode 100644 index 000000000000..4327cfe5fa1c --- /dev/null +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_enumerate_skus_result_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CognitiveServicesAccountEnumerateSkusResult(Model): + """The list of cognitive services accounts operation response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: Gets the list of Cognitive Services accounts and their + properties. + :vartype value: + list[~azure.mgmt.cognitiveservices.models.CognitiveServicesResourceAndSku] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CognitiveServicesResourceAndSku]'}, + } + + def __init__(self, **kwargs) -> None: + super(CognitiveServicesAccountEnumerateSkusResult, self).__init__(**kwargs) + self.value = None diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_keys.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_keys.py index 5cf1aaf11fda..14f54a0735b3 100644 --- a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_keys.py +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_keys.py @@ -26,6 +26,7 @@ class CognitiveServicesAccountKeys(Model): 'key2': {'key': 'key2', 'type': 'str'}, } - def __init__(self, key1=None, key2=None): - self.key1 = key1 - self.key2 = key2 + def __init__(self, **kwargs): + super(CognitiveServicesAccountKeys, self).__init__(**kwargs) + self.key1 = kwargs.get('key1', None) + self.key2 = kwargs.get('key2', None) diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_keys_py3.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_keys_py3.py new file mode 100644 index 000000000000..0407f9a5198b --- /dev/null +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_keys_py3.py @@ -0,0 +1,32 @@ +# 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 CognitiveServicesAccountKeys(Model): + """The access keys for the cognitive services account. + + :param key1: Gets the value of key 1. + :type key1: str + :param key2: Gets the value of key 2. + :type key2: str + """ + + _attribute_map = { + 'key1': {'key': 'key1', 'type': 'str'}, + 'key2': {'key': 'key2', 'type': 'str'}, + } + + def __init__(self, *, key1: str=None, key2: str=None, **kwargs) -> None: + super(CognitiveServicesAccountKeys, self).__init__(**kwargs) + self.key1 = key1 + self.key2 = key2 diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_py3.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_py3.py new file mode 100644 index 000000000000..a249cb7dd2bc --- /dev/null +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_py3.py @@ -0,0 +1,86 @@ +# 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 CognitiveServicesAccount(Model): + """Cognitive Services Account is an Azure resource representing the + provisioned account, its type, location and SKU. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param etag: Entity Tag + :type etag: str + :ivar id: The id of the created account + :vartype id: str + :param kind: Type of cognitive service account. + :type kind: str + :param location: The location of the resource + :type location: str + :ivar name: The name of the created account + :vartype name: str + :ivar provisioning_state: Gets the status of the cognitive services + account at the time the operation was called. Possible values include: + 'Creating', 'ResolvingDNS', 'Moving', 'Deleting', 'Succeeded', 'Failed' + :vartype provisioning_state: str or + ~azure.mgmt.cognitiveservices.models.ProvisioningState + :param endpoint: Endpoint of the created account. + :type endpoint: str + :param internal_id: The internal identifier. + :type internal_id: str + :param sku: The SKU of Cognitive Services account. + :type sku: ~azure.mgmt.cognitiveservices.models.Sku + :param tags: Gets or sets a list of key value pairs that describe the + resource. These tags can be used in viewing and grouping this resource + (across resource groups). A maximum of 15 tags can be provided for a + resource. Each tag must have a key no greater than 128 characters and + value no greater than 256 characters. + :type tags: dict[str, str] + :ivar type: Resource type + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'etag': {'key': 'etag', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'endpoint': {'key': 'properties.endpoint', 'type': 'str'}, + 'internal_id': {'key': 'properties.internalId', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, etag: str=None, kind: str=None, location: str=None, endpoint: str=None, internal_id: str=None, sku=None, tags=None, **kwargs) -> None: + super(CognitiveServicesAccount, self).__init__(**kwargs) + self.etag = etag + self.id = None + self.kind = kind + self.location = location + self.name = None + self.provisioning_state = None + self.endpoint = endpoint + self.internal_id = internal_id + self.sku = sku + self.tags = tags + self.type = None diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_update_parameters.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_update_parameters.py index ccead5d5ee3f..5b78b1a13a91 100644 --- a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_update_parameters.py +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_update_parameters.py @@ -30,6 +30,7 @@ class CognitiveServicesAccountUpdateParameters(Model): 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, sku=None, tags=None): - self.sku = sku - self.tags = tags + def __init__(self, **kwargs): + super(CognitiveServicesAccountUpdateParameters, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_update_parameters_py3.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_update_parameters_py3.py new file mode 100644 index 000000000000..03cd5ba1328b --- /dev/null +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_update_parameters_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CognitiveServicesAccountUpdateParameters(Model): + """The parameters to provide for the account. + + :param sku: Gets or sets the SKU of the resource. + :type sku: ~azure.mgmt.cognitiveservices.models.Sku + :param tags: Gets or sets a list of key value pairs that describe the + resource. These tags can be used in viewing and grouping this resource + (across resource groups). A maximum of 15 tags can be provided for a + resource. Each tag must have a key no greater than 128 characters and + value no greater than 256 characters. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, sku=None, tags=None, **kwargs) -> None: + super(CognitiveServicesAccountUpdateParameters, self).__init__(**kwargs) + self.sku = sku + self.tags = tags diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_management_client_enums.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_management_client_enums.py index b7de0c2dd55e..8d8c7ea8feb1 100644 --- a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_management_client_enums.py +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_management_client_enums.py @@ -12,7 +12,7 @@ from enum import Enum -class SkuName(Enum): +class SkuName(str, Enum): f0 = "F0" p0 = "P0" @@ -27,44 +27,78 @@ class SkuName(Enum): s6 = "S6" -class SkuTier(Enum): +class SkuTier(str, Enum): free = "Free" standard = "Standard" premium = "Premium" -class Kind(Enum): +class Kind(str, Enum): - academic = "Academic" - bing_autosuggest = "Bing.Autosuggest" - bing_search = "Bing.Search" + bing_autosuggestv7 = "Bing.Autosuggest.v7" + bing_custom_search = "Bing.CustomSearch" + bing_searchv7 = "Bing.Search.v7" bing_speech = "Bing.Speech" - bing_spell_check = "Bing.SpellCheck" + bing_spell_checkv7 = "Bing.SpellCheck.v7" computer_vision = "ComputerVision" content_moderator = "ContentModerator" custom_speech = "CustomSpeech" + custom_vision_prediction = "CustomVision.Prediction" + custom_vision_training = "CustomVision.Training" emotion = "Emotion" face = "Face" luis = "LUIS" - recommendations = "Recommendations" + qn_amaker = "QnAMaker" speaker_recognition = "SpeakerRecognition" - speech = "Speech" speech_translation = "SpeechTranslation" text_analytics = "TextAnalytics" text_translation = "TextTranslation" web_lm = "WebLM" -class ProvisioningState(Enum): +class ProvisioningState(str, Enum): creating = "Creating" resolving_dns = "ResolvingDNS" + moving = "Moving" + deleting = "Deleting" succeeded = "Succeeded" failed = "Failed" -class KeyName(Enum): +class KeyName(str, Enum): key1 = "Key1" key2 = "Key2" + + +class UnitType(str, Enum): + + count = "Count" + bytes = "Bytes" + seconds = "Seconds" + percent = "Percent" + count_per_second = "CountPerSecond" + bytes_per_second = "BytesPerSecond" + milliseconds = "Milliseconds" + + +class QuotaUsageStatus(str, Enum): + + included = "Included" + blocked = "Blocked" + in_overage = "InOverage" + unknown = "Unknown" + + +class ResourceSkuRestrictionsType(str, Enum): + + location = "Location" + zone = "Zone" + + +class ResourceSkuRestrictionsReasonCode(str, Enum): + + quota_id = "QuotaId" + not_available_for_subscription = "NotAvailableForSubscription" diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_resource_and_sku.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_resource_and_sku.py index e08584c04ff8..da6668117698 100644 --- a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_resource_and_sku.py +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_resource_and_sku.py @@ -26,6 +26,7 @@ class CognitiveServicesResourceAndSku(Model): 'sku': {'key': 'sku', 'type': 'Sku'}, } - def __init__(self, resource_type=None, sku=None): - self.resource_type = resource_type - self.sku = sku + def __init__(self, **kwargs): + super(CognitiveServicesResourceAndSku, self).__init__(**kwargs) + self.resource_type = kwargs.get('resource_type', None) + self.sku = kwargs.get('sku', None) diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_resource_and_sku_py3.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_resource_and_sku_py3.py new file mode 100644 index 000000000000..3151afd709e4 --- /dev/null +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_resource_and_sku_py3.py @@ -0,0 +1,32 @@ +# 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 CognitiveServicesResourceAndSku(Model): + """Cognitive Services resource type and SKU. + + :param resource_type: Resource Namespace and Type + :type resource_type: str + :param sku: The SKU of Cognitive Services account. + :type sku: ~azure.mgmt.cognitiveservices.models.Sku + """ + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, *, resource_type: str=None, sku=None, **kwargs) -> None: + super(CognitiveServicesResourceAndSku, self).__init__(**kwargs) + self.resource_type = resource_type + self.sku = sku diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/error.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/error.py index 84da2701249d..8a5104af371a 100644 --- a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/error.py +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/error.py @@ -24,8 +24,9 @@ class Error(Model): 'error': {'key': 'error', 'type': 'ErrorBody'}, } - def __init__(self, error=None): - self.error = error + def __init__(self, **kwargs): + super(Error, self).__init__(**kwargs) + self.error = kwargs.get('error', None) class ErrorException(HttpOperationError): diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/error_body.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/error_body.py index b32a385e5ca7..4371278624ec 100644 --- a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/error_body.py +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/error_body.py @@ -15,9 +15,11 @@ class ErrorBody(Model): """Cognitive Services error body. - :param code: error code + All required parameters must be populated in order to send to Azure. + + :param code: Required. error code :type code: str - :param message: error message + :param message: Required. error message :type message: str """ @@ -31,6 +33,7 @@ class ErrorBody(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self, code, message): - self.code = code - self.message = message + def __init__(self, **kwargs): + super(ErrorBody, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/error_body_py3.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/error_body_py3.py new file mode 100644 index 000000000000..7851e15157c3 --- /dev/null +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/error_body_py3.py @@ -0,0 +1,39 @@ +# 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 ErrorBody(Model): + """Cognitive Services error body. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. error code + :type code: str + :param message: Required. error message + :type message: str + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str, message: str, **kwargs) -> None: + super(ErrorBody, self).__init__(**kwargs) + self.code = code + self.message = message diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/error_py3.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/error_py3.py new file mode 100644 index 000000000000..54d832eb4725 --- /dev/null +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/error_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class Error(Model): + """Cognitive Services error object. + + :param error: The error body. + :type error: ~azure.mgmt.cognitiveservices.models.ErrorBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorBody'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(Error, self).__init__(**kwargs) + self.error = error + + +class ErrorException(HttpOperationError): + """Server responsed with exception of type: 'Error'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorException, self).__init__(deserialize, response, 'Error', *args) diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/metric_name.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/metric_name.py new file mode 100644 index 000000000000..fd3e3d504c9d --- /dev/null +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/metric_name.py @@ -0,0 +1,40 @@ +# 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): + """A metric name. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The name of the metric. + :vartype value: str + :ivar localized_value: The friendly name of the metric. + :vartype localized_value: str + """ + + _validation = { + 'value': {'readonly': True}, + 'localized_value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MetricName, self).__init__(**kwargs) + self.value = None + self.localized_value = None diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/metric_name_py3.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/metric_name_py3.py new file mode 100644 index 000000000000..811d94729969 --- /dev/null +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/metric_name_py3.py @@ -0,0 +1,40 @@ +# 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): + """A metric name. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The name of the metric. + :vartype value: str + :ivar localized_value: The friendly name of the metric. + :vartype localized_value: str + """ + + _validation = { + 'value': {'readonly': True}, + 'localized_value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(MetricName, self).__init__(**kwargs) + self.value = None + self.localized_value = None diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/operation_display_info.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/operation_display_info.py index e1fd7132c7f4..612864781d45 100644 --- a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/operation_display_info.py +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/operation_display_info.py @@ -33,8 +33,9 @@ class OperationDisplayInfo(Model): 'resource': {'key': 'resource', 'type': 'str'}, } - def __init__(self, description=None, operation=None, provider=None, resource=None): - self.description = description - self.operation = operation - self.provider = provider - self.resource = resource + def __init__(self, **kwargs): + super(OperationDisplayInfo, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.operation = kwargs.get('operation', None) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/operation_display_info_py3.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/operation_display_info_py3.py new file mode 100644 index 000000000000..18ea28fc7a43 --- /dev/null +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/operation_display_info_py3.py @@ -0,0 +1,41 @@ +# 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 OperationDisplayInfo(Model): + """The operation supported by Cognitive Services. + + :param description: The description of the operation. + :type description: str + :param operation: The action that users can perform, based on their + permission level. + :type operation: str + :param provider: Service provider: Microsoft Cognitive Services. + :type provider: str + :param resource: Resource on which the operation is performed. + :type resource: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + } + + def __init__(self, *, description: str=None, operation: str=None, provider: str=None, resource: str=None, **kwargs) -> None: + super(OperationDisplayInfo, self).__init__(**kwargs) + self.description = description + self.operation = operation + self.provider = provider + self.resource = resource diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/operation_entity.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/operation_entity.py index 7721d2673521..3411ea34f450 100644 --- a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/operation_entity.py +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/operation_entity.py @@ -32,8 +32,9 @@ class OperationEntity(Model): 'properties': {'key': 'properties', 'type': 'object'}, } - def __init__(self, name=None, display=None, origin=None, properties=None): - self.name = name - self.display = display - self.origin = origin - self.properties = properties + def __init__(self, **kwargs): + super(OperationEntity, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + self.origin = kwargs.get('origin', None) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/operation_entity_py3.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/operation_entity_py3.py new file mode 100644 index 000000000000..654a27867bda --- /dev/null +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/operation_entity_py3.py @@ -0,0 +1,40 @@ +# 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 OperationEntity(Model): + """The operation supported by Cognitive Services. + + :param name: Operation name: {provider}/{resource}/{operation}. + :type name: str + :param display: The operation supported by Cognitive Services. + :type display: ~azure.mgmt.cognitiveservices.models.OperationDisplayInfo + :param origin: The origin of the operation. + :type origin: str + :param properties: Additional properties. + :type properties: object + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplayInfo'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, + } + + def __init__(self, *, name: str=None, display=None, origin: str=None, properties=None, **kwargs) -> None: + super(OperationEntity, self).__init__(**kwargs) + self.name = name + self.display = display + self.origin = origin + self.properties = properties diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/regenerate_key_parameters.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/regenerate_key_parameters.py index b2e27098273f..132a0d8c16cc 100644 --- a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/regenerate_key_parameters.py +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/regenerate_key_parameters.py @@ -15,8 +15,10 @@ class RegenerateKeyParameters(Model): """Regenerate key parameters. - :param key_name: key name to generate (Key1|Key2). Possible values - include: 'Key1', 'Key2' + All required parameters must be populated in order to send to Azure. + + :param key_name: Required. key name to generate (Key1|Key2). Possible + values include: 'Key1', 'Key2' :type key_name: str or ~azure.mgmt.cognitiveservices.models.KeyName """ @@ -28,5 +30,6 @@ class RegenerateKeyParameters(Model): 'key_name': {'key': 'keyName', 'type': 'KeyName'}, } - def __init__(self, key_name): - self.key_name = key_name + def __init__(self, **kwargs): + super(RegenerateKeyParameters, self).__init__(**kwargs) + self.key_name = kwargs.get('key_name', None) diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/regenerate_key_parameters_py3.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/regenerate_key_parameters_py3.py new file mode 100644 index 000000000000..1fd67eabb405 --- /dev/null +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/regenerate_key_parameters_py3.py @@ -0,0 +1,35 @@ +# 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 RegenerateKeyParameters(Model): + """Regenerate key parameters. + + All required parameters must be populated in order to send to Azure. + + :param key_name: Required. key name to generate (Key1|Key2). Possible + values include: 'Key1', 'Key2' + :type key_name: str or ~azure.mgmt.cognitiveservices.models.KeyName + """ + + _validation = { + 'key_name': {'required': True}, + } + + _attribute_map = { + 'key_name': {'key': 'keyName', 'type': 'KeyName'}, + } + + def __init__(self, *, key_name, **kwargs) -> None: + super(RegenerateKeyParameters, self).__init__(**kwargs) + self.key_name = key_name diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/resource_sku.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/resource_sku.py new file mode 100644 index 000000000000..72f1cee9b8e9 --- /dev/null +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/resource_sku.py @@ -0,0 +1,62 @@ +# 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 ResourceSku(Model): + """Describes an available Cognitive Services SKU. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_type: The type of resource the SKU applies to. + :vartype resource_type: str + :ivar name: The name of SKU. + :vartype name: str + :ivar tier: Specifies the tier of Cognitive Services account. + :vartype tier: str + :ivar kind: The Kind of resources that are supported in this SKU. + :vartype kind: str + :ivar locations: The set of locations that the SKU is available. + :vartype locations: list[str] + :ivar restrictions: The restrictions because of which SKU cannot be used. + This is empty if there are no restrictions. + :vartype restrictions: + list[~azure.mgmt.cognitiveservices.models.ResourceSkuRestrictions] + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'name': {'readonly': True}, + 'tier': {'readonly': True}, + 'kind': {'readonly': True}, + 'locations': {'readonly': True}, + 'restrictions': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'locations': {'key': 'locations', 'type': '[str]'}, + 'restrictions': {'key': 'restrictions', 'type': '[ResourceSkuRestrictions]'}, + } + + def __init__(self, **kwargs): + super(ResourceSku, self).__init__(**kwargs) + self.resource_type = None + self.name = None + self.tier = None + self.kind = None + self.locations = None + self.restrictions = None diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/resource_sku_paged.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/resource_sku_paged.py new file mode 100644 index 000000000000..fb650eef27f1 --- /dev/null +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/resource_sku_paged.py @@ -0,0 +1,27 @@ +# 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 ResourceSkuPaged(Paged): + """ + A paging container for iterating over a list of :class:`ResourceSku ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ResourceSku]'} + } + + def __init__(self, *args, **kwargs): + + super(ResourceSkuPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/resource_sku_py3.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/resource_sku_py3.py new file mode 100644 index 000000000000..3aa9b8470364 --- /dev/null +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/resource_sku_py3.py @@ -0,0 +1,62 @@ +# 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 ResourceSku(Model): + """Describes an available Cognitive Services SKU. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_type: The type of resource the SKU applies to. + :vartype resource_type: str + :ivar name: The name of SKU. + :vartype name: str + :ivar tier: Specifies the tier of Cognitive Services account. + :vartype tier: str + :ivar kind: The Kind of resources that are supported in this SKU. + :vartype kind: str + :ivar locations: The set of locations that the SKU is available. + :vartype locations: list[str] + :ivar restrictions: The restrictions because of which SKU cannot be used. + This is empty if there are no restrictions. + :vartype restrictions: + list[~azure.mgmt.cognitiveservices.models.ResourceSkuRestrictions] + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'name': {'readonly': True}, + 'tier': {'readonly': True}, + 'kind': {'readonly': True}, + 'locations': {'readonly': True}, + 'restrictions': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'locations': {'key': 'locations', 'type': '[str]'}, + 'restrictions': {'key': 'restrictions', 'type': '[ResourceSkuRestrictions]'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceSku, self).__init__(**kwargs) + self.resource_type = None + self.name = None + self.tier = None + self.kind = None + self.locations = None + self.restrictions = None diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/resource_sku_restriction_info.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/resource_sku_restriction_info.py new file mode 100644 index 000000000000..677e93463d58 --- /dev/null +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/resource_sku_restriction_info.py @@ -0,0 +1,40 @@ +# 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 ResourceSkuRestrictionInfo(Model): + """ResourceSkuRestrictionInfo. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar locations: Locations where the SKU is restricted + :vartype locations: list[str] + :ivar zones: List of availability zones where the SKU is restricted. + :vartype zones: list[str] + """ + + _validation = { + 'locations': {'readonly': True}, + 'zones': {'readonly': True}, + } + + _attribute_map = { + 'locations': {'key': 'locations', 'type': '[str]'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(ResourceSkuRestrictionInfo, self).__init__(**kwargs) + self.locations = None + self.zones = None diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/resource_sku_restriction_info_py3.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/resource_sku_restriction_info_py3.py new file mode 100644 index 000000000000..008cf8d4c5fa --- /dev/null +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/resource_sku_restriction_info_py3.py @@ -0,0 +1,40 @@ +# 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 ResourceSkuRestrictionInfo(Model): + """ResourceSkuRestrictionInfo. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar locations: Locations where the SKU is restricted + :vartype locations: list[str] + :ivar zones: List of availability zones where the SKU is restricted. + :vartype zones: list[str] + """ + + _validation = { + 'locations': {'readonly': True}, + 'zones': {'readonly': True}, + } + + _attribute_map = { + 'locations': {'key': 'locations', 'type': '[str]'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceSkuRestrictionInfo, self).__init__(**kwargs) + self.locations = None + self.zones = None diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/resource_sku_restrictions.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/resource_sku_restrictions.py new file mode 100644 index 000000000000..5c1ae1141f3d --- /dev/null +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/resource_sku_restrictions.py @@ -0,0 +1,57 @@ +# 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 ResourceSkuRestrictions(Model): + """Describes restrictions of a SKU. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: The type of restrictions. Possible values include: 'Location', + 'Zone' + :vartype type: str or + ~azure.mgmt.cognitiveservices.models.ResourceSkuRestrictionsType + :ivar values: The value of restrictions. If the restriction type is set to + location. This would be different locations where the SKU is restricted. + :vartype values: list[str] + :ivar restriction_info: The information about the restriction where the + SKU cannot be used. + :vartype restriction_info: + ~azure.mgmt.cognitiveservices.models.ResourceSkuRestrictionInfo + :ivar reason_code: The reason for restriction. Possible values include: + 'QuotaId', 'NotAvailableForSubscription' + :vartype reason_code: str or + ~azure.mgmt.cognitiveservices.models.ResourceSkuRestrictionsReasonCode + """ + + _validation = { + 'type': {'readonly': True}, + 'values': {'readonly': True}, + 'restriction_info': {'readonly': True}, + 'reason_code': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'ResourceSkuRestrictionsType'}, + 'values': {'key': 'values', 'type': '[str]'}, + 'restriction_info': {'key': 'restrictionInfo', 'type': 'ResourceSkuRestrictionInfo'}, + 'reason_code': {'key': 'reasonCode', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceSkuRestrictions, self).__init__(**kwargs) + self.type = None + self.values = None + self.restriction_info = None + self.reason_code = None diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/resource_sku_restrictions_py3.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/resource_sku_restrictions_py3.py new file mode 100644 index 000000000000..62dee12bb165 --- /dev/null +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/resource_sku_restrictions_py3.py @@ -0,0 +1,57 @@ +# 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 ResourceSkuRestrictions(Model): + """Describes restrictions of a SKU. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: The type of restrictions. Possible values include: 'Location', + 'Zone' + :vartype type: str or + ~azure.mgmt.cognitiveservices.models.ResourceSkuRestrictionsType + :ivar values: The value of restrictions. If the restriction type is set to + location. This would be different locations where the SKU is restricted. + :vartype values: list[str] + :ivar restriction_info: The information about the restriction where the + SKU cannot be used. + :vartype restriction_info: + ~azure.mgmt.cognitiveservices.models.ResourceSkuRestrictionInfo + :ivar reason_code: The reason for restriction. Possible values include: + 'QuotaId', 'NotAvailableForSubscription' + :vartype reason_code: str or + ~azure.mgmt.cognitiveservices.models.ResourceSkuRestrictionsReasonCode + """ + + _validation = { + 'type': {'readonly': True}, + 'values': {'readonly': True}, + 'restriction_info': {'readonly': True}, + 'reason_code': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'ResourceSkuRestrictionsType'}, + 'values': {'key': 'values', 'type': '[str]'}, + 'restriction_info': {'key': 'restrictionInfo', 'type': 'ResourceSkuRestrictionInfo'}, + 'reason_code': {'key': 'reasonCode', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceSkuRestrictions, self).__init__(**kwargs) + self.type = None + self.values = None + self.restriction_info = None + self.reason_code = None diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/sku.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/sku.py index b19731f46e6b..4a70094c16e5 100644 --- a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/sku.py +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/sku.py @@ -18,9 +18,11 @@ class Sku(Model): Variables are only populated by the server, and will be ignored when sending a request. - :param name: Gets or sets the sku name. Required for account creation, - optional for update. Possible values include: 'F0', 'P0', 'P1', 'P2', - 'S0', 'S1', 'S2', 'S3', 'S4', 'S5', 'S6' + All required parameters must be populated in order to send to Azure. + + :param name: Required. Gets or sets the sku name. Required for account + creation, optional for update. Possible values include: 'F0', 'P0', 'P1', + 'P2', 'S0', 'S1', 'S2', 'S3', 'S4', 'S5', 'S6' :type name: str or ~azure.mgmt.cognitiveservices.models.SkuName :ivar tier: Gets the sku tier. This is based on the SKU name. Possible values include: 'Free', 'Standard', 'Premium' @@ -37,6 +39,7 @@ class Sku(Model): 'tier': {'key': 'tier', 'type': 'SkuTier'}, } - def __init__(self, name): - self.name = name + def __init__(self, **kwargs): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) self.tier = None diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/sku_py3.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/sku_py3.py new file mode 100644 index 000000000000..c0ffedc39c29 --- /dev/null +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/sku_py3.py @@ -0,0 +1,45 @@ +# 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 of the cognitive services account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Gets or sets the sku name. Required for account + creation, optional for update. Possible values include: 'F0', 'P0', 'P1', + 'P2', 'S0', 'S1', 'S2', 'S3', 'S4', 'S5', 'S6' + :type name: str or ~azure.mgmt.cognitiveservices.models.SkuName + :ivar tier: Gets the sku tier. This is based on the SKU name. Possible + values include: 'Free', 'Standard', 'Premium' + :vartype tier: str or ~azure.mgmt.cognitiveservices.models.SkuTier + """ + + _validation = { + 'name': {'required': True}, + 'tier': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'SkuTier'}, + } + + def __init__(self, *, name, **kwargs) -> None: + super(Sku, self).__init__(**kwargs) + self.name = name + self.tier = None diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/usage.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/usage.py new file mode 100644 index 000000000000..6911376e0206 --- /dev/null +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/usage.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.serialization import Model + + +class Usage(Model): + """The usage data for a usage request. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param unit: The unit of the metric. Possible values include: 'Count', + 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond', + 'Milliseconds' + :type unit: str or ~azure.mgmt.cognitiveservices.models.UnitType + :ivar name: The name information for the metric. + :vartype name: ~azure.mgmt.cognitiveservices.models.MetricName + :ivar quota_period: The quota period used to summarize the usage values. + :vartype quota_period: str + :ivar limit: Maximum value for this metric. + :vartype limit: float + :ivar current_value: Current value for this metric. + :vartype current_value: float + :ivar next_reset_time: Next reset time for current quota. + :vartype next_reset_time: str + :param status: Cognitive Services account quota usage status. Possible + values include: 'Included', 'Blocked', 'InOverage', 'Unknown' + :type status: str or ~azure.mgmt.cognitiveservices.models.QuotaUsageStatus + """ + + _validation = { + 'name': {'readonly': True}, + 'quota_period': {'readonly': True}, + 'limit': {'readonly': True}, + 'current_value': {'readonly': True}, + 'next_reset_time': {'readonly': True}, + } + + _attribute_map = { + 'unit': {'key': 'unit', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'MetricName'}, + 'quota_period': {'key': 'quotaPeriod', 'type': 'str'}, + 'limit': {'key': 'limit', 'type': 'float'}, + 'current_value': {'key': 'currentValue', 'type': 'float'}, + 'next_reset_time': {'key': 'nextResetTime', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Usage, self).__init__(**kwargs) + self.unit = kwargs.get('unit', None) + self.name = None + self.quota_period = None + self.limit = None + self.current_value = None + self.next_reset_time = None + self.status = kwargs.get('status', None) diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/usage_py3.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/usage_py3.py new file mode 100644 index 000000000000..b053f5be1790 --- /dev/null +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/usage_py3.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.serialization import Model + + +class Usage(Model): + """The usage data for a usage request. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param unit: The unit of the metric. Possible values include: 'Count', + 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond', + 'Milliseconds' + :type unit: str or ~azure.mgmt.cognitiveservices.models.UnitType + :ivar name: The name information for the metric. + :vartype name: ~azure.mgmt.cognitiveservices.models.MetricName + :ivar quota_period: The quota period used to summarize the usage values. + :vartype quota_period: str + :ivar limit: Maximum value for this metric. + :vartype limit: float + :ivar current_value: Current value for this metric. + :vartype current_value: float + :ivar next_reset_time: Next reset time for current quota. + :vartype next_reset_time: str + :param status: Cognitive Services account quota usage status. Possible + values include: 'Included', 'Blocked', 'InOverage', 'Unknown' + :type status: str or ~azure.mgmt.cognitiveservices.models.QuotaUsageStatus + """ + + _validation = { + 'name': {'readonly': True}, + 'quota_period': {'readonly': True}, + 'limit': {'readonly': True}, + 'current_value': {'readonly': True}, + 'next_reset_time': {'readonly': True}, + } + + _attribute_map = { + 'unit': {'key': 'unit', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'MetricName'}, + 'quota_period': {'key': 'quotaPeriod', 'type': 'str'}, + 'limit': {'key': 'limit', 'type': 'float'}, + 'current_value': {'key': 'currentValue', 'type': 'float'}, + 'next_reset_time': {'key': 'nextResetTime', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, *, unit=None, status=None, **kwargs) -> None: + super(Usage, self).__init__(**kwargs) + self.unit = unit + self.name = None + self.quota_period = None + self.limit = None + self.current_value = None + self.next_reset_time = None + self.status = status diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/usages_result.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/usages_result.py new file mode 100644 index 000000000000..67ece7d4e243 --- /dev/null +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/usages_result.py @@ -0,0 +1,35 @@ +# 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 UsagesResult(Model): + """The response to a list usage request. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The list of usages for Cognitive Service account. + :vartype value: list[~azure.mgmt.cognitiveservices.models.Usage] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Usage]'}, + } + + def __init__(self, **kwargs): + super(UsagesResult, self).__init__(**kwargs) + self.value = None diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/usages_result_py3.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/usages_result_py3.py new file mode 100644 index 000000000000..880dd7fd58e3 --- /dev/null +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/usages_result_py3.py @@ -0,0 +1,35 @@ +# 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 UsagesResult(Model): + """The response to a list usage request. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The list of usages for Cognitive Service account. + :vartype value: list[~azure.mgmt.cognitiveservices.models.Usage] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Usage]'}, + } + + def __init__(self, **kwargs) -> None: + super(UsagesResult, self).__init__(**kwargs) + self.value = None diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/__init__.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/__init__.py index 5c91cb9c82ca..3596470cf0ad 100644 --- a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/__init__.py +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/__init__.py @@ -10,11 +10,13 @@ # -------------------------------------------------------------------------- from .accounts_operations import AccountsOperations +from .resource_skus_operations import ResourceSkusOperations from .operations import Operations from .check_sku_availability_operations import CheckSkuAvailabilityOperations __all__ = [ 'AccountsOperations', + 'ResourceSkusOperations', 'Operations', 'CheckSkuAvailabilityOperations', ] diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/accounts_operations.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/accounts_operations.py index 3bedeb581323..3c940500295a 100644 --- a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/accounts_operations.py +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/accounts_operations.py @@ -21,10 +21,12 @@ class AccountsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-18. Constant value: "2017-04-18". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -60,7 +62,7 @@ def create( :class:`ErrorException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}' + url = self.create.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), @@ -88,7 +90,7 @@ def create( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 201]: raise models.ErrorException(self._deserialize, response) @@ -105,6 +107,7 @@ def create( return client_raw_response return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}'} def update( self, resource_group_name, account_name, sku=None, tags=None, custom_headers=None, raw=False, **operation_config): @@ -137,7 +140,7 @@ def update( parameters = models.CognitiveServicesAccountUpdateParameters(sku=sku, tags=tags) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}' + url = self.update.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), @@ -165,7 +168,7 @@ def update( # Construct and send request request = self._client.patch(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorException(self._deserialize, response) @@ -180,6 +183,7 @@ def update( return client_raw_response return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}'} def delete( self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): @@ -201,7 +205,7 @@ def delete( :class:`ErrorException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}' + url = self.delete.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), @@ -225,7 +229,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: raise models.ErrorException(self._deserialize, response) @@ -233,6 +237,7 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}'} def get_properties( self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): @@ -255,7 +260,7 @@ def get_properties( :class:`ErrorException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}' + url = self.get_properties.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), @@ -279,7 +284,7 @@ def get_properties( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorException(self._deserialize, response) @@ -294,6 +299,7 @@ def get_properties( return client_raw_response return deserialized + get_properties.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}'} def list_by_resource_group( self, resource_group_name, custom_headers=None, raw=False, **operation_config): @@ -318,7 +324,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts' + url = self.list_by_resource_group.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -346,7 +352,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorException(self._deserialize, response) @@ -362,6 +368,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts'} def list( self, custom_headers=None, raw=False, **operation_config): @@ -383,7 +390,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/accounts' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -410,7 +417,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorException(self._deserialize, response) @@ -426,6 +433,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/accounts'} def list_keys( self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): @@ -449,7 +457,7 @@ def list_keys( :class:`ErrorException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/listKeys' + url = self.list_keys.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), @@ -473,7 +481,7 @@ def list_keys( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorException(self._deserialize, response) @@ -488,6 +496,7 @@ def list_keys( return client_raw_response return deserialized + list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/listKeys'} def regenerate_key( self, resource_group_name, account_name, key_name, custom_headers=None, raw=False, **operation_config): @@ -517,7 +526,7 @@ def regenerate_key( parameters = models.RegenerateKeyParameters(key_name=key_name) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/regenerateKey' + url = self.regenerate_key.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), @@ -545,7 +554,7 @@ def regenerate_key( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorException(self._deserialize, response) @@ -560,6 +569,7 @@ def regenerate_key( return client_raw_response return deserialized + regenerate_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/regenerateKey'} def list_skus( self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): @@ -584,7 +594,7 @@ def list_skus( :class:`ErrorException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/skus' + url = self.list_skus.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), @@ -608,7 +618,7 @@ def list_skus( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorException(self._deserialize, response) @@ -623,3 +633,72 @@ def list_skus( return client_raw_response return deserialized + list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/skus'} + + def get_usages( + self, resource_group_name, account_name, filter=None, custom_headers=None, raw=False, **operation_config): + """Get usages for the requested Cognitive Services account. + + :param resource_group_name: The name of the resource group within the + user's subscription. + :type resource_group_name: str + :param account_name: The name of Cognitive Services account. + :type account_name: str + :param filter: An OData filter expression that describes a subset of + usages to return. The supported parameter is name.value (name of the + metric, can have an or of multiple names). + :type filter: 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: UsagesResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.cognitiveservices.models.UsagesResult or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorException` + """ + # Construct URL + url = self.get_usages.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + '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') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, '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]: + raise models.ErrorException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('UsagesResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/usages'} diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/check_sku_availability_operations.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/check_sku_availability_operations.py index d53105ddb252..d0e6a5631ad0 100644 --- a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/check_sku_availability_operations.py +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/check_sku_availability_operations.py @@ -22,10 +22,12 @@ class CheckSkuAvailabilityOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-18. Constant value: "2017-04-18". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -44,10 +46,11 @@ def list( :param skus: The SKU of the resource. :type skus: list[str or ~azure.mgmt.cognitiveservices.models.SkuName] :param kind: The Kind of the resource. Possible values include: - 'Academic', 'Bing.Autosuggest', 'Bing.Search', 'Bing.Speech', - 'Bing.SpellCheck', 'ComputerVision', 'ContentModerator', - 'CustomSpeech', 'Emotion', 'Face', 'LUIS', 'Recommendations', - 'SpeakerRecognition', 'Speech', 'SpeechTranslation', 'TextAnalytics', + 'Bing.Autosuggest.v7', 'Bing.CustomSearch', 'Bing.Search.v7', + 'Bing.Speech', 'Bing.SpellCheck.v7', 'ComputerVision', + 'ContentModerator', 'CustomSpeech', 'CustomVision.Prediction', + 'CustomVision.Training', 'Emotion', 'Face', 'LUIS', 'QnAMaker', + 'SpeakerRecognition', 'SpeechTranslation', 'TextAnalytics', 'TextTranslation', 'WebLM' :type kind: str or ~azure.mgmt.cognitiveservices.models.Kind :param type: The Type of the resource. @@ -67,7 +70,7 @@ def list( parameters = models.CheckSkuAvailabilityParameter(skus=skus, kind=kind, type=type) # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/locations/{location}/checkSkuAvailability' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'location': self._serialize.url("location", location, 'str') @@ -94,7 +97,7 @@ def list( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -111,3 +114,4 @@ def list( return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/locations/{location}/checkSkuAvailability'} diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/operations.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/operations.py index 240faac63efb..37bc3bc1163b 100644 --- a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/operations.py +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/operations.py @@ -22,10 +22,12 @@ class Operations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-18. Constant value: "2017-04-18". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -53,7 +55,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/providers/Microsoft.CognitiveServices/operations' + url = self.list.metadata['url'] # Construct parameters query_parameters = {} @@ -76,7 +78,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -94,3 +96,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/providers/Microsoft.CognitiveServices/operations'} diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/resource_skus_operations.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/resource_skus_operations.py new file mode 100644 index 000000000000..b719f342c8be --- /dev/null +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/resource_skus_operations.py @@ -0,0 +1,104 @@ +# 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 ResourceSkusOperations(object): + """ResourceSkusOperations 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: Version of the API to be used with the client request. Current version is 2017-04-18. Constant value: "2017-04-18". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-04-18" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Gets the list of Microsoft.CognitiveServices SKUs available for your + Subscription. + + :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 ResourceSku + :rtype: + ~azure.mgmt.cognitiveservices.models.ResourceSkuPaged[~azure.mgmt.cognitiveservices.models.ResourceSku] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.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("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.ResourceSkuPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ResourceSkuPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/skus'} diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/version.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/version.py index 53c4c7ea05e8..7f225c6aab41 100644 --- a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/version.py +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "2.0.0" +VERSION = "3.0.0" diff --git a/azure-mgmt-cognitiveservices/build.json b/azure-mgmt-cognitiveservices/build.json deleted file mode 100644 index d5356f60b700..000000000000 --- a/azure-mgmt-cognitiveservices/build.json +++ /dev/null @@ -1,225 +0,0 @@ -{ - "autorest": [ - { - "resolvedInfo": null, - "packageMetadata": { - "name": "@microsoft.azure/autorest-core", - "version": "2.0.4168", - "engines": { - "node": ">=7.10.0" - }, - "dependencies": {}, - "optionalDependencies": {}, - "devDependencies": { - "@microsoft.azure/async-io": "~1.0.22", - "@microsoft.azure/extension": "~1.2.12", - "@types/commonmark": "^0.27.0", - "@types/jsonpath": "^0.1.29", - "@types/node": "^8.0.28", - "@types/pify": "0.0.28", - "@types/source-map": "^0.5.0", - "@types/yargs": "^8.0.2", - "commonmark": "^0.27.0", - "file-url": "^2.0.2", - "get-uri": "^2.0.0", - "jsonpath": "^0.2.11", - "linq-es2015": "^2.4.25", - "mocha": "3.4.2", - "mocha-typescript": "1.1.5", - "pify": "^3.0.0", - "safe-eval": "^0.3.0", - "shx": "^0.2.2", - "source-map": "^0.5.6", - "source-map-support": "^0.4.15", - "strip-bom": "^3.0.0", - "typescript": "2.5.3", - "untildify": "^3.0.2", - "urijs": "^1.18.10", - "vscode-jsonrpc": "^3.3.1", - "yaml-ast-parser": "https://github.com/olydis/yaml-ast-parser/releases/download/0.0.34/yaml-ast-parser-0.0.34.tgz", - "yargs": "^8.0.2" - }, - "bundleDependencies": false, - "peerDependencies": {}, - "deprecated": false, - "_resolved": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", - "_shasum": "33813111fc9bfa488bd600fbba48bc53cc9182c7", - "_shrinkwrap": null, - "bin": null, - "_id": "@microsoft.azure/autorest-core@2.0.4168", - "_from": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", - "_requested": { - "type": "directory", - "where": "/git-restapi", - "raw": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", - "rawSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", - "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", - "fetchSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core" - }, - "_spec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", - "_where": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core" - }, - "extensionManager": { - "installationPath": "/root/.autorest", - "dotnetPath": "/root/.dotnet" - }, - "installationPath": "/root/.autorest" - }, - { - "resolvedInfo": null, - "packageMetadata": { - "name": "@microsoft.azure/autorest.modeler", - "version": "2.0.21", - "dependencies": { - "dotnet-2.0.0": "^1.3.2" - }, - "optionalDependencies": {}, - "devDependencies": { - "coffee-script": "^1.11.1", - "dotnet-sdk-2.0.0": "^1.1.1", - "gulp": "^3.9.1", - "gulp-filter": "^5.0.0", - "gulp-line-ending-corrector": "^1.0.1", - "iced-coffee-script": "^108.0.11", - "marked": "^0.3.6", - "marked-terminal": "^2.0.0", - "moment": "^2.17.1", - "run-sequence": "*", - "shx": "^0.2.2", - "through2-parallel": "^0.1.3", - "yargs": "^8.0.2", - "yarn": "^1.0.2" - }, - "bundleDependencies": false, - "peerDependencies": {}, - "deprecated": false, - "_resolved": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", - "_shasum": "3ce7d3939124b31830be15e5de99b9b7768afb90", - "_shrinkwrap": null, - "bin": null, - "_id": "@microsoft.azure/autorest.modeler@2.0.21", - "_from": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", - "_requested": { - "type": "directory", - "where": "/git-restapi", - "raw": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", - "rawSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", - "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", - "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler" - }, - "_spec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", - "_where": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler" - }, - "extensionManager": { - "installationPath": "/root/.autorest", - "dotnetPath": "/root/.dotnet" - }, - "installationPath": "/root/.autorest" - }, - { - "resolvedInfo": null, - "packageMetadata": { - "name": "@microsoft.azure/autorest.modeler", - "version": "2.1.22", - "dependencies": { - "dotnet-2.0.0": "^1.4.4" - }, - "optionalDependencies": {}, - "devDependencies": { - "coffee-script": "^1.11.1", - "dotnet-sdk-2.0.0": "^1.4.4", - "gulp": "^3.9.1", - "gulp-filter": "^5.0.0", - "gulp-line-ending-corrector": "^1.0.1", - "iced-coffee-script": "^108.0.11", - "marked": "^0.3.6", - "marked-terminal": "^2.0.0", - "moment": "^2.17.1", - "run-sequence": "*", - "shx": "^0.2.2", - "through2-parallel": "^0.1.3", - "yargs": "^8.0.2", - "yarn": "^1.0.2" - }, - "bundleDependencies": false, - "peerDependencies": {}, - "deprecated": false, - "_resolved": "/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", - "_shasum": "ca425289fa38a210d279729048a4a91673f09c67", - "_shrinkwrap": null, - "bin": null, - "_id": "@microsoft.azure/autorest.modeler@2.1.22", - "_from": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", - "_requested": { - "type": "directory", - "where": "/git-restapi", - "raw": "/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", - "rawSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", - "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", - "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler" - }, - "_spec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", - "_where": "/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler" - }, - "extensionManager": { - "installationPath": "/root/.autorest", - "dotnetPath": "/root/.dotnet" - }, - "installationPath": "/root/.autorest" - }, - { - "resolvedInfo": null, - "packageMetadata": { - "name": "@microsoft.azure/autorest.python", - "version": "2.0.19", - "dependencies": { - "dotnet-2.0.0": "^1.4.4" - }, - "optionalDependencies": {}, - "devDependencies": { - "@microsoft.azure/autorest.testserver": "^1.9.0", - "autorest": "^2.0.0", - "coffee-script": "^1.11.1", - "dotnet-sdk-2.0.0": "^1.4.4", - "gulp": "^3.9.1", - "gulp-filter": "^5.0.0", - "gulp-line-ending-corrector": "^1.0.1", - "iced-coffee-script": "^108.0.11", - "marked": "^0.3.6", - "marked-terminal": "^2.0.0", - "moment": "^2.17.1", - "run-sequence": "*", - "shx": "^0.2.2", - "through2-parallel": "^0.1.3", - "yargs": "^8.0.2", - "yarn": "^1.0.2" - }, - "bundleDependencies": false, - "peerDependencies": {}, - "deprecated": false, - "_resolved": "/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python", - "_shasum": "e069166c16fd903c8e1fdf9395b433f3043cb6e3", - "_shrinkwrap": null, - "bin": null, - "_id": "@microsoft.azure/autorest.python@2.0.19", - "_from": "file:/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python", - "_requested": { - "type": "directory", - "where": "/git-restapi", - "raw": "/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python", - "rawSpec": "/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python", - "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python", - "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python" - }, - "_spec": "/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python", - "_where": "/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python" - }, - "extensionManager": { - "installationPath": "/root/.autorest", - "dotnetPath": "/root/.dotnet" - }, - "installationPath": "/root/.autorest" - } - ], - "autorest_bootstrap": {} -} \ No newline at end of file diff --git a/azure-mgmt-cognitiveservices/setup.py b/azure-mgmt-cognitiveservices/setup.py index 9e284f3fdb07..f6e9b649508b 100644 --- a/azure-mgmt-cognitiveservices/setup.py +++ b/azure-mgmt-cognitiveservices/setup.py @@ -69,7 +69,6 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', @@ -78,7 +77,7 @@ zip_safe=False, packages=find_packages(exclude=["tests"]), install_requires=[ - 'msrestazure~=0.4.11', + 'msrestazure>=0.4.27,<2.0.0', 'azure-common~=1.1', ], cmdclass=cmdclass diff --git a/azure-mgmt-compute/README.rst b/azure-mgmt-compute/README.rst index 69f82209c777..cc57dfa74240 100644 --- a/azure-mgmt-compute/README.rst +++ b/azure-mgmt-compute/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Compute Management Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. +This package has been tested with Python 2.7, 3.4, 3.5 and 3.6. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. @@ -36,7 +36,7 @@ If you see azure==0.11.0 (or any version below 1.0), uninstall it first: Usage ===== -For code examples, see `Compute and Network Resource Management +For code examples, see `Compute Management `__ on docs.microsoft.com. diff --git a/azure-mgmt-compute/sdk_packaging.toml b/azure-mgmt-compute/sdk_packaging.toml new file mode 100644 index 000000000000..447ccf936dbe --- /dev/null +++ b/azure-mgmt-compute/sdk_packaging.toml @@ -0,0 +1,5 @@ +[packaging] +package_name = "azure-mgmt-compute" +package_pprint_name = "Compute Management" +package_doc_id = "virtualmachines" +is_stable = true diff --git a/azure-mgmt-compute/setup.py b/azure-mgmt-compute/setup.py index 4f04a54f68ff..bf45210b4e22 100644 --- a/azure-mgmt-compute/setup.py +++ b/azure-mgmt-compute/setup.py @@ -77,7 +77,7 @@ zip_safe=False, packages=find_packages(exclude=["tests"]), install_requires=[ - 'msrestazure>=0.4.20,<2.0.0', + 'msrestazure>=0.4.27,<2.0.0', 'azure-common~=1.1', ], cmdclass=cmdclass diff --git a/azure-mgmt-keyvault/README.rst b/azure-mgmt-keyvault/README.rst index a1e1f82297a1..ae12064e473d 100644 --- a/azure-mgmt-keyvault/README.rst +++ b/azure-mgmt-keyvault/README.rst @@ -1,12 +1,12 @@ Microsoft Azure SDK for Python ============================== -This is the Microsoft Azure KeyVault Resource Management Client Library. +This is the Microsoft Azure Key Vault Management Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.3, 3.4 and 3.5. +This package has been tested with Python 2.7, 3.4, 3.5 and 3.6. For a more complete set of Azure libraries, see the `azure `__ bundle package. @@ -33,9 +33,9 @@ If you see azure==0.11.0 (or any version below 1.0), uninstall it first: Usage ===== -For code examples, see `KeyVault Resource Management -`__ -on readthedocs.org. +For code examples, see `Key Vault Management +`__ +on docs.microsoft.com. Provide Feedback diff --git a/azure-mgmt-keyvault/sdk_packaging.toml b/azure-mgmt-keyvault/sdk_packaging.toml new file mode 100644 index 000000000000..6d33bc0f26af --- /dev/null +++ b/azure-mgmt-keyvault/sdk_packaging.toml @@ -0,0 +1,5 @@ +[packaging] +package_name = "azure-mgmt-keyvault" +package_pprint_name = "Key Vault Management" +package_doc_id = "key-vault" +is_stable = false diff --git a/azure-mgmt-keyvault/setup.cfg b/azure-mgmt-keyvault/setup.cfg index 0be29eb3bc63..856f4164982c 100644 --- a/azure-mgmt-keyvault/setup.cfg +++ b/azure-mgmt-keyvault/setup.cfg @@ -1,3 +1,3 @@ [bdist_wheel] universal=1 -azure-namespace-package=azure-mgmt-nspkg +azure-namespace-package=azure-mgmt-nspkg \ No newline at end of file diff --git a/azure-mgmt-keyvault/setup.py b/azure-mgmt-keyvault/setup.py index ed48d6dd1305..82f1c1dfb1f2 100644 --- a/azure-mgmt-keyvault/setup.py +++ b/azure-mgmt-keyvault/setup.py @@ -6,15 +6,25 @@ # license information. #-------------------------------------------------------------------------- -from setuptools import setup +import re +import os.path +from io import open +from setuptools import find_packages, setup try: from azure_bdist_wheel import cmdclass except ImportError: from distutils import log as logger logger.warn("Wheel is not available, disabling bdist_wheel hook") cmdclass = {} -from io import open -import re + +# Change the PACKAGE_NAME only to change folder and different name +PACKAGE_NAME = "azure-mgmt-keyvault" +PACKAGE_PPRINT_NAME = "Key Vault Management" + +# a-b-c => a/b/c +package_folder_path = PACKAGE_NAME.replace('-', '/') +# a-b-c => a.b.c +namespace_name = PACKAGE_NAME.replace('-', '.') # azure v0.x is not compatible with this package # azure v0.x used to have a __version__ attribute (newer versions don't) @@ -32,7 +42,7 @@ pass # Version extraction inspired from 'requests' -with open('azure/mgmt/keyvault/version.py', 'r') as fd: +with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) @@ -45,13 +55,13 @@ history = f.read() setup( - name='azure-mgmt-keyvault', + name=PACKAGE_NAME, version=version, - description='Microsoft Azure KeyVault Apps Resource Management Client Library for Python', + description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), long_description=readme + '\n\n' + history, license='MIT License', author='Microsoft Corporation', - author_email='ptvshelp@microsoft.com', + author_email='azurekeyvault@microsoft.com', url='https://github.com/Azure/azure-sdk-for-python', classifiers=[ 'Development Status :: 4 - Beta', @@ -59,23 +69,16 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'License :: OSI Approved :: MIT License', ], zip_safe=False, - packages=[ - 'azure', - 'azure.mgmt', - 'azure.mgmt.keyvault', - 'azure.mgmt.keyvault.models', - 'azure.mgmt.keyvault.operations', - ], + packages=find_packages(exclude=["tests"]), install_requires=[ - 'msrestazure~=0.4.7', - 'azure-common~=1.1.5', + 'msrestazure>=0.4.27,<2.0.0', + 'azure-common~=1.1', ], cmdclass=cmdclass ) diff --git a/azure-mgmt-loganalytics/HISTORY.rst b/azure-mgmt-loganalytics/HISTORY.rst index fcff098136f3..86113559c583 100644 --- a/azure-mgmt-loganalytics/HISTORY.rst +++ b/azure-mgmt-loganalytics/HISTORY.rst @@ -3,6 +3,53 @@ Release History =============== +0.2.0 (2018-05-29) +++++++++++++++++++ + +**Features** + +- Model IntelligencePack has a new parameter display_name +- Model SavedSearch has a new parameter name +- Model SavedSearch has a new parameter type +- Added operation WorkspacesOperations.purge +- Added operation WorkspacesOperations.update +- Added operation group Operations +- Client class can be used as a context manager to keep the underlying HTTP session open for performance + +**Breaking changes** + +- Model SavedSearch no longer has parameter etag (replaced by e_tag) +- Model SearchMetadata no longer has parameter etag (replaced by e_tag) + +**General Breaking changes** + +This version uses a next-generation code generator that *might* introduce breaking changes. + +- Model signatures now use only keyword-argument syntax. All positional arguments must be re-written as keyword-arguments. + To keep auto-completion in most cases, models are now generated for Python 2 and Python 3. Python 3 uses the "*" syntax for keyword-only arguments. +- Enum types now use the "str" mixin (class AzureEnum(str, Enum)) to improve the behavior when unrecognized enum values are encountered. + While this is not a breaking change, the distinctions are important, and are documented here: + https://docs.python.org/3/library/enum.html#others + At a glance: + + - "is" should not be used at all. + - "format" will return the string value, where "%s" string formatting will return `NameOfEnum.stringvalue`. Format syntax should be prefered. + +- New Long Running Operation: + + - Return type changes from `msrestazure.azure_operation.AzureOperationPoller` to `msrest.polling.LROPoller`. External API is the same. + - Return type is now **always** a `msrest.polling.LROPoller`, regardless of the optional parameters used. + - The behavior has changed when using `raw=True`. Instead of returning the initial call result as `ClientRawResponse`, + without polling, now this returns an LROPoller. After polling, the final resource will be returned as a `ClientRawResponse`. + - New `polling` parameter. The default behavior is `Polling=True` which will poll using ARM algorithm. When `Polling=False`, + the response of the initial call will be returned without polling. + - `polling` parameter accepts instances of subclasses of `msrest.polling.PollingMethod`. + - `add_done_callback` will no longer raise if called after polling is finished, but will instead execute the callback right away. + +**Bugfixes** + +- Compatibility of the sdist with wheel 0.31.0 + 0.1.0 (2017-11-01) ++++++++++++++++++ diff --git a/azure-mgmt-loganalytics/README.rst b/azure-mgmt-loganalytics/README.rst index 080abd41e37e..b2a999cb07a1 100644 --- a/azure-mgmt-loganalytics/README.rst +++ b/azure-mgmt-loganalytics/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Log Analytics Management Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. +This package has been tested with Python 2.7, 3.4, 3.5 and 3.6. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. @@ -37,8 +37,8 @@ Usage ===== For code examples, see `Log Analytics Management -`__ -on readthedocs.org. +`__ +on docs.microsoft.com. Provide Feedback diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/log_analytics_management_client.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/log_analytics_management_client.py index d6caf7dd2d20..25d5d8a10b9a 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/log_analytics_management_client.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/log_analytics_management_client.py @@ -9,15 +9,16 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import ServiceClient +from msrest.service_client import SDKClient from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION -from .operations.linked_services_operations import LinkedServicesOperations -from .operations.data_sources_operations import DataSourcesOperations -from .operations.workspaces_operations import WorkspacesOperations 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 @@ -43,36 +44,36 @@ def __init__( raise ValueError("Parameter 'credentials' must not be None.") if subscription_id is None: raise ValueError("Parameter 'subscription_id' must not be None.") - if not isinstance(subscription_id, str): - raise TypeError("Parameter 'subscription_id' must be str.") if not base_url: base_url = 'https://management.azure.com' super(LogAnalyticsManagementClientConfiguration, self).__init__(base_url) - self.add_user_agent('loganalyticsmanagementclient/{}'.format(VERSION)) + 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(object): +class LogAnalyticsManagementClient(SDKClient): """The Log Analytics Client. :ivar config: Configuration for client. :vartype config: LogAnalyticsManagementClientConfiguration - :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 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 @@ -88,19 +89,21 @@ def __init__( self, credentials, subscription_id, base_url=None): self.config = LogAnalyticsManagementClientConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) + 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.linked_services = LinkedServicesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.data_sources = DataSourcesOperations( + self.storage_insights = StorageInsightsOperations( self._client, self.config, self._serialize, self._deserialize) self.workspaces = WorkspacesOperations( self._client, self.config, self._serialize, self._deserialize) - self.storage_insights = StorageInsightsOperations( - 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/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/__init__.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/__init__.py index c5c5ecd343cb..10363263f00d 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/__init__.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/__init__.py @@ -9,62 +9,95 @@ # regenerated. # -------------------------------------------------------------------------- -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 .resource import Resource -from .proxy_resource import ProxyResource -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 .linked_service_paged import LinkedServicePaged -from .data_source_paged import DataSourcePaged +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 +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 .storage_insight_paged import StorageInsightPaged +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, DataSourceKind, SkuNameEnum, EntityStatus, - SearchSortEnum, - StorageInsightState, ) __all__ = [ - 'LinkedService', - 'DataSource', - 'DataSourceFilter', - 'IntelligencePack', - 'SharedKeys', - 'MetricName', - 'UsageMetric', - 'ManagementGroup', - 'Sku', - 'Workspace', - 'Resource', - 'ProxyResource', 'LinkTarget', 'Tag', 'CoreSummary', @@ -82,15 +115,35 @@ 'StorageAccount', 'StorageInsightStatus', 'StorageInsight', - 'LinkedServicePaged', - 'DataSourcePaged', + 'Resource', + 'ProxyResource', + 'WorkspacePurgeBodyFilters', + 'WorkspacePurgeBody', + 'WorkspacePurgeResponse', + 'WorkspacePurgeStatusResponse', + 'OperationDisplay', + 'Operation', + 'LinkedService', + 'DataSource', + 'DataSourceFilter', + 'IntelligencePack', + 'SharedKeys', + 'MetricName', + 'UsageMetric', + 'ManagementGroup', + 'Sku', + 'Workspace', + 'StorageInsightPaged', 'UsageMetricPaged', 'ManagementGroupPaged', 'WorkspacePaged', - 'StorageInsightPaged', + 'LinkedServicePaged', + 'DataSourcePaged', + 'OperationPaged', + 'SearchSortEnum', + 'StorageInsightState', + 'PurgeState', 'DataSourceKind', 'SkuNameEnum', 'EntityStatus', - 'SearchSortEnum', - 'StorageInsightState', ] diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/core_summary.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/core_summary.py index 478a1db45dcc..8facbdb80089 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/core_summary.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/core_summary.py @@ -15,9 +15,12 @@ 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: The number of documents of a core summary. + :param number_of_documents: Required. The number of documents of a core + summary. :type number_of_documents: long """ @@ -26,10 +29,11 @@ class CoreSummary(Model): } _attribute_map = { - 'status': {'key': 'Status', 'type': 'str'}, - 'number_of_documents': {'key': 'NumberOfDocuments', 'type': 'long'}, + 'status': {'key': 'status', 'type': 'str'}, + 'number_of_documents': {'key': 'numberOfDocuments', 'type': 'long'}, } - def __init__(self, number_of_documents, status=None): - self.status = status - self.number_of_documents = number_of_documents + 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/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/core_summary_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/core_summary_py3.py new file mode 100644 index 000000000000..adb9e80f5479 --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/core_summary_py3.py @@ -0,0 +1,39 @@ +# 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/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/data_source.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/data_source.py index 3b87ab959322..025239663f3c 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/data_source.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/data_source.py @@ -18,6 +18,8 @@ class DataSource(ProxyResource): 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. @@ -25,20 +27,19 @@ class DataSource(ProxyResource): :ivar type: Resource type. :vartype type: str :param tags: Resource tags - :type tags: dict - :param properties: The data source properties in raw json format, each - kind of data source have it's own schema. + :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: Possible values include: 'AzureActivityLog', + :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 :class:`DataSourceKind - ` + :type kind: str or ~azure.mgmt.loganalytics.models.DataSourceKind """ _validation = { @@ -59,8 +60,8 @@ class DataSource(ProxyResource): 'kind': {'key': 'kind', 'type': 'str'}, } - def __init__(self, properties, kind, tags=None, e_tag=None): - super(DataSource, self).__init__(tags=tags) - self.properties = properties - self.e_tag = e_tag - self.kind = kind + 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/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/data_source_filter.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/data_source_filter.py index ba24c91e75bb..8a45a5250d77 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/data_source_filter.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/data_source_filter.py @@ -21,13 +21,13 @@ class DataSourceFilter(Model): 'CustomLog', 'CustomLogCollection', 'GenericDataSource', 'IISLogs', 'LinuxPerformanceObject', 'LinuxPerformanceCollection', 'LinuxSyslog', 'LinuxSyslogCollection', 'WindowsEvent', 'WindowsPerformanceCounter' - :type kind: str or :class:`DataSourceKind - ` + :type kind: str or ~azure.mgmt.loganalytics.models.DataSourceKind """ _attribute_map = { 'kind': {'key': 'kind', 'type': 'str'}, } - def __init__(self, kind=None): - self.kind = kind + def __init__(self, **kwargs): + super(DataSourceFilter, self).__init__(**kwargs) + self.kind = kwargs.get('kind', None) diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/data_source_filter_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/data_source_filter_py3.py new file mode 100644 index 000000000000..e597802b8392 --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/data_source_filter_py3.py @@ -0,0 +1,33 @@ +# 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/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/data_source_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/data_source_py3.py new file mode 100644 index 000000000000..d0f5e0bd78b6 --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/data_source_py3.py @@ -0,0 +1,67 @@ +# 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/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/intelligence_pack.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/intelligence_pack.py index c1d69ea68c34..d65fb7ef0989 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/intelligence_pack.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/intelligence_pack.py @@ -20,13 +20,18 @@ class IntelligencePack(Model): :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=None, enabled=None): - self.name = name - self.enabled = enabled + 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/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/intelligence_pack_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/intelligence_pack_py3.py new file mode 100644 index 000000000000..0cc4b30790a1 --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/intelligence_pack_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +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/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/link_target.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/link_target.py index c0fb26b2c1ed..bd3839982bd6 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/link_target.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/link_target.py @@ -32,8 +32,9 @@ class LinkTarget(Model): 'location': {'key': 'location', 'type': 'str'}, } - def __init__(self, customer_id=None, display_name=None, workspace_name=None, location=None): - self.customer_id = customer_id - self.display_name = display_name - self.workspace_name = workspace_name - self.location = location + 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/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/link_target_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/link_target_py3.py new file mode 100644 index 000000000000..cbc600ad0573 --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/link_target_py3.py @@ -0,0 +1,40 @@ +# 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/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/linked_service.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/linked_service.py index b58b4648c325..3ffe0205654e 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/linked_service.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/linked_service.py @@ -18,6 +18,8 @@ class LinkedService(ProxyResource): 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. @@ -25,9 +27,9 @@ class LinkedService(ProxyResource): :ivar type: Resource type. :vartype type: str :param tags: Resource tags - :type tags: dict - :param resource_id: The resource id of the resource that will be linked to - the workspace. + :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 """ @@ -46,6 +48,6 @@ class LinkedService(ProxyResource): 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, } - def __init__(self, resource_id, tags=None): - super(LinkedService, self).__init__(tags=tags) - self.resource_id = resource_id + def __init__(self, **kwargs): + super(LinkedService, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/linked_service_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/linked_service_py3.py new file mode 100644 index 000000000000..2717ac4bd8a6 --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/linked_service_py3.py @@ -0,0 +1,53 @@ +# 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/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/log_analytics_management_client_enums.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/log_analytics_management_client_enums.py index c9b7875b3ffe..22641d5bc333 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/log_analytics_management_client_enums.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/log_analytics_management_client_enums.py @@ -12,7 +12,25 @@ from enum import Enum -class DataSourceKind(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" change_tracking_path = "ChangeTrackingPath" @@ -31,17 +49,18 @@ class DataSourceKind(Enum): windows_performance_counter = "WindowsPerformanceCounter" -class SkuNameEnum(Enum): +class SkuNameEnum(str, Enum): free = "Free" standard = "Standard" premium = "Premium" unlimited = "Unlimited" per_node = "PerNode" + per_gb2018 = "PerGB2018" standalone = "Standalone" -class EntityStatus(Enum): +class EntityStatus(str, Enum): creating = "Creating" succeeded = "Succeeded" @@ -49,15 +68,3 @@ class EntityStatus(Enum): canceled = "Canceled" deleting = "Deleting" provisioning_account = "ProvisioningAccount" - - -class SearchSortEnum(Enum): - - asc = "asc" - desc = "desc" - - -class StorageInsightState(Enum): - - ok = "OK" - error = "ERROR" diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/management_group.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/management_group.py index 7a5264498d39..1b79c460ce45 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/management_group.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/management_group.py @@ -49,12 +49,13 @@ class ManagementGroup(Model): 'sku': {'key': 'properties.sku', 'type': 'str'}, } - def __init__(self, server_count=None, is_gateway=None, name=None, id=None, created=None, data_received=None, version=None, sku=None): - 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 + 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/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/management_group_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/management_group_py3.py new file mode 100644 index 000000000000..5a0d9a535bfe --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/management_group_py3.py @@ -0,0 +1,61 @@ +# 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/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/metric_name.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/metric_name.py index e425cfe2f265..36482f58ac5f 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/metric_name.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/metric_name.py @@ -26,6 +26,7 @@ class MetricName(Model): 'localized_value': {'key': 'localizedValue', 'type': 'str'}, } - def __init__(self, value=None, localized_value=None): - self.value = value - self.localized_value = localized_value + 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/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/metric_name_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/metric_name_py3.py new file mode 100644 index 000000000000..515822cf3d47 --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/metric_name_py3.py @@ -0,0 +1,32 @@ +# 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/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation.py new file mode 100644 index 000000000000..26d84d4315aa --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation.py @@ -0,0 +1,32 @@ +# 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/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation_display.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation_display.py new file mode 100644 index 000000000000..97f173941c27 --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation_display.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class 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/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation_display_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation_display_py3.py new file mode 100644 index 000000000000..c5c2afad0bef --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation_display_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class 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/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation_paged.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation_paged.py new file mode 100644 index 000000000000..e9cb0c61e3f6 --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation_paged.py @@ -0,0 +1,27 @@ +# 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/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation_py3.py new file mode 100644 index 000000000000..22e7ddff5ccf --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/operation_py3.py @@ -0,0 +1,32 @@ +# 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/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/proxy_resource.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/proxy_resource.py index 998e54a0b24f..e15c31fdd01f 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/proxy_resource.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/proxy_resource.py @@ -25,7 +25,7 @@ class ProxyResource(Model): :ivar type: Resource type. :vartype type: str :param tags: Resource tags - :type tags: dict + :type tags: dict[str, str] """ _validation = { @@ -41,8 +41,9 @@ class ProxyResource(Model): 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, tags=None): + def __init__(self, **kwargs): + super(ProxyResource, self).__init__(**kwargs) self.id = None self.name = None self.type = None - self.tags = tags + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/proxy_resource_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/proxy_resource_py3.py new file mode 100644 index 000000000000..89cd0dab699f --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/proxy_resource_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +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/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/resource.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/resource.py index f2620239a160..8e4d6b9bdb23 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/resource.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/resource.py @@ -27,14 +27,13 @@ class Resource(Model): :param location: Resource location :type location: str :param tags: Resource tags - :type tags: dict + :type tags: dict[str, str] """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'location': {'required': True}, } _attribute_map = { @@ -45,9 +44,10 @@ class Resource(Model): 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, location, tags=None): + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) self.id = None self.name = None self.type = None - self.location = location - self.tags = tags + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/resource_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/resource_py3.py new file mode 100644 index 000000000000..95d57d535d37 --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/resource_py3.py @@ -0,0 +1,53 @@ +# 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/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/saved_search.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/saved_search.py index 5e55708848ae..7617dcd99070 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/saved_search.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/saved_search.py @@ -18,28 +18,37 @@ class SavedSearch(Model): 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 - :param etag: The etag of the saved search. - :type etag: str - :param category: The category of the saved search. This helps the user to - find a saved search faster. + :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: Saved search display name. + :param display_name: Required. Saved search display name. :type display_name: str - :param query: The query expression for the saved search. Please see + :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: The version number of the query lanuage. Only verion 1 is - allowed here. + :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 of :class:`Tag ` + :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}, @@ -48,19 +57,24 @@ class SavedSearch(Model): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, - 'etag': {'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]'}, + '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, display_name, query, version, etag=None, tags=None): + def __init__(self, **kwargs): + super(SavedSearch, self).__init__(**kwargs) self.id = None - self.etag = etag - self.category = category - self.display_name = display_name - self.query = query - self.version = version - self.tags = tags + 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/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/saved_search_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/saved_search_py3.py new file mode 100644 index 000000000000..a994394bfc7a --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/saved_search_py3.py @@ -0,0 +1,80 @@ +# 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/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/saved_searches_list_result.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/saved_searches_list_result.py index 71cb7b07c309..74509ad4e0d2 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/saved_searches_list_result.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/saved_searches_list_result.py @@ -16,18 +16,17 @@ class SavedSearchesListResult(Model): """The saved search operation response. :param metadata: The metadata from search results. - :type metadata: :class:`SearchMetadata - ` + :type metadata: ~azure.mgmt.loganalytics.models.SearchMetadata :param value: The array of result values. - :type value: list of :class:`SavedSearch - ` + :type value: list[~azure.mgmt.loganalytics.models.SavedSearch] """ _attribute_map = { - 'metadata': {'key': '__metadata', 'type': 'SearchMetadata'}, + 'metadata': {'key': 'metaData', 'type': 'SearchMetadata'}, 'value': {'key': 'value', 'type': '[SavedSearch]'}, } - def __init__(self, metadata=None, value=None): - self.metadata = metadata - self.value = value + def __init__(self, **kwargs): + super(SavedSearchesListResult, self).__init__(**kwargs) + self.metadata = kwargs.get('metadata', None) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/saved_searches_list_result_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/saved_searches_list_result_py3.py new file mode 100644 index 000000000000..10f174732fdc --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/saved_searches_list_result_py3.py @@ -0,0 +1,32 @@ +# 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/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_error.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_error.py index 559ed629c010..159823f38749 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_error.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_error.py @@ -26,6 +26,7 @@ class SearchError(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self, type=None, message=None): - self.type = type - self.message = message + def __init__(self, **kwargs): + super(SearchError, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.message = kwargs.get('message', None) diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_error_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_error_py3.py new file mode 100644 index 000000000000..9b093afea61d --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_error_py3.py @@ -0,0 +1,32 @@ +# 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/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_get_schema_response.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_get_schema_response.py index a9ef0ff22a0a..91e914734fc0 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_get_schema_response.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_get_schema_response.py @@ -16,18 +16,17 @@ class SearchGetSchemaResponse(Model): """The get schema operation response. :param metadata: The metadata from search results. - :type metadata: :class:`SearchMetadata - ` + :type metadata: ~azure.mgmt.loganalytics.models.SearchMetadata :param value: The array of result values. - :type value: list of :class:`SearchSchemaValue - ` + :type value: list[~azure.mgmt.loganalytics.models.SearchSchemaValue] """ _attribute_map = { - 'metadata': {'key': '__metadata', 'type': 'SearchMetadata'}, + 'metadata': {'key': 'metadata', 'type': 'SearchMetadata'}, 'value': {'key': 'value', 'type': '[SearchSchemaValue]'}, } - def __init__(self, metadata=None, value=None): - self.metadata = metadata - self.value = value + def __init__(self, **kwargs): + super(SearchGetSchemaResponse, self).__init__(**kwargs) + self.metadata = kwargs.get('metadata', None) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_get_schema_response_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_get_schema_response_py3.py new file mode 100644 index 000000000000..7d64e05b18df --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_get_schema_response_py3.py @@ -0,0 +1,32 @@ +# 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/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_highlight.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_highlight.py index 6867afea5f39..d4b7b292cb1c 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_highlight.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_highlight.py @@ -26,6 +26,7 @@ class SearchHighlight(Model): 'post': {'key': 'post', 'type': 'str'}, } - def __init__(self, pre=None, post=None): - self.pre = pre - self.post = post + def __init__(self, **kwargs): + super(SearchHighlight, self).__init__(**kwargs) + self.pre = kwargs.get('pre', None) + self.post = kwargs.get('post', None) diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_highlight_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_highlight_py3.py new file mode 100644 index 000000000000..d427d47c3824 --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_highlight_py3.py @@ -0,0 +1,32 @@ +# 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/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_metadata.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_metadata.py index 94414eeb4570..ba7f7a3dcffc 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_metadata.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_metadata.py @@ -26,19 +26,17 @@ class SearchMetadata(Model): :param id: The id of the search results request. :type id: str :param core_summaries: The core summaries. - :type core_summaries: list of :class:`CoreSummary - ` + :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 etag: The ETag of the search results. - :type etag: str + :param e_tag: The ETag of the search results. + :type e_tag: str :param sort: How the results are sorted. - :type sort: list of :class:`SearchSort - ` + :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. @@ -50,21 +48,20 @@ class SearchMetadata(Model): :param max: The max of all aggregates returned in the result set. :type max: long :param schema: The schema. - :type schema: :class:`SearchMetadataSchema - ` + :type schema: ~azure.mgmt.loganalytics.models.SearchMetadataSchema """ _attribute_map = { - 'search_id': {'key': 'RequestId', 'type': 'str'}, + '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'}, - 'etag': {'key': 'ETag', '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'}, @@ -74,21 +71,22 @@ class SearchMetadata(Model): 'schema': {'key': 'schema', 'type': 'SearchMetadataSchema'}, } - def __init__(self, search_id=None, result_type=None, total=None, top=None, id=None, core_summaries=None, status=None, start_time=None, last_updated=None, etag=None, sort=None, request_time=None, aggregated_value_field=None, aggregated_grouping_fields=None, sum=None, max=None, schema=None): - 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.etag = etag - 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 + 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/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_metadata_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_metadata_py3.py new file mode 100644 index 000000000000..11793a3e9b88 --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_metadata_py3.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.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/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_metadata_schema.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_metadata_schema.py index 0374d007325d..81238273f963 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_metadata_schema.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_metadata_schema.py @@ -26,6 +26,7 @@ class SearchMetadataSchema(Model): 'version': {'key': 'version', 'type': 'int'}, } - def __init__(self, name=None, version=None): - self.name = name - self.version = version + def __init__(self, **kwargs): + super(SearchMetadataSchema, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.version = kwargs.get('version', None) diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_metadata_schema_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_metadata_schema_py3.py new file mode 100644 index 000000000000..530524c2606d --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_metadata_schema_py3.py @@ -0,0 +1,32 @@ +# 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/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_parameters.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_parameters.py index 072745e124aa..721438021b2d 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_parameters.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_parameters.py @@ -15,12 +15,13 @@ 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: :class:`SearchHighlight - ` - :param query: The query to search. + :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. @@ -42,9 +43,10 @@ class SearchParameters(Model): 'end': {'key': 'end', 'type': 'iso-8601'}, } - def __init__(self, query, top=None, highlight=None, start=None, end=None): - self.top = top - self.highlight = highlight - self.query = query - self.start = start - self.end = end + 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/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_parameters_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_parameters_py3.py new file mode 100644 index 000000000000..8789f694abfc --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_parameters_py3.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +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/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_results_response.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_results_response.py index d43a32ea5e6e..88b9f99bcfe0 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_results_response.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_results_response.py @@ -21,13 +21,11 @@ class SearchResultsResponse(Model): :ivar id: The id of the search, which includes the full url. :vartype id: str :param metadata: The metadata from search results. - :type metadata: :class:`SearchMetadata - ` + :type metadata: ~azure.mgmt.loganalytics.models.SearchMetadata :param value: The array of result values. - :type value: list of object + :type value: list[object] :param error: The error. - :type error: :class:`SearchError - ` + :type error: ~azure.mgmt.loganalytics.models.SearchError """ _validation = { @@ -36,13 +34,14 @@ class SearchResultsResponse(Model): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, - 'metadata': {'key': '__metadata', 'type': 'SearchMetadata'}, + 'metadata': {'key': 'metaData', 'type': 'SearchMetadata'}, 'value': {'key': 'value', 'type': '[object]'}, 'error': {'key': 'error', 'type': 'SearchError'}, } - def __init__(self, metadata=None, value=None, error=None): + def __init__(self, **kwargs): + super(SearchResultsResponse, self).__init__(**kwargs) self.id = None - self.metadata = metadata - self.value = value - self.error = error + self.metadata = kwargs.get('metadata', None) + self.value = kwargs.get('value', None) + self.error = kwargs.get('error', None) diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_results_response_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_results_response_py3.py new file mode 100644 index 000000000000..414d2aae709b --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_results_response_py3.py @@ -0,0 +1,47 @@ +# 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/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_schema_value.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_schema_value.py index 71d388054576..56fe3e7089a6 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_schema_value.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_schema_value.py @@ -15,23 +15,25 @@ 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: The boolean that indicates the field is searchable as free - text. + :param indexed: Required. The boolean that indicates the field is + searchable as free text. :type indexed: bool - :param stored: The boolean that indicates whether or not the field is - stored. + :param stored: Required. The boolean that indicates whether or not the + field is stored. :type stored: bool - :param facet: The boolean that indicates whether or not the field is a - facet. + :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 of str + :type owner_type: list[str] """ _validation = { @@ -50,11 +52,12 @@ class SearchSchemaValue(Model): 'owner_type': {'key': 'ownerType', 'type': '[str]'}, } - def __init__(self, indexed, stored, facet, name=None, display_name=None, type=None, owner_type=None): - 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 + 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/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_schema_value_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_schema_value_py3.py new file mode 100644 index 000000000000..f29fd92f0aa4 --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_schema_value_py3.py @@ -0,0 +1,63 @@ +# 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/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_sort.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_sort.py index 15814e6e38a8..2abb299ee3fd 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_sort.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_sort.py @@ -19,8 +19,7 @@ class SearchSort(Model): :type name: str :param order: The sort order of the search. Possible values include: 'asc', 'desc' - :type order: str or :class:`SearchSortEnum - ` + :type order: str or ~azure.mgmt.loganalytics.models.SearchSortEnum """ _attribute_map = { @@ -28,6 +27,7 @@ class SearchSort(Model): 'order': {'key': 'order', 'type': 'str'}, } - def __init__(self, name=None, order=None): - self.name = name - self.order = order + def __init__(self, **kwargs): + super(SearchSort, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.order = kwargs.get('order', None) diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_sort_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_sort_py3.py new file mode 100644 index 000000000000..2e6c85535685 --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/search_sort_py3.py @@ -0,0 +1,33 @@ +# 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/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/shared_keys.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/shared_keys.py index 6e0a05c16977..416c872cbbfe 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/shared_keys.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/shared_keys.py @@ -26,6 +26,7 @@ class SharedKeys(Model): 'secondary_shared_key': {'key': 'secondarySharedKey', 'type': 'str'}, } - def __init__(self, primary_shared_key=None, secondary_shared_key=None): - self.primary_shared_key = primary_shared_key - self.secondary_shared_key = secondary_shared_key + 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/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/shared_keys_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/shared_keys_py3.py new file mode 100644 index 000000000000..922f0b31cd8e --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/shared_keys_py3.py @@ -0,0 +1,32 @@ +# 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/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/sku.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/sku.py index 242b975d11ac..73f09793dec9 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/sku.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/sku.py @@ -15,10 +15,12 @@ class Sku(Model): """The SKU (tier) of a workspace. - :param name: The name of the SKU. Possible values include: 'Free', - 'Standard', 'Premium', 'Unlimited', 'PerNode', 'Standalone' - :type name: str or :class:`SkuNameEnum - ` + 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 = { @@ -29,5 +31,6 @@ class Sku(Model): 'name': {'key': 'name', 'type': 'str'}, } - def __init__(self, name): - self.name = name + def __init__(self, **kwargs): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/sku_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/sku_py3.py new file mode 100644 index 000000000000..41a0c3d4b36b --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/sku_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class 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/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_account.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_account.py index 37d05a96d56a..d336824ca20c 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_account.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_account.py @@ -15,9 +15,12 @@ class StorageAccount(Model): """Describes a storage account connection. - :param id: The Azure Resource Manager ID of the storage account resource. + 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: The storage account key. + :param key: Required. The storage account key. :type key: str """ @@ -31,6 +34,7 @@ class StorageAccount(Model): 'key': {'key': 'key', 'type': 'str'}, } - def __init__(self, id, key): - self.id = id - self.key = key + def __init__(self, **kwargs): + super(StorageAccount, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.key = kwargs.get('key', None) diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_account_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_account_py3.py new file mode 100644 index 000000000000..1df1cc8e83bb --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_account_py3.py @@ -0,0 +1,40 @@ +# 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/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight.py index 67a0c8200f9d..ce9b749756c2 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight.py @@ -18,6 +18,8 @@ class StorageInsight(ProxyResource): 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. @@ -25,19 +27,17 @@ class StorageInsight(ProxyResource): :ivar type: Resource type. :vartype type: str :param tags: Resource tags - :type tags: dict + :type tags: dict[str, str] :param containers: The names of the blob containers that the workspace should read - :type containers: list of str + :type containers: list[str] :param tables: The names of the Azure tables that the workspace should read - :type tables: list of str - :param storage_account: The storage account connection details - :type storage_account: :class:`StorageAccount - ` + :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: :class:`StorageInsightStatus - ` + :vartype status: ~azure.mgmt.loganalytics.models.StorageInsightStatus :param e_tag: The ETag of the storage insight. :type e_tag: str """ @@ -62,10 +62,10 @@ class StorageInsight(ProxyResource): 'e_tag': {'key': 'eTag', 'type': 'str'}, } - def __init__(self, storage_account, tags=None, containers=None, tables=None, e_tag=None): - super(StorageInsight, self).__init__(tags=tags) - self.containers = containers - self.tables = tables - self.storage_account = storage_account + 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 = e_tag + self.e_tag = kwargs.get('e_tag', None) diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight_py3.py new file mode 100644 index 000000000000..17c3f9624aa9 --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight_py3.py @@ -0,0 +1,71 @@ +# 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/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight_status.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight_status.py index acf9028a859a..06af6f749f74 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight_status.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight_status.py @@ -15,10 +15,11 @@ class StorageInsightStatus(Model): """The status of the storage insight. - :param state: The state of the storage insight connection to the + 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 :class:`StorageInsightState - ` + :type state: str or ~azure.mgmt.loganalytics.models.StorageInsightState :param description: Description of the state of the storage insight. :type description: str """ @@ -32,6 +33,7 @@ class StorageInsightStatus(Model): 'description': {'key': 'description', 'type': 'str'}, } - def __init__(self, state, description=None): - self.state = state - self.description = description + def __init__(self, **kwargs): + super(StorageInsightStatus, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + self.description = kwargs.get('description', None) diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight_status_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight_status_py3.py new file mode 100644 index 000000000000..b30d58481193 --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/storage_insight_status_py3.py @@ -0,0 +1,39 @@ +# 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/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/tag.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/tag.py index 5f5fe1cb869a..416b195fd329 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/tag.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/tag.py @@ -15,9 +15,11 @@ class Tag(Model): """A tag of a saved search. - :param name: The tag name. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The tag name. :type name: str - :param value: The tag value. + :param value: Required. The tag value. :type value: str """ @@ -27,10 +29,11 @@ class Tag(Model): } _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'value': {'key': 'Value', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, } - def __init__(self, name, value): - self.name = name - self.value = value + def __init__(self, **kwargs): + super(Tag, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/tag_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/tag_py3.py new file mode 100644 index 000000000000..cf70eba079bb --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/tag_py3.py @@ -0,0 +1,39 @@ +# 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/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/usage_metric.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/usage_metric.py index 2a836140a6f9..816554809aba 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/usage_metric.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/usage_metric.py @@ -16,8 +16,7 @@ class UsageMetric(Model): """A metric describing the usage of a resource. :param name: The name of the metric. - :type name: :class:`MetricName - ` + :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. @@ -40,10 +39,11 @@ class UsageMetric(Model): 'quota_period': {'key': 'quotaPeriod', 'type': 'str'}, } - def __init__(self, name=None, unit=None, current_value=None, limit=None, next_reset_time=None, quota_period=None): - 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 + 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/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/usage_metric_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/usage_metric_py3.py new file mode 100644 index 000000000000..bb30a63af48e --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/usage_metric_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +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/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace.py index fa77db8a9125..1fc5acd6142e 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace.py @@ -27,12 +27,12 @@ class Workspace(Resource): :param location: Resource location :type location: str :param tags: Resource tags - :type tags: dict + :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 :class:`EntityStatus - ` + :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. @@ -47,7 +47,7 @@ class Workspace(Resource): client side. :type portal_url: str :param sku: The SKU of the workspace. - :type sku: :class:`Sku ` + :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. @@ -60,7 +60,6 @@ class Workspace(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'location': {'required': True}, 'retention_in_days': {'maximum': 730, 'minimum': -1}, } @@ -79,12 +78,12 @@ class Workspace(Resource): 'e_tag': {'key': 'eTag', 'type': 'str'}, } - def __init__(self, location, tags=None, provisioning_state=None, source=None, customer_id=None, portal_url=None, sku=None, retention_in_days=None, e_tag=None): - super(Workspace, self).__init__(location=location, tags=tags) - 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 + 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/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_body.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_body.py new file mode 100644 index 000000000000..8b5c2ccb6aa9 --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_body.py @@ -0,0 +1,41 @@ +# 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/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_body_filters.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_body_filters.py new file mode 100644 index 000000000000..0a9672178f6a --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_body_filters.py @@ -0,0 +1,40 @@ +# 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/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_body_filters_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_body_filters_py3.py new file mode 100644 index 000000000000..e5813d8d8c71 --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_body_filters_py3.py @@ -0,0 +1,40 @@ +# 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/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_body_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_body_py3.py new file mode 100644 index 000000000000..5112daee22c5 --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_body_py3.py @@ -0,0 +1,41 @@ +# 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/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_response.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_response.py new file mode 100644 index 000000000000..35d54f2167a6 --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_response.py @@ -0,0 +1,35 @@ +# 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/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_response_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_response_py3.py new file mode 100644 index 000000000000..26f7fbc448ae --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_response_py3.py @@ -0,0 +1,35 @@ +# 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/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_status_response.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_status_response.py new file mode 100644 index 000000000000..52216b115125 --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_status_response.py @@ -0,0 +1,35 @@ +# 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/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_status_response_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_status_response_py3.py new file mode 100644 index 000000000000..09c2dcb4410f --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_purge_status_response_py3.py @@ -0,0 +1,35 @@ +# 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/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_py3.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_py3.py new file mode 100644 index 000000000000..6c9f42e6d975 --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/workspace_py3.py @@ -0,0 +1,89 @@ +# 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/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/__init__.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/__init__.py index b9ace78ff9b7..c5ba8a2e6ecf 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/__init__.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/__init__.py @@ -9,16 +9,18 @@ # regenerated. # -------------------------------------------------------------------------- -from .linked_services_operations import LinkedServicesOperations -from .data_sources_operations import DataSourcesOperations -from .workspaces_operations import WorkspacesOperations 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 __all__ = [ - 'LinkedServicesOperations', - 'DataSourcesOperations', - 'WorkspacesOperations', 'StorageInsightsOperations', + 'WorkspacesOperations', 'SavedSearchesOperations', + 'LinkedServicesOperations', + 'DataSourcesOperations', + 'Operations', ] diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/data_sources_operations.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/data_sources_operations.py index 322b19ed4d04..24b70947dd5b 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/data_sources_operations.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/data_sources_operations.py @@ -22,10 +22,12 @@ class DataSourcesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2015-11-01-preview". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -49,24 +51,19 @@ def create_or_update( :type data_source_name: str :param parameters: The parameters required to create or update a datasource. - :type parameters: :class:`DataSource - ` + :type parameters: ~azure.mgmt.loganalytics.models.DataSource :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: :class:`DataSource - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`DataSource - ` or - :class:`ClientRawResponse` + :return: DataSource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.loganalytics.models.DataSource or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources/{dataSourceName}' + 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'), @@ -95,7 +92,7 @@ def create_or_update( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -114,6 +111,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources/{dataSourceName}'} def delete( self, resource_group_name, workspace_name, data_source_name, custom_headers=None, raw=False, **operation_config): @@ -132,15 +130,12 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources/{dataSourceName}' + 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'), @@ -165,7 +160,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -175,6 +170,7 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources/{dataSourceName}'} def get( self, resource_group_name, workspace_name, data_source_name, custom_headers=None, raw=False, **operation_config): @@ -193,17 +189,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`DataSource - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`DataSource - ` or - :class:`ClientRawResponse` + :return: DataSource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.loganalytics.models.DataSource or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources/{dataSourceName}' + 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'), @@ -228,7 +220,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -245,6 +237,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources/{dataSourceName}'} def list_by_workspace( self, resource_group_name, workspace_name, filter, skiptoken=None, custom_headers=None, raw=False, **operation_config): @@ -266,17 +259,16 @@ def list_by_workspace( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`DataSource - ` - :rtype: :class:`DataSourcePaged - ` + :return: An iterator like instance of DataSource + :rtype: + ~azure.mgmt.loganalytics.models.DataSourcePaged[~azure.mgmt.loganalytics.models.DataSource] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources' + 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'), @@ -308,7 +300,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -326,3 +318,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_workspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources'} diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/linked_services_operations.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/linked_services_operations.py index 5b13afe38a4c..397183f80a36 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/linked_services_operations.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/linked_services_operations.py @@ -22,10 +22,12 @@ class LinkedServicesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2015-11-01-preview". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -51,25 +53,21 @@ def create_or_update( linked to the workspace. :type resource_id: str :param tags: Resource tags - :type tags: dict + :type tags: dict[str, 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: :class:`LinkedService - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`LinkedService - ` or - :class:`ClientRawResponse` + :return: LinkedService or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.loganalytics.models.LinkedService or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ parameters = models.LinkedService(tags=tags, resource_id=resource_id) # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices/{linkedServiceName}' + 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'), @@ -98,7 +96,7 @@ def create_or_update( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -117,6 +115,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices/{linkedServiceName}'} def delete( self, resource_group_name, workspace_name, linked_service_name, custom_headers=None, raw=False, **operation_config): @@ -135,15 +134,12 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices/{linkedServiceName}' + 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'), @@ -168,7 +164,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -178,6 +174,7 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices/{linkedServiceName}'} def get( self, resource_group_name, workspace_name, linked_service_name, custom_headers=None, raw=False, **operation_config): @@ -196,17 +193,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`LinkedService - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`LinkedService - ` or - :class:`ClientRawResponse` + :return: LinkedService or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.loganalytics.models.LinkedService or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices/{linkedServiceName}' + 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'), @@ -231,7 +224,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -248,6 +241,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices/{linkedServiceName}'} def list_by_workspace( self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): @@ -264,17 +258,16 @@ def list_by_workspace( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`LinkedService - ` - :rtype: :class:`LinkedServicePaged - ` + :return: An iterator like instance of LinkedService + :rtype: + ~azure.mgmt.loganalytics.models.LinkedServicePaged[~azure.mgmt.loganalytics.models.LinkedService] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices' + 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'), @@ -303,7 +296,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -321,3 +314,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_workspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices'} diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/operations.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/operations.py new file mode 100644 index 000000000000..42e218c978a0 --- /dev/null +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/operations.py @@ -0,0 +1,99 @@ +# 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 Operations(object): + """Operations 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-11-01-preview". + """ + + models = models + + 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( + self, custom_headers=None, raw=False, **operation_config): + """Lists all of the available OperationalInsights Rest API operations. + + :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 Operation + :rtype: + ~azure.mgmt.loganalytics.models.OperationPaged[~azure.mgmt.loganalytics.models.Operation] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # 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.OperationPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/providers/Microsoft.OperationalInsights/operations'} diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/saved_searches_operations.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/saved_searches_operations.py index b10a788cbe92..95bbe17347cb 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/saved_searches_operations.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/saved_searches_operations.py @@ -22,10 +22,12 @@ class SavedSearchesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :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 @@ -51,15 +53,12 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchName}' + 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'), @@ -84,7 +83,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -94,6 +93,7 @@ def delete( 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): @@ -107,24 +107,19 @@ def create_or_update( :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: :class:`SavedSearch - ` + :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: :class:`SavedSearch - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`SavedSearch - ` or - :class:`ClientRawResponse` + :return: SavedSearch or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.loganalytics.models.SavedSearch or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchName}' + 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'), @@ -153,7 +148,7 @@ def create_or_update( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -170,6 +165,7 @@ def create_or_update( 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): @@ -187,17 +183,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`SavedSearch - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`SavedSearch - ` or - :class:`ClientRawResponse` + :return: SavedSearch or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.loganalytics.models.SavedSearch or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchName}' + 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'), @@ -222,7 +214,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -239,6 +231,7 @@ def get( 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): @@ -254,17 +247,13 @@ def list_by_workspace( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`SavedSearchesListResult - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`SavedSearchesListResult - ` or - :class:`ClientRawResponse` + :return: SavedSearchesListResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.loganalytics.models.SavedSearchesListResult or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches' + 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'), @@ -288,7 +277,7 @@ def list_by_workspace( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -305,6 +294,7 @@ def list_by_workspace( 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): @@ -322,17 +312,13 @@ def get_results( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`SearchResultsResponse - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`SearchResultsResponse - ` or - :class:`ClientRawResponse` + :return: SearchResultsResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.loganalytics.models.SearchResultsResponse or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchName}/results' + 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'), @@ -357,7 +343,7 @@ def get_results( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -374,3 +360,4 @@ def get_results( 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/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/storage_insights_operations.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/storage_insights_operations.py index b7da2e22eeca..3cd3adc2ed36 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/storage_insights_operations.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/storage_insights_operations.py @@ -22,10 +22,12 @@ class StorageInsightsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :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 @@ -50,24 +52,19 @@ def create_or_update( :type storage_insight_name: str :param parameters: The parameters required to create or update a storage insight. - :type parameters: :class:`StorageInsight - ` + :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: :class:`StorageInsight - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`StorageInsight - ` or - :class:`ClientRawResponse` + :return: StorageInsight or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.loganalytics.models.StorageInsight or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/storageInsightConfigs/{storageInsightName}' + 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'), @@ -96,25 +93,26 @@ def create_or_update( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) - if response.status_code not in [201, 200]: + 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 == 201: - deserialized = self._deserialize('StorageInsight', response) 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): @@ -134,17 +132,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`StorageInsight - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`StorageInsight - ` or - :class:`ClientRawResponse` + :return: StorageInsight or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.loganalytics.models.StorageInsight or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/storageInsightConfigs/{storageInsightName}' + 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'), @@ -169,7 +163,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -186,6 +180,7 @@ def get( 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): @@ -205,15 +200,12 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/storageInsightConfigs/{storageInsightName}' + 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'), @@ -238,7 +230,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -248,6 +240,7 @@ def delete( 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): @@ -264,17 +257,16 @@ def list_by_workspace( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`StorageInsight - ` - :rtype: :class:`StorageInsightPaged - ` + :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 = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/storageInsightConfigs' + 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'), @@ -303,7 +295,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -321,3 +313,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_workspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/storageInsightConfigs'} diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/workspaces_operations.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/workspaces_operations.py index 2f4034630ca9..50f97070acc1 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/workspaces_operations.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/workspaces_operations.py @@ -12,7 +12,8 @@ import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -from msrestazure.azure_operation import AzureOperationPoller +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -23,9 +24,11 @@ class WorkspacesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -34,6 +37,417 @@ def __init__(self, client, config, serializer, deserializer): 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. @@ -51,17 +465,14 @@ def disable_intelligence_pack( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ api_version = "2015-11-01-preview" # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/intelligencePacks/{intelligencePackName}/Disable' + url = self.disable_intelligence_pack.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'), @@ -86,7 +497,7 @@ def disable_intelligence_pack( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -96,6 +507,7 @@ def disable_intelligence_pack( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + disable_intelligence_pack.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/intelligencePacks/{intelligencePackName}/Disable'} def enable_intelligence_pack( self, resource_group_name, workspace_name, intelligence_pack_name, custom_headers=None, raw=False, **operation_config): @@ -114,17 +526,14 @@ def enable_intelligence_pack( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ api_version = "2015-11-01-preview" # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/intelligencePacks/{intelligencePackName}/Enable' + url = self.enable_intelligence_pack.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'), @@ -149,7 +558,7 @@ def enable_intelligence_pack( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -159,6 +568,7 @@ def enable_intelligence_pack( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + enable_intelligence_pack.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/intelligencePacks/{intelligencePackName}/Enable'} def list_intelligence_packs( self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): @@ -175,19 +585,15 @@ def list_intelligence_packs( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: list of :class:`IntelligencePack - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: list of :class:`IntelligencePack - ` or - :class:`ClientRawResponse` + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.loganalytics.models.IntelligencePack] or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ api_version = "2015-11-01-preview" # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/intelligencePacks' + url = self.list_intelligence_packs.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'), @@ -211,7 +617,7 @@ def list_intelligence_packs( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -228,6 +634,7 @@ def list_intelligence_packs( return client_raw_response return deserialized + list_intelligence_packs.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/intelligencePacks'} def get_shared_keys( self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): @@ -243,19 +650,15 @@ def get_shared_keys( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`SharedKeys - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`SharedKeys - ` or - :class:`ClientRawResponse` + :return: SharedKeys or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.loganalytics.models.SharedKeys or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ api_version = "2015-11-01-preview" # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/sharedKeys' + url = self.get_shared_keys.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'), @@ -279,7 +682,7 @@ def get_shared_keys( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -296,6 +699,7 @@ def get_shared_keys( return client_raw_response return deserialized + get_shared_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/sharedKeys'} def list_usages( self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): @@ -311,10 +715,9 @@ def list_usages( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`UsageMetric - ` - :rtype: :class:`UsageMetricPaged - ` + :return: An iterator like instance of UsageMetric + :rtype: + ~azure.mgmt.loganalytics.models.UsageMetricPaged[~azure.mgmt.loganalytics.models.UsageMetric] :raises: :class:`CloudError` """ api_version = "2015-11-01-preview" @@ -323,7 +726,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/usages' + url = self.list_usages.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'), @@ -352,7 +755,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -370,6 +773,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/usages'} def list_management_groups( self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): @@ -385,10 +789,9 @@ def list_management_groups( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`ManagementGroup - ` - :rtype: :class:`ManagementGroupPaged - ` + :return: An iterator like instance of ManagementGroup + :rtype: + ~azure.mgmt.loganalytics.models.ManagementGroupPaged[~azure.mgmt.loganalytics.models.ManagementGroup] :raises: :class:`CloudError` """ api_version = "2015-11-01-preview" @@ -397,7 +800,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/managementGroups' + url = self.list_management_groups.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'), @@ -426,7 +829,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -444,6 +847,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_management_groups.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/managementGroups'} def list_by_resource_group( self, resource_group_name, custom_headers=None, raw=False, **operation_config): @@ -457,10 +861,9 @@ def list_by_resource_group( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`Workspace - ` - :rtype: :class:`WorkspacePaged - ` + :return: An iterator like instance of Workspace + :rtype: + ~azure.mgmt.loganalytics.models.WorkspacePaged[~azure.mgmt.loganalytics.models.Workspace] :raises: :class:`CloudError` """ api_version = "2015-11-01-preview" @@ -469,7 +872,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces' + url = self.list_by_resource_group.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') @@ -497,7 +900,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -515,6 +918,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces'} def list( self, custom_headers=None, raw=False, **operation_config): @@ -525,10 +929,9 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`Workspace - ` - :rtype: :class:`WorkspacePaged - ` + :return: An iterator like instance of Workspace + :rtype: + ~azure.mgmt.loganalytics.models.WorkspacePaged[~azure.mgmt.loganalytics.models.Workspace] :raises: :class:`CloudError` """ api_version = "2015-11-01-preview" @@ -537,7 +940,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/workspaces' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -564,7 +967,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -582,37 +985,15 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/workspaces'} - def create_or_update( - self, resource_group_name, workspace_name, parameters, custom_headers=None, raw=False, **operation_config): - """Create or update a workspace. - :param resource_group_name: The resource group name of the workspace. - :type resource_group_name: str - :param workspace_name: The name of the workspace. - :type workspace_name: str - :param parameters: The parameters required to create or update a - workspace. - :type parameters: :class:`Workspace - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: - :class:`AzureOperationPoller` - instance that returns :class:`Workspace - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: - :class:`AzureOperationPoller` - or :class:`ClientRawResponse` - :raises: :class:`CloudError` - """ + 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 = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'), @@ -638,33 +1019,63 @@ def create_or_update( body_content = self._serialize.body(parameters, 'Workspace') # Construct and send request - def long_running_send(): + 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) - return self._client.send( - request, header_parameters, body_content, **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 - def get_long_running_status(status_link, headers=None): + deserialized = None - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) + if response.status_code == 200: + deserialized = self._deserialize('Workspace', response) + if response.status_code == 201: + deserialized = self._deserialize('Workspace', response) - def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + return deserialized + + def create_or_update( + self, resource_group_name, workspace_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update a workspace. - deserialized = None + :param resource_group_name: The resource group name of the workspace. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param parameters: The parameters required to create or update a + workspace. + :type parameters: ~azure.mgmt.loganalytics.models.Workspace + :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 Workspace or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.loganalytics.models.Workspace] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.loganalytics.models.Workspace]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) - if response.status_code == 200: - deserialized = self._deserialize('Workspace', response) - if response.status_code == 201: - deserialized = self._deserialize('Workspace', response) + def get_long_running_output(response): + deserialized = self._deserialize('Workspace', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -672,16 +1083,14 @@ def get_long_running_output(response): return deserialized - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, 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) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}'} def delete( self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): @@ -696,17 +1105,14 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ api_version = "2015-11-01-preview" # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}' + url = self.delete.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), @@ -730,7 +1136,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -740,6 +1146,7 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}'} def get( self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): @@ -754,17 +1161,15 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`Workspace ` - or :class:`ClientRawResponse` if - raw=true - :rtype: :class:`Workspace ` - or :class:`ClientRawResponse` + :return: Workspace or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.loganalytics.models.Workspace or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ api_version = "2015-11-01-preview" # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}' + url = self.get.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), @@ -788,7 +1193,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -805,174 +1210,35 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}'} - 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 of :class:`LinkTarget - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: list of :class:`LinkTarget - ` or - :class:`ClientRawResponse` - :raises: :class:`CloudError` - """ - api_version = "2015-03-20" - - # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/linkTargets' - 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, **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 - - def get_schema( - self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): - """Gets the schema for a given workspace. + def update( + self, resource_group_name, workspace_name, parameters, custom_headers=None, raw=False, **operation_config): + """Updates a workspace. - :param resource_group_name: The name of the resource group to get. The - name is case insensitive. + :param resource_group_name: The resource group name of the workspace. :type resource_group_name: str - :param workspace_name: Log Analytics workspace name + :param workspace_name: The name of the workspace. :type workspace_name: str + :param parameters: The parameters required to patch a workspace. + :type parameters: ~azure.mgmt.loganalytics.models.Workspace :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: :class:`SearchGetSchemaResponse - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`SearchGetSchemaResponse - ` or - :class:`ClientRawResponse` - :raises: :class:`CloudError` - """ - api_version = "2015-03-20" - - # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/schema' - 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, **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 - - def get_search_results( - self, resource_group_name, workspace_name, parameters, custom_headers=None, raw=False, **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: :class:`SearchParameters - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: - :class:`AzureOperationPoller` - instance that returns :class:`SearchResultsResponse - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: - :class:`AzureOperationPoller` - or :class:`ClientRawResponse` + :return: Workspace or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.loganalytics.models.Workspace or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - api_version = "2015-03-20" + api_version = "2015-11-01-preview" # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/search' + url = self.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'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -992,107 +1258,12 @@ def get_search_results( 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 - def long_running_send(): - - request = self._client.post(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - 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 - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - 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: :class:`SearchResultsResponse - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`SearchResultsResponse - ` or - :class:`ClientRawResponse` - :raises: :class:`CloudError` - """ - api_version = "2015-03-20" - - # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/search/{id}' - 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') + body_content = self._serialize.body(parameters, 'Workspace') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + request = self._client.patch(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) @@ -1102,10 +1273,11 @@ def update_search_results( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('SearchResultsResponse', response) + deserialized = self._deserialize('Workspace', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}'} diff --git a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/version.py b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/version.py index e0ec669828cb..9bd1dfac7ecb 100644 --- a/azure-mgmt-loganalytics/azure/mgmt/loganalytics/version.py +++ b/azure-mgmt-loganalytics/azure/mgmt/loganalytics/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.1.0" +VERSION = "0.2.0" diff --git a/azure-mgmt-loganalytics/sdk_packaging.toml b/azure-mgmt-loganalytics/sdk_packaging.toml new file mode 100644 index 000000000000..10f312526134 --- /dev/null +++ b/azure-mgmt-loganalytics/sdk_packaging.toml @@ -0,0 +1,5 @@ +[packaging] +package_name = "azure-mgmt-loganalytics" +package_pprint_name = "Log Analytics Management" +package_doc_id = "" +is_stable = false diff --git a/azure-mgmt-loganalytics/setup.py b/azure-mgmt-loganalytics/setup.py index ace1a862f01b..96f4ca887a06 100644 --- a/azure-mgmt-loganalytics/setup.py +++ b/azure-mgmt-loganalytics/setup.py @@ -69,7 +69,6 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', @@ -78,7 +77,7 @@ zip_safe=False, packages=find_packages(exclude=["tests"]), install_requires=[ - 'msrestazure~=0.4.11', + 'msrestazure>=0.4.27,<2.0.0', 'azure-common~=1.1', ], cmdclass=cmdclass diff --git a/azure-mgmt-logic/HISTORY.rst b/azure-mgmt-logic/HISTORY.rst index 21d8a5e14f65..721fc826b313 100644 --- a/azure-mgmt-logic/HISTORY.rst +++ b/azure-mgmt-logic/HISTORY.rst @@ -3,6 +3,64 @@ Release History =============== +3.0.0 (2018-05-18) +++++++++++++++++++ + +**Features** + +- Model WorkflowTriggerListCallbackUrlQueries has a new parameter se +- Model WorkflowRun has a new parameter wait_end_time +- Model WorkflowRunTrigger has a new parameter scheduled_time +- Added operation IntegrationAccountsOperations.log_tracking_events +- Added operation IntegrationAccountsOperations.regenerate_access_key +- Added operation IntegrationAccountsOperations.list_key_vault_keys +- Added operation WorkflowRunActionsOperations.list_expression_traces +- Added operation PartnersOperations.list_content_callback_url +- Added operation AgreementsOperations.list_content_callback_url +- Added operation SchemasOperations.list_content_callback_url +- Added operation WorkflowsOperations.move +- Added operation WorkflowsOperations.validate_workflow +- Added operation WorkflowsOperations.list_callback_url +- Added operation WorkflowTriggersOperations.get_schema_json +- Added operation WorkflowTriggersOperations.reset +- Added operation WorkflowTriggersOperations.set_state +- Added operation MapsOperations.list_content_callback_url +- Added operation group IntegrationAccountAssembliesOperations +- Added operation group WorkflowRunActionScopedRepetitionsOperations +- Added operation group WorkflowRunActionRepetitionsOperations +- Added operation group IntegrationAccountBatchConfigurationsOperations +- Added operation group WorkflowRunOperations +- Client class can be used as a context manager to keep the underlying HTTP session open for performance + +**General Breaking changes** + +This version uses a next-generation code generator that *might* introduce breaking changes. + +- Model signatures now use only keyword-argument syntax. All positional arguments must be re-written as keyword-arguments. + To keep auto-completion in most cases, models are now generated for Python 2 and Python 3. Python 3 uses the "*" syntax for keyword-only arguments. +- Enum types now use the "str" mixin (class AzureEnum(str, Enum)) to improve the behavior when unrecognized enum values are encountered. + While this is not a breaking change, the distinctions are important, and are documented here: + https://docs.python.org/3/library/enum.html#others + At a glance: + + - "is" should not be used at all. + - "format" will return the string value, where "%s" string formatting will return `NameOfEnum.stringvalue`. Format syntax should be prefered. + +- New Long Running Operation: + + - Return type changes from `msrestazure.azure_operation.AzureOperationPoller` to `msrest.polling.LROPoller`. External API is the same. + - Return type is now **always** a `msrest.polling.LROPoller`, regardless of the optional parameters used. + - The behavior has changed when using `raw=True`. Instead of returning the initial call result as `ClientRawResponse`, + without polling, now this returns an LROPoller. After polling, the final resource will be returned as a `ClientRawResponse`. + - New `polling` parameter. The default behavior is `Polling=True` which will poll using ARM algorithm. When `Polling=False`, + the response of the initial call will be returned without polling. + - `polling` parameter accepts instances of subclasses of `msrest.polling.PollingMethod`. + - `add_done_callback` will no longer raise if called after polling is finished, but will instead execute the callback right away. + +**Bugfixes** + +- Compatibility of the sdist with wheel 0.31.0 + 2.1.0 (2017-04-18) ++++++++++++++++++ diff --git a/azure-mgmt-logic/README.rst b/azure-mgmt-logic/README.rst index 75b3efa52753..095902143154 100644 --- a/azure-mgmt-logic/README.rst +++ b/azure-mgmt-logic/README.rst @@ -1,9 +1,15 @@ Microsoft Azure SDK for Python ============================== -This is the Microsoft Azure LogicApps Management Client Library. +This is the Microsoft Azure Logic Apps Management Client Library. -This package has been tested with Python 2.7, 3.3, 3.4 and 3.5. +Azure Resource Manager (ARM) is the next generation of management APIs that +replace the old Azure Service Management (ASM). + +This package has been tested with Python 2.7, 3.4, 3.5 and 3.6. + +For the older Azure Service Management (ASM) libraries, see +`azure-servicemanagement-legacy `__ library. For a more complete set of Azure libraries, see the `azure `__ bundle package. @@ -30,9 +36,9 @@ If you see azure==0.11.0 (or any version below 1.0), uninstall it first: Usage ===== -For code examples, see `Logic Apps Resource Management -`__ -on readthedocs.org. +For code examples, see `Logic Apps Management +`__ +on docs.microsoft.com. Provide Feedback diff --git a/azure-mgmt-logic/azure/mgmt/logic/__init__.py b/azure-mgmt-logic/azure/mgmt/logic/__init__.py old mode 100755 new mode 100644 diff --git a/azure-mgmt-logic/azure/mgmt/logic/logic_management_client.py b/azure-mgmt-logic/azure/mgmt/logic/logic_management_client.py old mode 100755 new mode 100644 index 359c38574c04..1546c6d7fffd --- a/azure-mgmt-logic/azure/mgmt/logic/logic_management_client.py +++ b/azure-mgmt-logic/azure/mgmt/logic/logic_management_client.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import ServiceClient +from msrest.service_client import SDKClient from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION @@ -22,7 +22,12 @@ from .operations.workflow_trigger_histories_operations import WorkflowTriggerHistoriesOperations from .operations.workflow_runs_operations import WorkflowRunsOperations from .operations.workflow_run_actions_operations import WorkflowRunActionsOperations +from .operations.workflow_run_action_repetitions_operations import WorkflowRunActionRepetitionsOperations +from .operations.workflow_run_action_scoped_repetitions_operations import WorkflowRunActionScopedRepetitionsOperations +from .operations.workflow_run_operations import WorkflowRunOperations from .operations.integration_accounts_operations import IntegrationAccountsOperations +from .operations.integration_account_assemblies_operations import IntegrationAccountAssembliesOperations +from .operations.integration_account_batch_configurations_operations import IntegrationAccountBatchConfigurationsOperations from .operations.schemas_operations import SchemasOperations from .operations.maps_operations import MapsOperations from .operations.partners_operations import PartnersOperations @@ -52,52 +57,60 @@ def __init__( raise ValueError("Parameter 'credentials' must not be None.") if subscription_id is None: raise ValueError("Parameter 'subscription_id' must not be None.") - if not isinstance(subscription_id, str): - raise TypeError("Parameter 'subscription_id' must be str.") if not base_url: base_url = 'https://management.azure.com' super(LogicManagementClientConfiguration, self).__init__(base_url) - self.add_user_agent('logicmanagementclient/{}'.format(VERSION)) + self.add_user_agent('azure-mgmt-logic/{}'.format(VERSION)) self.add_user_agent('Azure-SDK-For-Python') self.credentials = credentials self.subscription_id = subscription_id -class LogicManagementClient(object): +class LogicManagementClient(SDKClient): """REST API for Azure Logic Apps. :ivar config: Configuration for client. :vartype config: LogicManagementClientConfiguration :ivar workflows: Workflows operations - :vartype workflows: .operations.WorkflowsOperations + :vartype workflows: azure.mgmt.logic.operations.WorkflowsOperations :ivar workflow_versions: WorkflowVersions operations - :vartype workflow_versions: .operations.WorkflowVersionsOperations + :vartype workflow_versions: azure.mgmt.logic.operations.WorkflowVersionsOperations :ivar workflow_triggers: WorkflowTriggers operations - :vartype workflow_triggers: .operations.WorkflowTriggersOperations + :vartype workflow_triggers: azure.mgmt.logic.operations.WorkflowTriggersOperations :ivar workflow_trigger_histories: WorkflowTriggerHistories operations - :vartype workflow_trigger_histories: .operations.WorkflowTriggerHistoriesOperations + :vartype workflow_trigger_histories: azure.mgmt.logic.operations.WorkflowTriggerHistoriesOperations :ivar workflow_runs: WorkflowRuns operations - :vartype workflow_runs: .operations.WorkflowRunsOperations + :vartype workflow_runs: azure.mgmt.logic.operations.WorkflowRunsOperations :ivar workflow_run_actions: WorkflowRunActions operations - :vartype workflow_run_actions: .operations.WorkflowRunActionsOperations + :vartype workflow_run_actions: azure.mgmt.logic.operations.WorkflowRunActionsOperations + :ivar workflow_run_action_repetitions: WorkflowRunActionRepetitions operations + :vartype workflow_run_action_repetitions: azure.mgmt.logic.operations.WorkflowRunActionRepetitionsOperations + :ivar workflow_run_action_scoped_repetitions: WorkflowRunActionScopedRepetitions operations + :vartype workflow_run_action_scoped_repetitions: azure.mgmt.logic.operations.WorkflowRunActionScopedRepetitionsOperations + :ivar workflow_run_operations: WorkflowRunOperations operations + :vartype workflow_run_operations: azure.mgmt.logic.operations.WorkflowRunOperations :ivar integration_accounts: IntegrationAccounts operations - :vartype integration_accounts: .operations.IntegrationAccountsOperations + :vartype integration_accounts: azure.mgmt.logic.operations.IntegrationAccountsOperations + :ivar integration_account_assemblies: IntegrationAccountAssemblies operations + :vartype integration_account_assemblies: azure.mgmt.logic.operations.IntegrationAccountAssembliesOperations + :ivar integration_account_batch_configurations: IntegrationAccountBatchConfigurations operations + :vartype integration_account_batch_configurations: azure.mgmt.logic.operations.IntegrationAccountBatchConfigurationsOperations :ivar schemas: Schemas operations - :vartype schemas: .operations.SchemasOperations + :vartype schemas: azure.mgmt.logic.operations.SchemasOperations :ivar maps: Maps operations - :vartype maps: .operations.MapsOperations + :vartype maps: azure.mgmt.logic.operations.MapsOperations :ivar partners: Partners operations - :vartype partners: .operations.PartnersOperations + :vartype partners: azure.mgmt.logic.operations.PartnersOperations :ivar agreements: Agreements operations - :vartype agreements: .operations.AgreementsOperations + :vartype agreements: azure.mgmt.logic.operations.AgreementsOperations :ivar certificates: Certificates operations - :vartype certificates: .operations.CertificatesOperations + :vartype certificates: azure.mgmt.logic.operations.CertificatesOperations :ivar sessions: Sessions operations - :vartype sessions: .operations.SessionsOperations + :vartype sessions: azure.mgmt.logic.operations.SessionsOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -111,7 +124,7 @@ def __init__( self, credentials, subscription_id, base_url=None): self.config = LogicManagementClientConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) + super(LogicManagementClient, 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 = '2016-06-01' @@ -130,8 +143,18 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.workflow_run_actions = WorkflowRunActionsOperations( self._client, self.config, self._serialize, self._deserialize) + self.workflow_run_action_repetitions = WorkflowRunActionRepetitionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.workflow_run_action_scoped_repetitions = WorkflowRunActionScopedRepetitionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.workflow_run_operations = WorkflowRunOperations( + self._client, self.config, self._serialize, self._deserialize) self.integration_accounts = IntegrationAccountsOperations( self._client, self.config, self._serialize, self._deserialize) + self.integration_account_assemblies = IntegrationAccountAssembliesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.integration_account_batch_configurations = IntegrationAccountBatchConfigurationsOperations( + self._client, self.config, self._serialize, self._deserialize) self.schemas = SchemasOperations( self._client, self.config, self._serialize, self._deserialize) self.maps = MapsOperations( @@ -154,8 +177,9 @@ def list_operations( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`OperationPaged - ` + :return: An iterator like instance of Operation + :rtype: + ~azure.mgmt.logic.models.OperationPaged[~azure.mgmt.logic.models.Operation] :raises: :class:`ErrorResponseException` """ @@ -163,11 +187,11 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/providers/Microsoft.Logic/operations' + url = self.list_operations.metadata['url'] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.config.api_version", self.config.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link @@ -186,7 +210,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) @@ -202,3 +226,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_operations.metadata = {'url': '/providers/Microsoft.Logic/operations'} diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/__init__.py b/azure-mgmt-logic/azure/mgmt/logic/models/__init__.py old mode 100755 new mode 100644 index 0bafc2513adf..3f5a248b0d14 --- a/azure-mgmt-logic/azure/mgmt/logic/models/__init__.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/__init__.py @@ -9,107 +9,264 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource -from .sub_resource import SubResource -from .resource_reference import ResourceReference -from .sku import Sku -from .workflow_parameter import WorkflowParameter -from .workflow import Workflow -from .workflow_filter import WorkflowFilter -from .workflow_version import WorkflowVersion -from .recurrence_schedule_occurrence import RecurrenceScheduleOccurrence -from .recurrence_schedule import RecurrenceSchedule -from .workflow_trigger_recurrence import WorkflowTriggerRecurrence -from .workflow_trigger import WorkflowTrigger -from .workflow_trigger_filter import WorkflowTriggerFilter -from .workflow_trigger_list_callback_url_queries import WorkflowTriggerListCallbackUrlQueries -from .workflow_trigger_callback_url import WorkflowTriggerCallbackUrl -from .correlation import Correlation -from .content_hash import ContentHash -from .content_link import ContentLink -from .workflow_trigger_history import WorkflowTriggerHistory -from .workflow_trigger_history_filter import WorkflowTriggerHistoryFilter -from .workflow_run_trigger import WorkflowRunTrigger -from .workflow_output_parameter import WorkflowOutputParameter -from .workflow_run import WorkflowRun -from .workflow_run_filter import WorkflowRunFilter -from .error_properties import ErrorProperties -from .error_response import ErrorResponse, ErrorResponseException -from .retry_history import RetryHistory -from .workflow_run_action import WorkflowRunAction -from .workflow_run_action_filter import WorkflowRunActionFilter -from .regenerate_action_parameter import RegenerateActionParameter -from .generate_upgraded_definition_parameters import GenerateUpgradedDefinitionParameters -from .integration_account_sku import IntegrationAccountSku -from .integration_account import IntegrationAccount -from .get_callback_url_parameters import GetCallbackUrlParameters -from .callback_url import CallbackUrl -from .integration_account_schema import IntegrationAccountSchema -from .integration_account_schema_filter import IntegrationAccountSchemaFilter -from .integration_account_map_properties_parameters_schema import IntegrationAccountMapPropertiesParametersSchema -from .integration_account_map import IntegrationAccountMap -from .integration_account_map_filter import IntegrationAccountMapFilter -from .business_identity import BusinessIdentity -from .b2_bpartner_content import B2BPartnerContent -from .partner_content import PartnerContent -from .integration_account_partner import IntegrationAccountPartner -from .integration_account_partner_filter import IntegrationAccountPartnerFilter -from .as2_message_connection_settings import AS2MessageConnectionSettings -from .as2_acknowledgement_connection_settings import AS2AcknowledgementConnectionSettings -from .as2_mdn_settings import AS2MdnSettings -from .as2_security_settings import AS2SecuritySettings -from .as2_validation_settings import AS2ValidationSettings -from .as2_envelope_settings import AS2EnvelopeSettings -from .as2_error_settings import AS2ErrorSettings -from .as2_protocol_settings import AS2ProtocolSettings -from .as2_one_way_agreement import AS2OneWayAgreement -from .as2_agreement_content import AS2AgreementContent -from .x12_validation_settings import X12ValidationSettings -from .x12_framing_settings import X12FramingSettings -from .x12_envelope_settings import X12EnvelopeSettings -from .x12_acknowledgement_settings import X12AcknowledgementSettings -from .x12_message_filter import X12MessageFilter -from .x12_security_settings import X12SecuritySettings -from .x12_processing_settings import X12ProcessingSettings -from .x12_envelope_override import X12EnvelopeOverride -from .x12_validation_override import X12ValidationOverride -from .x12_message_identifier import X12MessageIdentifier -from .x12_schema_reference import X12SchemaReference -from .x12_delimiter_overrides import X12DelimiterOverrides -from .x12_protocol_settings import X12ProtocolSettings -from .x12_one_way_agreement import X12OneWayAgreement -from .x12_agreement_content import X12AgreementContent -from .edifact_validation_settings import EdifactValidationSettings -from .edifact_framing_settings import EdifactFramingSettings -from .edifact_envelope_settings import EdifactEnvelopeSettings -from .edifact_acknowledgement_settings import EdifactAcknowledgementSettings -from .edifact_message_filter import EdifactMessageFilter -from .edifact_processing_settings import EdifactProcessingSettings -from .edifact_envelope_override import EdifactEnvelopeOverride -from .edifact_message_identifier import EdifactMessageIdentifier -from .edifact_schema_reference import EdifactSchemaReference -from .edifact_validation_override import EdifactValidationOverride -from .edifact_delimiter_override import EdifactDelimiterOverride -from .edifact_protocol_settings import EdifactProtocolSettings -from .edifact_one_way_agreement import EdifactOneWayAgreement -from .edifact_agreement_content import EdifactAgreementContent -from .agreement_content import AgreementContent -from .integration_account_agreement import IntegrationAccountAgreement -from .integration_account_agreement_filter import IntegrationAccountAgreementFilter -from .key_vault_key_reference_key_vault import KeyVaultKeyReferenceKeyVault -from .key_vault_key_reference import KeyVaultKeyReference -from .integration_account_certificate import IntegrationAccountCertificate -from .integration_account_session_filter import IntegrationAccountSessionFilter -from .integration_account_session import IntegrationAccountSession -from .operation_display import OperationDisplay -from .operation import Operation +try: + from .resource_py3 import Resource + from .sub_resource_py3 import SubResource + from .resource_reference_py3 import ResourceReference + from .sku_py3 import Sku + from .workflow_parameter_py3 import WorkflowParameter + from .workflow_py3 import Workflow + from .workflow_filter_py3 import WorkflowFilter + from .workflow_version_py3 import WorkflowVersion + from .recurrence_schedule_occurrence_py3 import RecurrenceScheduleOccurrence + from .recurrence_schedule_py3 import RecurrenceSchedule + from .workflow_trigger_recurrence_py3 import WorkflowTriggerRecurrence + from .workflow_trigger_py3 import WorkflowTrigger + from .workflow_trigger_filter_py3 import WorkflowTriggerFilter + from .workflow_trigger_list_callback_url_queries_py3 import WorkflowTriggerListCallbackUrlQueries + from .workflow_trigger_callback_url_py3 import WorkflowTriggerCallbackUrl + from .correlation_py3 import Correlation + from .content_hash_py3 import ContentHash + from .content_link_py3 import ContentLink + from .workflow_trigger_history_py3 import WorkflowTriggerHistory + from .workflow_trigger_history_filter_py3 import WorkflowTriggerHistoryFilter + from .workflow_run_trigger_py3 import WorkflowRunTrigger + from .workflow_output_parameter_py3 import WorkflowOutputParameter + from .workflow_run_py3 import WorkflowRun + from .workflow_run_filter_py3 import WorkflowRunFilter + from .error_properties_py3 import ErrorProperties + from .error_response_py3 import ErrorResponse, ErrorResponseException + from .retry_history_py3 import RetryHistory + from .workflow_run_action_py3 import WorkflowRunAction + from .workflow_run_action_filter_py3 import WorkflowRunActionFilter + from .regenerate_action_parameter_py3 import RegenerateActionParameter + from .generate_upgraded_definition_parameters_py3 import GenerateUpgradedDefinitionParameters + from .integration_account_sku_py3 import IntegrationAccountSku + from .integration_account_py3 import IntegrationAccount + from .get_callback_url_parameters_py3 import GetCallbackUrlParameters + from .callback_url_py3 import CallbackUrl + from .integration_account_schema_py3 import IntegrationAccountSchema + from .integration_account_schema_filter_py3 import IntegrationAccountSchemaFilter + from .integration_account_map_properties_parameters_schema_py3 import IntegrationAccountMapPropertiesParametersSchema + from .integration_account_map_py3 import IntegrationAccountMap + from .integration_account_map_filter_py3 import IntegrationAccountMapFilter + from .business_identity_py3 import BusinessIdentity + from .b2_bpartner_content_py3 import B2BPartnerContent + from .partner_content_py3 import PartnerContent + from .integration_account_partner_py3 import IntegrationAccountPartner + from .integration_account_partner_filter_py3 import IntegrationAccountPartnerFilter + from .as2_message_connection_settings_py3 import AS2MessageConnectionSettings + from .as2_acknowledgement_connection_settings_py3 import AS2AcknowledgementConnectionSettings + from .as2_mdn_settings_py3 import AS2MdnSettings + from .as2_security_settings_py3 import AS2SecuritySettings + from .as2_validation_settings_py3 import AS2ValidationSettings + from .as2_envelope_settings_py3 import AS2EnvelopeSettings + from .as2_error_settings_py3 import AS2ErrorSettings + from .as2_protocol_settings_py3 import AS2ProtocolSettings + from .as2_one_way_agreement_py3 import AS2OneWayAgreement + from .as2_agreement_content_py3 import AS2AgreementContent + from .x12_validation_settings_py3 import X12ValidationSettings + from .x12_framing_settings_py3 import X12FramingSettings + from .x12_envelope_settings_py3 import X12EnvelopeSettings + from .x12_acknowledgement_settings_py3 import X12AcknowledgementSettings + from .x12_message_filter_py3 import X12MessageFilter + from .x12_security_settings_py3 import X12SecuritySettings + from .x12_processing_settings_py3 import X12ProcessingSettings + from .x12_envelope_override_py3 import X12EnvelopeOverride + from .x12_validation_override_py3 import X12ValidationOverride + from .x12_message_identifier_py3 import X12MessageIdentifier + from .x12_schema_reference_py3 import X12SchemaReference + from .x12_delimiter_overrides_py3 import X12DelimiterOverrides + from .x12_protocol_settings_py3 import X12ProtocolSettings + from .x12_one_way_agreement_py3 import X12OneWayAgreement + from .x12_agreement_content_py3 import X12AgreementContent + from .edifact_validation_settings_py3 import EdifactValidationSettings + from .edifact_framing_settings_py3 import EdifactFramingSettings + from .edifact_envelope_settings_py3 import EdifactEnvelopeSettings + from .edifact_acknowledgement_settings_py3 import EdifactAcknowledgementSettings + from .edifact_message_filter_py3 import EdifactMessageFilter + from .edifact_processing_settings_py3 import EdifactProcessingSettings + from .edifact_envelope_override_py3 import EdifactEnvelopeOverride + from .edifact_message_identifier_py3 import EdifactMessageIdentifier + from .edifact_schema_reference_py3 import EdifactSchemaReference + from .edifact_validation_override_py3 import EdifactValidationOverride + from .edifact_delimiter_override_py3 import EdifactDelimiterOverride + from .edifact_protocol_settings_py3 import EdifactProtocolSettings + from .edifact_one_way_agreement_py3 import EdifactOneWayAgreement + from .edifact_agreement_content_py3 import EdifactAgreementContent + from .agreement_content_py3 import AgreementContent + from .integration_account_agreement_py3 import IntegrationAccountAgreement + from .integration_account_agreement_filter_py3 import IntegrationAccountAgreementFilter + from .key_vault_key_reference_key_vault_py3 import KeyVaultKeyReferenceKeyVault + from .key_vault_key_reference_py3 import KeyVaultKeyReference + from .integration_account_certificate_py3 import IntegrationAccountCertificate + from .integration_account_session_filter_py3 import IntegrationAccountSessionFilter + from .integration_account_session_py3 import IntegrationAccountSession + from .operation_display_py3 import OperationDisplay + from .operation_py3 import Operation + from .key_vault_reference_py3 import KeyVaultReference + from .list_key_vault_keys_definition_py3 import ListKeyVaultKeysDefinition + from .key_vault_key_attributes_py3 import KeyVaultKeyAttributes + from .key_vault_key_py3 import KeyVaultKey + from .tracking_event_error_info_py3 import TrackingEventErrorInfo + from .tracking_event_py3 import TrackingEvent + from .tracking_events_definition_py3 import TrackingEventsDefinition + from .access_key_regenerate_action_definition_py3 import AccessKeyRegenerateActionDefinition + from .set_trigger_state_action_definition_py3 import SetTriggerStateActionDefinition + from .expression_root_py3 import ExpressionRoot + from .azure_resource_error_info_py3 import AzureResourceErrorInfo + from .expression_py3 import Expression + from .error_info_py3 import ErrorInfo + from .repetition_index_py3 import RepetitionIndex + from .workflow_run_action_repetition_definition_py3 import WorkflowRunActionRepetitionDefinition + from .workflow_run_action_repetition_definition_collection_py3 import WorkflowRunActionRepetitionDefinitionCollection + from .operation_result_py3 import OperationResult + from .run_action_correlation_py3 import RunActionCorrelation + from .operation_result_properties_py3 import OperationResultProperties + from .run_correlation_py3 import RunCorrelation + from .json_schema_py3 import JsonSchema + from .assembly_properties_py3 import AssemblyProperties + from .assembly_definition_py3 import AssemblyDefinition + from .artifact_content_properties_definition_py3 import ArtifactContentPropertiesDefinition + from .artifact_properties_py3 import ArtifactProperties + from .batch_release_criteria_py3 import BatchReleaseCriteria + from .batch_configuration_properties_py3 import BatchConfigurationProperties + from .batch_configuration_py3 import BatchConfiguration +except (SyntaxError, ImportError): + from .resource import Resource + from .sub_resource import SubResource + from .resource_reference import ResourceReference + from .sku import Sku + from .workflow_parameter import WorkflowParameter + from .workflow import Workflow + from .workflow_filter import WorkflowFilter + from .workflow_version import WorkflowVersion + from .recurrence_schedule_occurrence import RecurrenceScheduleOccurrence + from .recurrence_schedule import RecurrenceSchedule + from .workflow_trigger_recurrence import WorkflowTriggerRecurrence + from .workflow_trigger import WorkflowTrigger + from .workflow_trigger_filter import WorkflowTriggerFilter + from .workflow_trigger_list_callback_url_queries import WorkflowTriggerListCallbackUrlQueries + from .workflow_trigger_callback_url import WorkflowTriggerCallbackUrl + from .correlation import Correlation + from .content_hash import ContentHash + from .content_link import ContentLink + from .workflow_trigger_history import WorkflowTriggerHistory + from .workflow_trigger_history_filter import WorkflowTriggerHistoryFilter + from .workflow_run_trigger import WorkflowRunTrigger + from .workflow_output_parameter import WorkflowOutputParameter + from .workflow_run import WorkflowRun + from .workflow_run_filter import WorkflowRunFilter + from .error_properties import ErrorProperties + from .error_response import ErrorResponse, ErrorResponseException + from .retry_history import RetryHistory + from .workflow_run_action import WorkflowRunAction + from .workflow_run_action_filter import WorkflowRunActionFilter + from .regenerate_action_parameter import RegenerateActionParameter + from .generate_upgraded_definition_parameters import GenerateUpgradedDefinitionParameters + from .integration_account_sku import IntegrationAccountSku + from .integration_account import IntegrationAccount + from .get_callback_url_parameters import GetCallbackUrlParameters + from .callback_url import CallbackUrl + from .integration_account_schema import IntegrationAccountSchema + from .integration_account_schema_filter import IntegrationAccountSchemaFilter + from .integration_account_map_properties_parameters_schema import IntegrationAccountMapPropertiesParametersSchema + from .integration_account_map import IntegrationAccountMap + from .integration_account_map_filter import IntegrationAccountMapFilter + from .business_identity import BusinessIdentity + from .b2_bpartner_content import B2BPartnerContent + from .partner_content import PartnerContent + from .integration_account_partner import IntegrationAccountPartner + from .integration_account_partner_filter import IntegrationAccountPartnerFilter + from .as2_message_connection_settings import AS2MessageConnectionSettings + from .as2_acknowledgement_connection_settings import AS2AcknowledgementConnectionSettings + from .as2_mdn_settings import AS2MdnSettings + from .as2_security_settings import AS2SecuritySettings + from .as2_validation_settings import AS2ValidationSettings + from .as2_envelope_settings import AS2EnvelopeSettings + from .as2_error_settings import AS2ErrorSettings + from .as2_protocol_settings import AS2ProtocolSettings + from .as2_one_way_agreement import AS2OneWayAgreement + from .as2_agreement_content import AS2AgreementContent + from .x12_validation_settings import X12ValidationSettings + from .x12_framing_settings import X12FramingSettings + from .x12_envelope_settings import X12EnvelopeSettings + from .x12_acknowledgement_settings import X12AcknowledgementSettings + from .x12_message_filter import X12MessageFilter + from .x12_security_settings import X12SecuritySettings + from .x12_processing_settings import X12ProcessingSettings + from .x12_envelope_override import X12EnvelopeOverride + from .x12_validation_override import X12ValidationOverride + from .x12_message_identifier import X12MessageIdentifier + from .x12_schema_reference import X12SchemaReference + from .x12_delimiter_overrides import X12DelimiterOverrides + from .x12_protocol_settings import X12ProtocolSettings + from .x12_one_way_agreement import X12OneWayAgreement + from .x12_agreement_content import X12AgreementContent + from .edifact_validation_settings import EdifactValidationSettings + from .edifact_framing_settings import EdifactFramingSettings + from .edifact_envelope_settings import EdifactEnvelopeSettings + from .edifact_acknowledgement_settings import EdifactAcknowledgementSettings + from .edifact_message_filter import EdifactMessageFilter + from .edifact_processing_settings import EdifactProcessingSettings + from .edifact_envelope_override import EdifactEnvelopeOverride + from .edifact_message_identifier import EdifactMessageIdentifier + from .edifact_schema_reference import EdifactSchemaReference + from .edifact_validation_override import EdifactValidationOverride + from .edifact_delimiter_override import EdifactDelimiterOverride + from .edifact_protocol_settings import EdifactProtocolSettings + from .edifact_one_way_agreement import EdifactOneWayAgreement + from .edifact_agreement_content import EdifactAgreementContent + from .agreement_content import AgreementContent + from .integration_account_agreement import IntegrationAccountAgreement + from .integration_account_agreement_filter import IntegrationAccountAgreementFilter + from .key_vault_key_reference_key_vault import KeyVaultKeyReferenceKeyVault + from .key_vault_key_reference import KeyVaultKeyReference + from .integration_account_certificate import IntegrationAccountCertificate + from .integration_account_session_filter import IntegrationAccountSessionFilter + from .integration_account_session import IntegrationAccountSession + from .operation_display import OperationDisplay + from .operation import Operation + from .key_vault_reference import KeyVaultReference + from .list_key_vault_keys_definition import ListKeyVaultKeysDefinition + from .key_vault_key_attributes import KeyVaultKeyAttributes + from .key_vault_key import KeyVaultKey + from .tracking_event_error_info import TrackingEventErrorInfo + from .tracking_event import TrackingEvent + from .tracking_events_definition import TrackingEventsDefinition + from .access_key_regenerate_action_definition import AccessKeyRegenerateActionDefinition + from .set_trigger_state_action_definition import SetTriggerStateActionDefinition + from .expression_root import ExpressionRoot + from .azure_resource_error_info import AzureResourceErrorInfo + from .expression import Expression + from .error_info import ErrorInfo + from .repetition_index import RepetitionIndex + from .workflow_run_action_repetition_definition import WorkflowRunActionRepetitionDefinition + from .workflow_run_action_repetition_definition_collection import WorkflowRunActionRepetitionDefinitionCollection + from .operation_result import OperationResult + from .run_action_correlation import RunActionCorrelation + from .operation_result_properties import OperationResultProperties + from .run_correlation import RunCorrelation + from .json_schema import JsonSchema + from .assembly_properties import AssemblyProperties + from .assembly_definition import AssemblyDefinition + from .artifact_content_properties_definition import ArtifactContentPropertiesDefinition + from .artifact_properties import ArtifactProperties + from .batch_release_criteria import BatchReleaseCriteria + from .batch_configuration_properties import BatchConfigurationProperties + from .batch_configuration import BatchConfiguration from .workflow_paged import WorkflowPaged from .workflow_version_paged import WorkflowVersionPaged from .workflow_trigger_paged import WorkflowTriggerPaged from .workflow_trigger_history_paged import WorkflowTriggerHistoryPaged from .workflow_run_paged import WorkflowRunPaged from .workflow_run_action_paged import WorkflowRunActionPaged +from .expression_root_paged import ExpressionRootPaged +from .workflow_run_action_repetition_definition_paged import WorkflowRunActionRepetitionDefinitionPaged from .integration_account_paged import IntegrationAccountPaged +from .key_vault_key_paged import KeyVaultKeyPaged +from .assembly_definition_paged import AssemblyDefinitionPaged +from .batch_configuration_paged import BatchConfigurationPaged from .integration_account_schema_paged import IntegrationAccountSchemaPaged from .integration_account_map_paged import IntegrationAccountMapPaged from .integration_account_partner_paged import IntegrationAccountPartnerPaged @@ -145,6 +302,10 @@ MessageFilterType, EdifactCharacterSet, EdifactDecimalIndicator, + TrackEventsOperationOptions, + EventLevel, + TrackingRecordType, + AccessKeyType, ) __all__ = [ @@ -242,13 +403,46 @@ 'IntegrationAccountSession', 'OperationDisplay', 'Operation', + 'KeyVaultReference', + 'ListKeyVaultKeysDefinition', + 'KeyVaultKeyAttributes', + 'KeyVaultKey', + 'TrackingEventErrorInfo', + 'TrackingEvent', + 'TrackingEventsDefinition', + 'AccessKeyRegenerateActionDefinition', + 'SetTriggerStateActionDefinition', + 'ExpressionRoot', + 'AzureResourceErrorInfo', + 'Expression', + 'ErrorInfo', + 'RepetitionIndex', + 'WorkflowRunActionRepetitionDefinition', + 'WorkflowRunActionRepetitionDefinitionCollection', + 'OperationResult', + 'RunActionCorrelation', + 'OperationResultProperties', + 'RunCorrelation', + 'JsonSchema', + 'AssemblyProperties', + 'AssemblyDefinition', + 'ArtifactContentPropertiesDefinition', + 'ArtifactProperties', + 'BatchReleaseCriteria', + 'BatchConfigurationProperties', + 'BatchConfiguration', 'WorkflowPaged', 'WorkflowVersionPaged', 'WorkflowTriggerPaged', 'WorkflowTriggerHistoryPaged', 'WorkflowRunPaged', 'WorkflowRunActionPaged', + 'ExpressionRootPaged', + 'WorkflowRunActionRepetitionDefinitionPaged', 'IntegrationAccountPaged', + 'KeyVaultKeyPaged', + 'AssemblyDefinitionPaged', + 'BatchConfigurationPaged', 'IntegrationAccountSchemaPaged', 'IntegrationAccountMapPaged', 'IntegrationAccountPartnerPaged', @@ -283,4 +477,8 @@ 'MessageFilterType', 'EdifactCharacterSet', 'EdifactDecimalIndicator', + 'TrackEventsOperationOptions', + 'EventLevel', + 'TrackingRecordType', + 'AccessKeyType', ] diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/access_key_regenerate_action_definition.py b/azure-mgmt-logic/azure/mgmt/logic/models/access_key_regenerate_action_definition.py new file mode 100644 index 000000000000..6f254ed4b412 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/access_key_regenerate_action_definition.py @@ -0,0 +1,35 @@ +# 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 AccessKeyRegenerateActionDefinition(Model): + """AccessKeyRegenerateActionDefinition. + + All required parameters must be populated in order to send to Azure. + + :param key_type: Required. Possible values include: 'NotSpecified', + 'Primary', 'Secondary' + :type key_type: str or ~azure.mgmt.logic.models.AccessKeyType + """ + + _validation = { + 'key_type': {'required': True}, + } + + _attribute_map = { + 'key_type': {'key': 'keyType', 'type': 'AccessKeyType'}, + } + + def __init__(self, **kwargs): + super(AccessKeyRegenerateActionDefinition, self).__init__(**kwargs) + self.key_type = kwargs.get('key_type', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/access_key_regenerate_action_definition_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/access_key_regenerate_action_definition_py3.py new file mode 100644 index 000000000000..f6fbd7cc2e32 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/access_key_regenerate_action_definition_py3.py @@ -0,0 +1,35 @@ +# 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 AccessKeyRegenerateActionDefinition(Model): + """AccessKeyRegenerateActionDefinition. + + All required parameters must be populated in order to send to Azure. + + :param key_type: Required. Possible values include: 'NotSpecified', + 'Primary', 'Secondary' + :type key_type: str or ~azure.mgmt.logic.models.AccessKeyType + """ + + _validation = { + 'key_type': {'required': True}, + } + + _attribute_map = { + 'key_type': {'key': 'keyType', 'type': 'AccessKeyType'}, + } + + def __init__(self, *, key_type, **kwargs) -> None: + super(AccessKeyRegenerateActionDefinition, self).__init__(**kwargs) + self.key_type = key_type diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/agreement_content.py b/azure-mgmt-logic/azure/mgmt/logic/models/agreement_content.py old mode 100755 new mode 100644 index a373da3ec776..a447ae65cea8 --- a/azure-mgmt-logic/azure/mgmt/logic/models/agreement_content.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/agreement_content.py @@ -16,14 +16,11 @@ class AgreementContent(Model): """The integration account agreement content. :param a_s2: The AS2 agreement content. - :type a_s2: :class:`AS2AgreementContent - ` + :type a_s2: ~azure.mgmt.logic.models.AS2AgreementContent :param x12: The X12 agreement content. - :type x12: :class:`X12AgreementContent - ` + :type x12: ~azure.mgmt.logic.models.X12AgreementContent :param edifact: The EDIFACT agreement content. - :type edifact: :class:`EdifactAgreementContent - ` + :type edifact: ~azure.mgmt.logic.models.EdifactAgreementContent """ _attribute_map = { @@ -32,7 +29,8 @@ class AgreementContent(Model): 'edifact': {'key': 'edifact', 'type': 'EdifactAgreementContent'}, } - def __init__(self, a_s2=None, x12=None, edifact=None): - self.a_s2 = a_s2 - self.x12 = x12 - self.edifact = edifact + def __init__(self, **kwargs): + super(AgreementContent, self).__init__(**kwargs) + self.a_s2 = kwargs.get('a_s2', None) + self.x12 = kwargs.get('x12', None) + self.edifact = kwargs.get('edifact', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/agreement_content_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/agreement_content_py3.py new file mode 100644 index 000000000000..a0b8c0c0868a --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/agreement_content_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AgreementContent(Model): + """The integration account agreement content. + + :param a_s2: The AS2 agreement content. + :type a_s2: ~azure.mgmt.logic.models.AS2AgreementContent + :param x12: The X12 agreement content. + :type x12: ~azure.mgmt.logic.models.X12AgreementContent + :param edifact: The EDIFACT agreement content. + :type edifact: ~azure.mgmt.logic.models.EdifactAgreementContent + """ + + _attribute_map = { + 'a_s2': {'key': 'aS2', 'type': 'AS2AgreementContent'}, + 'x12': {'key': 'x12', 'type': 'X12AgreementContent'}, + 'edifact': {'key': 'edifact', 'type': 'EdifactAgreementContent'}, + } + + def __init__(self, *, a_s2=None, x12=None, edifact=None, **kwargs) -> None: + super(AgreementContent, self).__init__(**kwargs) + self.a_s2 = a_s2 + self.x12 = x12 + self.edifact = edifact diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/artifact_content_properties_definition.py b/azure-mgmt-logic/azure/mgmt/logic/models/artifact_content_properties_definition.py new file mode 100644 index 000000000000..7a6e617e023b --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/artifact_content_properties_definition.py @@ -0,0 +1,45 @@ +# 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 .artifact_properties import ArtifactProperties + + +class ArtifactContentPropertiesDefinition(ArtifactProperties): + """The artifact content properties definition. + + :param created_time: The artifact creation time. + :type created_time: datetime + :param changed_time: The artifact changed time. + :type changed_time: datetime + :param metadata: + :type metadata: object + :param content: + :type content: object + :param content_type: The content type. + :type content_type: str + :param content_link: The content link. + :type content_link: ~azure.mgmt.logic.models.ContentLink + """ + + _attribute_map = { + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, + 'metadata': {'key': 'metadata', 'type': 'object'}, + 'content': {'key': 'content', 'type': 'object'}, + 'content_type': {'key': 'contentType', 'type': 'str'}, + 'content_link': {'key': 'contentLink', 'type': 'ContentLink'}, + } + + def __init__(self, **kwargs): + super(ArtifactContentPropertiesDefinition, self).__init__(**kwargs) + self.content = kwargs.get('content', None) + self.content_type = kwargs.get('content_type', None) + self.content_link = kwargs.get('content_link', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/artifact_content_properties_definition_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/artifact_content_properties_definition_py3.py new file mode 100644 index 000000000000..64690564073c --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/artifact_content_properties_definition_py3.py @@ -0,0 +1,45 @@ +# 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 .artifact_properties_py3 import ArtifactProperties + + +class ArtifactContentPropertiesDefinition(ArtifactProperties): + """The artifact content properties definition. + + :param created_time: The artifact creation time. + :type created_time: datetime + :param changed_time: The artifact changed time. + :type changed_time: datetime + :param metadata: + :type metadata: object + :param content: + :type content: object + :param content_type: The content type. + :type content_type: str + :param content_link: The content link. + :type content_link: ~azure.mgmt.logic.models.ContentLink + """ + + _attribute_map = { + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, + 'metadata': {'key': 'metadata', 'type': 'object'}, + 'content': {'key': 'content', 'type': 'object'}, + 'content_type': {'key': 'contentType', 'type': 'str'}, + 'content_link': {'key': 'contentLink', 'type': 'ContentLink'}, + } + + def __init__(self, *, created_time=None, changed_time=None, metadata=None, content=None, content_type: str=None, content_link=None, **kwargs) -> None: + super(ArtifactContentPropertiesDefinition, self).__init__(created_time=created_time, changed_time=changed_time, metadata=metadata, **kwargs) + self.content = content + self.content_type = content_type + self.content_link = content_link diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/artifact_properties.py b/azure-mgmt-logic/azure/mgmt/logic/models/artifact_properties.py new file mode 100644 index 000000000000..a2f3088a0fbf --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/artifact_properties.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ArtifactProperties(Model): + """The artifact properties definition. + + :param created_time: The artifact creation time. + :type created_time: datetime + :param changed_time: The artifact changed time. + :type changed_time: datetime + :param metadata: + :type metadata: object + """ + + _attribute_map = { + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, + 'metadata': {'key': 'metadata', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(ArtifactProperties, self).__init__(**kwargs) + self.created_time = kwargs.get('created_time', None) + self.changed_time = kwargs.get('changed_time', None) + self.metadata = kwargs.get('metadata', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/artifact_properties_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/artifact_properties_py3.py new file mode 100644 index 000000000000..cf7381007c5b --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/artifact_properties_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ArtifactProperties(Model): + """The artifact properties definition. + + :param created_time: The artifact creation time. + :type created_time: datetime + :param changed_time: The artifact changed time. + :type changed_time: datetime + :param metadata: + :type metadata: object + """ + + _attribute_map = { + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, + 'metadata': {'key': 'metadata', 'type': 'object'}, + } + + def __init__(self, *, created_time=None, changed_time=None, metadata=None, **kwargs) -> None: + super(ArtifactProperties, self).__init__(**kwargs) + self.created_time = created_time + self.changed_time = changed_time + self.metadata = metadata diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/as2_acknowledgement_connection_settings.py b/azure-mgmt-logic/azure/mgmt/logic/models/as2_acknowledgement_connection_settings.py old mode 100755 new mode 100644 index a8e4633ab95b..ed3f318153d3 --- a/azure-mgmt-logic/azure/mgmt/logic/models/as2_acknowledgement_connection_settings.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/as2_acknowledgement_connection_settings.py @@ -13,19 +13,21 @@ class AS2AcknowledgementConnectionSettings(Model): - """The AS2 agreement acknowledegment connection settings. + """The AS2 agreement acknowledgement connection settings. - :param ignore_certificate_name_mismatch: The value indicating whether to - ignore mismatch in certificate name. + All required parameters must be populated in order to send to Azure. + + :param ignore_certificate_name_mismatch: Required. The value indicating + whether to ignore mismatch in certificate name. :type ignore_certificate_name_mismatch: bool - :param support_http_status_code_continue: The value indicating whether to - support HTTP status code 'CONTINUE'. + :param support_http_status_code_continue: Required. The value indicating + whether to support HTTP status code 'CONTINUE'. :type support_http_status_code_continue: bool - :param keep_http_connection_alive: The value indicating whether to keep - the connection alive. + :param keep_http_connection_alive: Required. The value indicating whether + to keep the connection alive. :type keep_http_connection_alive: bool - :param unfold_http_headers: The value indicating whether to unfold the - HTTP headers. + :param unfold_http_headers: Required. The value indicating whether to + unfold the HTTP headers. :type unfold_http_headers: bool """ @@ -43,8 +45,9 @@ class AS2AcknowledgementConnectionSettings(Model): 'unfold_http_headers': {'key': 'unfoldHttpHeaders', 'type': 'bool'}, } - def __init__(self, ignore_certificate_name_mismatch, support_http_status_code_continue, keep_http_connection_alive, unfold_http_headers): - self.ignore_certificate_name_mismatch = ignore_certificate_name_mismatch - self.support_http_status_code_continue = support_http_status_code_continue - self.keep_http_connection_alive = keep_http_connection_alive - self.unfold_http_headers = unfold_http_headers + def __init__(self, **kwargs): + super(AS2AcknowledgementConnectionSettings, self).__init__(**kwargs) + self.ignore_certificate_name_mismatch = kwargs.get('ignore_certificate_name_mismatch', None) + self.support_http_status_code_continue = kwargs.get('support_http_status_code_continue', None) + self.keep_http_connection_alive = kwargs.get('keep_http_connection_alive', None) + self.unfold_http_headers = kwargs.get('unfold_http_headers', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/as2_acknowledgement_connection_settings_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/as2_acknowledgement_connection_settings_py3.py new file mode 100644 index 000000000000..1b9fc2467be1 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/as2_acknowledgement_connection_settings_py3.py @@ -0,0 +1,53 @@ +# 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 AS2AcknowledgementConnectionSettings(Model): + """The AS2 agreement acknowledgement connection settings. + + All required parameters must be populated in order to send to Azure. + + :param ignore_certificate_name_mismatch: Required. The value indicating + whether to ignore mismatch in certificate name. + :type ignore_certificate_name_mismatch: bool + :param support_http_status_code_continue: Required. The value indicating + whether to support HTTP status code 'CONTINUE'. + :type support_http_status_code_continue: bool + :param keep_http_connection_alive: Required. The value indicating whether + to keep the connection alive. + :type keep_http_connection_alive: bool + :param unfold_http_headers: Required. The value indicating whether to + unfold the HTTP headers. + :type unfold_http_headers: bool + """ + + _validation = { + 'ignore_certificate_name_mismatch': {'required': True}, + 'support_http_status_code_continue': {'required': True}, + 'keep_http_connection_alive': {'required': True}, + 'unfold_http_headers': {'required': True}, + } + + _attribute_map = { + 'ignore_certificate_name_mismatch': {'key': 'ignoreCertificateNameMismatch', 'type': 'bool'}, + 'support_http_status_code_continue': {'key': 'supportHttpStatusCodeContinue', 'type': 'bool'}, + 'keep_http_connection_alive': {'key': 'keepHttpConnectionAlive', 'type': 'bool'}, + 'unfold_http_headers': {'key': 'unfoldHttpHeaders', 'type': 'bool'}, + } + + def __init__(self, *, ignore_certificate_name_mismatch: bool, support_http_status_code_continue: bool, keep_http_connection_alive: bool, unfold_http_headers: bool, **kwargs) -> None: + super(AS2AcknowledgementConnectionSettings, self).__init__(**kwargs) + self.ignore_certificate_name_mismatch = ignore_certificate_name_mismatch + self.support_http_status_code_continue = support_http_status_code_continue + self.keep_http_connection_alive = keep_http_connection_alive + self.unfold_http_headers = unfold_http_headers diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/as2_agreement_content.py b/azure-mgmt-logic/azure/mgmt/logic/models/as2_agreement_content.py old mode 100755 new mode 100644 index 6506c6664331..933c916cf751 --- a/azure-mgmt-logic/azure/mgmt/logic/models/as2_agreement_content.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/as2_agreement_content.py @@ -15,12 +15,12 @@ class AS2AgreementContent(Model): """The integration account AS2 agreement content. - :param receive_agreement: The AS2 one-way receive agreement. - :type receive_agreement: :class:`AS2OneWayAgreement - ` - :param send_agreement: The AS2 one-way send agreement. - :type send_agreement: :class:`AS2OneWayAgreement - ` + All required parameters must be populated in order to send to Azure. + + :param receive_agreement: Required. The AS2 one-way receive agreement. + :type receive_agreement: ~azure.mgmt.logic.models.AS2OneWayAgreement + :param send_agreement: Required. The AS2 one-way send agreement. + :type send_agreement: ~azure.mgmt.logic.models.AS2OneWayAgreement """ _validation = { @@ -33,6 +33,7 @@ class AS2AgreementContent(Model): 'send_agreement': {'key': 'sendAgreement', 'type': 'AS2OneWayAgreement'}, } - def __init__(self, receive_agreement, send_agreement): - self.receive_agreement = receive_agreement - self.send_agreement = send_agreement + def __init__(self, **kwargs): + super(AS2AgreementContent, self).__init__(**kwargs) + self.receive_agreement = kwargs.get('receive_agreement', None) + self.send_agreement = kwargs.get('send_agreement', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/as2_agreement_content_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/as2_agreement_content_py3.py new file mode 100644 index 000000000000..2c20e5c4cc5d --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/as2_agreement_content_py3.py @@ -0,0 +1,39 @@ +# 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 AS2AgreementContent(Model): + """The integration account AS2 agreement content. + + All required parameters must be populated in order to send to Azure. + + :param receive_agreement: Required. The AS2 one-way receive agreement. + :type receive_agreement: ~azure.mgmt.logic.models.AS2OneWayAgreement + :param send_agreement: Required. The AS2 one-way send agreement. + :type send_agreement: ~azure.mgmt.logic.models.AS2OneWayAgreement + """ + + _validation = { + 'receive_agreement': {'required': True}, + 'send_agreement': {'required': True}, + } + + _attribute_map = { + 'receive_agreement': {'key': 'receiveAgreement', 'type': 'AS2OneWayAgreement'}, + 'send_agreement': {'key': 'sendAgreement', 'type': 'AS2OneWayAgreement'}, + } + + def __init__(self, *, receive_agreement, send_agreement, **kwargs) -> None: + super(AS2AgreementContent, self).__init__(**kwargs) + self.receive_agreement = receive_agreement + self.send_agreement = send_agreement diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/as2_envelope_settings.py b/azure-mgmt-logic/azure/mgmt/logic/models/as2_envelope_settings.py old mode 100755 new mode 100644 index 6f314391e677..1c912b9dfcdc --- a/azure-mgmt-logic/azure/mgmt/logic/models/as2_envelope_settings.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/as2_envelope_settings.py @@ -15,18 +15,20 @@ class AS2EnvelopeSettings(Model): """The AS2 agreement envelope settings. - :param message_content_type: The message content type. + All required parameters must be populated in order to send to Azure. + + :param message_content_type: Required. The message content type. :type message_content_type: str - :param transmit_file_name_in_mime_header: The value indicating whether to - transmit file name in mime header. + :param transmit_file_name_in_mime_header: Required. The value indicating + whether to transmit file name in mime header. :type transmit_file_name_in_mime_header: bool - :param file_name_template: The template for file name. + :param file_name_template: Required. The template for file name. :type file_name_template: str - :param suspend_message_on_file_name_generation_error: The value indicating - whether to suspend message on file name generation error. + :param suspend_message_on_file_name_generation_error: Required. The value + indicating whether to suspend message on file name generation error. :type suspend_message_on_file_name_generation_error: bool - :param autogenerate_file_name: The value indicating whether to auto - generate file name. + :param autogenerate_file_name: Required. The value indicating whether to + auto generate file name. :type autogenerate_file_name: bool """ @@ -46,9 +48,10 @@ class AS2EnvelopeSettings(Model): 'autogenerate_file_name': {'key': 'autogenerateFileName', 'type': 'bool'}, } - def __init__(self, message_content_type, transmit_file_name_in_mime_header, file_name_template, suspend_message_on_file_name_generation_error, autogenerate_file_name): - self.message_content_type = message_content_type - self.transmit_file_name_in_mime_header = transmit_file_name_in_mime_header - self.file_name_template = file_name_template - self.suspend_message_on_file_name_generation_error = suspend_message_on_file_name_generation_error - self.autogenerate_file_name = autogenerate_file_name + def __init__(self, **kwargs): + super(AS2EnvelopeSettings, self).__init__(**kwargs) + self.message_content_type = kwargs.get('message_content_type', None) + self.transmit_file_name_in_mime_header = kwargs.get('transmit_file_name_in_mime_header', None) + self.file_name_template = kwargs.get('file_name_template', None) + self.suspend_message_on_file_name_generation_error = kwargs.get('suspend_message_on_file_name_generation_error', None) + self.autogenerate_file_name = kwargs.get('autogenerate_file_name', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/as2_envelope_settings_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/as2_envelope_settings_py3.py new file mode 100644 index 000000000000..a39fe640d9f6 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/as2_envelope_settings_py3.py @@ -0,0 +1,57 @@ +# 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 AS2EnvelopeSettings(Model): + """The AS2 agreement envelope settings. + + All required parameters must be populated in order to send to Azure. + + :param message_content_type: Required. The message content type. + :type message_content_type: str + :param transmit_file_name_in_mime_header: Required. The value indicating + whether to transmit file name in mime header. + :type transmit_file_name_in_mime_header: bool + :param file_name_template: Required. The template for file name. + :type file_name_template: str + :param suspend_message_on_file_name_generation_error: Required. The value + indicating whether to suspend message on file name generation error. + :type suspend_message_on_file_name_generation_error: bool + :param autogenerate_file_name: Required. The value indicating whether to + auto generate file name. + :type autogenerate_file_name: bool + """ + + _validation = { + 'message_content_type': {'required': True}, + 'transmit_file_name_in_mime_header': {'required': True}, + 'file_name_template': {'required': True}, + 'suspend_message_on_file_name_generation_error': {'required': True}, + 'autogenerate_file_name': {'required': True}, + } + + _attribute_map = { + 'message_content_type': {'key': 'messageContentType', 'type': 'str'}, + 'transmit_file_name_in_mime_header': {'key': 'transmitFileNameInMimeHeader', 'type': 'bool'}, + 'file_name_template': {'key': 'fileNameTemplate', 'type': 'str'}, + 'suspend_message_on_file_name_generation_error': {'key': 'suspendMessageOnFileNameGenerationError', 'type': 'bool'}, + 'autogenerate_file_name': {'key': 'autogenerateFileName', 'type': 'bool'}, + } + + def __init__(self, *, message_content_type: str, transmit_file_name_in_mime_header: bool, file_name_template: str, suspend_message_on_file_name_generation_error: bool, autogenerate_file_name: bool, **kwargs) -> None: + super(AS2EnvelopeSettings, self).__init__(**kwargs) + self.message_content_type = message_content_type + self.transmit_file_name_in_mime_header = transmit_file_name_in_mime_header + self.file_name_template = file_name_template + self.suspend_message_on_file_name_generation_error = suspend_message_on_file_name_generation_error + self.autogenerate_file_name = autogenerate_file_name diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/as2_error_settings.py b/azure-mgmt-logic/azure/mgmt/logic/models/as2_error_settings.py old mode 100755 new mode 100644 index 36ebbfc617cb..441d5e3bcb14 --- a/azure-mgmt-logic/azure/mgmt/logic/models/as2_error_settings.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/as2_error_settings.py @@ -15,11 +15,13 @@ class AS2ErrorSettings(Model): """The AS2 agreement error settings. - :param suspend_duplicate_message: The value indicating whether to suspend - duplicate message. + All required parameters must be populated in order to send to Azure. + + :param suspend_duplicate_message: Required. The value indicating whether + to suspend duplicate message. :type suspend_duplicate_message: bool - :param resend_if_mdn_not_received: The value indicating whether to resend - message If MDN is not received. + :param resend_if_mdn_not_received: Required. The value indicating whether + to resend message If MDN is not received. :type resend_if_mdn_not_received: bool """ @@ -33,6 +35,7 @@ class AS2ErrorSettings(Model): 'resend_if_mdn_not_received': {'key': 'resendIfMdnNotReceived', 'type': 'bool'}, } - def __init__(self, suspend_duplicate_message, resend_if_mdn_not_received): - self.suspend_duplicate_message = suspend_duplicate_message - self.resend_if_mdn_not_received = resend_if_mdn_not_received + def __init__(self, **kwargs): + super(AS2ErrorSettings, self).__init__(**kwargs) + self.suspend_duplicate_message = kwargs.get('suspend_duplicate_message', None) + self.resend_if_mdn_not_received = kwargs.get('resend_if_mdn_not_received', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/as2_error_settings_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/as2_error_settings_py3.py new file mode 100644 index 000000000000..d35752c38381 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/as2_error_settings_py3.py @@ -0,0 +1,41 @@ +# 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 AS2ErrorSettings(Model): + """The AS2 agreement error settings. + + All required parameters must be populated in order to send to Azure. + + :param suspend_duplicate_message: Required. The value indicating whether + to suspend duplicate message. + :type suspend_duplicate_message: bool + :param resend_if_mdn_not_received: Required. The value indicating whether + to resend message If MDN is not received. + :type resend_if_mdn_not_received: bool + """ + + _validation = { + 'suspend_duplicate_message': {'required': True}, + 'resend_if_mdn_not_received': {'required': True}, + } + + _attribute_map = { + 'suspend_duplicate_message': {'key': 'suspendDuplicateMessage', 'type': 'bool'}, + 'resend_if_mdn_not_received': {'key': 'resendIfMdnNotReceived', 'type': 'bool'}, + } + + def __init__(self, *, suspend_duplicate_message: bool, resend_if_mdn_not_received: bool, **kwargs) -> None: + super(AS2ErrorSettings, self).__init__(**kwargs) + self.suspend_duplicate_message = suspend_duplicate_message + self.resend_if_mdn_not_received = resend_if_mdn_not_received diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/as2_mdn_settings.py b/azure-mgmt-logic/azure/mgmt/logic/models/as2_mdn_settings.py old mode 100755 new mode 100644 index 642e6990406e..fd804f91d8de --- a/azure-mgmt-logic/azure/mgmt/logic/models/as2_mdn_settings.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/as2_mdn_settings.py @@ -15,32 +15,35 @@ class AS2MdnSettings(Model): """The AS2 agreement mdn settings. - :param need_mdn: The value indicating whether to send or request a MDN. + All required parameters must be populated in order to send to Azure. + + :param need_mdn: Required. The value indicating whether to send or request + a MDN. :type need_mdn: bool - :param sign_mdn: The value indicating whether the MDN needs to be signed - or not. + :param sign_mdn: Required. The value indicating whether the MDN needs to + be signed or not. :type sign_mdn: bool - :param send_mdn_asynchronously: The value indicating whether to send the - asynchronous MDN. + :param send_mdn_asynchronously: Required. The value indicating whether to + send the asynchronous MDN. :type send_mdn_asynchronously: bool :param receipt_delivery_url: The receipt delivery URL. :type receipt_delivery_url: str :param disposition_notification_to: The disposition notification to header value. :type disposition_notification_to: str - :param sign_outbound_mdn_if_optional: The value indicating whether to sign - the outbound MDN if optional. + :param sign_outbound_mdn_if_optional: Required. The value indicating + whether to sign the outbound MDN if optional. :type sign_outbound_mdn_if_optional: bool :param mdn_text: The MDN text. :type mdn_text: str - :param send_inbound_mdn_to_message_box: The value indicating whether to - send inbound MDN to message box. + :param send_inbound_mdn_to_message_box: Required. The value indicating + whether to send inbound MDN to message box. :type send_inbound_mdn_to_message_box: bool - :param mic_hashing_algorithm: The signing or hashing algorithm. Possible - values include: 'NotSpecified', 'None', 'MD5', 'SHA1', 'SHA2256', + :param mic_hashing_algorithm: Required. The signing or hashing algorithm. + Possible values include: 'NotSpecified', 'None', 'MD5', 'SHA1', 'SHA2256', 'SHA2384', 'SHA2512' - :type mic_hashing_algorithm: str or :class:`HashingAlgorithm - ` + :type mic_hashing_algorithm: str or + ~azure.mgmt.logic.models.HashingAlgorithm """ _validation = { @@ -64,13 +67,14 @@ class AS2MdnSettings(Model): 'mic_hashing_algorithm': {'key': 'micHashingAlgorithm', 'type': 'HashingAlgorithm'}, } - def __init__(self, need_mdn, sign_mdn, send_mdn_asynchronously, sign_outbound_mdn_if_optional, send_inbound_mdn_to_message_box, mic_hashing_algorithm, receipt_delivery_url=None, disposition_notification_to=None, mdn_text=None): - self.need_mdn = need_mdn - self.sign_mdn = sign_mdn - self.send_mdn_asynchronously = send_mdn_asynchronously - self.receipt_delivery_url = receipt_delivery_url - self.disposition_notification_to = disposition_notification_to - self.sign_outbound_mdn_if_optional = sign_outbound_mdn_if_optional - self.mdn_text = mdn_text - self.send_inbound_mdn_to_message_box = send_inbound_mdn_to_message_box - self.mic_hashing_algorithm = mic_hashing_algorithm + def __init__(self, **kwargs): + super(AS2MdnSettings, self).__init__(**kwargs) + self.need_mdn = kwargs.get('need_mdn', None) + self.sign_mdn = kwargs.get('sign_mdn', None) + self.send_mdn_asynchronously = kwargs.get('send_mdn_asynchronously', None) + self.receipt_delivery_url = kwargs.get('receipt_delivery_url', None) + self.disposition_notification_to = kwargs.get('disposition_notification_to', None) + self.sign_outbound_mdn_if_optional = kwargs.get('sign_outbound_mdn_if_optional', None) + self.mdn_text = kwargs.get('mdn_text', None) + self.send_inbound_mdn_to_message_box = kwargs.get('send_inbound_mdn_to_message_box', None) + self.mic_hashing_algorithm = kwargs.get('mic_hashing_algorithm', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/as2_mdn_settings_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/as2_mdn_settings_py3.py new file mode 100644 index 000000000000..291be8730abe --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/as2_mdn_settings_py3.py @@ -0,0 +1,80 @@ +# 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 AS2MdnSettings(Model): + """The AS2 agreement mdn settings. + + All required parameters must be populated in order to send to Azure. + + :param need_mdn: Required. The value indicating whether to send or request + a MDN. + :type need_mdn: bool + :param sign_mdn: Required. The value indicating whether the MDN needs to + be signed or not. + :type sign_mdn: bool + :param send_mdn_asynchronously: Required. The value indicating whether to + send the asynchronous MDN. + :type send_mdn_asynchronously: bool + :param receipt_delivery_url: The receipt delivery URL. + :type receipt_delivery_url: str + :param disposition_notification_to: The disposition notification to header + value. + :type disposition_notification_to: str + :param sign_outbound_mdn_if_optional: Required. The value indicating + whether to sign the outbound MDN if optional. + :type sign_outbound_mdn_if_optional: bool + :param mdn_text: The MDN text. + :type mdn_text: str + :param send_inbound_mdn_to_message_box: Required. The value indicating + whether to send inbound MDN to message box. + :type send_inbound_mdn_to_message_box: bool + :param mic_hashing_algorithm: Required. The signing or hashing algorithm. + Possible values include: 'NotSpecified', 'None', 'MD5', 'SHA1', 'SHA2256', + 'SHA2384', 'SHA2512' + :type mic_hashing_algorithm: str or + ~azure.mgmt.logic.models.HashingAlgorithm + """ + + _validation = { + 'need_mdn': {'required': True}, + 'sign_mdn': {'required': True}, + 'send_mdn_asynchronously': {'required': True}, + 'sign_outbound_mdn_if_optional': {'required': True}, + 'send_inbound_mdn_to_message_box': {'required': True}, + 'mic_hashing_algorithm': {'required': True}, + } + + _attribute_map = { + 'need_mdn': {'key': 'needMdn', 'type': 'bool'}, + 'sign_mdn': {'key': 'signMdn', 'type': 'bool'}, + 'send_mdn_asynchronously': {'key': 'sendMdnAsynchronously', 'type': 'bool'}, + 'receipt_delivery_url': {'key': 'receiptDeliveryUrl', 'type': 'str'}, + 'disposition_notification_to': {'key': 'dispositionNotificationTo', 'type': 'str'}, + 'sign_outbound_mdn_if_optional': {'key': 'signOutboundMdnIfOptional', 'type': 'bool'}, + 'mdn_text': {'key': 'mdnText', 'type': 'str'}, + 'send_inbound_mdn_to_message_box': {'key': 'sendInboundMdnToMessageBox', 'type': 'bool'}, + 'mic_hashing_algorithm': {'key': 'micHashingAlgorithm', 'type': 'HashingAlgorithm'}, + } + + def __init__(self, *, need_mdn: bool, sign_mdn: bool, send_mdn_asynchronously: bool, sign_outbound_mdn_if_optional: bool, send_inbound_mdn_to_message_box: bool, mic_hashing_algorithm, receipt_delivery_url: str=None, disposition_notification_to: str=None, mdn_text: str=None, **kwargs) -> None: + super(AS2MdnSettings, self).__init__(**kwargs) + self.need_mdn = need_mdn + self.sign_mdn = sign_mdn + self.send_mdn_asynchronously = send_mdn_asynchronously + self.receipt_delivery_url = receipt_delivery_url + self.disposition_notification_to = disposition_notification_to + self.sign_outbound_mdn_if_optional = sign_outbound_mdn_if_optional + self.mdn_text = mdn_text + self.send_inbound_mdn_to_message_box = send_inbound_mdn_to_message_box + self.mic_hashing_algorithm = mic_hashing_algorithm diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/as2_message_connection_settings.py b/azure-mgmt-logic/azure/mgmt/logic/models/as2_message_connection_settings.py old mode 100755 new mode 100644 index 922615206fbd..887855c734f9 --- a/azure-mgmt-logic/azure/mgmt/logic/models/as2_message_connection_settings.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/as2_message_connection_settings.py @@ -15,17 +15,19 @@ class AS2MessageConnectionSettings(Model): """The AS2 agreement message connection settings. - :param ignore_certificate_name_mismatch: The value indicating whether to - ignore mismatch in certificate name. + All required parameters must be populated in order to send to Azure. + + :param ignore_certificate_name_mismatch: Required. The value indicating + whether to ignore mismatch in certificate name. :type ignore_certificate_name_mismatch: bool - :param support_http_status_code_continue: The value indicating whether to - support HTTP status code 'CONTINUE'. + :param support_http_status_code_continue: Required. The value indicating + whether to support HTTP status code 'CONTINUE'. :type support_http_status_code_continue: bool - :param keep_http_connection_alive: The value indicating whether to keep - the connection alive. + :param keep_http_connection_alive: Required. The value indicating whether + to keep the connection alive. :type keep_http_connection_alive: bool - :param unfold_http_headers: The value indicating whether to unfold the - HTTP headers. + :param unfold_http_headers: Required. The value indicating whether to + unfold the HTTP headers. :type unfold_http_headers: bool """ @@ -43,8 +45,9 @@ class AS2MessageConnectionSettings(Model): 'unfold_http_headers': {'key': 'unfoldHttpHeaders', 'type': 'bool'}, } - def __init__(self, ignore_certificate_name_mismatch, support_http_status_code_continue, keep_http_connection_alive, unfold_http_headers): - self.ignore_certificate_name_mismatch = ignore_certificate_name_mismatch - self.support_http_status_code_continue = support_http_status_code_continue - self.keep_http_connection_alive = keep_http_connection_alive - self.unfold_http_headers = unfold_http_headers + def __init__(self, **kwargs): + super(AS2MessageConnectionSettings, self).__init__(**kwargs) + self.ignore_certificate_name_mismatch = kwargs.get('ignore_certificate_name_mismatch', None) + self.support_http_status_code_continue = kwargs.get('support_http_status_code_continue', None) + self.keep_http_connection_alive = kwargs.get('keep_http_connection_alive', None) + self.unfold_http_headers = kwargs.get('unfold_http_headers', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/as2_message_connection_settings_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/as2_message_connection_settings_py3.py new file mode 100644 index 000000000000..377250f5802f --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/as2_message_connection_settings_py3.py @@ -0,0 +1,53 @@ +# 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 AS2MessageConnectionSettings(Model): + """The AS2 agreement message connection settings. + + All required parameters must be populated in order to send to Azure. + + :param ignore_certificate_name_mismatch: Required. The value indicating + whether to ignore mismatch in certificate name. + :type ignore_certificate_name_mismatch: bool + :param support_http_status_code_continue: Required. The value indicating + whether to support HTTP status code 'CONTINUE'. + :type support_http_status_code_continue: bool + :param keep_http_connection_alive: Required. The value indicating whether + to keep the connection alive. + :type keep_http_connection_alive: bool + :param unfold_http_headers: Required. The value indicating whether to + unfold the HTTP headers. + :type unfold_http_headers: bool + """ + + _validation = { + 'ignore_certificate_name_mismatch': {'required': True}, + 'support_http_status_code_continue': {'required': True}, + 'keep_http_connection_alive': {'required': True}, + 'unfold_http_headers': {'required': True}, + } + + _attribute_map = { + 'ignore_certificate_name_mismatch': {'key': 'ignoreCertificateNameMismatch', 'type': 'bool'}, + 'support_http_status_code_continue': {'key': 'supportHttpStatusCodeContinue', 'type': 'bool'}, + 'keep_http_connection_alive': {'key': 'keepHttpConnectionAlive', 'type': 'bool'}, + 'unfold_http_headers': {'key': 'unfoldHttpHeaders', 'type': 'bool'}, + } + + def __init__(self, *, ignore_certificate_name_mismatch: bool, support_http_status_code_continue: bool, keep_http_connection_alive: bool, unfold_http_headers: bool, **kwargs) -> None: + super(AS2MessageConnectionSettings, self).__init__(**kwargs) + self.ignore_certificate_name_mismatch = ignore_certificate_name_mismatch + self.support_http_status_code_continue = support_http_status_code_continue + self.keep_http_connection_alive = keep_http_connection_alive + self.unfold_http_headers = unfold_http_headers diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/as2_one_way_agreement.py b/azure-mgmt-logic/azure/mgmt/logic/models/as2_one_way_agreement.py old mode 100755 new mode 100644 index 11e6c03929f3..1f75e787d1da --- a/azure-mgmt-logic/azure/mgmt/logic/models/as2_one_way_agreement.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/as2_one_way_agreement.py @@ -13,17 +13,18 @@ class AS2OneWayAgreement(Model): - """The integration account AS2 oneway agreement. - - :param sender_business_identity: The sender business identity - :type sender_business_identity: :class:`BusinessIdentity - ` - :param receiver_business_identity: The receiver business identity - :type receiver_business_identity: :class:`BusinessIdentity - ` - :param protocol_settings: The AS2 protocol settings. - :type protocol_settings: :class:`AS2ProtocolSettings - ` + """The integration account AS2 one-way agreement. + + All required parameters must be populated in order to send to Azure. + + :param sender_business_identity: Required. The sender business identity + :type sender_business_identity: ~azure.mgmt.logic.models.BusinessIdentity + :param receiver_business_identity: Required. The receiver business + identity + :type receiver_business_identity: + ~azure.mgmt.logic.models.BusinessIdentity + :param protocol_settings: Required. The AS2 protocol settings. + :type protocol_settings: ~azure.mgmt.logic.models.AS2ProtocolSettings """ _validation = { @@ -38,7 +39,8 @@ class AS2OneWayAgreement(Model): 'protocol_settings': {'key': 'protocolSettings', 'type': 'AS2ProtocolSettings'}, } - def __init__(self, sender_business_identity, receiver_business_identity, protocol_settings): - self.sender_business_identity = sender_business_identity - self.receiver_business_identity = receiver_business_identity - self.protocol_settings = protocol_settings + def __init__(self, **kwargs): + super(AS2OneWayAgreement, self).__init__(**kwargs) + self.sender_business_identity = kwargs.get('sender_business_identity', None) + self.receiver_business_identity = kwargs.get('receiver_business_identity', None) + self.protocol_settings = kwargs.get('protocol_settings', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/as2_one_way_agreement_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/as2_one_way_agreement_py3.py new file mode 100644 index 000000000000..54315da2006a --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/as2_one_way_agreement_py3.py @@ -0,0 +1,46 @@ +# 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 AS2OneWayAgreement(Model): + """The integration account AS2 one-way agreement. + + All required parameters must be populated in order to send to Azure. + + :param sender_business_identity: Required. The sender business identity + :type sender_business_identity: ~azure.mgmt.logic.models.BusinessIdentity + :param receiver_business_identity: Required. The receiver business + identity + :type receiver_business_identity: + ~azure.mgmt.logic.models.BusinessIdentity + :param protocol_settings: Required. The AS2 protocol settings. + :type protocol_settings: ~azure.mgmt.logic.models.AS2ProtocolSettings + """ + + _validation = { + 'sender_business_identity': {'required': True}, + 'receiver_business_identity': {'required': True}, + 'protocol_settings': {'required': True}, + } + + _attribute_map = { + 'sender_business_identity': {'key': 'senderBusinessIdentity', 'type': 'BusinessIdentity'}, + 'receiver_business_identity': {'key': 'receiverBusinessIdentity', 'type': 'BusinessIdentity'}, + 'protocol_settings': {'key': 'protocolSettings', 'type': 'AS2ProtocolSettings'}, + } + + def __init__(self, *, sender_business_identity, receiver_business_identity, protocol_settings, **kwargs) -> None: + super(AS2OneWayAgreement, self).__init__(**kwargs) + self.sender_business_identity = sender_business_identity + self.receiver_business_identity = receiver_business_identity + self.protocol_settings = protocol_settings diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/as2_protocol_settings.py b/azure-mgmt-logic/azure/mgmt/logic/models/as2_protocol_settings.py old mode 100755 new mode 100644 index 33ee9fc10a55..1c79994dd5fd --- a/azure-mgmt-logic/azure/mgmt/logic/models/as2_protocol_settings.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/as2_protocol_settings.py @@ -15,29 +15,26 @@ class AS2ProtocolSettings(Model): """The AS2 agreement protocol settings. - :param message_connection_settings: The message connection settings. - :type message_connection_settings: :class:`AS2MessageConnectionSettings - ` - :param acknowledgement_connection_settings: The acknowledgement connection + All required parameters must be populated in order to send to Azure. + + :param message_connection_settings: Required. The message connection settings. + :type message_connection_settings: + ~azure.mgmt.logic.models.AS2MessageConnectionSettings + :param acknowledgement_connection_settings: Required. The acknowledgement + connection settings. :type acknowledgement_connection_settings: - :class:`AS2AcknowledgementConnectionSettings - ` - :param mdn_settings: The MDN settings. - :type mdn_settings: :class:`AS2MdnSettings - ` - :param security_settings: The security settings. - :type security_settings: :class:`AS2SecuritySettings - ` - :param validation_settings: The validation settings. - :type validation_settings: :class:`AS2ValidationSettings - ` - :param envelope_settings: The envelope settings. - :type envelope_settings: :class:`AS2EnvelopeSettings - ` - :param error_settings: The error settings. - :type error_settings: :class:`AS2ErrorSettings - ` + ~azure.mgmt.logic.models.AS2AcknowledgementConnectionSettings + :param mdn_settings: Required. The MDN settings. + :type mdn_settings: ~azure.mgmt.logic.models.AS2MdnSettings + :param security_settings: Required. The security settings. + :type security_settings: ~azure.mgmt.logic.models.AS2SecuritySettings + :param validation_settings: Required. The validation settings. + :type validation_settings: ~azure.mgmt.logic.models.AS2ValidationSettings + :param envelope_settings: Required. The envelope settings. + :type envelope_settings: ~azure.mgmt.logic.models.AS2EnvelopeSettings + :param error_settings: Required. The error settings. + :type error_settings: ~azure.mgmt.logic.models.AS2ErrorSettings """ _validation = { @@ -60,11 +57,12 @@ class AS2ProtocolSettings(Model): 'error_settings': {'key': 'errorSettings', 'type': 'AS2ErrorSettings'}, } - def __init__(self, message_connection_settings, acknowledgement_connection_settings, mdn_settings, security_settings, validation_settings, envelope_settings, error_settings): - self.message_connection_settings = message_connection_settings - self.acknowledgement_connection_settings = acknowledgement_connection_settings - self.mdn_settings = mdn_settings - self.security_settings = security_settings - self.validation_settings = validation_settings - self.envelope_settings = envelope_settings - self.error_settings = error_settings + def __init__(self, **kwargs): + super(AS2ProtocolSettings, self).__init__(**kwargs) + self.message_connection_settings = kwargs.get('message_connection_settings', None) + self.acknowledgement_connection_settings = kwargs.get('acknowledgement_connection_settings', None) + self.mdn_settings = kwargs.get('mdn_settings', None) + self.security_settings = kwargs.get('security_settings', None) + self.validation_settings = kwargs.get('validation_settings', None) + self.envelope_settings = kwargs.get('envelope_settings', None) + self.error_settings = kwargs.get('error_settings', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/as2_protocol_settings_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/as2_protocol_settings_py3.py new file mode 100644 index 000000000000..217fdc55147d --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/as2_protocol_settings_py3.py @@ -0,0 +1,68 @@ +# 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 AS2ProtocolSettings(Model): + """The AS2 agreement protocol settings. + + All required parameters must be populated in order to send to Azure. + + :param message_connection_settings: Required. The message connection + settings. + :type message_connection_settings: + ~azure.mgmt.logic.models.AS2MessageConnectionSettings + :param acknowledgement_connection_settings: Required. The acknowledgement + connection settings. + :type acknowledgement_connection_settings: + ~azure.mgmt.logic.models.AS2AcknowledgementConnectionSettings + :param mdn_settings: Required. The MDN settings. + :type mdn_settings: ~azure.mgmt.logic.models.AS2MdnSettings + :param security_settings: Required. The security settings. + :type security_settings: ~azure.mgmt.logic.models.AS2SecuritySettings + :param validation_settings: Required. The validation settings. + :type validation_settings: ~azure.mgmt.logic.models.AS2ValidationSettings + :param envelope_settings: Required. The envelope settings. + :type envelope_settings: ~azure.mgmt.logic.models.AS2EnvelopeSettings + :param error_settings: Required. The error settings. + :type error_settings: ~azure.mgmt.logic.models.AS2ErrorSettings + """ + + _validation = { + 'message_connection_settings': {'required': True}, + 'acknowledgement_connection_settings': {'required': True}, + 'mdn_settings': {'required': True}, + 'security_settings': {'required': True}, + 'validation_settings': {'required': True}, + 'envelope_settings': {'required': True}, + 'error_settings': {'required': True}, + } + + _attribute_map = { + 'message_connection_settings': {'key': 'messageConnectionSettings', 'type': 'AS2MessageConnectionSettings'}, + 'acknowledgement_connection_settings': {'key': 'acknowledgementConnectionSettings', 'type': 'AS2AcknowledgementConnectionSettings'}, + 'mdn_settings': {'key': 'mdnSettings', 'type': 'AS2MdnSettings'}, + 'security_settings': {'key': 'securitySettings', 'type': 'AS2SecuritySettings'}, + 'validation_settings': {'key': 'validationSettings', 'type': 'AS2ValidationSettings'}, + 'envelope_settings': {'key': 'envelopeSettings', 'type': 'AS2EnvelopeSettings'}, + 'error_settings': {'key': 'errorSettings', 'type': 'AS2ErrorSettings'}, + } + + def __init__(self, *, message_connection_settings, acknowledgement_connection_settings, mdn_settings, security_settings, validation_settings, envelope_settings, error_settings, **kwargs) -> None: + super(AS2ProtocolSettings, self).__init__(**kwargs) + self.message_connection_settings = message_connection_settings + self.acknowledgement_connection_settings = acknowledgement_connection_settings + self.mdn_settings = mdn_settings + self.security_settings = security_settings + self.validation_settings = validation_settings + self.envelope_settings = envelope_settings + self.error_settings = error_settings diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/as2_security_settings.py b/azure-mgmt-logic/azure/mgmt/logic/models/as2_security_settings.py old mode 100755 new mode 100644 index 7194beb13170..c90158ada77e --- a/azure-mgmt-logic/azure/mgmt/logic/models/as2_security_settings.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/as2_security_settings.py @@ -15,31 +15,33 @@ class AS2SecuritySettings(Model): """The AS2 agreement security settings. - :param override_group_signing_certificate: The value indicating whether to - send or request a MDN. + All required parameters must be populated in order to send to Azure. + + :param override_group_signing_certificate: Required. The value indicating + whether to send or request a MDN. :type override_group_signing_certificate: bool :param signing_certificate_name: The name of the signing certificate. :type signing_certificate_name: str :param encryption_certificate_name: The name of the encryption certificate. :type encryption_certificate_name: str - :param enable_nrr_for_inbound_encoded_messages: The value indicating - whether to enable NRR for inbound encoded messages. + :param enable_nrr_for_inbound_encoded_messages: Required. The value + indicating whether to enable NRR for inbound encoded messages. :type enable_nrr_for_inbound_encoded_messages: bool - :param enable_nrr_for_inbound_decoded_messages: The value indicating - whether to enable NRR for inbound decoded messages. + :param enable_nrr_for_inbound_decoded_messages: Required. The value + indicating whether to enable NRR for inbound decoded messages. :type enable_nrr_for_inbound_decoded_messages: bool - :param enable_nrr_for_outbound_mdn: The value indicating whether to enable - NRR for outbound MDN. + :param enable_nrr_for_outbound_mdn: Required. The value indicating whether + to enable NRR for outbound MDN. :type enable_nrr_for_outbound_mdn: bool - :param enable_nrr_for_outbound_encoded_messages: The value indicating - whether to enable NRR for outbound encoded messages. + :param enable_nrr_for_outbound_encoded_messages: Required. The value + indicating whether to enable NRR for outbound encoded messages. :type enable_nrr_for_outbound_encoded_messages: bool - :param enable_nrr_for_outbound_decoded_messages: The value indicating - whether to enable NRR for outbound decoded messages. + :param enable_nrr_for_outbound_decoded_messages: Required. The value + indicating whether to enable NRR for outbound decoded messages. :type enable_nrr_for_outbound_decoded_messages: bool - :param enable_nrr_for_inbound_mdn: The value indicating whether to enable - NRR for inbound MDN. + :param enable_nrr_for_inbound_mdn: Required. The value indicating whether + to enable NRR for inbound MDN. :type enable_nrr_for_inbound_mdn: bool :param sha2_algorithm_format: The Sha2 algorithm format. Valid values are Sha2, ShaHashSize, ShaHyphenHashSize, Sha2UnderscoreHashSize. @@ -69,14 +71,15 @@ class AS2SecuritySettings(Model): 'sha2_algorithm_format': {'key': 'sha2AlgorithmFormat', 'type': 'str'}, } - def __init__(self, override_group_signing_certificate, enable_nrr_for_inbound_encoded_messages, enable_nrr_for_inbound_decoded_messages, enable_nrr_for_outbound_mdn, enable_nrr_for_outbound_encoded_messages, enable_nrr_for_outbound_decoded_messages, enable_nrr_for_inbound_mdn, signing_certificate_name=None, encryption_certificate_name=None, sha2_algorithm_format=None): - self.override_group_signing_certificate = override_group_signing_certificate - self.signing_certificate_name = signing_certificate_name - self.encryption_certificate_name = encryption_certificate_name - self.enable_nrr_for_inbound_encoded_messages = enable_nrr_for_inbound_encoded_messages - self.enable_nrr_for_inbound_decoded_messages = enable_nrr_for_inbound_decoded_messages - self.enable_nrr_for_outbound_mdn = enable_nrr_for_outbound_mdn - self.enable_nrr_for_outbound_encoded_messages = enable_nrr_for_outbound_encoded_messages - self.enable_nrr_for_outbound_decoded_messages = enable_nrr_for_outbound_decoded_messages - self.enable_nrr_for_inbound_mdn = enable_nrr_for_inbound_mdn - self.sha2_algorithm_format = sha2_algorithm_format + def __init__(self, **kwargs): + super(AS2SecuritySettings, self).__init__(**kwargs) + self.override_group_signing_certificate = kwargs.get('override_group_signing_certificate', None) + self.signing_certificate_name = kwargs.get('signing_certificate_name', None) + self.encryption_certificate_name = kwargs.get('encryption_certificate_name', None) + self.enable_nrr_for_inbound_encoded_messages = kwargs.get('enable_nrr_for_inbound_encoded_messages', None) + self.enable_nrr_for_inbound_decoded_messages = kwargs.get('enable_nrr_for_inbound_decoded_messages', None) + self.enable_nrr_for_outbound_mdn = kwargs.get('enable_nrr_for_outbound_mdn', None) + self.enable_nrr_for_outbound_encoded_messages = kwargs.get('enable_nrr_for_outbound_encoded_messages', None) + self.enable_nrr_for_outbound_decoded_messages = kwargs.get('enable_nrr_for_outbound_decoded_messages', None) + self.enable_nrr_for_inbound_mdn = kwargs.get('enable_nrr_for_inbound_mdn', None) + self.sha2_algorithm_format = kwargs.get('sha2_algorithm_format', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/as2_security_settings_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/as2_security_settings_py3.py new file mode 100644 index 000000000000..3dc2473c7ff8 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/as2_security_settings_py3.py @@ -0,0 +1,85 @@ +# 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 AS2SecuritySettings(Model): + """The AS2 agreement security settings. + + All required parameters must be populated in order to send to Azure. + + :param override_group_signing_certificate: Required. The value indicating + whether to send or request a MDN. + :type override_group_signing_certificate: bool + :param signing_certificate_name: The name of the signing certificate. + :type signing_certificate_name: str + :param encryption_certificate_name: The name of the encryption + certificate. + :type encryption_certificate_name: str + :param enable_nrr_for_inbound_encoded_messages: Required. The value + indicating whether to enable NRR for inbound encoded messages. + :type enable_nrr_for_inbound_encoded_messages: bool + :param enable_nrr_for_inbound_decoded_messages: Required. The value + indicating whether to enable NRR for inbound decoded messages. + :type enable_nrr_for_inbound_decoded_messages: bool + :param enable_nrr_for_outbound_mdn: Required. The value indicating whether + to enable NRR for outbound MDN. + :type enable_nrr_for_outbound_mdn: bool + :param enable_nrr_for_outbound_encoded_messages: Required. The value + indicating whether to enable NRR for outbound encoded messages. + :type enable_nrr_for_outbound_encoded_messages: bool + :param enable_nrr_for_outbound_decoded_messages: Required. The value + indicating whether to enable NRR for outbound decoded messages. + :type enable_nrr_for_outbound_decoded_messages: bool + :param enable_nrr_for_inbound_mdn: Required. The value indicating whether + to enable NRR for inbound MDN. + :type enable_nrr_for_inbound_mdn: bool + :param sha2_algorithm_format: The Sha2 algorithm format. Valid values are + Sha2, ShaHashSize, ShaHyphenHashSize, Sha2UnderscoreHashSize. + :type sha2_algorithm_format: str + """ + + _validation = { + 'override_group_signing_certificate': {'required': True}, + 'enable_nrr_for_inbound_encoded_messages': {'required': True}, + 'enable_nrr_for_inbound_decoded_messages': {'required': True}, + 'enable_nrr_for_outbound_mdn': {'required': True}, + 'enable_nrr_for_outbound_encoded_messages': {'required': True}, + 'enable_nrr_for_outbound_decoded_messages': {'required': True}, + 'enable_nrr_for_inbound_mdn': {'required': True}, + } + + _attribute_map = { + 'override_group_signing_certificate': {'key': 'overrideGroupSigningCertificate', 'type': 'bool'}, + 'signing_certificate_name': {'key': 'signingCertificateName', 'type': 'str'}, + 'encryption_certificate_name': {'key': 'encryptionCertificateName', 'type': 'str'}, + 'enable_nrr_for_inbound_encoded_messages': {'key': 'enableNrrForInboundEncodedMessages', 'type': 'bool'}, + 'enable_nrr_for_inbound_decoded_messages': {'key': 'enableNrrForInboundDecodedMessages', 'type': 'bool'}, + 'enable_nrr_for_outbound_mdn': {'key': 'enableNrrForOutboundMdn', 'type': 'bool'}, + 'enable_nrr_for_outbound_encoded_messages': {'key': 'enableNrrForOutboundEncodedMessages', 'type': 'bool'}, + 'enable_nrr_for_outbound_decoded_messages': {'key': 'enableNrrForOutboundDecodedMessages', 'type': 'bool'}, + 'enable_nrr_for_inbound_mdn': {'key': 'enableNrrForInboundMdn', 'type': 'bool'}, + 'sha2_algorithm_format': {'key': 'sha2AlgorithmFormat', 'type': 'str'}, + } + + def __init__(self, *, override_group_signing_certificate: bool, enable_nrr_for_inbound_encoded_messages: bool, enable_nrr_for_inbound_decoded_messages: bool, enable_nrr_for_outbound_mdn: bool, enable_nrr_for_outbound_encoded_messages: bool, enable_nrr_for_outbound_decoded_messages: bool, enable_nrr_for_inbound_mdn: bool, signing_certificate_name: str=None, encryption_certificate_name: str=None, sha2_algorithm_format: str=None, **kwargs) -> None: + super(AS2SecuritySettings, self).__init__(**kwargs) + self.override_group_signing_certificate = override_group_signing_certificate + self.signing_certificate_name = signing_certificate_name + self.encryption_certificate_name = encryption_certificate_name + self.enable_nrr_for_inbound_encoded_messages = enable_nrr_for_inbound_encoded_messages + self.enable_nrr_for_inbound_decoded_messages = enable_nrr_for_inbound_decoded_messages + self.enable_nrr_for_outbound_mdn = enable_nrr_for_outbound_mdn + self.enable_nrr_for_outbound_encoded_messages = enable_nrr_for_outbound_encoded_messages + self.enable_nrr_for_outbound_decoded_messages = enable_nrr_for_outbound_decoded_messages + self.enable_nrr_for_inbound_mdn = enable_nrr_for_inbound_mdn + self.sha2_algorithm_format = sha2_algorithm_format diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/as2_validation_settings.py b/azure-mgmt-logic/azure/mgmt/logic/models/as2_validation_settings.py old mode 100755 new mode 100644 index f1950b7ced38..42acb57ff48a --- a/azure-mgmt-logic/azure/mgmt/logic/models/as2_validation_settings.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/as2_validation_settings.py @@ -15,39 +15,40 @@ class AS2ValidationSettings(Model): """The AS2 agreement validation settings. - :param override_message_properties: The value indicating whether to - override incoming message properties with those in agreement. + All required parameters must be populated in order to send to Azure. + + :param override_message_properties: Required. The value indicating whether + to override incoming message properties with those in agreement. :type override_message_properties: bool - :param encrypt_message: The value indicating whether the message has to be - encrypted. + :param encrypt_message: Required. The value indicating whether the message + has to be encrypted. :type encrypt_message: bool - :param sign_message: The value indicating whether the message has to be - signed. + :param sign_message: Required. The value indicating whether the message + has to be signed. :type sign_message: bool - :param compress_message: The value indicating whether the message has to - be compressed. + :param compress_message: Required. The value indicating whether the + message has to be compressed. :type compress_message: bool - :param check_duplicate_message: The value indicating whether to check for - duplicate message. + :param check_duplicate_message: Required. The value indicating whether to + check for duplicate message. :type check_duplicate_message: bool - :param interchange_duplicates_validity_days: The number of days to look - back for duplicate interchange. + :param interchange_duplicates_validity_days: Required. The number of days + to look back for duplicate interchange. :type interchange_duplicates_validity_days: int - :param check_certificate_revocation_list_on_send: The value indicating - whether to check for certificate revocation list on send. + :param check_certificate_revocation_list_on_send: Required. The value + indicating whether to check for certificate revocation list on send. :type check_certificate_revocation_list_on_send: bool - :param check_certificate_revocation_list_on_receive: The value indicating - whether to check for certificate revocation list on receive. + :param check_certificate_revocation_list_on_receive: Required. The value + indicating whether to check for certificate revocation list on receive. :type check_certificate_revocation_list_on_receive: bool - :param encryption_algorithm: The encryption algorithm. Possible values - include: 'NotSpecified', 'None', 'DES3', 'RC2', 'AES128', 'AES192', + :param encryption_algorithm: Required. The encryption algorithm. Possible + values include: 'NotSpecified', 'None', 'DES3', 'RC2', 'AES128', 'AES192', 'AES256' - :type encryption_algorithm: str or :class:`EncryptionAlgorithm - ` + :type encryption_algorithm: str or + ~azure.mgmt.logic.models.EncryptionAlgorithm :param signing_algorithm: The signing algorithm. Possible values include: 'NotSpecified', 'Default', 'SHA1', 'SHA2256', 'SHA2384', 'SHA2512' - :type signing_algorithm: str or :class:`SigningAlgorithm - ` + :type signing_algorithm: str or ~azure.mgmt.logic.models.SigningAlgorithm """ _validation = { @@ -75,14 +76,15 @@ class AS2ValidationSettings(Model): 'signing_algorithm': {'key': 'signingAlgorithm', 'type': 'str'}, } - def __init__(self, override_message_properties, encrypt_message, sign_message, compress_message, check_duplicate_message, interchange_duplicates_validity_days, check_certificate_revocation_list_on_send, check_certificate_revocation_list_on_receive, encryption_algorithm, signing_algorithm=None): - self.override_message_properties = override_message_properties - self.encrypt_message = encrypt_message - self.sign_message = sign_message - self.compress_message = compress_message - self.check_duplicate_message = check_duplicate_message - self.interchange_duplicates_validity_days = interchange_duplicates_validity_days - self.check_certificate_revocation_list_on_send = check_certificate_revocation_list_on_send - self.check_certificate_revocation_list_on_receive = check_certificate_revocation_list_on_receive - self.encryption_algorithm = encryption_algorithm - self.signing_algorithm = signing_algorithm + def __init__(self, **kwargs): + super(AS2ValidationSettings, self).__init__(**kwargs) + self.override_message_properties = kwargs.get('override_message_properties', None) + self.encrypt_message = kwargs.get('encrypt_message', None) + self.sign_message = kwargs.get('sign_message', None) + self.compress_message = kwargs.get('compress_message', None) + self.check_duplicate_message = kwargs.get('check_duplicate_message', None) + self.interchange_duplicates_validity_days = kwargs.get('interchange_duplicates_validity_days', None) + self.check_certificate_revocation_list_on_send = kwargs.get('check_certificate_revocation_list_on_send', None) + self.check_certificate_revocation_list_on_receive = kwargs.get('check_certificate_revocation_list_on_receive', None) + self.encryption_algorithm = kwargs.get('encryption_algorithm', None) + self.signing_algorithm = kwargs.get('signing_algorithm', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/as2_validation_settings_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/as2_validation_settings_py3.py new file mode 100644 index 000000000000..d56c1d9ce95f --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/as2_validation_settings_py3.py @@ -0,0 +1,90 @@ +# 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 AS2ValidationSettings(Model): + """The AS2 agreement validation settings. + + All required parameters must be populated in order to send to Azure. + + :param override_message_properties: Required. The value indicating whether + to override incoming message properties with those in agreement. + :type override_message_properties: bool + :param encrypt_message: Required. The value indicating whether the message + has to be encrypted. + :type encrypt_message: bool + :param sign_message: Required. The value indicating whether the message + has to be signed. + :type sign_message: bool + :param compress_message: Required. The value indicating whether the + message has to be compressed. + :type compress_message: bool + :param check_duplicate_message: Required. The value indicating whether to + check for duplicate message. + :type check_duplicate_message: bool + :param interchange_duplicates_validity_days: Required. The number of days + to look back for duplicate interchange. + :type interchange_duplicates_validity_days: int + :param check_certificate_revocation_list_on_send: Required. The value + indicating whether to check for certificate revocation list on send. + :type check_certificate_revocation_list_on_send: bool + :param check_certificate_revocation_list_on_receive: Required. The value + indicating whether to check for certificate revocation list on receive. + :type check_certificate_revocation_list_on_receive: bool + :param encryption_algorithm: Required. The encryption algorithm. Possible + values include: 'NotSpecified', 'None', 'DES3', 'RC2', 'AES128', 'AES192', + 'AES256' + :type encryption_algorithm: str or + ~azure.mgmt.logic.models.EncryptionAlgorithm + :param signing_algorithm: The signing algorithm. Possible values include: + 'NotSpecified', 'Default', 'SHA1', 'SHA2256', 'SHA2384', 'SHA2512' + :type signing_algorithm: str or ~azure.mgmt.logic.models.SigningAlgorithm + """ + + _validation = { + 'override_message_properties': {'required': True}, + 'encrypt_message': {'required': True}, + 'sign_message': {'required': True}, + 'compress_message': {'required': True}, + 'check_duplicate_message': {'required': True}, + 'interchange_duplicates_validity_days': {'required': True}, + 'check_certificate_revocation_list_on_send': {'required': True}, + 'check_certificate_revocation_list_on_receive': {'required': True}, + 'encryption_algorithm': {'required': True}, + } + + _attribute_map = { + 'override_message_properties': {'key': 'overrideMessageProperties', 'type': 'bool'}, + 'encrypt_message': {'key': 'encryptMessage', 'type': 'bool'}, + 'sign_message': {'key': 'signMessage', 'type': 'bool'}, + 'compress_message': {'key': 'compressMessage', 'type': 'bool'}, + 'check_duplicate_message': {'key': 'checkDuplicateMessage', 'type': 'bool'}, + 'interchange_duplicates_validity_days': {'key': 'interchangeDuplicatesValidityDays', 'type': 'int'}, + 'check_certificate_revocation_list_on_send': {'key': 'checkCertificateRevocationListOnSend', 'type': 'bool'}, + 'check_certificate_revocation_list_on_receive': {'key': 'checkCertificateRevocationListOnReceive', 'type': 'bool'}, + 'encryption_algorithm': {'key': 'encryptionAlgorithm', 'type': 'EncryptionAlgorithm'}, + 'signing_algorithm': {'key': 'signingAlgorithm', 'type': 'str'}, + } + + def __init__(self, *, override_message_properties: bool, encrypt_message: bool, sign_message: bool, compress_message: bool, check_duplicate_message: bool, interchange_duplicates_validity_days: int, check_certificate_revocation_list_on_send: bool, check_certificate_revocation_list_on_receive: bool, encryption_algorithm, signing_algorithm=None, **kwargs) -> None: + super(AS2ValidationSettings, self).__init__(**kwargs) + self.override_message_properties = override_message_properties + self.encrypt_message = encrypt_message + self.sign_message = sign_message + self.compress_message = compress_message + self.check_duplicate_message = check_duplicate_message + self.interchange_duplicates_validity_days = interchange_duplicates_validity_days + self.check_certificate_revocation_list_on_send = check_certificate_revocation_list_on_send + self.check_certificate_revocation_list_on_receive = check_certificate_revocation_list_on_receive + self.encryption_algorithm = encryption_algorithm + self.signing_algorithm = signing_algorithm diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/assembly_definition.py b/azure-mgmt-logic/azure/mgmt/logic/models/assembly_definition.py new file mode 100644 index 000000000000..0332e1a65491 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/assembly_definition.py @@ -0,0 +1,55 @@ +# 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 AssemblyDefinition(Resource): + """The assembly definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param properties: Required. The assembly properties. + :type properties: ~azure.mgmt.logic.models.AssemblyProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'AssemblyProperties'}, + } + + def __init__(self, **kwargs): + super(AssemblyDefinition, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/assembly_definition_paged.py b/azure-mgmt-logic/azure/mgmt/logic/models/assembly_definition_paged.py new file mode 100644 index 000000000000..fbe3cc995683 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/assembly_definition_paged.py @@ -0,0 +1,27 @@ +# 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 AssemblyDefinitionPaged(Paged): + """ + A paging container for iterating over a list of :class:`AssemblyDefinition ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AssemblyDefinition]'} + } + + def __init__(self, *args, **kwargs): + + super(AssemblyDefinitionPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/assembly_definition_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/assembly_definition_py3.py new file mode 100644 index 000000000000..e30c214c6a87 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/assembly_definition_py3.py @@ -0,0 +1,55 @@ +# 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 AssemblyDefinition(Resource): + """The assembly definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param properties: Required. The assembly properties. + :type properties: ~azure.mgmt.logic.models.AssemblyProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'AssemblyProperties'}, + } + + def __init__(self, *, properties, location: str=None, tags=None, **kwargs) -> None: + super(AssemblyDefinition, self).__init__(location=location, tags=tags, **kwargs) + self.properties = properties diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/assembly_properties.py b/azure-mgmt-logic/azure/mgmt/logic/models/assembly_properties.py new file mode 100644 index 000000000000..e6ec176ecf0a --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/assembly_properties.py @@ -0,0 +1,64 @@ +# 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 .artifact_content_properties_definition import ArtifactContentPropertiesDefinition + + +class AssemblyProperties(ArtifactContentPropertiesDefinition): + """The assembly properties definition. + + All required parameters must be populated in order to send to Azure. + + :param created_time: The artifact creation time. + :type created_time: datetime + :param changed_time: The artifact changed time. + :type changed_time: datetime + :param metadata: + :type metadata: object + :param content: + :type content: object + :param content_type: The content type. + :type content_type: str + :param content_link: The content link. + :type content_link: ~azure.mgmt.logic.models.ContentLink + :param assembly_name: Required. The assembly name. + :type assembly_name: str + :param assembly_version: The assembly version. + :type assembly_version: str + :param assembly_culture: The assembly culture. + :type assembly_culture: str + :param assembly_public_key_token: The assembly public key token. + :type assembly_public_key_token: str + """ + + _validation = { + 'assembly_name': {'required': True}, + } + + _attribute_map = { + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, + 'metadata': {'key': 'metadata', 'type': 'object'}, + 'content': {'key': 'content', 'type': 'object'}, + 'content_type': {'key': 'contentType', 'type': 'str'}, + 'content_link': {'key': 'contentLink', 'type': 'ContentLink'}, + 'assembly_name': {'key': 'assemblyName', 'type': 'str'}, + 'assembly_version': {'key': 'assemblyVersion', 'type': 'str'}, + 'assembly_culture': {'key': 'assemblyCulture', 'type': 'str'}, + 'assembly_public_key_token': {'key': 'assemblyPublicKeyToken', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AssemblyProperties, self).__init__(**kwargs) + self.assembly_name = kwargs.get('assembly_name', None) + self.assembly_version = kwargs.get('assembly_version', None) + self.assembly_culture = kwargs.get('assembly_culture', None) + self.assembly_public_key_token = kwargs.get('assembly_public_key_token', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/assembly_properties_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/assembly_properties_py3.py new file mode 100644 index 000000000000..a0676a264c9d --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/assembly_properties_py3.py @@ -0,0 +1,64 @@ +# 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 .artifact_content_properties_definition_py3 import ArtifactContentPropertiesDefinition + + +class AssemblyProperties(ArtifactContentPropertiesDefinition): + """The assembly properties definition. + + All required parameters must be populated in order to send to Azure. + + :param created_time: The artifact creation time. + :type created_time: datetime + :param changed_time: The artifact changed time. + :type changed_time: datetime + :param metadata: + :type metadata: object + :param content: + :type content: object + :param content_type: The content type. + :type content_type: str + :param content_link: The content link. + :type content_link: ~azure.mgmt.logic.models.ContentLink + :param assembly_name: Required. The assembly name. + :type assembly_name: str + :param assembly_version: The assembly version. + :type assembly_version: str + :param assembly_culture: The assembly culture. + :type assembly_culture: str + :param assembly_public_key_token: The assembly public key token. + :type assembly_public_key_token: str + """ + + _validation = { + 'assembly_name': {'required': True}, + } + + _attribute_map = { + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, + 'metadata': {'key': 'metadata', 'type': 'object'}, + 'content': {'key': 'content', 'type': 'object'}, + 'content_type': {'key': 'contentType', 'type': 'str'}, + 'content_link': {'key': 'contentLink', 'type': 'ContentLink'}, + 'assembly_name': {'key': 'assemblyName', 'type': 'str'}, + 'assembly_version': {'key': 'assemblyVersion', 'type': 'str'}, + 'assembly_culture': {'key': 'assemblyCulture', 'type': 'str'}, + 'assembly_public_key_token': {'key': 'assemblyPublicKeyToken', 'type': 'str'}, + } + + def __init__(self, *, assembly_name: str, created_time=None, changed_time=None, metadata=None, content=None, content_type: str=None, content_link=None, assembly_version: str=None, assembly_culture: str=None, assembly_public_key_token: str=None, **kwargs) -> None: + super(AssemblyProperties, self).__init__(created_time=created_time, changed_time=changed_time, metadata=metadata, content=content, content_type=content_type, content_link=content_link, **kwargs) + self.assembly_name = assembly_name + self.assembly_version = assembly_version + self.assembly_culture = assembly_culture + self.assembly_public_key_token = assembly_public_key_token diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/azure_resource_error_info.py b/azure-mgmt-logic/azure/mgmt/logic/models/azure_resource_error_info.py new file mode 100644 index 000000000000..ecec1dd28437 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/azure_resource_error_info.py @@ -0,0 +1,42 @@ +# 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 .error_info import ErrorInfo + + +class AzureResourceErrorInfo(ErrorInfo): + """The azure resource error info. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. The error code. + :type code: str + :param message: Required. The error message. + :type message: str + :param details: The error details. + :type details: list[~azure.mgmt.logic.models.AzureResourceErrorInfo] + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[AzureResourceErrorInfo]'}, + } + + def __init__(self, **kwargs): + super(AzureResourceErrorInfo, self).__init__(**kwargs) + self.message = kwargs.get('message', None) + self.details = kwargs.get('details', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/azure_resource_error_info_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/azure_resource_error_info_py3.py new file mode 100644 index 000000000000..cd39d5f68870 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/azure_resource_error_info_py3.py @@ -0,0 +1,42 @@ +# 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 .error_info_py3 import ErrorInfo + + +class AzureResourceErrorInfo(ErrorInfo): + """The azure resource error info. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. The error code. + :type code: str + :param message: Required. The error message. + :type message: str + :param details: The error details. + :type details: list[~azure.mgmt.logic.models.AzureResourceErrorInfo] + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[AzureResourceErrorInfo]'}, + } + + def __init__(self, *, code: str, message: str, details=None, **kwargs) -> None: + super(AzureResourceErrorInfo, self).__init__(code=code, **kwargs) + self.message = message + self.details = details diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/b2_bpartner_content.py b/azure-mgmt-logic/azure/mgmt/logic/models/b2_bpartner_content.py old mode 100755 new mode 100644 index 1703eff7cd3e..ede9238ab529 --- a/azure-mgmt-logic/azure/mgmt/logic/models/b2_bpartner_content.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/b2_bpartner_content.py @@ -16,13 +16,13 @@ class B2BPartnerContent(Model): """The B2B partner content. :param business_identities: The list of partner business identities. - :type business_identities: list of :class:`BusinessIdentity - ` + :type business_identities: list[~azure.mgmt.logic.models.BusinessIdentity] """ _attribute_map = { 'business_identities': {'key': 'businessIdentities', 'type': '[BusinessIdentity]'}, } - def __init__(self, business_identities=None): - self.business_identities = business_identities + def __init__(self, **kwargs): + super(B2BPartnerContent, self).__init__(**kwargs) + self.business_identities = kwargs.get('business_identities', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/b2_bpartner_content_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/b2_bpartner_content_py3.py new file mode 100644 index 000000000000..7563514fe683 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/b2_bpartner_content_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class B2BPartnerContent(Model): + """The B2B partner content. + + :param business_identities: The list of partner business identities. + :type business_identities: list[~azure.mgmt.logic.models.BusinessIdentity] + """ + + _attribute_map = { + 'business_identities': {'key': 'businessIdentities', 'type': '[BusinessIdentity]'}, + } + + def __init__(self, *, business_identities=None, **kwargs) -> None: + super(B2BPartnerContent, self).__init__(**kwargs) + self.business_identities = business_identities diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/batch_configuration.py b/azure-mgmt-logic/azure/mgmt/logic/models/batch_configuration.py new file mode 100644 index 000000000000..12920895e108 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/batch_configuration.py @@ -0,0 +1,55 @@ +# 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 BatchConfiguration(Resource): + """The batch configuration resource definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param properties: Required. The batch configuration properties. + :type properties: ~azure.mgmt.logic.models.BatchConfigurationProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'BatchConfigurationProperties'}, + } + + def __init__(self, **kwargs): + super(BatchConfiguration, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/batch_configuration_paged.py b/azure-mgmt-logic/azure/mgmt/logic/models/batch_configuration_paged.py new file mode 100644 index 000000000000..965308916323 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/batch_configuration_paged.py @@ -0,0 +1,27 @@ +# 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 BatchConfigurationPaged(Paged): + """ + A paging container for iterating over a list of :class:`BatchConfiguration ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[BatchConfiguration]'} + } + + def __init__(self, *args, **kwargs): + + super(BatchConfigurationPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/batch_configuration_properties.py b/azure-mgmt-logic/azure/mgmt/logic/models/batch_configuration_properties.py new file mode 100644 index 000000000000..8b3038836ccb --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/batch_configuration_properties.py @@ -0,0 +1,48 @@ +# 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 .artifact_properties import ArtifactProperties + + +class BatchConfigurationProperties(ArtifactProperties): + """The batch configuration properties definition. + + All required parameters must be populated in order to send to Azure. + + :param created_time: The artifact creation time. + :type created_time: datetime + :param changed_time: The artifact changed time. + :type changed_time: datetime + :param metadata: + :type metadata: object + :param batch_group_name: Required. The name of the batch group. + :type batch_group_name: str + :param release_criteria: Required. The batch release criteria. + :type release_criteria: ~azure.mgmt.logic.models.BatchReleaseCriteria + """ + + _validation = { + 'batch_group_name': {'required': True}, + 'release_criteria': {'required': True}, + } + + _attribute_map = { + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, + 'metadata': {'key': 'metadata', 'type': 'object'}, + 'batch_group_name': {'key': 'batchGroupName', 'type': 'str'}, + 'release_criteria': {'key': 'releaseCriteria', 'type': 'BatchReleaseCriteria'}, + } + + def __init__(self, **kwargs): + super(BatchConfigurationProperties, self).__init__(**kwargs) + self.batch_group_name = kwargs.get('batch_group_name', None) + self.release_criteria = kwargs.get('release_criteria', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/batch_configuration_properties_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/batch_configuration_properties_py3.py new file mode 100644 index 000000000000..5729113a66f3 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/batch_configuration_properties_py3.py @@ -0,0 +1,48 @@ +# 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 .artifact_properties_py3 import ArtifactProperties + + +class BatchConfigurationProperties(ArtifactProperties): + """The batch configuration properties definition. + + All required parameters must be populated in order to send to Azure. + + :param created_time: The artifact creation time. + :type created_time: datetime + :param changed_time: The artifact changed time. + :type changed_time: datetime + :param metadata: + :type metadata: object + :param batch_group_name: Required. The name of the batch group. + :type batch_group_name: str + :param release_criteria: Required. The batch release criteria. + :type release_criteria: ~azure.mgmt.logic.models.BatchReleaseCriteria + """ + + _validation = { + 'batch_group_name': {'required': True}, + 'release_criteria': {'required': True}, + } + + _attribute_map = { + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, + 'metadata': {'key': 'metadata', 'type': 'object'}, + 'batch_group_name': {'key': 'batchGroupName', 'type': 'str'}, + 'release_criteria': {'key': 'releaseCriteria', 'type': 'BatchReleaseCriteria'}, + } + + def __init__(self, *, batch_group_name: str, release_criteria, created_time=None, changed_time=None, metadata=None, **kwargs) -> None: + super(BatchConfigurationProperties, self).__init__(created_time=created_time, changed_time=changed_time, metadata=metadata, **kwargs) + self.batch_group_name = batch_group_name + self.release_criteria = release_criteria diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/batch_configuration_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/batch_configuration_py3.py new file mode 100644 index 000000000000..19dc6458274d --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/batch_configuration_py3.py @@ -0,0 +1,55 @@ +# 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 BatchConfiguration(Resource): + """The batch configuration resource definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param properties: Required. The batch configuration properties. + :type properties: ~azure.mgmt.logic.models.BatchConfigurationProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'BatchConfigurationProperties'}, + } + + def __init__(self, *, properties, location: str=None, tags=None, **kwargs) -> None: + super(BatchConfiguration, self).__init__(location=location, tags=tags, **kwargs) + self.properties = properties diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/batch_release_criteria.py b/azure-mgmt-logic/azure/mgmt/logic/models/batch_release_criteria.py new file mode 100644 index 000000000000..55217abd6e46 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/batch_release_criteria.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BatchReleaseCriteria(Model): + """The batch release criteria. + + :param message_count: The message count. + :type message_count: int + :param batch_size: The batch size in bytes. + :type batch_size: int + :param recurrence: The recurrence. + :type recurrence: ~azure.mgmt.logic.models.WorkflowTriggerRecurrence + """ + + _attribute_map = { + 'message_count': {'key': 'messageCount', 'type': 'int'}, + 'batch_size': {'key': 'batchSize', 'type': 'int'}, + 'recurrence': {'key': 'recurrence', 'type': 'WorkflowTriggerRecurrence'}, + } + + def __init__(self, **kwargs): + super(BatchReleaseCriteria, self).__init__(**kwargs) + self.message_count = kwargs.get('message_count', None) + self.batch_size = kwargs.get('batch_size', None) + self.recurrence = kwargs.get('recurrence', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/batch_release_criteria_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/batch_release_criteria_py3.py new file mode 100644 index 000000000000..33d596dc902c --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/batch_release_criteria_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BatchReleaseCriteria(Model): + """The batch release criteria. + + :param message_count: The message count. + :type message_count: int + :param batch_size: The batch size in bytes. + :type batch_size: int + :param recurrence: The recurrence. + :type recurrence: ~azure.mgmt.logic.models.WorkflowTriggerRecurrence + """ + + _attribute_map = { + 'message_count': {'key': 'messageCount', 'type': 'int'}, + 'batch_size': {'key': 'batchSize', 'type': 'int'}, + 'recurrence': {'key': 'recurrence', 'type': 'WorkflowTriggerRecurrence'}, + } + + def __init__(self, *, message_count: int=None, batch_size: int=None, recurrence=None, **kwargs) -> None: + super(BatchReleaseCriteria, self).__init__(**kwargs) + self.message_count = message_count + self.batch_size = batch_size + self.recurrence = recurrence diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/business_identity.py b/azure-mgmt-logic/azure/mgmt/logic/models/business_identity.py old mode 100755 new mode 100644 index 951bf116a5fe..f3ece263cff5 --- a/azure-mgmt-logic/azure/mgmt/logic/models/business_identity.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/business_identity.py @@ -15,10 +15,12 @@ class BusinessIdentity(Model): """The integration account partner's business identity. - :param qualifier: The business identity qualifier e.g. as2identity, ZZ, - ZZZ, 31, 32 + All required parameters must be populated in order to send to Azure. + + :param qualifier: Required. The business identity qualifier e.g. + as2identity, ZZ, ZZZ, 31, 32 :type qualifier: str - :param value: The user defined business identity value. + :param value: Required. The user defined business identity value. :type value: str """ @@ -32,6 +34,7 @@ class BusinessIdentity(Model): 'value': {'key': 'value', 'type': 'str'}, } - def __init__(self, qualifier, value): - self.qualifier = qualifier - self.value = value + def __init__(self, **kwargs): + super(BusinessIdentity, self).__init__(**kwargs) + self.qualifier = kwargs.get('qualifier', None) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/business_identity_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/business_identity_py3.py new file mode 100644 index 000000000000..41c27a99d299 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/business_identity_py3.py @@ -0,0 +1,40 @@ +# 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 BusinessIdentity(Model): + """The integration account partner's business identity. + + All required parameters must be populated in order to send to Azure. + + :param qualifier: Required. The business identity qualifier e.g. + as2identity, ZZ, ZZZ, 31, 32 + :type qualifier: str + :param value: Required. The user defined business identity value. + :type value: str + """ + + _validation = { + 'qualifier': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'qualifier': {'key': 'qualifier', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, qualifier: str, value: str, **kwargs) -> None: + super(BusinessIdentity, self).__init__(**kwargs) + self.qualifier = qualifier + self.value = value diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/callback_url.py b/azure-mgmt-logic/azure/mgmt/logic/models/callback_url.py old mode 100755 new mode 100644 index ea64eda116d8..0fe1f3a30647 --- a/azure-mgmt-logic/azure/mgmt/logic/models/callback_url.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/callback_url.py @@ -23,5 +23,6 @@ class CallbackUrl(Model): 'value': {'key': 'value', 'type': 'str'}, } - def __init__(self, value=None): - self.value = value + def __init__(self, **kwargs): + super(CallbackUrl, self).__init__(**kwargs) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/callback_url_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/callback_url_py3.py new file mode 100644 index 000000000000..fd8271657bef --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/callback_url_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CallbackUrl(Model): + """The callback url. + + :param value: The URL value. + :type value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, value: str=None, **kwargs) -> None: + super(CallbackUrl, self).__init__(**kwargs) + self.value = value diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/content_hash.py b/azure-mgmt-logic/azure/mgmt/logic/models/content_hash.py old mode 100755 new mode 100644 index ec6b433e371c..a67e06aafa7d --- a/azure-mgmt-logic/azure/mgmt/logic/models/content_hash.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/content_hash.py @@ -26,6 +26,7 @@ class ContentHash(Model): 'value': {'key': 'value', 'type': 'str'}, } - def __init__(self, algorithm=None, value=None): - self.algorithm = algorithm - self.value = value + def __init__(self, **kwargs): + super(ContentHash, self).__init__(**kwargs) + self.algorithm = kwargs.get('algorithm', None) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/content_hash_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/content_hash_py3.py new file mode 100644 index 000000000000..868bfe2ba5f2 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/content_hash_py3.py @@ -0,0 +1,32 @@ +# 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 ContentHash(Model): + """The content hash. + + :param algorithm: The algorithm of the content hash. + :type algorithm: str + :param value: The value of the content hash. + :type value: str + """ + + _attribute_map = { + 'algorithm': {'key': 'algorithm', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, algorithm: str=None, value: str=None, **kwargs) -> None: + super(ContentHash, self).__init__(**kwargs) + self.algorithm = algorithm + self.value = value diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/content_link.py b/azure-mgmt-logic/azure/mgmt/logic/models/content_link.py old mode 100755 new mode 100644 index 0410c028144c..cbbdefd771bf --- a/azure-mgmt-logic/azure/mgmt/logic/models/content_link.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/content_link.py @@ -22,8 +22,7 @@ class ContentLink(Model): :param content_size: The content size. :type content_size: long :param content_hash: The content hash. - :type content_hash: :class:`ContentHash - ` + :type content_hash: ~azure.mgmt.logic.models.ContentHash :param metadata: The metadata. :type metadata: object """ @@ -36,9 +35,10 @@ class ContentLink(Model): 'metadata': {'key': 'metadata', 'type': 'object'}, } - def __init__(self, uri=None, content_version=None, content_size=None, content_hash=None, metadata=None): - self.uri = uri - self.content_version = content_version - self.content_size = content_size - self.content_hash = content_hash - self.metadata = metadata + def __init__(self, **kwargs): + super(ContentLink, self).__init__(**kwargs) + self.uri = kwargs.get('uri', None) + self.content_version = kwargs.get('content_version', None) + self.content_size = kwargs.get('content_size', None) + self.content_hash = kwargs.get('content_hash', None) + self.metadata = kwargs.get('metadata', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/content_link_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/content_link_py3.py new file mode 100644 index 000000000000..1af59960aad2 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/content_link_py3.py @@ -0,0 +1,44 @@ +# 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 ContentLink(Model): + """The content link. + + :param uri: The content link URI. + :type uri: str + :param content_version: The content version. + :type content_version: str + :param content_size: The content size. + :type content_size: long + :param content_hash: The content hash. + :type content_hash: ~azure.mgmt.logic.models.ContentHash + :param metadata: The metadata. + :type metadata: object + """ + + _attribute_map = { + 'uri': {'key': 'uri', 'type': 'str'}, + 'content_version': {'key': 'contentVersion', 'type': 'str'}, + 'content_size': {'key': 'contentSize', 'type': 'long'}, + 'content_hash': {'key': 'contentHash', 'type': 'ContentHash'}, + 'metadata': {'key': 'metadata', 'type': 'object'}, + } + + def __init__(self, *, uri: str=None, content_version: str=None, content_size: int=None, content_hash=None, metadata=None, **kwargs) -> None: + super(ContentLink, self).__init__(**kwargs) + self.uri = uri + self.content_version = content_version + self.content_size = content_size + self.content_hash = content_hash + self.metadata = metadata diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/correlation.py b/azure-mgmt-logic/azure/mgmt/logic/models/correlation.py old mode 100755 new mode 100644 index 0855fec8b196..6712f294b086 --- a/azure-mgmt-logic/azure/mgmt/logic/models/correlation.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/correlation.py @@ -23,5 +23,6 @@ class Correlation(Model): 'client_tracking_id': {'key': 'clientTrackingId', 'type': 'str'}, } - def __init__(self, client_tracking_id=None): - self.client_tracking_id = client_tracking_id + def __init__(self, **kwargs): + super(Correlation, self).__init__(**kwargs) + self.client_tracking_id = kwargs.get('client_tracking_id', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/correlation_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/correlation_py3.py new file mode 100644 index 000000000000..8f4a03eef0f7 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/correlation_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Correlation(Model): + """The correlation property. + + :param client_tracking_id: The client tracking id. + :type client_tracking_id: str + """ + + _attribute_map = { + 'client_tracking_id': {'key': 'clientTrackingId', 'type': 'str'}, + } + + def __init__(self, *, client_tracking_id: str=None, **kwargs) -> None: + super(Correlation, self).__init__(**kwargs) + self.client_tracking_id = client_tracking_id diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_acknowledgement_settings.py b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_acknowledgement_settings.py old mode 100755 new mode 100644 index 82a0b98a0522..bf32720e1ab6 --- a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_acknowledgement_settings.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_acknowledgement_settings.py @@ -15,23 +15,25 @@ class EdifactAcknowledgementSettings(Model): """The Edifact agreement acknowledgement settings. - :param need_technical_acknowledgement: The value indicating whether - technical acknowledgement is needed. + All required parameters must be populated in order to send to Azure. + + :param need_technical_acknowledgement: Required. The value indicating + whether technical acknowledgement is needed. :type need_technical_acknowledgement: bool - :param batch_technical_acknowledgements: The value indicating whether to - batch the technical acknowledgements. + :param batch_technical_acknowledgements: Required. The value indicating + whether to batch the technical acknowledgements. :type batch_technical_acknowledgements: bool - :param need_functional_acknowledgement: The value indicating whether - functional acknowledgement is needed. + :param need_functional_acknowledgement: Required. The value indicating + whether functional acknowledgement is needed. :type need_functional_acknowledgement: bool - :param batch_functional_acknowledgements: The value indicating whether to - batch functional acknowledgements. + :param batch_functional_acknowledgements: Required. The value indicating + whether to batch functional acknowledgements. :type batch_functional_acknowledgements: bool - :param need_loop_for_valid_messages: The value indicating whether a loop - is needed for valid messages. + :param need_loop_for_valid_messages: Required. The value indicating + whether a loop is needed for valid messages. :type need_loop_for_valid_messages: bool - :param send_synchronous_acknowledgement: The value indicating whether to - send synchronous acknowledgement. + :param send_synchronous_acknowledgement: Required. The value indicating + whether to send synchronous acknowledgement. :type send_synchronous_acknowledgement: bool :param acknowledgement_control_number_prefix: The acknowledgement control number prefix. @@ -39,14 +41,14 @@ class EdifactAcknowledgementSettings(Model): :param acknowledgement_control_number_suffix: The acknowledgement control number suffix. :type acknowledgement_control_number_suffix: str - :param acknowledgement_control_number_lower_bound: The acknowledgement - control number lower bound. + :param acknowledgement_control_number_lower_bound: Required. The + acknowledgement control number lower bound. :type acknowledgement_control_number_lower_bound: int - :param acknowledgement_control_number_upper_bound: The acknowledgement - control number upper bound. + :param acknowledgement_control_number_upper_bound: Required. The + acknowledgement control number upper bound. :type acknowledgement_control_number_upper_bound: int - :param rollover_acknowledgement_control_number: The value indicating - whether to rollover acknowledgement control number. + :param rollover_acknowledgement_control_number: Required. The value + indicating whether to rollover acknowledgement control number. :type rollover_acknowledgement_control_number: bool """ @@ -76,15 +78,16 @@ class EdifactAcknowledgementSettings(Model): 'rollover_acknowledgement_control_number': {'key': 'rolloverAcknowledgementControlNumber', 'type': 'bool'}, } - def __init__(self, need_technical_acknowledgement, batch_technical_acknowledgements, need_functional_acknowledgement, batch_functional_acknowledgements, need_loop_for_valid_messages, send_synchronous_acknowledgement, acknowledgement_control_number_lower_bound, acknowledgement_control_number_upper_bound, rollover_acknowledgement_control_number, acknowledgement_control_number_prefix=None, acknowledgement_control_number_suffix=None): - self.need_technical_acknowledgement = need_technical_acknowledgement - self.batch_technical_acknowledgements = batch_technical_acknowledgements - self.need_functional_acknowledgement = need_functional_acknowledgement - self.batch_functional_acknowledgements = batch_functional_acknowledgements - self.need_loop_for_valid_messages = need_loop_for_valid_messages - self.send_synchronous_acknowledgement = send_synchronous_acknowledgement - self.acknowledgement_control_number_prefix = acknowledgement_control_number_prefix - self.acknowledgement_control_number_suffix = acknowledgement_control_number_suffix - self.acknowledgement_control_number_lower_bound = acknowledgement_control_number_lower_bound - self.acknowledgement_control_number_upper_bound = acknowledgement_control_number_upper_bound - self.rollover_acknowledgement_control_number = rollover_acknowledgement_control_number + def __init__(self, **kwargs): + super(EdifactAcknowledgementSettings, self).__init__(**kwargs) + self.need_technical_acknowledgement = kwargs.get('need_technical_acknowledgement', None) + self.batch_technical_acknowledgements = kwargs.get('batch_technical_acknowledgements', None) + self.need_functional_acknowledgement = kwargs.get('need_functional_acknowledgement', None) + self.batch_functional_acknowledgements = kwargs.get('batch_functional_acknowledgements', None) + self.need_loop_for_valid_messages = kwargs.get('need_loop_for_valid_messages', None) + self.send_synchronous_acknowledgement = kwargs.get('send_synchronous_acknowledgement', None) + self.acknowledgement_control_number_prefix = kwargs.get('acknowledgement_control_number_prefix', None) + self.acknowledgement_control_number_suffix = kwargs.get('acknowledgement_control_number_suffix', None) + self.acknowledgement_control_number_lower_bound = kwargs.get('acknowledgement_control_number_lower_bound', None) + self.acknowledgement_control_number_upper_bound = kwargs.get('acknowledgement_control_number_upper_bound', None) + self.rollover_acknowledgement_control_number = kwargs.get('rollover_acknowledgement_control_number', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_acknowledgement_settings_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_acknowledgement_settings_py3.py new file mode 100644 index 000000000000..3242b1565b47 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_acknowledgement_settings_py3.py @@ -0,0 +1,93 @@ +# 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 EdifactAcknowledgementSettings(Model): + """The Edifact agreement acknowledgement settings. + + All required parameters must be populated in order to send to Azure. + + :param need_technical_acknowledgement: Required. The value indicating + whether technical acknowledgement is needed. + :type need_technical_acknowledgement: bool + :param batch_technical_acknowledgements: Required. The value indicating + whether to batch the technical acknowledgements. + :type batch_technical_acknowledgements: bool + :param need_functional_acknowledgement: Required. The value indicating + whether functional acknowledgement is needed. + :type need_functional_acknowledgement: bool + :param batch_functional_acknowledgements: Required. The value indicating + whether to batch functional acknowledgements. + :type batch_functional_acknowledgements: bool + :param need_loop_for_valid_messages: Required. The value indicating + whether a loop is needed for valid messages. + :type need_loop_for_valid_messages: bool + :param send_synchronous_acknowledgement: Required. The value indicating + whether to send synchronous acknowledgement. + :type send_synchronous_acknowledgement: bool + :param acknowledgement_control_number_prefix: The acknowledgement control + number prefix. + :type acknowledgement_control_number_prefix: str + :param acknowledgement_control_number_suffix: The acknowledgement control + number suffix. + :type acknowledgement_control_number_suffix: str + :param acknowledgement_control_number_lower_bound: Required. The + acknowledgement control number lower bound. + :type acknowledgement_control_number_lower_bound: int + :param acknowledgement_control_number_upper_bound: Required. The + acknowledgement control number upper bound. + :type acknowledgement_control_number_upper_bound: int + :param rollover_acknowledgement_control_number: Required. The value + indicating whether to rollover acknowledgement control number. + :type rollover_acknowledgement_control_number: bool + """ + + _validation = { + 'need_technical_acknowledgement': {'required': True}, + 'batch_technical_acknowledgements': {'required': True}, + 'need_functional_acknowledgement': {'required': True}, + 'batch_functional_acknowledgements': {'required': True}, + 'need_loop_for_valid_messages': {'required': True}, + 'send_synchronous_acknowledgement': {'required': True}, + 'acknowledgement_control_number_lower_bound': {'required': True}, + 'acknowledgement_control_number_upper_bound': {'required': True}, + 'rollover_acknowledgement_control_number': {'required': True}, + } + + _attribute_map = { + 'need_technical_acknowledgement': {'key': 'needTechnicalAcknowledgement', 'type': 'bool'}, + 'batch_technical_acknowledgements': {'key': 'batchTechnicalAcknowledgements', 'type': 'bool'}, + 'need_functional_acknowledgement': {'key': 'needFunctionalAcknowledgement', 'type': 'bool'}, + 'batch_functional_acknowledgements': {'key': 'batchFunctionalAcknowledgements', 'type': 'bool'}, + 'need_loop_for_valid_messages': {'key': 'needLoopForValidMessages', 'type': 'bool'}, + 'send_synchronous_acknowledgement': {'key': 'sendSynchronousAcknowledgement', 'type': 'bool'}, + 'acknowledgement_control_number_prefix': {'key': 'acknowledgementControlNumberPrefix', 'type': 'str'}, + 'acknowledgement_control_number_suffix': {'key': 'acknowledgementControlNumberSuffix', 'type': 'str'}, + 'acknowledgement_control_number_lower_bound': {'key': 'acknowledgementControlNumberLowerBound', 'type': 'int'}, + 'acknowledgement_control_number_upper_bound': {'key': 'acknowledgementControlNumberUpperBound', 'type': 'int'}, + 'rollover_acknowledgement_control_number': {'key': 'rolloverAcknowledgementControlNumber', 'type': 'bool'}, + } + + def __init__(self, *, need_technical_acknowledgement: bool, batch_technical_acknowledgements: bool, need_functional_acknowledgement: bool, batch_functional_acknowledgements: bool, need_loop_for_valid_messages: bool, send_synchronous_acknowledgement: bool, acknowledgement_control_number_lower_bound: int, acknowledgement_control_number_upper_bound: int, rollover_acknowledgement_control_number: bool, acknowledgement_control_number_prefix: str=None, acknowledgement_control_number_suffix: str=None, **kwargs) -> None: + super(EdifactAcknowledgementSettings, self).__init__(**kwargs) + self.need_technical_acknowledgement = need_technical_acknowledgement + self.batch_technical_acknowledgements = batch_technical_acknowledgements + self.need_functional_acknowledgement = need_functional_acknowledgement + self.batch_functional_acknowledgements = batch_functional_acknowledgements + self.need_loop_for_valid_messages = need_loop_for_valid_messages + self.send_synchronous_acknowledgement = send_synchronous_acknowledgement + self.acknowledgement_control_number_prefix = acknowledgement_control_number_prefix + self.acknowledgement_control_number_suffix = acknowledgement_control_number_suffix + self.acknowledgement_control_number_lower_bound = acknowledgement_control_number_lower_bound + self.acknowledgement_control_number_upper_bound = acknowledgement_control_number_upper_bound + self.rollover_acknowledgement_control_number = rollover_acknowledgement_control_number diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_agreement_content.py b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_agreement_content.py old mode 100755 new mode 100644 index ebda85454d9c..e3c0bd495180 --- a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_agreement_content.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_agreement_content.py @@ -15,12 +15,12 @@ class EdifactAgreementContent(Model): """The Edifact agreement content. - :param receive_agreement: The EDIFACT one-way receive agreement. - :type receive_agreement: :class:`EdifactOneWayAgreement - ` - :param send_agreement: The EDIFACT one-way send agreement. - :type send_agreement: :class:`EdifactOneWayAgreement - ` + All required parameters must be populated in order to send to Azure. + + :param receive_agreement: Required. The EDIFACT one-way receive agreement. + :type receive_agreement: ~azure.mgmt.logic.models.EdifactOneWayAgreement + :param send_agreement: Required. The EDIFACT one-way send agreement. + :type send_agreement: ~azure.mgmt.logic.models.EdifactOneWayAgreement """ _validation = { @@ -33,6 +33,7 @@ class EdifactAgreementContent(Model): 'send_agreement': {'key': 'sendAgreement', 'type': 'EdifactOneWayAgreement'}, } - def __init__(self, receive_agreement, send_agreement): - self.receive_agreement = receive_agreement - self.send_agreement = send_agreement + def __init__(self, **kwargs): + super(EdifactAgreementContent, self).__init__(**kwargs) + self.receive_agreement = kwargs.get('receive_agreement', None) + self.send_agreement = kwargs.get('send_agreement', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_agreement_content_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_agreement_content_py3.py new file mode 100644 index 000000000000..2a19f44a6fa3 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_agreement_content_py3.py @@ -0,0 +1,39 @@ +# 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 EdifactAgreementContent(Model): + """The Edifact agreement content. + + All required parameters must be populated in order to send to Azure. + + :param receive_agreement: Required. The EDIFACT one-way receive agreement. + :type receive_agreement: ~azure.mgmt.logic.models.EdifactOneWayAgreement + :param send_agreement: Required. The EDIFACT one-way send agreement. + :type send_agreement: ~azure.mgmt.logic.models.EdifactOneWayAgreement + """ + + _validation = { + 'receive_agreement': {'required': True}, + 'send_agreement': {'required': True}, + } + + _attribute_map = { + 'receive_agreement': {'key': 'receiveAgreement', 'type': 'EdifactOneWayAgreement'}, + 'send_agreement': {'key': 'sendAgreement', 'type': 'EdifactOneWayAgreement'}, + } + + def __init__(self, *, receive_agreement, send_agreement, **kwargs) -> None: + super(EdifactAgreementContent, self).__init__(**kwargs) + self.receive_agreement = receive_agreement + self.send_agreement = send_agreement diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_delimiter_override.py b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_delimiter_override.py old mode 100755 new mode 100644 index 88dee2d9f461..9cab599afb9a --- a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_delimiter_override.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_delimiter_override.py @@ -15,29 +15,31 @@ class EdifactDelimiterOverride(Model): """The Edifact delimiter override settings. + All required parameters must be populated in order to send to Azure. + :param message_id: The message id. :type message_id: str :param message_version: The message version. :type message_version: str - :param message_release: The message releaseversion. + :param message_release: The message release. :type message_release: str - :param data_element_separator: The data element separator. + :param data_element_separator: Required. The data element separator. :type data_element_separator: int - :param component_separator: The component separator. + :param component_separator: Required. The component separator. :type component_separator: int - :param segment_terminator: The segment terminator. + :param segment_terminator: Required. The segment terminator. :type segment_terminator: int - :param repetition_separator: The repetition separator. + :param repetition_separator: Required. The repetition separator. :type repetition_separator: int - :param segment_terminator_suffix: The segment terminator suffix. Possible - values include: 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' - :type segment_terminator_suffix: str or :class:`SegmentTerminatorSuffix - ` - :param decimal_point_indicator: The decimal point indicator. Possible - values include: 'NotSpecified', 'Comma', 'Decimal' - :type decimal_point_indicator: str or :class:`EdifactDecimalIndicator - ` - :param release_indicator: The release indicator. + :param segment_terminator_suffix: Required. The segment terminator suffix. + Possible values include: 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' + :type segment_terminator_suffix: str or + ~azure.mgmt.logic.models.SegmentTerminatorSuffix + :param decimal_point_indicator: Required. The decimal point indicator. + Possible values include: 'NotSpecified', 'Comma', 'Decimal' + :type decimal_point_indicator: str or + ~azure.mgmt.logic.models.EdifactDecimalIndicator + :param release_indicator: Required. The release indicator. :type release_indicator: int :param message_association_assigned_code: The message association assigned code. @@ -72,16 +74,17 @@ class EdifactDelimiterOverride(Model): 'target_namespace': {'key': 'targetNamespace', 'type': 'str'}, } - def __init__(self, data_element_separator, component_separator, segment_terminator, repetition_separator, segment_terminator_suffix, decimal_point_indicator, release_indicator, message_id=None, message_version=None, message_release=None, message_association_assigned_code=None, target_namespace=None): - self.message_id = message_id - self.message_version = message_version - self.message_release = message_release - self.data_element_separator = data_element_separator - self.component_separator = component_separator - self.segment_terminator = segment_terminator - self.repetition_separator = repetition_separator - self.segment_terminator_suffix = segment_terminator_suffix - self.decimal_point_indicator = decimal_point_indicator - self.release_indicator = release_indicator - self.message_association_assigned_code = message_association_assigned_code - self.target_namespace = target_namespace + def __init__(self, **kwargs): + super(EdifactDelimiterOverride, self).__init__(**kwargs) + self.message_id = kwargs.get('message_id', None) + self.message_version = kwargs.get('message_version', None) + self.message_release = kwargs.get('message_release', None) + self.data_element_separator = kwargs.get('data_element_separator', None) + self.component_separator = kwargs.get('component_separator', None) + self.segment_terminator = kwargs.get('segment_terminator', None) + self.repetition_separator = kwargs.get('repetition_separator', None) + self.segment_terminator_suffix = kwargs.get('segment_terminator_suffix', None) + self.decimal_point_indicator = kwargs.get('decimal_point_indicator', None) + self.release_indicator = kwargs.get('release_indicator', None) + self.message_association_assigned_code = kwargs.get('message_association_assigned_code', None) + self.target_namespace = kwargs.get('target_namespace', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_delimiter_override_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_delimiter_override_py3.py new file mode 100644 index 000000000000..3d35e5e000a6 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_delimiter_override_py3.py @@ -0,0 +1,90 @@ +# 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 EdifactDelimiterOverride(Model): + """The Edifact delimiter override settings. + + All required parameters must be populated in order to send to Azure. + + :param message_id: The message id. + :type message_id: str + :param message_version: The message version. + :type message_version: str + :param message_release: The message release. + :type message_release: str + :param data_element_separator: Required. The data element separator. + :type data_element_separator: int + :param component_separator: Required. The component separator. + :type component_separator: int + :param segment_terminator: Required. The segment terminator. + :type segment_terminator: int + :param repetition_separator: Required. The repetition separator. + :type repetition_separator: int + :param segment_terminator_suffix: Required. The segment terminator suffix. + Possible values include: 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' + :type segment_terminator_suffix: str or + ~azure.mgmt.logic.models.SegmentTerminatorSuffix + :param decimal_point_indicator: Required. The decimal point indicator. + Possible values include: 'NotSpecified', 'Comma', 'Decimal' + :type decimal_point_indicator: str or + ~azure.mgmt.logic.models.EdifactDecimalIndicator + :param release_indicator: Required. The release indicator. + :type release_indicator: int + :param message_association_assigned_code: The message association assigned + code. + :type message_association_assigned_code: str + :param target_namespace: The target namespace on which this delimiter + settings has to be applied. + :type target_namespace: str + """ + + _validation = { + 'data_element_separator': {'required': True}, + 'component_separator': {'required': True}, + 'segment_terminator': {'required': True}, + 'repetition_separator': {'required': True}, + 'segment_terminator_suffix': {'required': True}, + 'decimal_point_indicator': {'required': True}, + 'release_indicator': {'required': True}, + } + + _attribute_map = { + 'message_id': {'key': 'messageId', 'type': 'str'}, + 'message_version': {'key': 'messageVersion', 'type': 'str'}, + 'message_release': {'key': 'messageRelease', 'type': 'str'}, + 'data_element_separator': {'key': 'dataElementSeparator', 'type': 'int'}, + 'component_separator': {'key': 'componentSeparator', 'type': 'int'}, + 'segment_terminator': {'key': 'segmentTerminator', 'type': 'int'}, + 'repetition_separator': {'key': 'repetitionSeparator', 'type': 'int'}, + 'segment_terminator_suffix': {'key': 'segmentTerminatorSuffix', 'type': 'SegmentTerminatorSuffix'}, + 'decimal_point_indicator': {'key': 'decimalPointIndicator', 'type': 'EdifactDecimalIndicator'}, + 'release_indicator': {'key': 'releaseIndicator', 'type': 'int'}, + 'message_association_assigned_code': {'key': 'messageAssociationAssignedCode', 'type': 'str'}, + 'target_namespace': {'key': 'targetNamespace', 'type': 'str'}, + } + + def __init__(self, *, data_element_separator: int, component_separator: int, segment_terminator: int, repetition_separator: int, segment_terminator_suffix, decimal_point_indicator, release_indicator: int, message_id: str=None, message_version: str=None, message_release: str=None, message_association_assigned_code: str=None, target_namespace: str=None, **kwargs) -> None: + super(EdifactDelimiterOverride, self).__init__(**kwargs) + self.message_id = message_id + self.message_version = message_version + self.message_release = message_release + self.data_element_separator = data_element_separator + self.component_separator = component_separator + self.segment_terminator = segment_terminator + self.repetition_separator = repetition_separator + self.segment_terminator_suffix = segment_terminator_suffix + self.decimal_point_indicator = decimal_point_indicator + self.release_indicator = release_indicator + self.message_association_assigned_code = message_association_assigned_code + self.target_namespace = target_namespace diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_envelope_override.py b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_envelope_override.py old mode 100755 new mode 100644 index 2d71b902f285..2b82b5560ed7 --- a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_envelope_override.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_envelope_override.py @@ -13,7 +13,7 @@ class EdifactEnvelopeOverride(Model): - """The Edifact enevlope override settings. + """The Edifact envelope override settings. :param message_id: The message id on which this envelope settings has to be applied. @@ -70,19 +70,20 @@ class EdifactEnvelopeOverride(Model): 'application_password': {'key': 'applicationPassword', 'type': 'str'}, } - def __init__(self, message_id=None, message_version=None, message_release=None, message_association_assigned_code=None, target_namespace=None, functional_group_id=None, sender_application_qualifier=None, sender_application_id=None, receiver_application_qualifier=None, receiver_application_id=None, controlling_agency_code=None, group_header_message_version=None, group_header_message_release=None, association_assigned_code=None, application_password=None): - self.message_id = message_id - self.message_version = message_version - self.message_release = message_release - self.message_association_assigned_code = message_association_assigned_code - self.target_namespace = target_namespace - self.functional_group_id = functional_group_id - self.sender_application_qualifier = sender_application_qualifier - self.sender_application_id = sender_application_id - self.receiver_application_qualifier = receiver_application_qualifier - self.receiver_application_id = receiver_application_id - self.controlling_agency_code = controlling_agency_code - self.group_header_message_version = group_header_message_version - self.group_header_message_release = group_header_message_release - self.association_assigned_code = association_assigned_code - self.application_password = application_password + def __init__(self, **kwargs): + super(EdifactEnvelopeOverride, self).__init__(**kwargs) + self.message_id = kwargs.get('message_id', None) + self.message_version = kwargs.get('message_version', None) + self.message_release = kwargs.get('message_release', None) + self.message_association_assigned_code = kwargs.get('message_association_assigned_code', None) + self.target_namespace = kwargs.get('target_namespace', None) + self.functional_group_id = kwargs.get('functional_group_id', None) + self.sender_application_qualifier = kwargs.get('sender_application_qualifier', None) + self.sender_application_id = kwargs.get('sender_application_id', None) + self.receiver_application_qualifier = kwargs.get('receiver_application_qualifier', None) + self.receiver_application_id = kwargs.get('receiver_application_id', None) + self.controlling_agency_code = kwargs.get('controlling_agency_code', None) + self.group_header_message_version = kwargs.get('group_header_message_version', None) + self.group_header_message_release = kwargs.get('group_header_message_release', None) + self.association_assigned_code = kwargs.get('association_assigned_code', None) + self.application_password = kwargs.get('application_password', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_envelope_override_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_envelope_override_py3.py new file mode 100644 index 000000000000..77fed1d1e51e --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_envelope_override_py3.py @@ -0,0 +1,89 @@ +# 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 EdifactEnvelopeOverride(Model): + """The Edifact envelope override settings. + + :param message_id: The message id on which this envelope settings has to + be applied. + :type message_id: str + :param message_version: The message version on which this envelope + settings has to be applied. + :type message_version: str + :param message_release: The message release version on which this envelope + settings has to be applied. + :type message_release: str + :param message_association_assigned_code: The message association assigned + code. + :type message_association_assigned_code: str + :param target_namespace: The target namespace on which this envelope + settings has to be applied. + :type target_namespace: str + :param functional_group_id: The functional group id. + :type functional_group_id: str + :param sender_application_qualifier: The sender application qualifier. + :type sender_application_qualifier: str + :param sender_application_id: The sender application id. + :type sender_application_id: str + :param receiver_application_qualifier: The receiver application qualifier. + :type receiver_application_qualifier: str + :param receiver_application_id: The receiver application id. + :type receiver_application_id: str + :param controlling_agency_code: The controlling agency code. + :type controlling_agency_code: str + :param group_header_message_version: The group header message version. + :type group_header_message_version: str + :param group_header_message_release: The group header message release. + :type group_header_message_release: str + :param association_assigned_code: The association assigned code. + :type association_assigned_code: str + :param application_password: The application password. + :type application_password: str + """ + + _attribute_map = { + 'message_id': {'key': 'messageId', 'type': 'str'}, + 'message_version': {'key': 'messageVersion', 'type': 'str'}, + 'message_release': {'key': 'messageRelease', 'type': 'str'}, + 'message_association_assigned_code': {'key': 'messageAssociationAssignedCode', 'type': 'str'}, + 'target_namespace': {'key': 'targetNamespace', 'type': 'str'}, + 'functional_group_id': {'key': 'functionalGroupId', 'type': 'str'}, + 'sender_application_qualifier': {'key': 'senderApplicationQualifier', 'type': 'str'}, + 'sender_application_id': {'key': 'senderApplicationId', 'type': 'str'}, + 'receiver_application_qualifier': {'key': 'receiverApplicationQualifier', 'type': 'str'}, + 'receiver_application_id': {'key': 'receiverApplicationId', 'type': 'str'}, + 'controlling_agency_code': {'key': 'controllingAgencyCode', 'type': 'str'}, + 'group_header_message_version': {'key': 'groupHeaderMessageVersion', 'type': 'str'}, + 'group_header_message_release': {'key': 'groupHeaderMessageRelease', 'type': 'str'}, + 'association_assigned_code': {'key': 'associationAssignedCode', 'type': 'str'}, + 'application_password': {'key': 'applicationPassword', 'type': 'str'}, + } + + def __init__(self, *, message_id: str=None, message_version: str=None, message_release: str=None, message_association_assigned_code: str=None, target_namespace: str=None, functional_group_id: str=None, sender_application_qualifier: str=None, sender_application_id: str=None, receiver_application_qualifier: str=None, receiver_application_id: str=None, controlling_agency_code: str=None, group_header_message_version: str=None, group_header_message_release: str=None, association_assigned_code: str=None, application_password: str=None, **kwargs) -> None: + super(EdifactEnvelopeOverride, self).__init__(**kwargs) + self.message_id = message_id + self.message_version = message_version + self.message_release = message_release + self.message_association_assigned_code = message_association_assigned_code + self.target_namespace = target_namespace + self.functional_group_id = functional_group_id + self.sender_application_qualifier = sender_application_qualifier + self.sender_application_id = sender_application_id + self.receiver_application_qualifier = receiver_application_qualifier + self.receiver_application_id = receiver_application_id + self.controlling_agency_code = controlling_agency_code + self.group_header_message_version = group_header_message_version + self.group_header_message_release = group_header_message_release + self.association_assigned_code = association_assigned_code + self.application_password = application_password diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_envelope_settings.py b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_envelope_settings.py old mode 100755 new mode 100644 index 57ce39e8804c..7ea218a53f18 --- a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_envelope_settings.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_envelope_settings.py @@ -15,19 +15,21 @@ class EdifactEnvelopeSettings(Model): """The Edifact agreement envelope settings. + All required parameters must be populated in order to send to Azure. + :param group_association_assigned_code: The group association assigned code. :type group_association_assigned_code: str :param communication_agreement_id: The communication agreement id. :type communication_agreement_id: str - :param apply_delimiter_string_advice: The value indicating whether to - apply delimiter string advice. + :param apply_delimiter_string_advice: Required. The value indicating + whether to apply delimiter string advice. :type apply_delimiter_string_advice: bool - :param create_grouping_segments: The value indicating whether to create - grouping segments. + :param create_grouping_segments: Required. The value indicating whether to + create grouping segments. :type create_grouping_segments: bool - :param enable_default_group_headers: The value indicating whether to - enable default group headers. + :param enable_default_group_headers: Required. The value indicating + whether to enable default group headers. :type enable_default_group_headers: bool :param recipient_reference_password_value: The recipient reference password value. @@ -39,14 +41,14 @@ class EdifactEnvelopeSettings(Model): :type application_reference_id: str :param processing_priority_code: The processing priority code. :type processing_priority_code: str - :param interchange_control_number_lower_bound: The interchange control - number lower bound. + :param interchange_control_number_lower_bound: Required. The interchange + control number lower bound. :type interchange_control_number_lower_bound: long - :param interchange_control_number_upper_bound: The interchange control - number upper bound. + :param interchange_control_number_upper_bound: Required. The interchange + control number upper bound. :type interchange_control_number_upper_bound: long - :param rollover_interchange_control_number: The value indicating whether - to rollover interchange control number. + :param rollover_interchange_control_number: Required. The value indicating + whether to rollover interchange control number. :type rollover_interchange_control_number: bool :param interchange_control_number_prefix: The interchange control number prefix. @@ -67,14 +69,14 @@ class EdifactEnvelopeSettings(Model): :type group_message_version: str :param group_message_release: The group message release. :type group_message_release: str - :param group_control_number_lower_bound: The group control number lower - bound. + :param group_control_number_lower_bound: Required. The group control + number lower bound. :type group_control_number_lower_bound: long - :param group_control_number_upper_bound: The group control number upper - bound. + :param group_control_number_upper_bound: Required. The group control + number upper bound. :type group_control_number_upper_bound: long - :param rollover_group_control_number: The value indicating whether to - rollover group control number. + :param rollover_group_control_number: Required. The value indicating + whether to rollover group control number. :type rollover_group_control_number: bool :param group_control_number_prefix: The group control number prefix. :type group_control_number_prefix: str @@ -92,8 +94,9 @@ class EdifactEnvelopeSettings(Model): :type group_application_sender_id: str :param group_application_password: The group application password. :type group_application_password: str - :param overwrite_existing_transaction_set_control_number: The value - indicating whether to overwrite existing transaction set control number. + :param overwrite_existing_transaction_set_control_number: Required. The + value indicating whether to overwrite existing transaction set control + number. :type overwrite_existing_transaction_set_control_number: bool :param transaction_set_control_number_prefix: The transaction set control number prefix. @@ -101,17 +104,17 @@ class EdifactEnvelopeSettings(Model): :param transaction_set_control_number_suffix: The transaction set control number suffix. :type transaction_set_control_number_suffix: str - :param transaction_set_control_number_lower_bound: The transaction set - control number lower bound. + :param transaction_set_control_number_lower_bound: Required. The + transaction set control number lower bound. :type transaction_set_control_number_lower_bound: long - :param transaction_set_control_number_upper_bound: The transaction set - control number upper bound. + :param transaction_set_control_number_upper_bound: Required. The + transaction set control number upper bound. :type transaction_set_control_number_upper_bound: long - :param rollover_transaction_set_control_number: The value indicating - whether to rollover transaction set control number. + :param rollover_transaction_set_control_number: Required. The value + indicating whether to rollover transaction set control number. :type rollover_transaction_set_control_number: bool - :param is_test_interchange: The value indicating whether the message is a - test interchange. + :param is_test_interchange: Required. The value indicating whether the + message is a test interchange. :type is_test_interchange: bool :param sender_internal_identification: The sender internal identification. :type sender_internal_identification: str @@ -187,45 +190,46 @@ class EdifactEnvelopeSettings(Model): 'receiver_internal_sub_identification': {'key': 'receiverInternalSubIdentification', 'type': 'str'}, } - def __init__(self, apply_delimiter_string_advice, create_grouping_segments, enable_default_group_headers, interchange_control_number_lower_bound, interchange_control_number_upper_bound, rollover_interchange_control_number, group_control_number_lower_bound, group_control_number_upper_bound, rollover_group_control_number, overwrite_existing_transaction_set_control_number, transaction_set_control_number_lower_bound, transaction_set_control_number_upper_bound, rollover_transaction_set_control_number, is_test_interchange, group_association_assigned_code=None, communication_agreement_id=None, recipient_reference_password_value=None, recipient_reference_password_qualifier=None, application_reference_id=None, processing_priority_code=None, interchange_control_number_prefix=None, interchange_control_number_suffix=None, sender_reverse_routing_address=None, receiver_reverse_routing_address=None, functional_group_id=None, group_controlling_agency_code=None, group_message_version=None, group_message_release=None, group_control_number_prefix=None, group_control_number_suffix=None, group_application_receiver_qualifier=None, group_application_receiver_id=None, group_application_sender_qualifier=None, group_application_sender_id=None, group_application_password=None, transaction_set_control_number_prefix=None, transaction_set_control_number_suffix=None, sender_internal_identification=None, sender_internal_sub_identification=None, receiver_internal_identification=None, receiver_internal_sub_identification=None): - self.group_association_assigned_code = group_association_assigned_code - self.communication_agreement_id = communication_agreement_id - self.apply_delimiter_string_advice = apply_delimiter_string_advice - self.create_grouping_segments = create_grouping_segments - self.enable_default_group_headers = enable_default_group_headers - self.recipient_reference_password_value = recipient_reference_password_value - self.recipient_reference_password_qualifier = recipient_reference_password_qualifier - self.application_reference_id = application_reference_id - self.processing_priority_code = processing_priority_code - self.interchange_control_number_lower_bound = interchange_control_number_lower_bound - self.interchange_control_number_upper_bound = interchange_control_number_upper_bound - self.rollover_interchange_control_number = rollover_interchange_control_number - self.interchange_control_number_prefix = interchange_control_number_prefix - self.interchange_control_number_suffix = interchange_control_number_suffix - self.sender_reverse_routing_address = sender_reverse_routing_address - self.receiver_reverse_routing_address = receiver_reverse_routing_address - self.functional_group_id = functional_group_id - self.group_controlling_agency_code = group_controlling_agency_code - self.group_message_version = group_message_version - self.group_message_release = group_message_release - self.group_control_number_lower_bound = group_control_number_lower_bound - self.group_control_number_upper_bound = group_control_number_upper_bound - self.rollover_group_control_number = rollover_group_control_number - self.group_control_number_prefix = group_control_number_prefix - self.group_control_number_suffix = group_control_number_suffix - self.group_application_receiver_qualifier = group_application_receiver_qualifier - self.group_application_receiver_id = group_application_receiver_id - self.group_application_sender_qualifier = group_application_sender_qualifier - self.group_application_sender_id = group_application_sender_id - self.group_application_password = group_application_password - self.overwrite_existing_transaction_set_control_number = overwrite_existing_transaction_set_control_number - self.transaction_set_control_number_prefix = transaction_set_control_number_prefix - self.transaction_set_control_number_suffix = transaction_set_control_number_suffix - self.transaction_set_control_number_lower_bound = transaction_set_control_number_lower_bound - self.transaction_set_control_number_upper_bound = transaction_set_control_number_upper_bound - self.rollover_transaction_set_control_number = rollover_transaction_set_control_number - self.is_test_interchange = is_test_interchange - self.sender_internal_identification = sender_internal_identification - self.sender_internal_sub_identification = sender_internal_sub_identification - self.receiver_internal_identification = receiver_internal_identification - self.receiver_internal_sub_identification = receiver_internal_sub_identification + def __init__(self, **kwargs): + super(EdifactEnvelopeSettings, self).__init__(**kwargs) + self.group_association_assigned_code = kwargs.get('group_association_assigned_code', None) + self.communication_agreement_id = kwargs.get('communication_agreement_id', None) + self.apply_delimiter_string_advice = kwargs.get('apply_delimiter_string_advice', None) + self.create_grouping_segments = kwargs.get('create_grouping_segments', None) + self.enable_default_group_headers = kwargs.get('enable_default_group_headers', None) + self.recipient_reference_password_value = kwargs.get('recipient_reference_password_value', None) + self.recipient_reference_password_qualifier = kwargs.get('recipient_reference_password_qualifier', None) + self.application_reference_id = kwargs.get('application_reference_id', None) + self.processing_priority_code = kwargs.get('processing_priority_code', None) + self.interchange_control_number_lower_bound = kwargs.get('interchange_control_number_lower_bound', None) + self.interchange_control_number_upper_bound = kwargs.get('interchange_control_number_upper_bound', None) + self.rollover_interchange_control_number = kwargs.get('rollover_interchange_control_number', None) + self.interchange_control_number_prefix = kwargs.get('interchange_control_number_prefix', None) + self.interchange_control_number_suffix = kwargs.get('interchange_control_number_suffix', None) + self.sender_reverse_routing_address = kwargs.get('sender_reverse_routing_address', None) + self.receiver_reverse_routing_address = kwargs.get('receiver_reverse_routing_address', None) + self.functional_group_id = kwargs.get('functional_group_id', None) + self.group_controlling_agency_code = kwargs.get('group_controlling_agency_code', None) + self.group_message_version = kwargs.get('group_message_version', None) + self.group_message_release = kwargs.get('group_message_release', None) + self.group_control_number_lower_bound = kwargs.get('group_control_number_lower_bound', None) + self.group_control_number_upper_bound = kwargs.get('group_control_number_upper_bound', None) + self.rollover_group_control_number = kwargs.get('rollover_group_control_number', None) + self.group_control_number_prefix = kwargs.get('group_control_number_prefix', None) + self.group_control_number_suffix = kwargs.get('group_control_number_suffix', None) + self.group_application_receiver_qualifier = kwargs.get('group_application_receiver_qualifier', None) + self.group_application_receiver_id = kwargs.get('group_application_receiver_id', None) + self.group_application_sender_qualifier = kwargs.get('group_application_sender_qualifier', None) + self.group_application_sender_id = kwargs.get('group_application_sender_id', None) + self.group_application_password = kwargs.get('group_application_password', None) + self.overwrite_existing_transaction_set_control_number = kwargs.get('overwrite_existing_transaction_set_control_number', None) + self.transaction_set_control_number_prefix = kwargs.get('transaction_set_control_number_prefix', None) + self.transaction_set_control_number_suffix = kwargs.get('transaction_set_control_number_suffix', None) + self.transaction_set_control_number_lower_bound = kwargs.get('transaction_set_control_number_lower_bound', None) + self.transaction_set_control_number_upper_bound = kwargs.get('transaction_set_control_number_upper_bound', None) + self.rollover_transaction_set_control_number = kwargs.get('rollover_transaction_set_control_number', None) + self.is_test_interchange = kwargs.get('is_test_interchange', None) + self.sender_internal_identification = kwargs.get('sender_internal_identification', None) + self.sender_internal_sub_identification = kwargs.get('sender_internal_sub_identification', None) + self.receiver_internal_identification = kwargs.get('receiver_internal_identification', None) + self.receiver_internal_sub_identification = kwargs.get('receiver_internal_sub_identification', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_envelope_settings_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_envelope_settings_py3.py new file mode 100644 index 000000000000..9c771ca5150f --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_envelope_settings_py3.py @@ -0,0 +1,235 @@ +# 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 EdifactEnvelopeSettings(Model): + """The Edifact agreement envelope settings. + + All required parameters must be populated in order to send to Azure. + + :param group_association_assigned_code: The group association assigned + code. + :type group_association_assigned_code: str + :param communication_agreement_id: The communication agreement id. + :type communication_agreement_id: str + :param apply_delimiter_string_advice: Required. The value indicating + whether to apply delimiter string advice. + :type apply_delimiter_string_advice: bool + :param create_grouping_segments: Required. The value indicating whether to + create grouping segments. + :type create_grouping_segments: bool + :param enable_default_group_headers: Required. The value indicating + whether to enable default group headers. + :type enable_default_group_headers: bool + :param recipient_reference_password_value: The recipient reference + password value. + :type recipient_reference_password_value: str + :param recipient_reference_password_qualifier: The recipient reference + password qualifier. + :type recipient_reference_password_qualifier: str + :param application_reference_id: The application reference id. + :type application_reference_id: str + :param processing_priority_code: The processing priority code. + :type processing_priority_code: str + :param interchange_control_number_lower_bound: Required. The interchange + control number lower bound. + :type interchange_control_number_lower_bound: long + :param interchange_control_number_upper_bound: Required. The interchange + control number upper bound. + :type interchange_control_number_upper_bound: long + :param rollover_interchange_control_number: Required. The value indicating + whether to rollover interchange control number. + :type rollover_interchange_control_number: bool + :param interchange_control_number_prefix: The interchange control number + prefix. + :type interchange_control_number_prefix: str + :param interchange_control_number_suffix: The interchange control number + suffix. + :type interchange_control_number_suffix: str + :param sender_reverse_routing_address: The sender reverse routing address. + :type sender_reverse_routing_address: str + :param receiver_reverse_routing_address: The receiver reverse routing + address. + :type receiver_reverse_routing_address: str + :param functional_group_id: The functional group id. + :type functional_group_id: str + :param group_controlling_agency_code: The group controlling agency code. + :type group_controlling_agency_code: str + :param group_message_version: The group message version. + :type group_message_version: str + :param group_message_release: The group message release. + :type group_message_release: str + :param group_control_number_lower_bound: Required. The group control + number lower bound. + :type group_control_number_lower_bound: long + :param group_control_number_upper_bound: Required. The group control + number upper bound. + :type group_control_number_upper_bound: long + :param rollover_group_control_number: Required. The value indicating + whether to rollover group control number. + :type rollover_group_control_number: bool + :param group_control_number_prefix: The group control number prefix. + :type group_control_number_prefix: str + :param group_control_number_suffix: The group control number suffix. + :type group_control_number_suffix: str + :param group_application_receiver_qualifier: The group application + receiver qualifier. + :type group_application_receiver_qualifier: str + :param group_application_receiver_id: The group application receiver id. + :type group_application_receiver_id: str + :param group_application_sender_qualifier: The group application sender + qualifier. + :type group_application_sender_qualifier: str + :param group_application_sender_id: The group application sender id. + :type group_application_sender_id: str + :param group_application_password: The group application password. + :type group_application_password: str + :param overwrite_existing_transaction_set_control_number: Required. The + value indicating whether to overwrite existing transaction set control + number. + :type overwrite_existing_transaction_set_control_number: bool + :param transaction_set_control_number_prefix: The transaction set control + number prefix. + :type transaction_set_control_number_prefix: str + :param transaction_set_control_number_suffix: The transaction set control + number suffix. + :type transaction_set_control_number_suffix: str + :param transaction_set_control_number_lower_bound: Required. The + transaction set control number lower bound. + :type transaction_set_control_number_lower_bound: long + :param transaction_set_control_number_upper_bound: Required. The + transaction set control number upper bound. + :type transaction_set_control_number_upper_bound: long + :param rollover_transaction_set_control_number: Required. The value + indicating whether to rollover transaction set control number. + :type rollover_transaction_set_control_number: bool + :param is_test_interchange: Required. The value indicating whether the + message is a test interchange. + :type is_test_interchange: bool + :param sender_internal_identification: The sender internal identification. + :type sender_internal_identification: str + :param sender_internal_sub_identification: The sender internal sub + identification. + :type sender_internal_sub_identification: str + :param receiver_internal_identification: The receiver internal + identification. + :type receiver_internal_identification: str + :param receiver_internal_sub_identification: The receiver internal sub + identification. + :type receiver_internal_sub_identification: str + """ + + _validation = { + 'apply_delimiter_string_advice': {'required': True}, + 'create_grouping_segments': {'required': True}, + 'enable_default_group_headers': {'required': True}, + 'interchange_control_number_lower_bound': {'required': True}, + 'interchange_control_number_upper_bound': {'required': True}, + 'rollover_interchange_control_number': {'required': True}, + 'group_control_number_lower_bound': {'required': True}, + 'group_control_number_upper_bound': {'required': True}, + 'rollover_group_control_number': {'required': True}, + 'overwrite_existing_transaction_set_control_number': {'required': True}, + 'transaction_set_control_number_lower_bound': {'required': True}, + 'transaction_set_control_number_upper_bound': {'required': True}, + 'rollover_transaction_set_control_number': {'required': True}, + 'is_test_interchange': {'required': True}, + } + + _attribute_map = { + 'group_association_assigned_code': {'key': 'groupAssociationAssignedCode', 'type': 'str'}, + 'communication_agreement_id': {'key': 'communicationAgreementId', 'type': 'str'}, + 'apply_delimiter_string_advice': {'key': 'applyDelimiterStringAdvice', 'type': 'bool'}, + 'create_grouping_segments': {'key': 'createGroupingSegments', 'type': 'bool'}, + 'enable_default_group_headers': {'key': 'enableDefaultGroupHeaders', 'type': 'bool'}, + 'recipient_reference_password_value': {'key': 'recipientReferencePasswordValue', 'type': 'str'}, + 'recipient_reference_password_qualifier': {'key': 'recipientReferencePasswordQualifier', 'type': 'str'}, + 'application_reference_id': {'key': 'applicationReferenceId', 'type': 'str'}, + 'processing_priority_code': {'key': 'processingPriorityCode', 'type': 'str'}, + 'interchange_control_number_lower_bound': {'key': 'interchangeControlNumberLowerBound', 'type': 'long'}, + 'interchange_control_number_upper_bound': {'key': 'interchangeControlNumberUpperBound', 'type': 'long'}, + 'rollover_interchange_control_number': {'key': 'rolloverInterchangeControlNumber', 'type': 'bool'}, + 'interchange_control_number_prefix': {'key': 'interchangeControlNumberPrefix', 'type': 'str'}, + 'interchange_control_number_suffix': {'key': 'interchangeControlNumberSuffix', 'type': 'str'}, + 'sender_reverse_routing_address': {'key': 'senderReverseRoutingAddress', 'type': 'str'}, + 'receiver_reverse_routing_address': {'key': 'receiverReverseRoutingAddress', 'type': 'str'}, + 'functional_group_id': {'key': 'functionalGroupId', 'type': 'str'}, + 'group_controlling_agency_code': {'key': 'groupControllingAgencyCode', 'type': 'str'}, + 'group_message_version': {'key': 'groupMessageVersion', 'type': 'str'}, + 'group_message_release': {'key': 'groupMessageRelease', 'type': 'str'}, + 'group_control_number_lower_bound': {'key': 'groupControlNumberLowerBound', 'type': 'long'}, + 'group_control_number_upper_bound': {'key': 'groupControlNumberUpperBound', 'type': 'long'}, + 'rollover_group_control_number': {'key': 'rolloverGroupControlNumber', 'type': 'bool'}, + 'group_control_number_prefix': {'key': 'groupControlNumberPrefix', 'type': 'str'}, + 'group_control_number_suffix': {'key': 'groupControlNumberSuffix', 'type': 'str'}, + 'group_application_receiver_qualifier': {'key': 'groupApplicationReceiverQualifier', 'type': 'str'}, + 'group_application_receiver_id': {'key': 'groupApplicationReceiverId', 'type': 'str'}, + 'group_application_sender_qualifier': {'key': 'groupApplicationSenderQualifier', 'type': 'str'}, + 'group_application_sender_id': {'key': 'groupApplicationSenderId', 'type': 'str'}, + 'group_application_password': {'key': 'groupApplicationPassword', 'type': 'str'}, + 'overwrite_existing_transaction_set_control_number': {'key': 'overwriteExistingTransactionSetControlNumber', 'type': 'bool'}, + 'transaction_set_control_number_prefix': {'key': 'transactionSetControlNumberPrefix', 'type': 'str'}, + 'transaction_set_control_number_suffix': {'key': 'transactionSetControlNumberSuffix', 'type': 'str'}, + 'transaction_set_control_number_lower_bound': {'key': 'transactionSetControlNumberLowerBound', 'type': 'long'}, + 'transaction_set_control_number_upper_bound': {'key': 'transactionSetControlNumberUpperBound', 'type': 'long'}, + 'rollover_transaction_set_control_number': {'key': 'rolloverTransactionSetControlNumber', 'type': 'bool'}, + 'is_test_interchange': {'key': 'isTestInterchange', 'type': 'bool'}, + 'sender_internal_identification': {'key': 'senderInternalIdentification', 'type': 'str'}, + 'sender_internal_sub_identification': {'key': 'senderInternalSubIdentification', 'type': 'str'}, + 'receiver_internal_identification': {'key': 'receiverInternalIdentification', 'type': 'str'}, + 'receiver_internal_sub_identification': {'key': 'receiverInternalSubIdentification', 'type': 'str'}, + } + + def __init__(self, *, apply_delimiter_string_advice: bool, create_grouping_segments: bool, enable_default_group_headers: bool, interchange_control_number_lower_bound: int, interchange_control_number_upper_bound: int, rollover_interchange_control_number: bool, group_control_number_lower_bound: int, group_control_number_upper_bound: int, rollover_group_control_number: bool, overwrite_existing_transaction_set_control_number: bool, transaction_set_control_number_lower_bound: int, transaction_set_control_number_upper_bound: int, rollover_transaction_set_control_number: bool, is_test_interchange: bool, group_association_assigned_code: str=None, communication_agreement_id: str=None, recipient_reference_password_value: str=None, recipient_reference_password_qualifier: str=None, application_reference_id: str=None, processing_priority_code: str=None, interchange_control_number_prefix: str=None, interchange_control_number_suffix: str=None, sender_reverse_routing_address: str=None, receiver_reverse_routing_address: str=None, functional_group_id: str=None, group_controlling_agency_code: str=None, group_message_version: str=None, group_message_release: str=None, group_control_number_prefix: str=None, group_control_number_suffix: str=None, group_application_receiver_qualifier: str=None, group_application_receiver_id: str=None, group_application_sender_qualifier: str=None, group_application_sender_id: str=None, group_application_password: str=None, transaction_set_control_number_prefix: str=None, transaction_set_control_number_suffix: str=None, sender_internal_identification: str=None, sender_internal_sub_identification: str=None, receiver_internal_identification: str=None, receiver_internal_sub_identification: str=None, **kwargs) -> None: + super(EdifactEnvelopeSettings, self).__init__(**kwargs) + self.group_association_assigned_code = group_association_assigned_code + self.communication_agreement_id = communication_agreement_id + self.apply_delimiter_string_advice = apply_delimiter_string_advice + self.create_grouping_segments = create_grouping_segments + self.enable_default_group_headers = enable_default_group_headers + self.recipient_reference_password_value = recipient_reference_password_value + self.recipient_reference_password_qualifier = recipient_reference_password_qualifier + self.application_reference_id = application_reference_id + self.processing_priority_code = processing_priority_code + self.interchange_control_number_lower_bound = interchange_control_number_lower_bound + self.interchange_control_number_upper_bound = interchange_control_number_upper_bound + self.rollover_interchange_control_number = rollover_interchange_control_number + self.interchange_control_number_prefix = interchange_control_number_prefix + self.interchange_control_number_suffix = interchange_control_number_suffix + self.sender_reverse_routing_address = sender_reverse_routing_address + self.receiver_reverse_routing_address = receiver_reverse_routing_address + self.functional_group_id = functional_group_id + self.group_controlling_agency_code = group_controlling_agency_code + self.group_message_version = group_message_version + self.group_message_release = group_message_release + self.group_control_number_lower_bound = group_control_number_lower_bound + self.group_control_number_upper_bound = group_control_number_upper_bound + self.rollover_group_control_number = rollover_group_control_number + self.group_control_number_prefix = group_control_number_prefix + self.group_control_number_suffix = group_control_number_suffix + self.group_application_receiver_qualifier = group_application_receiver_qualifier + self.group_application_receiver_id = group_application_receiver_id + self.group_application_sender_qualifier = group_application_sender_qualifier + self.group_application_sender_id = group_application_sender_id + self.group_application_password = group_application_password + self.overwrite_existing_transaction_set_control_number = overwrite_existing_transaction_set_control_number + self.transaction_set_control_number_prefix = transaction_set_control_number_prefix + self.transaction_set_control_number_suffix = transaction_set_control_number_suffix + self.transaction_set_control_number_lower_bound = transaction_set_control_number_lower_bound + self.transaction_set_control_number_upper_bound = transaction_set_control_number_upper_bound + self.rollover_transaction_set_control_number = rollover_transaction_set_control_number + self.is_test_interchange = is_test_interchange + self.sender_internal_identification = sender_internal_identification + self.sender_internal_sub_identification = sender_internal_sub_identification + self.receiver_internal_identification = receiver_internal_identification + self.receiver_internal_sub_identification = receiver_internal_sub_identification diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_framing_settings.py b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_framing_settings.py old mode 100755 new mode 100644 index 59bfcf4c3c91..f3e4c22b1e45 --- a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_framing_settings.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_framing_settings.py @@ -15,37 +15,40 @@ class EdifactFramingSettings(Model): """The Edifact agreement framing settings. + All required parameters must be populated in order to send to Azure. + :param service_code_list_directory_version: The service code list directory version. :type service_code_list_directory_version: str :param character_encoding: The character encoding. :type character_encoding: str - :param protocol_version: The protocol version. + :param protocol_version: Required. The protocol version. :type protocol_version: int - :param data_element_separator: The data element separator. + :param data_element_separator: Required. The data element separator. :type data_element_separator: int - :param component_separator: The component separator. + :param component_separator: Required. The component separator. :type component_separator: int - :param segment_terminator: The segment terminator. + :param segment_terminator: Required. The segment terminator. :type segment_terminator: int - :param release_indicator: The release indicator. + :param release_indicator: Required. The release indicator. :type release_indicator: int - :param repetition_separator: The repetition separator. + :param repetition_separator: Required. The repetition separator. :type repetition_separator: int - :param character_set: The EDIFACT frame setting characterSet. Possible - values include: 'NotSpecified', 'UNOB', 'UNOA', 'UNOC', 'UNOD', 'UNOE', - 'UNOF', 'UNOG', 'UNOH', 'UNOI', 'UNOJ', 'UNOK', 'UNOX', 'UNOY', 'KECA' - :type character_set: str or :class:`EdifactCharacterSet - ` - :param decimal_point_indicator: The EDIFACT frame setting decimal - indicator. Possible values include: 'NotSpecified', 'Comma', 'Decimal' - :type decimal_point_indicator: str or :class:`EdifactDecimalIndicator - ` - :param segment_terminator_suffix: The EDIFACT frame setting segment - terminator suffix. Possible values include: 'NotSpecified', 'None', 'CR', - 'LF', 'CRLF' - :type segment_terminator_suffix: str or :class:`SegmentTerminatorSuffix - ` + :param character_set: Required. The EDIFACT frame setting characterSet. + Possible values include: 'NotSpecified', 'UNOB', 'UNOA', 'UNOC', 'UNOD', + 'UNOE', 'UNOF', 'UNOG', 'UNOH', 'UNOI', 'UNOJ', 'UNOK', 'UNOX', 'UNOY', + 'KECA' + :type character_set: str or ~azure.mgmt.logic.models.EdifactCharacterSet + :param decimal_point_indicator: Required. The EDIFACT frame setting + decimal indicator. Possible values include: 'NotSpecified', 'Comma', + 'Decimal' + :type decimal_point_indicator: str or + ~azure.mgmt.logic.models.EdifactDecimalIndicator + :param segment_terminator_suffix: Required. The EDIFACT frame setting + segment terminator suffix. Possible values include: 'NotSpecified', + 'None', 'CR', 'LF', 'CRLF' + :type segment_terminator_suffix: str or + ~azure.mgmt.logic.models.SegmentTerminatorSuffix """ _validation = { @@ -74,15 +77,16 @@ class EdifactFramingSettings(Model): 'segment_terminator_suffix': {'key': 'segmentTerminatorSuffix', 'type': 'SegmentTerminatorSuffix'}, } - def __init__(self, protocol_version, data_element_separator, component_separator, segment_terminator, release_indicator, repetition_separator, character_set, decimal_point_indicator, segment_terminator_suffix, service_code_list_directory_version=None, character_encoding=None): - self.service_code_list_directory_version = service_code_list_directory_version - self.character_encoding = character_encoding - self.protocol_version = protocol_version - self.data_element_separator = data_element_separator - self.component_separator = component_separator - self.segment_terminator = segment_terminator - self.release_indicator = release_indicator - self.repetition_separator = repetition_separator - self.character_set = character_set - self.decimal_point_indicator = decimal_point_indicator - self.segment_terminator_suffix = segment_terminator_suffix + def __init__(self, **kwargs): + super(EdifactFramingSettings, self).__init__(**kwargs) + self.service_code_list_directory_version = kwargs.get('service_code_list_directory_version', None) + self.character_encoding = kwargs.get('character_encoding', None) + self.protocol_version = kwargs.get('protocol_version', None) + self.data_element_separator = kwargs.get('data_element_separator', None) + self.component_separator = kwargs.get('component_separator', None) + self.segment_terminator = kwargs.get('segment_terminator', None) + self.release_indicator = kwargs.get('release_indicator', None) + self.repetition_separator = kwargs.get('repetition_separator', None) + self.character_set = kwargs.get('character_set', None) + self.decimal_point_indicator = kwargs.get('decimal_point_indicator', None) + self.segment_terminator_suffix = kwargs.get('segment_terminator_suffix', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_framing_settings_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_framing_settings_py3.py new file mode 100644 index 000000000000..18db9195a80f --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_framing_settings_py3.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.serialization import Model + + +class EdifactFramingSettings(Model): + """The Edifact agreement framing settings. + + All required parameters must be populated in order to send to Azure. + + :param service_code_list_directory_version: The service code list + directory version. + :type service_code_list_directory_version: str + :param character_encoding: The character encoding. + :type character_encoding: str + :param protocol_version: Required. The protocol version. + :type protocol_version: int + :param data_element_separator: Required. The data element separator. + :type data_element_separator: int + :param component_separator: Required. The component separator. + :type component_separator: int + :param segment_terminator: Required. The segment terminator. + :type segment_terminator: int + :param release_indicator: Required. The release indicator. + :type release_indicator: int + :param repetition_separator: Required. The repetition separator. + :type repetition_separator: int + :param character_set: Required. The EDIFACT frame setting characterSet. + Possible values include: 'NotSpecified', 'UNOB', 'UNOA', 'UNOC', 'UNOD', + 'UNOE', 'UNOF', 'UNOG', 'UNOH', 'UNOI', 'UNOJ', 'UNOK', 'UNOX', 'UNOY', + 'KECA' + :type character_set: str or ~azure.mgmt.logic.models.EdifactCharacterSet + :param decimal_point_indicator: Required. The EDIFACT frame setting + decimal indicator. Possible values include: 'NotSpecified', 'Comma', + 'Decimal' + :type decimal_point_indicator: str or + ~azure.mgmt.logic.models.EdifactDecimalIndicator + :param segment_terminator_suffix: Required. The EDIFACT frame setting + segment terminator suffix. Possible values include: 'NotSpecified', + 'None', 'CR', 'LF', 'CRLF' + :type segment_terminator_suffix: str or + ~azure.mgmt.logic.models.SegmentTerminatorSuffix + """ + + _validation = { + 'protocol_version': {'required': True}, + 'data_element_separator': {'required': True}, + 'component_separator': {'required': True}, + 'segment_terminator': {'required': True}, + 'release_indicator': {'required': True}, + 'repetition_separator': {'required': True}, + 'character_set': {'required': True}, + 'decimal_point_indicator': {'required': True}, + 'segment_terminator_suffix': {'required': True}, + } + + _attribute_map = { + 'service_code_list_directory_version': {'key': 'serviceCodeListDirectoryVersion', 'type': 'str'}, + 'character_encoding': {'key': 'characterEncoding', 'type': 'str'}, + 'protocol_version': {'key': 'protocolVersion', 'type': 'int'}, + 'data_element_separator': {'key': 'dataElementSeparator', 'type': 'int'}, + 'component_separator': {'key': 'componentSeparator', 'type': 'int'}, + 'segment_terminator': {'key': 'segmentTerminator', 'type': 'int'}, + 'release_indicator': {'key': 'releaseIndicator', 'type': 'int'}, + 'repetition_separator': {'key': 'repetitionSeparator', 'type': 'int'}, + 'character_set': {'key': 'characterSet', 'type': 'EdifactCharacterSet'}, + 'decimal_point_indicator': {'key': 'decimalPointIndicator', 'type': 'EdifactDecimalIndicator'}, + 'segment_terminator_suffix': {'key': 'segmentTerminatorSuffix', 'type': 'SegmentTerminatorSuffix'}, + } + + def __init__(self, *, protocol_version: int, data_element_separator: int, component_separator: int, segment_terminator: int, release_indicator: int, repetition_separator: int, character_set, decimal_point_indicator, segment_terminator_suffix, service_code_list_directory_version: str=None, character_encoding: str=None, **kwargs) -> None: + super(EdifactFramingSettings, self).__init__(**kwargs) + self.service_code_list_directory_version = service_code_list_directory_version + self.character_encoding = character_encoding + self.protocol_version = protocol_version + self.data_element_separator = data_element_separator + self.component_separator = component_separator + self.segment_terminator = segment_terminator + self.release_indicator = release_indicator + self.repetition_separator = repetition_separator + self.character_set = character_set + self.decimal_point_indicator = decimal_point_indicator + self.segment_terminator_suffix = segment_terminator_suffix diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_message_filter.py b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_message_filter.py old mode 100755 new mode 100644 index cdaaf318444b..7eb3d9865ef6 --- a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_message_filter.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_message_filter.py @@ -15,10 +15,12 @@ class EdifactMessageFilter(Model): """The Edifact message filter for odata query. - :param message_filter_type: The message filter type. Possible values - include: 'NotSpecified', 'Include', 'Exclude' - :type message_filter_type: str or :class:`MessageFilterType - ` + All required parameters must be populated in order to send to Azure. + + :param message_filter_type: Required. The message filter type. Possible + values include: 'NotSpecified', 'Include', 'Exclude' + :type message_filter_type: str or + ~azure.mgmt.logic.models.MessageFilterType """ _validation = { @@ -29,5 +31,6 @@ class EdifactMessageFilter(Model): 'message_filter_type': {'key': 'messageFilterType', 'type': 'MessageFilterType'}, } - def __init__(self, message_filter_type): - self.message_filter_type = message_filter_type + def __init__(self, **kwargs): + super(EdifactMessageFilter, self).__init__(**kwargs) + self.message_filter_type = kwargs.get('message_filter_type', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_message_filter_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_message_filter_py3.py new file mode 100644 index 000000000000..bcfcfd3c6a44 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_message_filter_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EdifactMessageFilter(Model): + """The Edifact message filter for odata query. + + All required parameters must be populated in order to send to Azure. + + :param message_filter_type: Required. The message filter type. Possible + values include: 'NotSpecified', 'Include', 'Exclude' + :type message_filter_type: str or + ~azure.mgmt.logic.models.MessageFilterType + """ + + _validation = { + 'message_filter_type': {'required': True}, + } + + _attribute_map = { + 'message_filter_type': {'key': 'messageFilterType', 'type': 'MessageFilterType'}, + } + + def __init__(self, *, message_filter_type, **kwargs) -> None: + super(EdifactMessageFilter, self).__init__(**kwargs) + self.message_filter_type = message_filter_type diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_message_identifier.py b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_message_identifier.py old mode 100755 new mode 100644 index cfd53f36a79f..1aac0d7f82cc --- a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_message_identifier.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_message_identifier.py @@ -15,8 +15,10 @@ class EdifactMessageIdentifier(Model): """The Edifact message identifier. - :param message_id: The message id on which this envelope settings has to - be applied. + All required parameters must be populated in order to send to Azure. + + :param message_id: Required. The message id on which this envelope + settings has to be applied. :type message_id: str """ @@ -28,5 +30,6 @@ class EdifactMessageIdentifier(Model): 'message_id': {'key': 'messageId', 'type': 'str'}, } - def __init__(self, message_id): - self.message_id = message_id + def __init__(self, **kwargs): + super(EdifactMessageIdentifier, self).__init__(**kwargs) + self.message_id = kwargs.get('message_id', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_message_identifier_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_message_identifier_py3.py new file mode 100644 index 000000000000..022f6017ace9 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_message_identifier_py3.py @@ -0,0 +1,35 @@ +# 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 EdifactMessageIdentifier(Model): + """The Edifact message identifier. + + All required parameters must be populated in order to send to Azure. + + :param message_id: Required. The message id on which this envelope + settings has to be applied. + :type message_id: str + """ + + _validation = { + 'message_id': {'required': True}, + } + + _attribute_map = { + 'message_id': {'key': 'messageId', 'type': 'str'}, + } + + def __init__(self, *, message_id: str, **kwargs) -> None: + super(EdifactMessageIdentifier, self).__init__(**kwargs) + self.message_id = message_id diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_one_way_agreement.py b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_one_way_agreement.py old mode 100755 new mode 100644 index 043c4a35e706..f5e2e18b2562 --- a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_one_way_agreement.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_one_way_agreement.py @@ -15,15 +15,16 @@ class EdifactOneWayAgreement(Model): """The Edifact one way agreement. - :param sender_business_identity: The sender business identity - :type sender_business_identity: :class:`BusinessIdentity - ` - :param receiver_business_identity: The receiver business identity - :type receiver_business_identity: :class:`BusinessIdentity - ` - :param protocol_settings: The EDIFACT protocol settings. - :type protocol_settings: :class:`EdifactProtocolSettings - ` + All required parameters must be populated in order to send to Azure. + + :param sender_business_identity: Required. The sender business identity + :type sender_business_identity: ~azure.mgmt.logic.models.BusinessIdentity + :param receiver_business_identity: Required. The receiver business + identity + :type receiver_business_identity: + ~azure.mgmt.logic.models.BusinessIdentity + :param protocol_settings: Required. The EDIFACT protocol settings. + :type protocol_settings: ~azure.mgmt.logic.models.EdifactProtocolSettings """ _validation = { @@ -38,7 +39,8 @@ class EdifactOneWayAgreement(Model): 'protocol_settings': {'key': 'protocolSettings', 'type': 'EdifactProtocolSettings'}, } - def __init__(self, sender_business_identity, receiver_business_identity, protocol_settings): - self.sender_business_identity = sender_business_identity - self.receiver_business_identity = receiver_business_identity - self.protocol_settings = protocol_settings + def __init__(self, **kwargs): + super(EdifactOneWayAgreement, self).__init__(**kwargs) + self.sender_business_identity = kwargs.get('sender_business_identity', None) + self.receiver_business_identity = kwargs.get('receiver_business_identity', None) + self.protocol_settings = kwargs.get('protocol_settings', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_one_way_agreement_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_one_way_agreement_py3.py new file mode 100644 index 000000000000..81fbd5025ec9 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_one_way_agreement_py3.py @@ -0,0 +1,46 @@ +# 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 EdifactOneWayAgreement(Model): + """The Edifact one way agreement. + + All required parameters must be populated in order to send to Azure. + + :param sender_business_identity: Required. The sender business identity + :type sender_business_identity: ~azure.mgmt.logic.models.BusinessIdentity + :param receiver_business_identity: Required. The receiver business + identity + :type receiver_business_identity: + ~azure.mgmt.logic.models.BusinessIdentity + :param protocol_settings: Required. The EDIFACT protocol settings. + :type protocol_settings: ~azure.mgmt.logic.models.EdifactProtocolSettings + """ + + _validation = { + 'sender_business_identity': {'required': True}, + 'receiver_business_identity': {'required': True}, + 'protocol_settings': {'required': True}, + } + + _attribute_map = { + 'sender_business_identity': {'key': 'senderBusinessIdentity', 'type': 'BusinessIdentity'}, + 'receiver_business_identity': {'key': 'receiverBusinessIdentity', 'type': 'BusinessIdentity'}, + 'protocol_settings': {'key': 'protocolSettings', 'type': 'EdifactProtocolSettings'}, + } + + def __init__(self, *, sender_business_identity, receiver_business_identity, protocol_settings, **kwargs) -> None: + super(EdifactOneWayAgreement, self).__init__(**kwargs) + self.sender_business_identity = sender_business_identity + self.receiver_business_identity = receiver_business_identity + self.protocol_settings = protocol_settings diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_processing_settings.py b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_processing_settings.py old mode 100755 new mode 100644 index 5b9c401dc31c..c1ee11a2f226 --- a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_processing_settings.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_processing_settings.py @@ -15,20 +15,22 @@ class EdifactProcessingSettings(Model): """The Edifact agreement protocol settings. - :param mask_security_info: The value indicating whether to mask security - information. + All required parameters must be populated in order to send to Azure. + + :param mask_security_info: Required. The value indicating whether to mask + security information. :type mask_security_info: bool - :param preserve_interchange: The value indicating whether to preserve - interchange. + :param preserve_interchange: Required. The value indicating whether to + preserve interchange. :type preserve_interchange: bool - :param suspend_interchange_on_error: The value indicating whether to - suspend interchange on error. + :param suspend_interchange_on_error: Required. The value indicating + whether to suspend interchange on error. :type suspend_interchange_on_error: bool - :param create_empty_xml_tags_for_trailing_separators: The value indicating - whether to create empty xml tags for trailing separators. + :param create_empty_xml_tags_for_trailing_separators: Required. The value + indicating whether to create empty xml tags for trailing separators. :type create_empty_xml_tags_for_trailing_separators: bool - :param use_dot_as_decimal_separator: The value indicating whether to use - dot as decimal separator. + :param use_dot_as_decimal_separator: Required. The value indicating + whether to use dot as decimal separator. :type use_dot_as_decimal_separator: bool """ @@ -48,9 +50,10 @@ class EdifactProcessingSettings(Model): 'use_dot_as_decimal_separator': {'key': 'useDotAsDecimalSeparator', 'type': 'bool'}, } - def __init__(self, mask_security_info, preserve_interchange, suspend_interchange_on_error, create_empty_xml_tags_for_trailing_separators, use_dot_as_decimal_separator): - self.mask_security_info = mask_security_info - self.preserve_interchange = preserve_interchange - self.suspend_interchange_on_error = suspend_interchange_on_error - self.create_empty_xml_tags_for_trailing_separators = create_empty_xml_tags_for_trailing_separators - self.use_dot_as_decimal_separator = use_dot_as_decimal_separator + def __init__(self, **kwargs): + super(EdifactProcessingSettings, self).__init__(**kwargs) + self.mask_security_info = kwargs.get('mask_security_info', None) + self.preserve_interchange = kwargs.get('preserve_interchange', None) + self.suspend_interchange_on_error = kwargs.get('suspend_interchange_on_error', None) + self.create_empty_xml_tags_for_trailing_separators = kwargs.get('create_empty_xml_tags_for_trailing_separators', None) + self.use_dot_as_decimal_separator = kwargs.get('use_dot_as_decimal_separator', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_processing_settings_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_processing_settings_py3.py new file mode 100644 index 000000000000..5beb418ea9c9 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_processing_settings_py3.py @@ -0,0 +1,59 @@ +# 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 EdifactProcessingSettings(Model): + """The Edifact agreement protocol settings. + + All required parameters must be populated in order to send to Azure. + + :param mask_security_info: Required. The value indicating whether to mask + security information. + :type mask_security_info: bool + :param preserve_interchange: Required. The value indicating whether to + preserve interchange. + :type preserve_interchange: bool + :param suspend_interchange_on_error: Required. The value indicating + whether to suspend interchange on error. + :type suspend_interchange_on_error: bool + :param create_empty_xml_tags_for_trailing_separators: Required. The value + indicating whether to create empty xml tags for trailing separators. + :type create_empty_xml_tags_for_trailing_separators: bool + :param use_dot_as_decimal_separator: Required. The value indicating + whether to use dot as decimal separator. + :type use_dot_as_decimal_separator: bool + """ + + _validation = { + 'mask_security_info': {'required': True}, + 'preserve_interchange': {'required': True}, + 'suspend_interchange_on_error': {'required': True}, + 'create_empty_xml_tags_for_trailing_separators': {'required': True}, + 'use_dot_as_decimal_separator': {'required': True}, + } + + _attribute_map = { + 'mask_security_info': {'key': 'maskSecurityInfo', 'type': 'bool'}, + 'preserve_interchange': {'key': 'preserveInterchange', 'type': 'bool'}, + 'suspend_interchange_on_error': {'key': 'suspendInterchangeOnError', 'type': 'bool'}, + 'create_empty_xml_tags_for_trailing_separators': {'key': 'createEmptyXmlTagsForTrailingSeparators', 'type': 'bool'}, + 'use_dot_as_decimal_separator': {'key': 'useDotAsDecimalSeparator', 'type': 'bool'}, + } + + def __init__(self, *, mask_security_info: bool, preserve_interchange: bool, suspend_interchange_on_error: bool, create_empty_xml_tags_for_trailing_separators: bool, use_dot_as_decimal_separator: bool, **kwargs) -> None: + super(EdifactProcessingSettings, self).__init__(**kwargs) + self.mask_security_info = mask_security_info + self.preserve_interchange = preserve_interchange + self.suspend_interchange_on_error = suspend_interchange_on_error + self.create_empty_xml_tags_for_trailing_separators = create_empty_xml_tags_for_trailing_separators + self.use_dot_as_decimal_separator = use_dot_as_decimal_separator diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_protocol_settings.py b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_protocol_settings.py old mode 100755 new mode 100644 index cbdcef7445d0..e61786f11f26 --- a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_protocol_settings.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_protocol_settings.py @@ -15,41 +15,40 @@ class EdifactProtocolSettings(Model): """The Edifact agreement protocol settings. - :param validation_settings: The EDIFACT validation settings. - :type validation_settings: :class:`EdifactValidationSettings - ` - :param framing_settings: The EDIFACT framing settings. - :type framing_settings: :class:`EdifactFramingSettings - ` - :param envelope_settings: The EDIFACT envelope settings. - :type envelope_settings: :class:`EdifactEnvelopeSettings - ` - :param acknowledgement_settings: The EDIFACT acknowledgement settings. - :type acknowledgement_settings: :class:`EdifactAcknowledgementSettings - ` - :param message_filter: The EDIFACT message filter. - :type message_filter: :class:`EdifactMessageFilter - ` - :param processing_settings: The EDIFACT processing Settings. - :type processing_settings: :class:`EdifactProcessingSettings - ` + All required parameters must be populated in order to send to Azure. + + :param validation_settings: Required. The EDIFACT validation settings. + :type validation_settings: + ~azure.mgmt.logic.models.EdifactValidationSettings + :param framing_settings: Required. The EDIFACT framing settings. + :type framing_settings: ~azure.mgmt.logic.models.EdifactFramingSettings + :param envelope_settings: Required. The EDIFACT envelope settings. + :type envelope_settings: ~azure.mgmt.logic.models.EdifactEnvelopeSettings + :param acknowledgement_settings: Required. The EDIFACT acknowledgement + settings. + :type acknowledgement_settings: + ~azure.mgmt.logic.models.EdifactAcknowledgementSettings + :param message_filter: Required. The EDIFACT message filter. + :type message_filter: ~azure.mgmt.logic.models.EdifactMessageFilter + :param processing_settings: Required. The EDIFACT processing Settings. + :type processing_settings: + ~azure.mgmt.logic.models.EdifactProcessingSettings :param envelope_overrides: The EDIFACT envelope override settings. - :type envelope_overrides: list of :class:`EdifactEnvelopeOverride - ` + :type envelope_overrides: + list[~azure.mgmt.logic.models.EdifactEnvelopeOverride] :param message_filter_list: The EDIFACT message filter list. - :type message_filter_list: list of :class:`EdifactMessageIdentifier - ` - :param schema_references: The EDIFACT schema references. - :type schema_references: list of :class:`EdifactSchemaReference - ` + :type message_filter_list: + list[~azure.mgmt.logic.models.EdifactMessageIdentifier] + :param schema_references: Required. The EDIFACT schema references. + :type schema_references: + list[~azure.mgmt.logic.models.EdifactSchemaReference] :param validation_overrides: The EDIFACT validation override settings. - :type validation_overrides: list of :class:`EdifactValidationOverride - ` + :type validation_overrides: + list[~azure.mgmt.logic.models.EdifactValidationOverride] :param edifact_delimiter_overrides: The EDIFACT delimiter override settings. - :type edifact_delimiter_overrides: list of - :class:`EdifactDelimiterOverride - ` + :type edifact_delimiter_overrides: + list[~azure.mgmt.logic.models.EdifactDelimiterOverride] """ _validation = { @@ -76,15 +75,16 @@ class EdifactProtocolSettings(Model): 'edifact_delimiter_overrides': {'key': 'edifactDelimiterOverrides', 'type': '[EdifactDelimiterOverride]'}, } - def __init__(self, validation_settings, framing_settings, envelope_settings, acknowledgement_settings, message_filter, processing_settings, schema_references, envelope_overrides=None, message_filter_list=None, validation_overrides=None, edifact_delimiter_overrides=None): - self.validation_settings = validation_settings - self.framing_settings = framing_settings - self.envelope_settings = envelope_settings - self.acknowledgement_settings = acknowledgement_settings - self.message_filter = message_filter - self.processing_settings = processing_settings - self.envelope_overrides = envelope_overrides - self.message_filter_list = message_filter_list - self.schema_references = schema_references - self.validation_overrides = validation_overrides - self.edifact_delimiter_overrides = edifact_delimiter_overrides + def __init__(self, **kwargs): + super(EdifactProtocolSettings, self).__init__(**kwargs) + self.validation_settings = kwargs.get('validation_settings', None) + self.framing_settings = kwargs.get('framing_settings', None) + self.envelope_settings = kwargs.get('envelope_settings', None) + self.acknowledgement_settings = kwargs.get('acknowledgement_settings', None) + self.message_filter = kwargs.get('message_filter', None) + self.processing_settings = kwargs.get('processing_settings', None) + self.envelope_overrides = kwargs.get('envelope_overrides', None) + self.message_filter_list = kwargs.get('message_filter_list', None) + self.schema_references = kwargs.get('schema_references', None) + self.validation_overrides = kwargs.get('validation_overrides', None) + self.edifact_delimiter_overrides = kwargs.get('edifact_delimiter_overrides', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_protocol_settings_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_protocol_settings_py3.py new file mode 100644 index 000000000000..37e81aeb0f3c --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_protocol_settings_py3.py @@ -0,0 +1,90 @@ +# 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 EdifactProtocolSettings(Model): + """The Edifact agreement protocol settings. + + All required parameters must be populated in order to send to Azure. + + :param validation_settings: Required. The EDIFACT validation settings. + :type validation_settings: + ~azure.mgmt.logic.models.EdifactValidationSettings + :param framing_settings: Required. The EDIFACT framing settings. + :type framing_settings: ~azure.mgmt.logic.models.EdifactFramingSettings + :param envelope_settings: Required. The EDIFACT envelope settings. + :type envelope_settings: ~azure.mgmt.logic.models.EdifactEnvelopeSettings + :param acknowledgement_settings: Required. The EDIFACT acknowledgement + settings. + :type acknowledgement_settings: + ~azure.mgmt.logic.models.EdifactAcknowledgementSettings + :param message_filter: Required. The EDIFACT message filter. + :type message_filter: ~azure.mgmt.logic.models.EdifactMessageFilter + :param processing_settings: Required. The EDIFACT processing Settings. + :type processing_settings: + ~azure.mgmt.logic.models.EdifactProcessingSettings + :param envelope_overrides: The EDIFACT envelope override settings. + :type envelope_overrides: + list[~azure.mgmt.logic.models.EdifactEnvelopeOverride] + :param message_filter_list: The EDIFACT message filter list. + :type message_filter_list: + list[~azure.mgmt.logic.models.EdifactMessageIdentifier] + :param schema_references: Required. The EDIFACT schema references. + :type schema_references: + list[~azure.mgmt.logic.models.EdifactSchemaReference] + :param validation_overrides: The EDIFACT validation override settings. + :type validation_overrides: + list[~azure.mgmt.logic.models.EdifactValidationOverride] + :param edifact_delimiter_overrides: The EDIFACT delimiter override + settings. + :type edifact_delimiter_overrides: + list[~azure.mgmt.logic.models.EdifactDelimiterOverride] + """ + + _validation = { + 'validation_settings': {'required': True}, + 'framing_settings': {'required': True}, + 'envelope_settings': {'required': True}, + 'acknowledgement_settings': {'required': True}, + 'message_filter': {'required': True}, + 'processing_settings': {'required': True}, + 'schema_references': {'required': True}, + } + + _attribute_map = { + 'validation_settings': {'key': 'validationSettings', 'type': 'EdifactValidationSettings'}, + 'framing_settings': {'key': 'framingSettings', 'type': 'EdifactFramingSettings'}, + 'envelope_settings': {'key': 'envelopeSettings', 'type': 'EdifactEnvelopeSettings'}, + 'acknowledgement_settings': {'key': 'acknowledgementSettings', 'type': 'EdifactAcknowledgementSettings'}, + 'message_filter': {'key': 'messageFilter', 'type': 'EdifactMessageFilter'}, + 'processing_settings': {'key': 'processingSettings', 'type': 'EdifactProcessingSettings'}, + 'envelope_overrides': {'key': 'envelopeOverrides', 'type': '[EdifactEnvelopeOverride]'}, + 'message_filter_list': {'key': 'messageFilterList', 'type': '[EdifactMessageIdentifier]'}, + 'schema_references': {'key': 'schemaReferences', 'type': '[EdifactSchemaReference]'}, + 'validation_overrides': {'key': 'validationOverrides', 'type': '[EdifactValidationOverride]'}, + 'edifact_delimiter_overrides': {'key': 'edifactDelimiterOverrides', 'type': '[EdifactDelimiterOverride]'}, + } + + def __init__(self, *, validation_settings, framing_settings, envelope_settings, acknowledgement_settings, message_filter, processing_settings, schema_references, envelope_overrides=None, message_filter_list=None, validation_overrides=None, edifact_delimiter_overrides=None, **kwargs) -> None: + super(EdifactProtocolSettings, self).__init__(**kwargs) + self.validation_settings = validation_settings + self.framing_settings = framing_settings + self.envelope_settings = envelope_settings + self.acknowledgement_settings = acknowledgement_settings + self.message_filter = message_filter + self.processing_settings = processing_settings + self.envelope_overrides = envelope_overrides + self.message_filter_list = message_filter_list + self.schema_references = schema_references + self.validation_overrides = validation_overrides + self.edifact_delimiter_overrides = edifact_delimiter_overrides diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_schema_reference.py b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_schema_reference.py old mode 100755 new mode 100644 index 21056933f385..7e994ce7fe52 --- a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_schema_reference.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_schema_reference.py @@ -15,11 +15,13 @@ class EdifactSchemaReference(Model): """The Edifact schema reference. - :param message_id: The message id. + All required parameters must be populated in order to send to Azure. + + :param message_id: Required. The message id. :type message_id: str - :param message_version: The message version. + :param message_version: Required. The message version. :type message_version: str - :param message_release: The message release version. + :param message_release: Required. The message release version. :type message_release: str :param sender_application_id: The sender application id. :type sender_application_id: str @@ -27,7 +29,7 @@ class EdifactSchemaReference(Model): :type sender_application_qualifier: str :param association_assigned_code: The association assigned code. :type association_assigned_code: str - :param schema_name: The schema name. + :param schema_name: Required. The schema name. :type schema_name: str """ @@ -48,11 +50,12 @@ class EdifactSchemaReference(Model): 'schema_name': {'key': 'schemaName', 'type': 'str'}, } - def __init__(self, message_id, message_version, message_release, schema_name, sender_application_id=None, sender_application_qualifier=None, association_assigned_code=None): - self.message_id = message_id - self.message_version = message_version - self.message_release = message_release - self.sender_application_id = sender_application_id - self.sender_application_qualifier = sender_application_qualifier - self.association_assigned_code = association_assigned_code - self.schema_name = schema_name + def __init__(self, **kwargs): + super(EdifactSchemaReference, self).__init__(**kwargs) + self.message_id = kwargs.get('message_id', None) + self.message_version = kwargs.get('message_version', None) + self.message_release = kwargs.get('message_release', None) + self.sender_application_id = kwargs.get('sender_application_id', None) + self.sender_application_qualifier = kwargs.get('sender_application_qualifier', None) + self.association_assigned_code = kwargs.get('association_assigned_code', None) + self.schema_name = kwargs.get('schema_name', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_schema_reference_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_schema_reference_py3.py new file mode 100644 index 000000000000..5f282f5e5a7e --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_schema_reference_py3.py @@ -0,0 +1,61 @@ +# 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 EdifactSchemaReference(Model): + """The Edifact schema reference. + + All required parameters must be populated in order to send to Azure. + + :param message_id: Required. The message id. + :type message_id: str + :param message_version: Required. The message version. + :type message_version: str + :param message_release: Required. The message release version. + :type message_release: str + :param sender_application_id: The sender application id. + :type sender_application_id: str + :param sender_application_qualifier: The sender application qualifier. + :type sender_application_qualifier: str + :param association_assigned_code: The association assigned code. + :type association_assigned_code: str + :param schema_name: Required. The schema name. + :type schema_name: str + """ + + _validation = { + 'message_id': {'required': True}, + 'message_version': {'required': True}, + 'message_release': {'required': True}, + 'schema_name': {'required': True}, + } + + _attribute_map = { + 'message_id': {'key': 'messageId', 'type': 'str'}, + 'message_version': {'key': 'messageVersion', 'type': 'str'}, + 'message_release': {'key': 'messageRelease', 'type': 'str'}, + 'sender_application_id': {'key': 'senderApplicationId', 'type': 'str'}, + 'sender_application_qualifier': {'key': 'senderApplicationQualifier', 'type': 'str'}, + 'association_assigned_code': {'key': 'associationAssignedCode', 'type': 'str'}, + 'schema_name': {'key': 'schemaName', 'type': 'str'}, + } + + def __init__(self, *, message_id: str, message_version: str, message_release: str, schema_name: str, sender_application_id: str=None, sender_application_qualifier: str=None, association_assigned_code: str=None, **kwargs) -> None: + super(EdifactSchemaReference, self).__init__(**kwargs) + self.message_id = message_id + self.message_version = message_version + self.message_release = message_release + self.sender_application_id = sender_application_id + self.sender_application_qualifier = sender_application_qualifier + self.association_assigned_code = association_assigned_code + self.schema_name = schema_name diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_validation_override.py b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_validation_override.py old mode 100755 new mode 100644 index 154deeeb7ca9..15044485db2c --- a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_validation_override.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_validation_override.py @@ -15,27 +15,30 @@ class EdifactValidationOverride(Model): """The Edifact validation override settings. - :param message_id: The message id on which the validation settings has to - be applied. + All required parameters must be populated in order to send to Azure. + + :param message_id: Required. The message id on which the validation + settings has to be applied. :type message_id: str - :param enforce_character_set: The value indicating whether to validate - character Set. + :param enforce_character_set: Required. The value indicating whether to + validate character Set. :type enforce_character_set: bool - :param validate_edi_types: The value indicating whether to validate EDI - types. + :param validate_edi_types: Required. The value indicating whether to + validate EDI types. :type validate_edi_types: bool - :param validate_xsd_types: The value indicating whether to validate XSD - types. + :param validate_xsd_types: Required. The value indicating whether to + validate XSD types. :type validate_xsd_types: bool - :param allow_leading_and_trailing_spaces_and_zeroes: The value indicating - whether to allow leading and trailing spaces and zeroes. + :param allow_leading_and_trailing_spaces_and_zeroes: Required. The value + indicating whether to allow leading and trailing spaces and zeroes. :type allow_leading_and_trailing_spaces_and_zeroes: bool - :param trailing_separator_policy: The trailing separator policy. Possible - values include: 'NotSpecified', 'NotAllowed', 'Optional', 'Mandatory' - :type trailing_separator_policy: str or :class:`TrailingSeparatorPolicy - ` - :param trim_leading_and_trailing_spaces_and_zeroes: The value indicating - whether to trim leading and trailing spaces and zeroes. + :param trailing_separator_policy: Required. The trailing separator policy. + Possible values include: 'NotSpecified', 'NotAllowed', 'Optional', + 'Mandatory' + :type trailing_separator_policy: str or + ~azure.mgmt.logic.models.TrailingSeparatorPolicy + :param trim_leading_and_trailing_spaces_and_zeroes: Required. The value + indicating whether to trim leading and trailing spaces and zeroes. :type trim_leading_and_trailing_spaces_and_zeroes: bool """ @@ -59,11 +62,12 @@ class EdifactValidationOverride(Model): 'trim_leading_and_trailing_spaces_and_zeroes': {'key': 'trimLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, } - def __init__(self, message_id, enforce_character_set, validate_edi_types, validate_xsd_types, allow_leading_and_trailing_spaces_and_zeroes, trailing_separator_policy, trim_leading_and_trailing_spaces_and_zeroes): - self.message_id = message_id - self.enforce_character_set = enforce_character_set - self.validate_edi_types = validate_edi_types - self.validate_xsd_types = validate_xsd_types - self.allow_leading_and_trailing_spaces_and_zeroes = allow_leading_and_trailing_spaces_and_zeroes - self.trailing_separator_policy = trailing_separator_policy - self.trim_leading_and_trailing_spaces_and_zeroes = trim_leading_and_trailing_spaces_and_zeroes + def __init__(self, **kwargs): + super(EdifactValidationOverride, self).__init__(**kwargs) + self.message_id = kwargs.get('message_id', None) + self.enforce_character_set = kwargs.get('enforce_character_set', None) + self.validate_edi_types = kwargs.get('validate_edi_types', None) + self.validate_xsd_types = kwargs.get('validate_xsd_types', None) + self.allow_leading_and_trailing_spaces_and_zeroes = kwargs.get('allow_leading_and_trailing_spaces_and_zeroes', None) + self.trailing_separator_policy = kwargs.get('trailing_separator_policy', None) + self.trim_leading_and_trailing_spaces_and_zeroes = kwargs.get('trim_leading_and_trailing_spaces_and_zeroes', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_validation_override_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_validation_override_py3.py new file mode 100644 index 000000000000..e7a62672e8d0 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_validation_override_py3.py @@ -0,0 +1,73 @@ +# 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 EdifactValidationOverride(Model): + """The Edifact validation override settings. + + All required parameters must be populated in order to send to Azure. + + :param message_id: Required. The message id on which the validation + settings has to be applied. + :type message_id: str + :param enforce_character_set: Required. The value indicating whether to + validate character Set. + :type enforce_character_set: bool + :param validate_edi_types: Required. The value indicating whether to + validate EDI types. + :type validate_edi_types: bool + :param validate_xsd_types: Required. The value indicating whether to + validate XSD types. + :type validate_xsd_types: bool + :param allow_leading_and_trailing_spaces_and_zeroes: Required. The value + indicating whether to allow leading and trailing spaces and zeroes. + :type allow_leading_and_trailing_spaces_and_zeroes: bool + :param trailing_separator_policy: Required. The trailing separator policy. + Possible values include: 'NotSpecified', 'NotAllowed', 'Optional', + 'Mandatory' + :type trailing_separator_policy: str or + ~azure.mgmt.logic.models.TrailingSeparatorPolicy + :param trim_leading_and_trailing_spaces_and_zeroes: Required. The value + indicating whether to trim leading and trailing spaces and zeroes. + :type trim_leading_and_trailing_spaces_and_zeroes: bool + """ + + _validation = { + 'message_id': {'required': True}, + 'enforce_character_set': {'required': True}, + 'validate_edi_types': {'required': True}, + 'validate_xsd_types': {'required': True}, + 'allow_leading_and_trailing_spaces_and_zeroes': {'required': True}, + 'trailing_separator_policy': {'required': True}, + 'trim_leading_and_trailing_spaces_and_zeroes': {'required': True}, + } + + _attribute_map = { + 'message_id': {'key': 'messageId', 'type': 'str'}, + 'enforce_character_set': {'key': 'enforceCharacterSet', 'type': 'bool'}, + 'validate_edi_types': {'key': 'validateEdiTypes', 'type': 'bool'}, + 'validate_xsd_types': {'key': 'validateXsdTypes', 'type': 'bool'}, + 'allow_leading_and_trailing_spaces_and_zeroes': {'key': 'allowLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, + 'trailing_separator_policy': {'key': 'trailingSeparatorPolicy', 'type': 'TrailingSeparatorPolicy'}, + 'trim_leading_and_trailing_spaces_and_zeroes': {'key': 'trimLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, + } + + def __init__(self, *, message_id: str, enforce_character_set: bool, validate_edi_types: bool, validate_xsd_types: bool, allow_leading_and_trailing_spaces_and_zeroes: bool, trailing_separator_policy, trim_leading_and_trailing_spaces_and_zeroes: bool, **kwargs) -> None: + super(EdifactValidationOverride, self).__init__(**kwargs) + self.message_id = message_id + self.enforce_character_set = enforce_character_set + self.validate_edi_types = validate_edi_types + self.validate_xsd_types = validate_xsd_types + self.allow_leading_and_trailing_spaces_and_zeroes = allow_leading_and_trailing_spaces_and_zeroes + self.trailing_separator_policy = trailing_separator_policy + self.trim_leading_and_trailing_spaces_and_zeroes = trim_leading_and_trailing_spaces_and_zeroes diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_validation_settings.py b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_validation_settings.py old mode 100755 new mode 100644 index 94eb228aad27..3918a817ef43 --- a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_validation_settings.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_validation_settings.py @@ -15,37 +15,40 @@ class EdifactValidationSettings(Model): """The Edifact agreement validation settings. - :param validate_character_set: The value indicating whether to validate - character set in the message. + All required parameters must be populated in order to send to Azure. + + :param validate_character_set: Required. The value indicating whether to + validate character set in the message. :type validate_character_set: bool - :param check_duplicate_interchange_control_number: The value indicating - whether to check for duplicate interchange control number. + :param check_duplicate_interchange_control_number: Required. The value + indicating whether to check for duplicate interchange control number. :type check_duplicate_interchange_control_number: bool - :param interchange_control_number_validity_days: The validity period of - interchange control number. + :param interchange_control_number_validity_days: Required. The validity + period of interchange control number. :type interchange_control_number_validity_days: int - :param check_duplicate_group_control_number: The value indicating whether - to check for duplicate group control number. + :param check_duplicate_group_control_number: Required. The value + indicating whether to check for duplicate group control number. :type check_duplicate_group_control_number: bool - :param check_duplicate_transaction_set_control_number: The value + :param check_duplicate_transaction_set_control_number: Required. The value indicating whether to check for duplicate transaction set control number. :type check_duplicate_transaction_set_control_number: bool - :param validate_edi_types: The value indicating whether to Whether to - validate EDI types. + :param validate_edi_types: Required. The value indicating whether to + Whether to validate EDI types. :type validate_edi_types: bool - :param validate_xsd_types: The value indicating whether to Whether to - validate XSD types. + :param validate_xsd_types: Required. The value indicating whether to + Whether to validate XSD types. :type validate_xsd_types: bool - :param allow_leading_and_trailing_spaces_and_zeroes: The value indicating - whether to allow leading and trailing spaces and zeroes. + :param allow_leading_and_trailing_spaces_and_zeroes: Required. The value + indicating whether to allow leading and trailing spaces and zeroes. :type allow_leading_and_trailing_spaces_and_zeroes: bool - :param trim_leading_and_trailing_spaces_and_zeroes: The value indicating - whether to trim leading and trailing spaces and zeroes. + :param trim_leading_and_trailing_spaces_and_zeroes: Required. The value + indicating whether to trim leading and trailing spaces and zeroes. :type trim_leading_and_trailing_spaces_and_zeroes: bool - :param trailing_separator_policy: The trailing separator policy. Possible - values include: 'NotSpecified', 'NotAllowed', 'Optional', 'Mandatory' - :type trailing_separator_policy: str or :class:`TrailingSeparatorPolicy - ` + :param trailing_separator_policy: Required. The trailing separator policy. + Possible values include: 'NotSpecified', 'NotAllowed', 'Optional', + 'Mandatory' + :type trailing_separator_policy: str or + ~azure.mgmt.logic.models.TrailingSeparatorPolicy """ _validation = { @@ -74,14 +77,15 @@ class EdifactValidationSettings(Model): 'trailing_separator_policy': {'key': 'trailingSeparatorPolicy', 'type': 'TrailingSeparatorPolicy'}, } - def __init__(self, validate_character_set, check_duplicate_interchange_control_number, interchange_control_number_validity_days, check_duplicate_group_control_number, check_duplicate_transaction_set_control_number, validate_edi_types, validate_xsd_types, allow_leading_and_trailing_spaces_and_zeroes, trim_leading_and_trailing_spaces_and_zeroes, trailing_separator_policy): - self.validate_character_set = validate_character_set - self.check_duplicate_interchange_control_number = check_duplicate_interchange_control_number - self.interchange_control_number_validity_days = interchange_control_number_validity_days - self.check_duplicate_group_control_number = check_duplicate_group_control_number - self.check_duplicate_transaction_set_control_number = check_duplicate_transaction_set_control_number - self.validate_edi_types = validate_edi_types - self.validate_xsd_types = validate_xsd_types - self.allow_leading_and_trailing_spaces_and_zeroes = allow_leading_and_trailing_spaces_and_zeroes - self.trim_leading_and_trailing_spaces_and_zeroes = trim_leading_and_trailing_spaces_and_zeroes - self.trailing_separator_policy = trailing_separator_policy + def __init__(self, **kwargs): + super(EdifactValidationSettings, self).__init__(**kwargs) + self.validate_character_set = kwargs.get('validate_character_set', None) + self.check_duplicate_interchange_control_number = kwargs.get('check_duplicate_interchange_control_number', None) + self.interchange_control_number_validity_days = kwargs.get('interchange_control_number_validity_days', None) + self.check_duplicate_group_control_number = kwargs.get('check_duplicate_group_control_number', None) + self.check_duplicate_transaction_set_control_number = kwargs.get('check_duplicate_transaction_set_control_number', None) + self.validate_edi_types = kwargs.get('validate_edi_types', None) + self.validate_xsd_types = kwargs.get('validate_xsd_types', None) + self.allow_leading_and_trailing_spaces_and_zeroes = kwargs.get('allow_leading_and_trailing_spaces_and_zeroes', None) + self.trim_leading_and_trailing_spaces_and_zeroes = kwargs.get('trim_leading_and_trailing_spaces_and_zeroes', None) + self.trailing_separator_policy = kwargs.get('trailing_separator_policy', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/edifact_validation_settings_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_validation_settings_py3.py new file mode 100644 index 000000000000..42d2215721ab --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/edifact_validation_settings_py3.py @@ -0,0 +1,91 @@ +# 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 EdifactValidationSettings(Model): + """The Edifact agreement validation settings. + + All required parameters must be populated in order to send to Azure. + + :param validate_character_set: Required. The value indicating whether to + validate character set in the message. + :type validate_character_set: bool + :param check_duplicate_interchange_control_number: Required. The value + indicating whether to check for duplicate interchange control number. + :type check_duplicate_interchange_control_number: bool + :param interchange_control_number_validity_days: Required. The validity + period of interchange control number. + :type interchange_control_number_validity_days: int + :param check_duplicate_group_control_number: Required. The value + indicating whether to check for duplicate group control number. + :type check_duplicate_group_control_number: bool + :param check_duplicate_transaction_set_control_number: Required. The value + indicating whether to check for duplicate transaction set control number. + :type check_duplicate_transaction_set_control_number: bool + :param validate_edi_types: Required. The value indicating whether to + Whether to validate EDI types. + :type validate_edi_types: bool + :param validate_xsd_types: Required. The value indicating whether to + Whether to validate XSD types. + :type validate_xsd_types: bool + :param allow_leading_and_trailing_spaces_and_zeroes: Required. The value + indicating whether to allow leading and trailing spaces and zeroes. + :type allow_leading_and_trailing_spaces_and_zeroes: bool + :param trim_leading_and_trailing_spaces_and_zeroes: Required. The value + indicating whether to trim leading and trailing spaces and zeroes. + :type trim_leading_and_trailing_spaces_and_zeroes: bool + :param trailing_separator_policy: Required. The trailing separator policy. + Possible values include: 'NotSpecified', 'NotAllowed', 'Optional', + 'Mandatory' + :type trailing_separator_policy: str or + ~azure.mgmt.logic.models.TrailingSeparatorPolicy + """ + + _validation = { + 'validate_character_set': {'required': True}, + 'check_duplicate_interchange_control_number': {'required': True}, + 'interchange_control_number_validity_days': {'required': True}, + 'check_duplicate_group_control_number': {'required': True}, + 'check_duplicate_transaction_set_control_number': {'required': True}, + 'validate_edi_types': {'required': True}, + 'validate_xsd_types': {'required': True}, + 'allow_leading_and_trailing_spaces_and_zeroes': {'required': True}, + 'trim_leading_and_trailing_spaces_and_zeroes': {'required': True}, + 'trailing_separator_policy': {'required': True}, + } + + _attribute_map = { + 'validate_character_set': {'key': 'validateCharacterSet', 'type': 'bool'}, + 'check_duplicate_interchange_control_number': {'key': 'checkDuplicateInterchangeControlNumber', 'type': 'bool'}, + 'interchange_control_number_validity_days': {'key': 'interchangeControlNumberValidityDays', 'type': 'int'}, + 'check_duplicate_group_control_number': {'key': 'checkDuplicateGroupControlNumber', 'type': 'bool'}, + 'check_duplicate_transaction_set_control_number': {'key': 'checkDuplicateTransactionSetControlNumber', 'type': 'bool'}, + 'validate_edi_types': {'key': 'validateEdiTypes', 'type': 'bool'}, + 'validate_xsd_types': {'key': 'validateXsdTypes', 'type': 'bool'}, + 'allow_leading_and_trailing_spaces_and_zeroes': {'key': 'allowLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, + 'trim_leading_and_trailing_spaces_and_zeroes': {'key': 'trimLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, + 'trailing_separator_policy': {'key': 'trailingSeparatorPolicy', 'type': 'TrailingSeparatorPolicy'}, + } + + def __init__(self, *, validate_character_set: bool, check_duplicate_interchange_control_number: bool, interchange_control_number_validity_days: int, check_duplicate_group_control_number: bool, check_duplicate_transaction_set_control_number: bool, validate_edi_types: bool, validate_xsd_types: bool, allow_leading_and_trailing_spaces_and_zeroes: bool, trim_leading_and_trailing_spaces_and_zeroes: bool, trailing_separator_policy, **kwargs) -> None: + super(EdifactValidationSettings, self).__init__(**kwargs) + self.validate_character_set = validate_character_set + self.check_duplicate_interchange_control_number = check_duplicate_interchange_control_number + self.interchange_control_number_validity_days = interchange_control_number_validity_days + self.check_duplicate_group_control_number = check_duplicate_group_control_number + self.check_duplicate_transaction_set_control_number = check_duplicate_transaction_set_control_number + self.validate_edi_types = validate_edi_types + self.validate_xsd_types = validate_xsd_types + self.allow_leading_and_trailing_spaces_and_zeroes = allow_leading_and_trailing_spaces_and_zeroes + self.trim_leading_and_trailing_spaces_and_zeroes = trim_leading_and_trailing_spaces_and_zeroes + self.trailing_separator_policy = trailing_separator_policy diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/error_info.py b/azure-mgmt-logic/azure/mgmt/logic/models/error_info.py new file mode 100644 index 000000000000..4e9b48e2796c --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/error_info.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ErrorInfo(Model): + """The error info. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. The error code. + :type code: str + """ + + _validation = { + 'code': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ErrorInfo, self).__init__(**kwargs) + self.code = kwargs.get('code', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/error_info_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/error_info_py3.py new file mode 100644 index 000000000000..e3c4ec9958ab --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/error_info_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ErrorInfo(Model): + """The error info. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. The error code. + :type code: str + """ + + _validation = { + 'code': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + } + + def __init__(self, *, code: str, **kwargs) -> None: + super(ErrorInfo, self).__init__(**kwargs) + self.code = code diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/error_properties.py b/azure-mgmt-logic/azure/mgmt/logic/models/error_properties.py old mode 100755 new mode 100644 index 36a74596df39..f774797075e0 --- a/azure-mgmt-logic/azure/mgmt/logic/models/error_properties.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/error_properties.py @@ -27,6 +27,7 @@ class ErrorProperties(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self, code=None, message=None): - self.code = code - self.message = message + def __init__(self, **kwargs): + super(ErrorProperties, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/error_properties_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/error_properties_py3.py new file mode 100644 index 000000000000..333f2a770740 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/error_properties_py3.py @@ -0,0 +1,33 @@ +# 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 ErrorProperties(Model): + """Error properties indicate why the Logic service was not able to process the + incoming request. The reason is provided in the error message. + + :param code: Error code. + :type code: str + :param message: Error message indicating why the operation failed. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: + super(ErrorProperties, self).__init__(**kwargs) + self.code = code + self.message = message diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/error_response.py b/azure-mgmt-logic/azure/mgmt/logic/models/error_response.py old mode 100755 new mode 100644 index da6fc7aa456e..76a7e8315595 --- a/azure-mgmt-logic/azure/mgmt/logic/models/error_response.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/error_response.py @@ -14,20 +14,20 @@ class ErrorResponse(Model): - """Error reponse indicates Logic service is not able to process the incoming + """Error response indicates Logic service is not able to process the incoming request. The error property contains the error details. :param error: The error properties. - :type error: :class:`ErrorProperties - ` + :type error: ~azure.mgmt.logic.models.ErrorProperties """ _attribute_map = { 'error': {'key': 'error', 'type': 'ErrorProperties'}, } - def __init__(self, error=None): - self.error = error + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.error = kwargs.get('error', None) class ErrorResponseException(HttpOperationError): diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/error_response_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/error_response_py3.py new file mode 100644 index 000000000000..8e081b09a2b0 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/error_response_py3.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class ErrorResponse(Model): + """Error response indicates Logic service is not able to process the incoming + request. The error property contains the error details. + + :param error: The error properties. + :type error: ~azure.mgmt.logic.models.ErrorProperties + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorProperties'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.error = error + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/expression.py b/azure-mgmt-logic/azure/mgmt/logic/models/expression.py new file mode 100644 index 000000000000..a67ba97cfc33 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/expression.py @@ -0,0 +1,40 @@ +# 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 Expression(Model): + """Expression. + + :param text: + :type text: str + :param value: + :type value: object + :param subexpressions: + :type subexpressions: list[~azure.mgmt.logic.models.Expression] + :param error: + :type error: ~azure.mgmt.logic.models.AzureResourceErrorInfo + """ + + _attribute_map = { + 'text': {'key': 'text', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'object'}, + 'subexpressions': {'key': 'subexpressions', 'type': '[Expression]'}, + 'error': {'key': 'error', 'type': 'AzureResourceErrorInfo'}, + } + + def __init__(self, **kwargs): + super(Expression, self).__init__(**kwargs) + self.text = kwargs.get('text', None) + self.value = kwargs.get('value', None) + self.subexpressions = kwargs.get('subexpressions', None) + self.error = kwargs.get('error', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/expression_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/expression_py3.py new file mode 100644 index 000000000000..d2e00042a929 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/expression_py3.py @@ -0,0 +1,40 @@ +# 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 Expression(Model): + """Expression. + + :param text: + :type text: str + :param value: + :type value: object + :param subexpressions: + :type subexpressions: list[~azure.mgmt.logic.models.Expression] + :param error: + :type error: ~azure.mgmt.logic.models.AzureResourceErrorInfo + """ + + _attribute_map = { + 'text': {'key': 'text', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'object'}, + 'subexpressions': {'key': 'subexpressions', 'type': '[Expression]'}, + 'error': {'key': 'error', 'type': 'AzureResourceErrorInfo'}, + } + + def __init__(self, *, text: str=None, value=None, subexpressions=None, error=None, **kwargs) -> None: + super(Expression, self).__init__(**kwargs) + self.text = text + self.value = value + self.subexpressions = subexpressions + self.error = error diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/expression_root.py b/azure-mgmt-logic/azure/mgmt/logic/models/expression_root.py new file mode 100644 index 000000000000..45a9253fce15 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/expression_root.py @@ -0,0 +1,40 @@ +# 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 .expression import Expression + + +class ExpressionRoot(Expression): + """ExpressionRoot. + + :param text: + :type text: str + :param value: + :type value: object + :param subexpressions: + :type subexpressions: list[~azure.mgmt.logic.models.Expression] + :param error: + :type error: ~azure.mgmt.logic.models.AzureResourceErrorInfo + :param path: The path. + :type path: str + """ + + _attribute_map = { + 'text': {'key': 'text', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'object'}, + 'subexpressions': {'key': 'subexpressions', 'type': '[Expression]'}, + 'error': {'key': 'error', 'type': 'AzureResourceErrorInfo'}, + 'path': {'key': 'path', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ExpressionRoot, self).__init__(**kwargs) + self.path = kwargs.get('path', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/expression_root_paged.py b/azure-mgmt-logic/azure/mgmt/logic/models/expression_root_paged.py new file mode 100644 index 000000000000..d32646b4a1d8 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/expression_root_paged.py @@ -0,0 +1,27 @@ +# 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 ExpressionRootPaged(Paged): + """ + A paging container for iterating over a list of :class:`ExpressionRoot ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'inputs', 'type': '[ExpressionRoot]'} + } + + def __init__(self, *args, **kwargs): + + super(ExpressionRootPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/expression_root_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/expression_root_py3.py new file mode 100644 index 000000000000..6463b1607310 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/expression_root_py3.py @@ -0,0 +1,40 @@ +# 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 .expression_py3 import Expression + + +class ExpressionRoot(Expression): + """ExpressionRoot. + + :param text: + :type text: str + :param value: + :type value: object + :param subexpressions: + :type subexpressions: list[~azure.mgmt.logic.models.Expression] + :param error: + :type error: ~azure.mgmt.logic.models.AzureResourceErrorInfo + :param path: The path. + :type path: str + """ + + _attribute_map = { + 'text': {'key': 'text', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'object'}, + 'subexpressions': {'key': 'subexpressions', 'type': '[Expression]'}, + 'error': {'key': 'error', 'type': 'AzureResourceErrorInfo'}, + 'path': {'key': 'path', 'type': 'str'}, + } + + def __init__(self, *, text: str=None, value=None, subexpressions=None, error=None, path: str=None, **kwargs) -> None: + super(ExpressionRoot, self).__init__(text=text, value=value, subexpressions=subexpressions, error=error, **kwargs) + self.path = path diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/generate_upgraded_definition_parameters.py b/azure-mgmt-logic/azure/mgmt/logic/models/generate_upgraded_definition_parameters.py old mode 100755 new mode 100644 index bd61d96944ec..fbab264f0c56 --- a/azure-mgmt-logic/azure/mgmt/logic/models/generate_upgraded_definition_parameters.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/generate_upgraded_definition_parameters.py @@ -23,5 +23,6 @@ class GenerateUpgradedDefinitionParameters(Model): 'target_schema_version': {'key': 'targetSchemaVersion', 'type': 'str'}, } - def __init__(self, target_schema_version=None): - self.target_schema_version = target_schema_version + def __init__(self, **kwargs): + super(GenerateUpgradedDefinitionParameters, self).__init__(**kwargs) + self.target_schema_version = kwargs.get('target_schema_version', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/generate_upgraded_definition_parameters_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/generate_upgraded_definition_parameters_py3.py new file mode 100644 index 000000000000..fe3f6bcf11cb --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/generate_upgraded_definition_parameters_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class GenerateUpgradedDefinitionParameters(Model): + """The parameters to generate upgraded definition. + + :param target_schema_version: The target schema version. + :type target_schema_version: str + """ + + _attribute_map = { + 'target_schema_version': {'key': 'targetSchemaVersion', 'type': 'str'}, + } + + def __init__(self, *, target_schema_version: str=None, **kwargs) -> None: + super(GenerateUpgradedDefinitionParameters, self).__init__(**kwargs) + self.target_schema_version = target_schema_version diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/get_callback_url_parameters.py b/azure-mgmt-logic/azure/mgmt/logic/models/get_callback_url_parameters.py old mode 100755 new mode 100644 index a2423d9accb3..0c5c2dacc767 --- a/azure-mgmt-logic/azure/mgmt/logic/models/get_callback_url_parameters.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/get_callback_url_parameters.py @@ -19,7 +19,7 @@ class GetCallbackUrlParameters(Model): :type not_after: datetime :param key_type: The key type. Possible values include: 'NotSpecified', 'Primary', 'Secondary' - :type key_type: str or :class:`KeyType ` + :type key_type: str or ~azure.mgmt.logic.models.KeyType """ _attribute_map = { @@ -27,6 +27,7 @@ class GetCallbackUrlParameters(Model): 'key_type': {'key': 'keyType', 'type': 'KeyType'}, } - def __init__(self, not_after=None, key_type=None): - self.not_after = not_after - self.key_type = key_type + def __init__(self, **kwargs): + super(GetCallbackUrlParameters, self).__init__(**kwargs) + self.not_after = kwargs.get('not_after', None) + self.key_type = kwargs.get('key_type', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/get_callback_url_parameters_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/get_callback_url_parameters_py3.py new file mode 100644 index 000000000000..0eb2275adef3 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/get_callback_url_parameters_py3.py @@ -0,0 +1,33 @@ +# 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 GetCallbackUrlParameters(Model): + """The callback url parameters. + + :param not_after: The expiry time. + :type not_after: datetime + :param key_type: The key type. Possible values include: 'NotSpecified', + 'Primary', 'Secondary' + :type key_type: str or ~azure.mgmt.logic.models.KeyType + """ + + _attribute_map = { + 'not_after': {'key': 'notAfter', 'type': 'iso-8601'}, + 'key_type': {'key': 'keyType', 'type': 'KeyType'}, + } + + def __init__(self, *, not_after=None, key_type=None, **kwargs) -> None: + super(GetCallbackUrlParameters, self).__init__(**kwargs) + self.not_after = not_after + self.key_type = key_type diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account.py old mode 100755 new mode 100644 index 6c6afa235fd2..b29acb017b92 --- a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account.py @@ -27,12 +27,11 @@ class IntegrationAccount(Resource): :param location: The resource location. :type location: str :param tags: The resource tags. - :type tags: dict + :type tags: dict[str, str] :param properties: The integration account properties. :type properties: object :param sku: The sku. - :type sku: :class:`IntegrationAccountSku - ` + :type sku: ~azure.mgmt.logic.models.IntegrationAccountSku """ _validation = { @@ -51,7 +50,7 @@ class IntegrationAccount(Resource): 'sku': {'key': 'sku', 'type': 'IntegrationAccountSku'}, } - def __init__(self, location=None, tags=None, properties=None, sku=None): - super(IntegrationAccount, self).__init__(location=location, tags=tags) - self.properties = properties - self.sku = sku + def __init__(self, **kwargs): + super(IntegrationAccount, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.sku = kwargs.get('sku', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_agreement.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_agreement.py old mode 100755 new mode 100644 index 2fe646232820..5fad800c2ade --- a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_agreement.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_agreement.py @@ -18,6 +18,8 @@ class IntegrationAccountAgreement(Resource): 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 resource id. :vartype id: str :ivar name: Gets the resource name. @@ -27,32 +29,29 @@ class IntegrationAccountAgreement(Resource): :param location: The resource location. :type location: str :param tags: The resource tags. - :type tags: dict + :type tags: dict[str, str] :ivar created_time: The created time. :vartype created_time: datetime :ivar changed_time: The changed time. :vartype changed_time: datetime :param metadata: The metadata. :type metadata: object - :param agreement_type: The agreement type. Possible values include: - 'NotSpecified', 'AS2', 'X12', 'Edifact' - :type agreement_type: str or :class:`AgreementType - ` - :param host_partner: The integration account partner that is set as host - partner for this agreement. + :param agreement_type: Required. The agreement type. Possible values + include: 'NotSpecified', 'AS2', 'X12', 'Edifact' + :type agreement_type: str or ~azure.mgmt.logic.models.AgreementType + :param host_partner: Required. The integration account partner that is set + as host partner for this agreement. :type host_partner: str - :param guest_partner: The integration account partner that is set as guest - partner for this agreement. + :param guest_partner: Required. The integration account partner that is + set as guest partner for this agreement. :type guest_partner: str - :param host_identity: The business identity of the host partner. - :type host_identity: :class:`BusinessIdentity - ` - :param guest_identity: The business identity of the guest partner. - :type guest_identity: :class:`BusinessIdentity - ` - :param content: The agreement content. - :type content: :class:`AgreementContent - ` + :param host_identity: Required. The business identity of the host partner. + :type host_identity: ~azure.mgmt.logic.models.BusinessIdentity + :param guest_identity: Required. The business identity of the guest + partner. + :type guest_identity: ~azure.mgmt.logic.models.BusinessIdentity + :param content: Required. The agreement content. + :type content: ~azure.mgmt.logic.models.AgreementContent """ _validation = { @@ -86,14 +85,14 @@ class IntegrationAccountAgreement(Resource): 'content': {'key': 'properties.content', 'type': 'AgreementContent'}, } - def __init__(self, agreement_type, host_partner, guest_partner, host_identity, guest_identity, content, location=None, tags=None, metadata=None): - super(IntegrationAccountAgreement, self).__init__(location=location, tags=tags) + def __init__(self, **kwargs): + super(IntegrationAccountAgreement, self).__init__(**kwargs) self.created_time = None self.changed_time = None - self.metadata = metadata - self.agreement_type = agreement_type - self.host_partner = host_partner - self.guest_partner = guest_partner - self.host_identity = host_identity - self.guest_identity = guest_identity - self.content = content + self.metadata = kwargs.get('metadata', None) + self.agreement_type = kwargs.get('agreement_type', None) + self.host_partner = kwargs.get('host_partner', None) + self.guest_partner = kwargs.get('guest_partner', None) + self.host_identity = kwargs.get('host_identity', None) + self.guest_identity = kwargs.get('guest_identity', None) + self.content = kwargs.get('content', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_agreement_filter.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_agreement_filter.py old mode 100755 new mode 100644 index 0a00f603754e..ed00ee6cf955 --- a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_agreement_filter.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_agreement_filter.py @@ -15,11 +15,12 @@ class IntegrationAccountAgreementFilter(Model): """The integration account agreement filter for odata query. - :param agreement_type: The agreement type of integration account + All required parameters must be populated in order to send to Azure. + + :param agreement_type: Required. The agreement type of integration account agreement. Possible values include: 'NotSpecified', 'AS2', 'X12', 'Edifact' - :type agreement_type: str or :class:`AgreementType - ` + :type agreement_type: str or ~azure.mgmt.logic.models.AgreementType """ _validation = { @@ -30,5 +31,6 @@ class IntegrationAccountAgreementFilter(Model): 'agreement_type': {'key': 'agreementType', 'type': 'AgreementType'}, } - def __init__(self, agreement_type): - self.agreement_type = agreement_type + def __init__(self, **kwargs): + super(IntegrationAccountAgreementFilter, self).__init__(**kwargs) + self.agreement_type = kwargs.get('agreement_type', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_agreement_filter_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_agreement_filter_py3.py new file mode 100644 index 000000000000..aa7b65c825aa --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_agreement_filter_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class IntegrationAccountAgreementFilter(Model): + """The integration account agreement filter for odata query. + + All required parameters must be populated in order to send to Azure. + + :param agreement_type: Required. The agreement type of integration account + agreement. Possible values include: 'NotSpecified', 'AS2', 'X12', + 'Edifact' + :type agreement_type: str or ~azure.mgmt.logic.models.AgreementType + """ + + _validation = { + 'agreement_type': {'required': True}, + } + + _attribute_map = { + 'agreement_type': {'key': 'agreementType', 'type': 'AgreementType'}, + } + + def __init__(self, *, agreement_type, **kwargs) -> None: + super(IntegrationAccountAgreementFilter, self).__init__(**kwargs) + self.agreement_type = agreement_type diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_agreement_paged.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_agreement_paged.py old mode 100755 new mode 100644 index e34f0a44af56..dab33964358e --- a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_agreement_paged.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_agreement_paged.py @@ -14,7 +14,7 @@ class IntegrationAccountAgreementPaged(Paged): """ - A paging container for iterating over a list of IntegrationAccountAgreement object + A paging container for iterating over a list of :class:`IntegrationAccountAgreement ` object """ _attribute_map = { diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_agreement_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_agreement_py3.py new file mode 100644 index 000000000000..4f6d7c00bb25 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_agreement_py3.py @@ -0,0 +1,98 @@ +# 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 IntegrationAccountAgreement(Resource): + """The integration account agreement. + + 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 resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :ivar created_time: The created time. + :vartype created_time: datetime + :ivar changed_time: The changed time. + :vartype changed_time: datetime + :param metadata: The metadata. + :type metadata: object + :param agreement_type: Required. The agreement type. Possible values + include: 'NotSpecified', 'AS2', 'X12', 'Edifact' + :type agreement_type: str or ~azure.mgmt.logic.models.AgreementType + :param host_partner: Required. The integration account partner that is set + as host partner for this agreement. + :type host_partner: str + :param guest_partner: Required. The integration account partner that is + set as guest partner for this agreement. + :type guest_partner: str + :param host_identity: Required. The business identity of the host partner. + :type host_identity: ~azure.mgmt.logic.models.BusinessIdentity + :param guest_identity: Required. The business identity of the guest + partner. + :type guest_identity: ~azure.mgmt.logic.models.BusinessIdentity + :param content: Required. The agreement content. + :type content: ~azure.mgmt.logic.models.AgreementContent + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_time': {'readonly': True}, + 'changed_time': {'readonly': True}, + 'agreement_type': {'required': True}, + 'host_partner': {'required': True}, + 'guest_partner': {'required': True}, + 'host_identity': {'required': True}, + 'guest_identity': {'required': True}, + 'content': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, + 'metadata': {'key': 'properties.metadata', 'type': 'object'}, + 'agreement_type': {'key': 'properties.agreementType', 'type': 'AgreementType'}, + 'host_partner': {'key': 'properties.hostPartner', 'type': 'str'}, + 'guest_partner': {'key': 'properties.guestPartner', 'type': 'str'}, + 'host_identity': {'key': 'properties.hostIdentity', 'type': 'BusinessIdentity'}, + 'guest_identity': {'key': 'properties.guestIdentity', 'type': 'BusinessIdentity'}, + 'content': {'key': 'properties.content', 'type': 'AgreementContent'}, + } + + def __init__(self, *, agreement_type, host_partner: str, guest_partner: str, host_identity, guest_identity, content, location: str=None, tags=None, metadata=None, **kwargs) -> None: + super(IntegrationAccountAgreement, self).__init__(location=location, tags=tags, **kwargs) + self.created_time = None + self.changed_time = None + self.metadata = metadata + self.agreement_type = agreement_type + self.host_partner = host_partner + self.guest_partner = guest_partner + self.host_identity = host_identity + self.guest_identity = guest_identity + self.content = content diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_certificate.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_certificate.py old mode 100755 new mode 100644 index f9e19c566267..d6345949d649 --- a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_certificate.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_certificate.py @@ -27,7 +27,7 @@ class IntegrationAccountCertificate(Resource): :param location: The resource location. :type location: str :param tags: The resource tags. - :type tags: dict + :type tags: dict[str, str] :ivar created_time: The created time. :vartype created_time: datetime :ivar changed_time: The changed time. @@ -35,8 +35,7 @@ class IntegrationAccountCertificate(Resource): :param metadata: The metadata. :type metadata: object :param key: The key details in the key vault. - :type key: :class:`KeyVaultKeyReference - ` + :type key: ~azure.mgmt.logic.models.KeyVaultKeyReference :param public_certificate: The public certificate. :type public_certificate: str """ @@ -62,10 +61,10 @@ class IntegrationAccountCertificate(Resource): 'public_certificate': {'key': 'properties.publicCertificate', 'type': 'str'}, } - def __init__(self, location=None, tags=None, metadata=None, key=None, public_certificate=None): - super(IntegrationAccountCertificate, self).__init__(location=location, tags=tags) + def __init__(self, **kwargs): + super(IntegrationAccountCertificate, self).__init__(**kwargs) self.created_time = None self.changed_time = None - self.metadata = metadata - self.key = key - self.public_certificate = public_certificate + self.metadata = kwargs.get('metadata', None) + self.key = kwargs.get('key', None) + self.public_certificate = kwargs.get('public_certificate', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_certificate_paged.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_certificate_paged.py old mode 100755 new mode 100644 index 2145a818e6ab..a428c4a54112 --- a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_certificate_paged.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_certificate_paged.py @@ -14,7 +14,7 @@ class IntegrationAccountCertificatePaged(Paged): """ - A paging container for iterating over a list of IntegrationAccountCertificate object + A paging container for iterating over a list of :class:`IntegrationAccountCertificate ` object """ _attribute_map = { diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_certificate_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_certificate_py3.py new file mode 100644 index 000000000000..84a426fb109e --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_certificate_py3.py @@ -0,0 +1,70 @@ +# 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 IntegrationAccountCertificate(Resource): + """The integration account certificate. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :ivar created_time: The created time. + :vartype created_time: datetime + :ivar changed_time: The changed time. + :vartype changed_time: datetime + :param metadata: The metadata. + :type metadata: object + :param key: The key details in the key vault. + :type key: ~azure.mgmt.logic.models.KeyVaultKeyReference + :param public_certificate: The public certificate. + :type public_certificate: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_time': {'readonly': True}, + 'changed_time': {'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}'}, + 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, + 'metadata': {'key': 'properties.metadata', 'type': 'object'}, + 'key': {'key': 'properties.key', 'type': 'KeyVaultKeyReference'}, + 'public_certificate': {'key': 'properties.publicCertificate', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, metadata=None, key=None, public_certificate: str=None, **kwargs) -> None: + super(IntegrationAccountCertificate, self).__init__(location=location, tags=tags, **kwargs) + self.created_time = None + self.changed_time = None + self.metadata = metadata + self.key = key + self.public_certificate = public_certificate diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map.py old mode 100755 new mode 100644 index 2faaaf028e56..eca7358d918e --- a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map.py @@ -18,6 +18,8 @@ class IntegrationAccountMap(Resource): 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 resource id. :vartype id: str :ivar name: Gets the resource name. @@ -27,15 +29,14 @@ class IntegrationAccountMap(Resource): :param location: The resource location. :type location: str :param tags: The resource tags. - :type tags: dict - :param map_type: The map type. Possible values include: 'NotSpecified', - 'Xslt' - :type map_type: str or :class:`MapType ` + :type tags: dict[str, str] + :param map_type: Required. The map type. Possible values include: + 'NotSpecified', 'Xslt' + :type map_type: str or ~azure.mgmt.logic.models.MapType :param parameters_schema: The parameters schema of integration account map. :type parameters_schema: - :class:`IntegrationAccountMapPropertiesParametersSchema - ` + ~azure.mgmt.logic.models.IntegrationAccountMapPropertiesParametersSchema :ivar created_time: The created time. :vartype created_time: datetime :ivar changed_time: The changed time. @@ -45,8 +46,7 @@ class IntegrationAccountMap(Resource): :param content_type: The content type. :type content_type: str :ivar content_link: The content link. - :vartype content_link: :class:`ContentLink - ` + :vartype content_link: ~azure.mgmt.logic.models.ContentLink :param metadata: The metadata. :type metadata: object """ @@ -77,13 +77,13 @@ class IntegrationAccountMap(Resource): 'metadata': {'key': 'properties.metadata', 'type': 'object'}, } - def __init__(self, map_type, location=None, tags=None, parameters_schema=None, content=None, content_type=None, metadata=None): - super(IntegrationAccountMap, self).__init__(location=location, tags=tags) - self.map_type = map_type - self.parameters_schema = parameters_schema + def __init__(self, **kwargs): + super(IntegrationAccountMap, self).__init__(**kwargs) + self.map_type = kwargs.get('map_type', None) + self.parameters_schema = kwargs.get('parameters_schema', None) self.created_time = None self.changed_time = None - self.content = content - self.content_type = content_type + self.content = kwargs.get('content', None) + self.content_type = kwargs.get('content_type', None) self.content_link = None - self.metadata = metadata + self.metadata = kwargs.get('metadata', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_filter.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_filter.py old mode 100755 new mode 100644 index 2ebb56fcce5e..0854c1f78a89 --- a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_filter.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_filter.py @@ -15,9 +15,11 @@ class IntegrationAccountMapFilter(Model): """The integration account map filter for odata query. - :param map_type: The map type of integration account map. Possible values - include: 'NotSpecified', 'Xslt' - :type map_type: str or :class:`MapType ` + All required parameters must be populated in order to send to Azure. + + :param map_type: Required. The map type of integration account map. + Possible values include: 'NotSpecified', 'Xslt' + :type map_type: str or ~azure.mgmt.logic.models.MapType """ _validation = { @@ -28,5 +30,6 @@ class IntegrationAccountMapFilter(Model): 'map_type': {'key': 'mapType', 'type': 'MapType'}, } - def __init__(self, map_type): - self.map_type = map_type + def __init__(self, **kwargs): + super(IntegrationAccountMapFilter, self).__init__(**kwargs) + self.map_type = kwargs.get('map_type', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_filter_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_filter_py3.py new file mode 100644 index 000000000000..94e1aaf938f2 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_filter_py3.py @@ -0,0 +1,35 @@ +# 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 IntegrationAccountMapFilter(Model): + """The integration account map filter for odata query. + + All required parameters must be populated in order to send to Azure. + + :param map_type: Required. The map type of integration account map. + Possible values include: 'NotSpecified', 'Xslt' + :type map_type: str or ~azure.mgmt.logic.models.MapType + """ + + _validation = { + 'map_type': {'required': True}, + } + + _attribute_map = { + 'map_type': {'key': 'mapType', 'type': 'MapType'}, + } + + def __init__(self, *, map_type, **kwargs) -> None: + super(IntegrationAccountMapFilter, self).__init__(**kwargs) + self.map_type = map_type diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_paged.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_paged.py old mode 100755 new mode 100644 index 9efb38f2b9f2..993fc034cef6 --- a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_paged.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_paged.py @@ -14,7 +14,7 @@ class IntegrationAccountMapPaged(Paged): """ - A paging container for iterating over a list of IntegrationAccountMap object + A paging container for iterating over a list of :class:`IntegrationAccountMap ` object """ _attribute_map = { diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_properties_parameters_schema.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_properties_parameters_schema.py old mode 100755 new mode 100644 index 7c4ebc8950d1..4d2b083b084a --- a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_properties_parameters_schema.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_properties_parameters_schema.py @@ -23,5 +23,6 @@ class IntegrationAccountMapPropertiesParametersSchema(Model): 'ref': {'key': 'ref', 'type': 'str'}, } - def __init__(self, ref=None): - self.ref = ref + def __init__(self, **kwargs): + super(IntegrationAccountMapPropertiesParametersSchema, self).__init__(**kwargs) + self.ref = kwargs.get('ref', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_properties_parameters_schema_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_properties_parameters_schema_py3.py new file mode 100644 index 000000000000..35d9a7ce410a --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_properties_parameters_schema_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class IntegrationAccountMapPropertiesParametersSchema(Model): + """The parameters schema of integration account map. + + :param ref: The reference name. + :type ref: str + """ + + _attribute_map = { + 'ref': {'key': 'ref', 'type': 'str'}, + } + + def __init__(self, *, ref: str=None, **kwargs) -> None: + super(IntegrationAccountMapPropertiesParametersSchema, self).__init__(**kwargs) + self.ref = ref diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_py3.py new file mode 100644 index 000000000000..27f4da9281b7 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_map_py3.py @@ -0,0 +1,89 @@ +# 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 IntegrationAccountMap(Resource): + """The integration account map. + + 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 resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param map_type: Required. The map type. Possible values include: + 'NotSpecified', 'Xslt' + :type map_type: str or ~azure.mgmt.logic.models.MapType + :param parameters_schema: The parameters schema of integration account + map. + :type parameters_schema: + ~azure.mgmt.logic.models.IntegrationAccountMapPropertiesParametersSchema + :ivar created_time: The created time. + :vartype created_time: datetime + :ivar changed_time: The changed time. + :vartype changed_time: datetime + :param content: The content. + :type content: str + :param content_type: The content type. + :type content_type: str + :ivar content_link: The content link. + :vartype content_link: ~azure.mgmt.logic.models.ContentLink + :param metadata: The metadata. + :type metadata: object + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'map_type': {'required': True}, + 'created_time': {'readonly': True}, + 'changed_time': {'readonly': True}, + 'content_link': {'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}'}, + 'map_type': {'key': 'properties.mapType', 'type': 'MapType'}, + 'parameters_schema': {'key': 'properties.parametersSchema', 'type': 'IntegrationAccountMapPropertiesParametersSchema'}, + 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, + 'content': {'key': 'properties.content', 'type': 'str'}, + 'content_type': {'key': 'properties.contentType', 'type': 'str'}, + 'content_link': {'key': 'properties.contentLink', 'type': 'ContentLink'}, + 'metadata': {'key': 'properties.metadata', 'type': 'object'}, + } + + def __init__(self, *, map_type, location: str=None, tags=None, parameters_schema=None, content: str=None, content_type: str=None, metadata=None, **kwargs) -> None: + super(IntegrationAccountMap, self).__init__(location=location, tags=tags, **kwargs) + self.map_type = map_type + self.parameters_schema = parameters_schema + self.created_time = None + self.changed_time = None + self.content = content + self.content_type = content_type + self.content_link = None + self.metadata = metadata diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_paged.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_paged.py old mode 100755 new mode 100644 index ed94ff07b1ae..33bf18e0fd8d --- a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_paged.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_paged.py @@ -14,7 +14,7 @@ class IntegrationAccountPaged(Paged): """ - A paging container for iterating over a list of IntegrationAccount object + A paging container for iterating over a list of :class:`IntegrationAccount ` object """ _attribute_map = { diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_partner.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_partner.py old mode 100755 new mode 100644 index 247611dac555..27abb6538309 --- a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_partner.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_partner.py @@ -18,6 +18,8 @@ class IntegrationAccountPartner(Resource): 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 resource id. :vartype id: str :ivar name: Gets the resource name. @@ -27,20 +29,18 @@ class IntegrationAccountPartner(Resource): :param location: The resource location. :type location: str :param tags: The resource tags. - :type tags: dict - :param partner_type: The partner type. Possible values include: + :type tags: dict[str, str] + :param partner_type: Required. The partner type. Possible values include: 'NotSpecified', 'B2B' - :type partner_type: str or :class:`PartnerType - ` + :type partner_type: str or ~azure.mgmt.logic.models.PartnerType :ivar created_time: The created time. :vartype created_time: datetime :ivar changed_time: The changed time. :vartype changed_time: datetime :param metadata: The metadata. :type metadata: object - :param content: The partner content. - :type content: :class:`PartnerContent - ` + :param content: Required. The partner content. + :type content: ~azure.mgmt.logic.models.PartnerContent """ _validation = { @@ -66,10 +66,10 @@ class IntegrationAccountPartner(Resource): 'content': {'key': 'properties.content', 'type': 'PartnerContent'}, } - def __init__(self, partner_type, content, location=None, tags=None, metadata=None): - super(IntegrationAccountPartner, self).__init__(location=location, tags=tags) - self.partner_type = partner_type + def __init__(self, **kwargs): + super(IntegrationAccountPartner, self).__init__(**kwargs) + self.partner_type = kwargs.get('partner_type', None) self.created_time = None self.changed_time = None - self.metadata = metadata - self.content = content + self.metadata = kwargs.get('metadata', None) + self.content = kwargs.get('content', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_partner_filter.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_partner_filter.py old mode 100755 new mode 100644 index 13559708d272..97e127714cf1 --- a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_partner_filter.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_partner_filter.py @@ -15,10 +15,11 @@ class IntegrationAccountPartnerFilter(Model): """The integration account partner filter for odata query. - :param partner_type: The partner type of integration account partner. - Possible values include: 'NotSpecified', 'B2B' - :type partner_type: str or :class:`PartnerType - ` + All required parameters must be populated in order to send to Azure. + + :param partner_type: Required. The partner type of integration account + partner. Possible values include: 'NotSpecified', 'B2B' + :type partner_type: str or ~azure.mgmt.logic.models.PartnerType """ _validation = { @@ -29,5 +30,6 @@ class IntegrationAccountPartnerFilter(Model): 'partner_type': {'key': 'partnerType', 'type': 'PartnerType'}, } - def __init__(self, partner_type): - self.partner_type = partner_type + def __init__(self, **kwargs): + super(IntegrationAccountPartnerFilter, self).__init__(**kwargs) + self.partner_type = kwargs.get('partner_type', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_partner_filter_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_partner_filter_py3.py new file mode 100644 index 000000000000..e96805f485b6 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_partner_filter_py3.py @@ -0,0 +1,35 @@ +# 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 IntegrationAccountPartnerFilter(Model): + """The integration account partner filter for odata query. + + All required parameters must be populated in order to send to Azure. + + :param partner_type: Required. The partner type of integration account + partner. Possible values include: 'NotSpecified', 'B2B' + :type partner_type: str or ~azure.mgmt.logic.models.PartnerType + """ + + _validation = { + 'partner_type': {'required': True}, + } + + _attribute_map = { + 'partner_type': {'key': 'partnerType', 'type': 'PartnerType'}, + } + + def __init__(self, *, partner_type, **kwargs) -> None: + super(IntegrationAccountPartnerFilter, self).__init__(**kwargs) + self.partner_type = partner_type diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_partner_paged.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_partner_paged.py old mode 100755 new mode 100644 index 456113f5c30b..36bcc35e62dd --- a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_partner_paged.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_partner_paged.py @@ -14,7 +14,7 @@ class IntegrationAccountPartnerPaged(Paged): """ - A paging container for iterating over a list of IntegrationAccountPartner object + A paging container for iterating over a list of :class:`IntegrationAccountPartner ` object """ _attribute_map = { diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_partner_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_partner_py3.py new file mode 100644 index 000000000000..7c6af813aa42 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_partner_py3.py @@ -0,0 +1,75 @@ +# 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 IntegrationAccountPartner(Resource): + """The integration account partner. + + 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 resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param partner_type: Required. The partner type. Possible values include: + 'NotSpecified', 'B2B' + :type partner_type: str or ~azure.mgmt.logic.models.PartnerType + :ivar created_time: The created time. + :vartype created_time: datetime + :ivar changed_time: The changed time. + :vartype changed_time: datetime + :param metadata: The metadata. + :type metadata: object + :param content: Required. The partner content. + :type content: ~azure.mgmt.logic.models.PartnerContent + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'partner_type': {'required': True}, + 'created_time': {'readonly': True}, + 'changed_time': {'readonly': True}, + 'content': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'partner_type': {'key': 'properties.partnerType', 'type': 'PartnerType'}, + 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, + 'metadata': {'key': 'properties.metadata', 'type': 'object'}, + 'content': {'key': 'properties.content', 'type': 'PartnerContent'}, + } + + def __init__(self, *, partner_type, content, location: str=None, tags=None, metadata=None, **kwargs) -> None: + super(IntegrationAccountPartner, self).__init__(location=location, tags=tags, **kwargs) + self.partner_type = partner_type + self.created_time = None + self.changed_time = None + self.metadata = metadata + self.content = content diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_py3.py new file mode 100644 index 000000000000..ef2bc107d386 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_py3.py @@ -0,0 +1,56 @@ +# 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 IntegrationAccount(Resource): + """The integration account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param properties: The integration account properties. + :type properties: object + :param sku: The sku. + :type sku: ~azure.mgmt.logic.models.IntegrationAccountSku + """ + + _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}'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'sku': {'key': 'sku', 'type': 'IntegrationAccountSku'}, + } + + def __init__(self, *, location: str=None, tags=None, properties=None, sku=None, **kwargs) -> None: + super(IntegrationAccount, self).__init__(location=location, tags=tags, **kwargs) + self.properties = properties + self.sku = sku diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_schema.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_schema.py old mode 100755 new mode 100644 index 40235fb07405..e528830cdb2e --- a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_schema.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_schema.py @@ -18,6 +18,8 @@ class IntegrationAccountSchema(Resource): 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 resource id. :vartype id: str :ivar name: Gets the resource name. @@ -27,11 +29,10 @@ class IntegrationAccountSchema(Resource): :param location: The resource location. :type location: str :param tags: The resource tags. - :type tags: dict - :param schema_type: The schema type. Possible values include: + :type tags: dict[str, str] + :param schema_type: Required. The schema type. Possible values include: 'NotSpecified', 'Xml' - :type schema_type: str or :class:`SchemaType - ` + :type schema_type: str or ~azure.mgmt.logic.models.SchemaType :param target_namespace: The target namespace of the schema. :type target_namespace: str :param document_name: The document name. @@ -49,8 +50,7 @@ class IntegrationAccountSchema(Resource): :param content_type: The content type. :type content_type: str :ivar content_link: The content link. - :vartype content_link: :class:`ContentLink - ` + :vartype content_link: ~azure.mgmt.logic.models.ContentLink """ _validation = { @@ -81,15 +81,15 @@ class IntegrationAccountSchema(Resource): 'content_link': {'key': 'properties.contentLink', 'type': 'ContentLink'}, } - def __init__(self, schema_type, location=None, tags=None, target_namespace=None, document_name=None, file_name=None, metadata=None, content=None, content_type=None): - super(IntegrationAccountSchema, self).__init__(location=location, tags=tags) - self.schema_type = schema_type - self.target_namespace = target_namespace - self.document_name = document_name - self.file_name = file_name + def __init__(self, **kwargs): + super(IntegrationAccountSchema, self).__init__(**kwargs) + self.schema_type = kwargs.get('schema_type', None) + self.target_namespace = kwargs.get('target_namespace', None) + self.document_name = kwargs.get('document_name', None) + self.file_name = kwargs.get('file_name', None) self.created_time = None self.changed_time = None - self.metadata = metadata - self.content = content - self.content_type = content_type + self.metadata = kwargs.get('metadata', None) + self.content = kwargs.get('content', None) + self.content_type = kwargs.get('content_type', None) self.content_link = None diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_schema_filter.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_schema_filter.py old mode 100755 new mode 100644 index 71b43b3feafd..96d624e2ac45 --- a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_schema_filter.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_schema_filter.py @@ -15,10 +15,11 @@ class IntegrationAccountSchemaFilter(Model): """The integration account schema filter for odata query. - :param schema_type: The schema type of integration account schema. - Possible values include: 'NotSpecified', 'Xml' - :type schema_type: str or :class:`SchemaType - ` + All required parameters must be populated in order to send to Azure. + + :param schema_type: Required. The schema type of integration account + schema. Possible values include: 'NotSpecified', 'Xml' + :type schema_type: str or ~azure.mgmt.logic.models.SchemaType """ _validation = { @@ -29,5 +30,6 @@ class IntegrationAccountSchemaFilter(Model): 'schema_type': {'key': 'schemaType', 'type': 'SchemaType'}, } - def __init__(self, schema_type): - self.schema_type = schema_type + def __init__(self, **kwargs): + super(IntegrationAccountSchemaFilter, self).__init__(**kwargs) + self.schema_type = kwargs.get('schema_type', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_schema_filter_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_schema_filter_py3.py new file mode 100644 index 000000000000..17303ce6eac2 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_schema_filter_py3.py @@ -0,0 +1,35 @@ +# 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 IntegrationAccountSchemaFilter(Model): + """The integration account schema filter for odata query. + + All required parameters must be populated in order to send to Azure. + + :param schema_type: Required. The schema type of integration account + schema. Possible values include: 'NotSpecified', 'Xml' + :type schema_type: str or ~azure.mgmt.logic.models.SchemaType + """ + + _validation = { + 'schema_type': {'required': True}, + } + + _attribute_map = { + 'schema_type': {'key': 'schemaType', 'type': 'SchemaType'}, + } + + def __init__(self, *, schema_type, **kwargs) -> None: + super(IntegrationAccountSchemaFilter, self).__init__(**kwargs) + self.schema_type = schema_type diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_schema_paged.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_schema_paged.py old mode 100755 new mode 100644 index 5c9d15b38823..778d81bab195 --- a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_schema_paged.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_schema_paged.py @@ -14,7 +14,7 @@ class IntegrationAccountSchemaPaged(Paged): """ - A paging container for iterating over a list of IntegrationAccountSchema object + A paging container for iterating over a list of :class:`IntegrationAccountSchema ` object """ _attribute_map = { diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_schema_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_schema_py3.py new file mode 100644 index 000000000000..e6b6b3bcd072 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_schema_py3.py @@ -0,0 +1,95 @@ +# 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 IntegrationAccountSchema(Resource): + """The integration account schema. + + 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 resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param schema_type: Required. The schema type. Possible values include: + 'NotSpecified', 'Xml' + :type schema_type: str or ~azure.mgmt.logic.models.SchemaType + :param target_namespace: The target namespace of the schema. + :type target_namespace: str + :param document_name: The document name. + :type document_name: str + :param file_name: The file name. + :type file_name: str + :ivar created_time: The created time. + :vartype created_time: datetime + :ivar changed_time: The changed time. + :vartype changed_time: datetime + :param metadata: The metadata. + :type metadata: object + :param content: The content. + :type content: str + :param content_type: The content type. + :type content_type: str + :ivar content_link: The content link. + :vartype content_link: ~azure.mgmt.logic.models.ContentLink + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'schema_type': {'required': True}, + 'created_time': {'readonly': True}, + 'changed_time': {'readonly': True}, + 'content_link': {'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}'}, + 'schema_type': {'key': 'properties.schemaType', 'type': 'SchemaType'}, + 'target_namespace': {'key': 'properties.targetNamespace', 'type': 'str'}, + 'document_name': {'key': 'properties.documentName', 'type': 'str'}, + 'file_name': {'key': 'properties.fileName', 'type': 'str'}, + 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, + 'metadata': {'key': 'properties.metadata', 'type': 'object'}, + 'content': {'key': 'properties.content', 'type': 'str'}, + 'content_type': {'key': 'properties.contentType', 'type': 'str'}, + 'content_link': {'key': 'properties.contentLink', 'type': 'ContentLink'}, + } + + def __init__(self, *, schema_type, location: str=None, tags=None, target_namespace: str=None, document_name: str=None, file_name: str=None, metadata=None, content: str=None, content_type: str=None, **kwargs) -> None: + super(IntegrationAccountSchema, self).__init__(location=location, tags=tags, **kwargs) + self.schema_type = schema_type + self.target_namespace = target_namespace + self.document_name = document_name + self.file_name = file_name + self.created_time = None + self.changed_time = None + self.metadata = metadata + self.content = content + self.content_type = content_type + self.content_link = None diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_session.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_session.py old mode 100755 new mode 100644 index 6015069c6ef8..e779bc551406 --- a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_session.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_session.py @@ -27,7 +27,7 @@ class IntegrationAccountSession(Resource): :param location: The resource location. :type location: str :param tags: The resource tags. - :type tags: dict + :type tags: dict[str, str] :ivar created_time: The created time. :vartype created_time: datetime :ivar changed_time: The changed time. @@ -55,8 +55,8 @@ class IntegrationAccountSession(Resource): 'content': {'key': 'properties.content', 'type': 'object'}, } - def __init__(self, location=None, tags=None, content=None): - super(IntegrationAccountSession, self).__init__(location=location, tags=tags) + def __init__(self, **kwargs): + super(IntegrationAccountSession, self).__init__(**kwargs) self.created_time = None self.changed_time = None - self.content = content + self.content = kwargs.get('content', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_session_filter.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_session_filter.py old mode 100755 new mode 100644 index b6f55a6e0212..5c4b92f81245 --- a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_session_filter.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_session_filter.py @@ -15,7 +15,10 @@ class IntegrationAccountSessionFilter(Model): """The integration account session filter. - :param changed_time: The changed time of integration account sessions. + All required parameters must be populated in order to send to Azure. + + :param changed_time: Required. The changed time of integration account + sessions. :type changed_time: datetime """ @@ -27,5 +30,6 @@ class IntegrationAccountSessionFilter(Model): 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, } - def __init__(self, changed_time): - self.changed_time = changed_time + def __init__(self, **kwargs): + super(IntegrationAccountSessionFilter, self).__init__(**kwargs) + self.changed_time = kwargs.get('changed_time', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_session_filter_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_session_filter_py3.py new file mode 100644 index 000000000000..cc860f372c00 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_session_filter_py3.py @@ -0,0 +1,35 @@ +# 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 IntegrationAccountSessionFilter(Model): + """The integration account session filter. + + All required parameters must be populated in order to send to Azure. + + :param changed_time: Required. The changed time of integration account + sessions. + :type changed_time: datetime + """ + + _validation = { + 'changed_time': {'required': True}, + } + + _attribute_map = { + 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, changed_time, **kwargs) -> None: + super(IntegrationAccountSessionFilter, self).__init__(**kwargs) + self.changed_time = changed_time diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_session_paged.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_session_paged.py old mode 100755 new mode 100644 index 470a6d9b8434..8e29ebfe24cd --- a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_session_paged.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_session_paged.py @@ -14,7 +14,7 @@ class IntegrationAccountSessionPaged(Paged): """ - A paging container for iterating over a list of IntegrationAccountSession object + A paging container for iterating over a list of :class:`IntegrationAccountSession ` object """ _attribute_map = { diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_session_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_session_py3.py new file mode 100644 index 000000000000..91d024d47d75 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_session_py3.py @@ -0,0 +1,62 @@ +# 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 IntegrationAccountSession(Resource): + """The integration account session. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :ivar created_time: The created time. + :vartype created_time: datetime + :ivar changed_time: The changed time. + :vartype changed_time: datetime + :param content: The session content. + :type content: object + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_time': {'readonly': True}, + 'changed_time': {'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}'}, + 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, + 'content': {'key': 'properties.content', 'type': 'object'}, + } + + def __init__(self, *, location: str=None, tags=None, content=None, **kwargs) -> None: + super(IntegrationAccountSession, self).__init__(location=location, tags=tags, **kwargs) + self.created_time = None + self.changed_time = None + self.content = content diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_sku.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_sku.py old mode 100755 new mode 100644 index b8ae8fe1e190..9701f9b19f3e --- a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_sku.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_sku.py @@ -15,10 +15,11 @@ class IntegrationAccountSku(Model): """The integration account sku. - :param name: The sku name. Possible values include: 'NotSpecified', - 'Free', 'Standard' - :type name: str or :class:`IntegrationAccountSkuName - ` + All required parameters must be populated in order to send to Azure. + + :param name: Required. The sku name. Possible values include: + 'NotSpecified', 'Free', 'Standard' + :type name: str or ~azure.mgmt.logic.models.IntegrationAccountSkuName """ _validation = { @@ -29,5 +30,6 @@ class IntegrationAccountSku(Model): 'name': {'key': 'name', 'type': 'IntegrationAccountSkuName'}, } - def __init__(self, name): - self.name = name + def __init__(self, **kwargs): + super(IntegrationAccountSku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_sku_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_sku_py3.py new file mode 100644 index 000000000000..a7eeab01946b --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/integration_account_sku_py3.py @@ -0,0 +1,35 @@ +# 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 IntegrationAccountSku(Model): + """The integration account sku. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The sku name. Possible values include: + 'NotSpecified', 'Free', 'Standard' + :type name: str or ~azure.mgmt.logic.models.IntegrationAccountSkuName + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'IntegrationAccountSkuName'}, + } + + def __init__(self, *, name, **kwargs) -> None: + super(IntegrationAccountSku, self).__init__(**kwargs) + self.name = name diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/json_schema.py b/azure-mgmt-logic/azure/mgmt/logic/models/json_schema.py new file mode 100644 index 000000000000..4d9fc567f826 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/json_schema.py @@ -0,0 +1,32 @@ +# 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 JsonSchema(Model): + """The JSON schema. + + :param title: The JSON title. + :type title: str + :param content: The JSON content. + :type content: str + """ + + _attribute_map = { + 'title': {'key': 'title', 'type': 'str'}, + 'content': {'key': 'content', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JsonSchema, self).__init__(**kwargs) + self.title = kwargs.get('title', None) + self.content = kwargs.get('content', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/json_schema_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/json_schema_py3.py new file mode 100644 index 000000000000..edaaa76244cc --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/json_schema_py3.py @@ -0,0 +1,32 @@ +# 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 JsonSchema(Model): + """The JSON schema. + + :param title: The JSON title. + :type title: str + :param content: The JSON content. + :type content: str + """ + + _attribute_map = { + 'title': {'key': 'title', 'type': 'str'}, + 'content': {'key': 'content', 'type': 'str'}, + } + + def __init__(self, *, title: str=None, content: str=None, **kwargs) -> None: + super(JsonSchema, self).__init__(**kwargs) + self.title = title + self.content = content diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key.py b/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key.py new file mode 100644 index 000000000000..6e337eda6dcb --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key.py @@ -0,0 +1,32 @@ +# 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 KeyVaultKey(Model): + """The key vault key. + + :param kid: The key id. + :type kid: str + :param attributes: The key attributes. + :type attributes: ~azure.mgmt.logic.models.KeyVaultKeyAttributes + """ + + _attribute_map = { + 'kid': {'key': 'kid', 'type': 'str'}, + 'attributes': {'key': 'attributes', 'type': 'KeyVaultKeyAttributes'}, + } + + def __init__(self, **kwargs): + super(KeyVaultKey, self).__init__(**kwargs) + self.kid = kwargs.get('kid', None) + self.attributes = kwargs.get('attributes', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_attributes.py b/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_attributes.py new file mode 100644 index 000000000000..715d92ab0af1 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_attributes.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class KeyVaultKeyAttributes(Model): + """The key attributes. + + :param enabled: Whether the key is enabled or not. + :type enabled: bool + :param created: When the key was created. + :type created: long + :param updated: When the key was updated. + :type updated: long + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'created': {'key': 'created', 'type': 'long'}, + 'updated': {'key': 'updated', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(KeyVaultKeyAttributes, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.created = kwargs.get('created', None) + self.updated = kwargs.get('updated', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_attributes_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_attributes_py3.py new file mode 100644 index 000000000000..fa14881da122 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_attributes_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class KeyVaultKeyAttributes(Model): + """The key attributes. + + :param enabled: Whether the key is enabled or not. + :type enabled: bool + :param created: When the key was created. + :type created: long + :param updated: When the key was updated. + :type updated: long + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'created': {'key': 'created', 'type': 'long'}, + 'updated': {'key': 'updated', 'type': 'long'}, + } + + def __init__(self, *, enabled: bool=None, created: int=None, updated: int=None, **kwargs) -> None: + super(KeyVaultKeyAttributes, self).__init__(**kwargs) + self.enabled = enabled + self.created = created + self.updated = updated diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_paged.py b/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_paged.py new file mode 100644 index 000000000000..8384bd46af02 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_paged.py @@ -0,0 +1,27 @@ +# 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 KeyVaultKeyPaged(Paged): + """ + A paging container for iterating over a list of :class:`KeyVaultKey ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[KeyVaultKey]'} + } + + def __init__(self, *args, **kwargs): + + super(KeyVaultKeyPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_py3.py new file mode 100644 index 000000000000..3c55470665a4 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_py3.py @@ -0,0 +1,32 @@ +# 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 KeyVaultKey(Model): + """The key vault key. + + :param kid: The key id. + :type kid: str + :param attributes: The key attributes. + :type attributes: ~azure.mgmt.logic.models.KeyVaultKeyAttributes + """ + + _attribute_map = { + 'kid': {'key': 'kid', 'type': 'str'}, + 'attributes': {'key': 'attributes', 'type': 'KeyVaultKeyAttributes'}, + } + + def __init__(self, *, kid: str=None, attributes=None, **kwargs) -> None: + super(KeyVaultKey, self).__init__(**kwargs) + self.kid = kid + self.attributes = attributes diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_reference.py b/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_reference.py old mode 100755 new mode 100644 index 08f7e0f759d5..509822e7a4dc --- a/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_reference.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_reference.py @@ -15,10 +15,11 @@ class KeyVaultKeyReference(Model): """The reference to the key vault key. - :param key_vault: The key vault reference. - :type key_vault: :class:`KeyVaultKeyReferenceKeyVault - ` - :param key_name: The private key name in key vault. + All required parameters must be populated in order to send to Azure. + + :param key_vault: Required. The key vault reference. + :type key_vault: ~azure.mgmt.logic.models.KeyVaultKeyReferenceKeyVault + :param key_name: Required. The private key name in key vault. :type key_name: str :param key_version: The private key version in key vault. :type key_version: str @@ -35,7 +36,8 @@ class KeyVaultKeyReference(Model): 'key_version': {'key': 'keyVersion', 'type': 'str'}, } - def __init__(self, key_vault, key_name, key_version=None): - self.key_vault = key_vault - self.key_name = key_name - self.key_version = key_version + def __init__(self, **kwargs): + super(KeyVaultKeyReference, self).__init__(**kwargs) + self.key_vault = kwargs.get('key_vault', None) + self.key_name = kwargs.get('key_name', None) + self.key_version = kwargs.get('key_version', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_reference_key_vault.py b/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_reference_key_vault.py old mode 100755 new mode 100644 index 9caa8bc94e97..d1d4bda43dbb --- a/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_reference_key_vault.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_reference_key_vault.py @@ -37,7 +37,8 @@ class KeyVaultKeyReferenceKeyVault(Model): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, id=None): - self.id = id + def __init__(self, **kwargs): + super(KeyVaultKeyReferenceKeyVault, self).__init__(**kwargs) + self.id = kwargs.get('id', None) self.name = None self.type = None diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_reference_key_vault_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_reference_key_vault_py3.py new file mode 100644 index 000000000000..71b65da492e9 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_reference_key_vault_py3.py @@ -0,0 +1,44 @@ +# 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 KeyVaultKeyReferenceKeyVault(Model): + """The key vault reference. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: The resource id. + :type id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(KeyVaultKeyReferenceKeyVault, self).__init__(**kwargs) + self.id = id + self.name = None + self.type = None diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_reference_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_reference_py3.py new file mode 100644 index 000000000000..c46fba8a4a4b --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_key_reference_py3.py @@ -0,0 +1,43 @@ +# 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 KeyVaultKeyReference(Model): + """The reference to the key vault key. + + All required parameters must be populated in order to send to Azure. + + :param key_vault: Required. The key vault reference. + :type key_vault: ~azure.mgmt.logic.models.KeyVaultKeyReferenceKeyVault + :param key_name: Required. The private key name in key vault. + :type key_name: str + :param key_version: The private key version in key vault. + :type key_version: str + """ + + _validation = { + 'key_vault': {'required': True}, + 'key_name': {'required': True}, + } + + _attribute_map = { + 'key_vault': {'key': 'keyVault', 'type': 'KeyVaultKeyReferenceKeyVault'}, + 'key_name': {'key': 'keyName', 'type': 'str'}, + 'key_version': {'key': 'keyVersion', 'type': 'str'}, + } + + def __init__(self, *, key_vault, key_name: str, key_version: str=None, **kwargs) -> None: + super(KeyVaultKeyReference, self).__init__(**kwargs) + self.key_vault = key_vault + self.key_name = key_name + self.key_version = key_version diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_reference.py b/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_reference.py new file mode 100644 index 000000000000..7ce542e92b0c --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_reference.py @@ -0,0 +1,42 @@ +# 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_reference import ResourceReference + + +class KeyVaultReference(ResourceReference): + """The key vault reference. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: 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'}, + } + + def __init__(self, **kwargs): + super(KeyVaultReference, self).__init__(**kwargs) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_reference_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_reference_py3.py new file mode 100644 index 000000000000..bfcd7a433416 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/key_vault_reference_py3.py @@ -0,0 +1,42 @@ +# 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_reference_py3 import ResourceReference + + +class KeyVaultReference(ResourceReference): + """The key vault reference. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: 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'}, + } + + def __init__(self, **kwargs) -> None: + super(KeyVaultReference, self).__init__(**kwargs) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/list_key_vault_keys_definition.py b/azure-mgmt-logic/azure/mgmt/logic/models/list_key_vault_keys_definition.py new file mode 100644 index 000000000000..7b989c66c6b5 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/list_key_vault_keys_definition.py @@ -0,0 +1,38 @@ +# 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 ListKeyVaultKeysDefinition(Model): + """The list key vault keys definition. + + All required parameters must be populated in order to send to Azure. + + :param key_vault: Required. The key vault reference. + :type key_vault: ~azure.mgmt.logic.models.KeyVaultReference + :param skip_token: The skip token. + :type skip_token: str + """ + + _validation = { + 'key_vault': {'required': True}, + } + + _attribute_map = { + 'key_vault': {'key': 'keyVault', 'type': 'KeyVaultReference'}, + 'skip_token': {'key': 'skipToken', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ListKeyVaultKeysDefinition, self).__init__(**kwargs) + self.key_vault = kwargs.get('key_vault', None) + self.skip_token = kwargs.get('skip_token', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/list_key_vault_keys_definition_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/list_key_vault_keys_definition_py3.py new file mode 100644 index 000000000000..6e726e777df9 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/list_key_vault_keys_definition_py3.py @@ -0,0 +1,38 @@ +# 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 ListKeyVaultKeysDefinition(Model): + """The list key vault keys definition. + + All required parameters must be populated in order to send to Azure. + + :param key_vault: Required. The key vault reference. + :type key_vault: ~azure.mgmt.logic.models.KeyVaultReference + :param skip_token: The skip token. + :type skip_token: str + """ + + _validation = { + 'key_vault': {'required': True}, + } + + _attribute_map = { + 'key_vault': {'key': 'keyVault', 'type': 'KeyVaultReference'}, + 'skip_token': {'key': 'skipToken', 'type': 'str'}, + } + + def __init__(self, *, key_vault, skip_token: str=None, **kwargs) -> None: + super(ListKeyVaultKeysDefinition, self).__init__(**kwargs) + self.key_vault = key_vault + self.skip_token = skip_token diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/logic_management_client_enums.py b/azure-mgmt-logic/azure/mgmt/logic/models/logic_management_client_enums.py old mode 100755 new mode 100644 index 780c7bac1f92..285aeb025198 --- a/azure-mgmt-logic/azure/mgmt/logic/models/logic_management_client_enums.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/logic_management_client_enums.py @@ -12,7 +12,7 @@ from enum import Enum -class WorkflowProvisioningState(Enum): +class WorkflowProvisioningState(str, Enum): not_specified = "NotSpecified" accepted = "Accepted" @@ -34,7 +34,7 @@ class WorkflowProvisioningState(Enum): completed = "Completed" -class WorkflowState(Enum): +class WorkflowState(str, Enum): not_specified = "NotSpecified" completed = "Completed" @@ -44,7 +44,7 @@ class WorkflowState(Enum): suspended = "Suspended" -class SkuName(Enum): +class SkuName(str, Enum): not_specified = "NotSpecified" free = "Free" @@ -54,7 +54,7 @@ class SkuName(Enum): premium = "Premium" -class ParameterType(Enum): +class ParameterType(str, Enum): not_specified = "NotSpecified" string = "String" @@ -67,7 +67,7 @@ class ParameterType(Enum): secure_object = "SecureObject" -class WorkflowTriggerProvisioningState(Enum): +class WorkflowTriggerProvisioningState(str, Enum): not_specified = "NotSpecified" accepted = "Accepted" @@ -89,7 +89,7 @@ class WorkflowTriggerProvisioningState(Enum): completed = "Completed" -class WorkflowStatus(Enum): +class WorkflowStatus(str, Enum): not_specified = "NotSpecified" paused = "Paused" @@ -106,7 +106,7 @@ class WorkflowStatus(Enum): ignored = "Ignored" -class RecurrenceFrequency(Enum): +class RecurrenceFrequency(str, Enum): not_specified = "NotSpecified" second = "Second" @@ -118,7 +118,7 @@ class RecurrenceFrequency(Enum): year = "Year" -class DaysOfWeek(Enum): +class DaysOfWeek(str, Enum): sunday = "Sunday" monday = "Monday" @@ -129,7 +129,7 @@ class DaysOfWeek(Enum): saturday = "Saturday" -class DayOfWeek(Enum): +class DayOfWeek(str, Enum): sunday = "Sunday" monday = "Monday" @@ -140,39 +140,39 @@ class DayOfWeek(Enum): saturday = "Saturday" -class KeyType(Enum): +class KeyType(str, Enum): not_specified = "NotSpecified" primary = "Primary" secondary = "Secondary" -class IntegrationAccountSkuName(Enum): +class IntegrationAccountSkuName(str, Enum): not_specified = "NotSpecified" free = "Free" standard = "Standard" -class SchemaType(Enum): +class SchemaType(str, Enum): not_specified = "NotSpecified" xml = "Xml" -class MapType(Enum): +class MapType(str, Enum): not_specified = "NotSpecified" xslt = "Xslt" -class PartnerType(Enum): +class PartnerType(str, Enum): not_specified = "NotSpecified" b2_b = "B2B" -class AgreementType(Enum): +class AgreementType(str, Enum): not_specified = "NotSpecified" as2 = "AS2" @@ -180,7 +180,7 @@ class AgreementType(Enum): edifact = "Edifact" -class HashingAlgorithm(Enum): +class HashingAlgorithm(str, Enum): not_specified = "NotSpecified" none = "None" @@ -191,7 +191,7 @@ class HashingAlgorithm(Enum): sha2512 = "SHA2512" -class EncryptionAlgorithm(Enum): +class EncryptionAlgorithm(str, Enum): not_specified = "NotSpecified" none = "None" @@ -202,7 +202,7 @@ class EncryptionAlgorithm(Enum): aes256 = "AES256" -class SigningAlgorithm(Enum): +class SigningAlgorithm(str, Enum): not_specified = "NotSpecified" default = "Default" @@ -212,7 +212,7 @@ class SigningAlgorithm(Enum): sha2512 = "SHA2512" -class TrailingSeparatorPolicy(Enum): +class TrailingSeparatorPolicy(str, Enum): not_specified = "NotSpecified" not_allowed = "NotAllowed" @@ -220,7 +220,7 @@ class TrailingSeparatorPolicy(Enum): mandatory = "Mandatory" -class X12CharacterSet(Enum): +class X12CharacterSet(str, Enum): not_specified = "NotSpecified" basic = "Basic" @@ -228,7 +228,7 @@ class X12CharacterSet(Enum): utf8 = "UTF8" -class SegmentTerminatorSuffix(Enum): +class SegmentTerminatorSuffix(str, Enum): not_specified = "NotSpecified" none = "None" @@ -237,14 +237,14 @@ class SegmentTerminatorSuffix(Enum): crlf = "CRLF" -class X12DateFormat(Enum): +class X12DateFormat(str, Enum): not_specified = "NotSpecified" ccyymmdd = "CCYYMMDD" yymmdd = "YYMMDD" -class X12TimeFormat(Enum): +class X12TimeFormat(str, Enum): not_specified = "NotSpecified" hhmm = "HHMM" @@ -253,7 +253,7 @@ class X12TimeFormat(Enum): hhmms_sd = "HHMMSSd" -class UsageIndicator(Enum): +class UsageIndicator(str, Enum): not_specified = "NotSpecified" test = "Test" @@ -261,14 +261,14 @@ class UsageIndicator(Enum): production = "Production" -class MessageFilterType(Enum): +class MessageFilterType(str, Enum): not_specified = "NotSpecified" include = "Include" exclude = "Exclude" -class EdifactCharacterSet(Enum): +class EdifactCharacterSet(str, Enum): not_specified = "NotSpecified" unob = "UNOB" @@ -287,8 +287,51 @@ class EdifactCharacterSet(Enum): keca = "KECA" -class EdifactDecimalIndicator(Enum): +class EdifactDecimalIndicator(str, Enum): not_specified = "NotSpecified" comma = "Comma" decimal_enum = "Decimal" + + +class TrackEventsOperationOptions(str, Enum): + + none = "None" + disable_source_info_enrich = "DisableSourceInfoEnrich" + + +class EventLevel(str, Enum): + + log_always = "LogAlways" + critical = "Critical" + error = "Error" + warning = "Warning" + informational = "Informational" + verbose = "Verbose" + + +class TrackingRecordType(str, Enum): + + not_specified = "NotSpecified" + custom = "Custom" + as2_message = "AS2Message" + as2_mdn = "AS2MDN" + x12_interchange = "X12Interchange" + x12_functional_group = "X12FunctionalGroup" + x12_transaction_set = "X12TransactionSet" + x12_interchange_acknowledgment = "X12InterchangeAcknowledgment" + x12_functional_group_acknowledgment = "X12FunctionalGroupAcknowledgment" + x12_transaction_set_acknowledgment = "X12TransactionSetAcknowledgment" + edifact_interchange = "EdifactInterchange" + edifact_functional_group = "EdifactFunctionalGroup" + edifact_transaction_set = "EdifactTransactionSet" + edifact_interchange_acknowledgment = "EdifactInterchangeAcknowledgment" + edifact_functional_group_acknowledgment = "EdifactFunctionalGroupAcknowledgment" + edifact_transaction_set_acknowledgment = "EdifactTransactionSetAcknowledgment" + + +class AccessKeyType(str, Enum): + + not_specified = "NotSpecified" + primary = "Primary" + secondary = "Secondary" diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/operation.py b/azure-mgmt-logic/azure/mgmt/logic/models/operation.py old mode 100755 new mode 100644 index bd908f8b12b6..24f4765fbb64 --- a/azure-mgmt-logic/azure/mgmt/logic/models/operation.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/operation.py @@ -18,8 +18,7 @@ class Operation(Model): :param name: Operation name: {provider}/{resource}/{operation} :type name: str :param display: The object that represents the operation. - :type display: :class:`OperationDisplay - ` + :type display: ~azure.mgmt.logic.models.OperationDisplay """ _attribute_map = { @@ -27,6 +26,7 @@ class Operation(Model): 'display': {'key': 'display', 'type': 'OperationDisplay'}, } - def __init__(self, name=None, display=None): - self.name = name - self.display = display + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/operation_display.py b/azure-mgmt-logic/azure/mgmt/logic/models/operation_display.py old mode 100755 new mode 100644 index c451fec8ae87..dde4fd1e3b5b --- a/azure-mgmt-logic/azure/mgmt/logic/models/operation_display.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/operation_display.py @@ -30,7 +30,8 @@ class OperationDisplay(Model): 'operation': {'key': 'operation', 'type': 'str'}, } - def __init__(self, provider=None, resource=None, operation=None): - self.provider = provider - self.resource = resource - self.operation = operation + 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/azure-mgmt-logic/azure/mgmt/logic/models/operation_display_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/operation_display_py3.py new file mode 100644 index 000000000000..0b35f13673cb --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/operation_display_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationDisplay(Model): + """The object that represents the operation. + + :param provider: Service provider: Microsoft.Logic + :type provider: str + :param resource: Resource on which the operation is performed: Profile, + endpoint, etc. + :type resource: str + :param operation: Operation type: Read, write, 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/azure-mgmt-logic/azure/mgmt/logic/models/operation_paged.py b/azure-mgmt-logic/azure/mgmt/logic/models/operation_paged.py old mode 100755 new mode 100644 index 09def13d5ae2..d5a86908d4dc --- a/azure-mgmt-logic/azure/mgmt/logic/models/operation_paged.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/operation_paged.py @@ -14,7 +14,7 @@ class OperationPaged(Paged): """ - A paging container for iterating over a list of Operation object + A paging container for iterating over a list of :class:`Operation ` object """ _attribute_map = { diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/operation_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/operation_py3.py new file mode 100644 index 000000000000..c528c6c5a046 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/operation_py3.py @@ -0,0 +1,32 @@ +# 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): + """Logic REST API operation. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param display: The object that represents the operation. + :type display: ~azure.mgmt.logic.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/azure-mgmt-logic/azure/mgmt/logic/models/operation_result.py b/azure-mgmt-logic/azure/mgmt/logic/models/operation_result.py new file mode 100644 index 000000000000..6906151ab408 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/operation_result.py @@ -0,0 +1,89 @@ +# 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 .operation_result_properties import OperationResultProperties + + +class OperationResult(OperationResultProperties): + """The operation result definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param start_time: The start time of the workflow scope repetition. + :type start_time: datetime + :param end_time: The end time of the workflow scope repetition. + :type end_time: datetime + :param correlation: The correlation properties. + :type correlation: ~azure.mgmt.logic.models.RunActionCorrelation + :param status: The status of the workflow scope repetition. Possible + values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', + 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', + 'TimedOut', 'Aborted', 'Ignored' + :type status: str or ~azure.mgmt.logic.models.WorkflowStatus + :param code: The workflow scope repetition code. + :type code: str + :param error: + :type error: object + :ivar tracking_id: Gets the tracking id. + :vartype tracking_id: str + :ivar inputs: Gets the inputs. + :vartype inputs: object + :ivar inputs_link: Gets the link to inputs. + :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink + :ivar outputs: Gets the outputs. + :vartype outputs: object + :ivar outputs_link: Gets the link to outputs. + :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink + :ivar tracked_properties: Gets the tracked properties. + :vartype tracked_properties: object + :param retry_history: Gets the retry histories. + :type retry_history: list[~azure.mgmt.logic.models.RetryHistory] + :param iteration_count: + :type iteration_count: int + """ + + _validation = { + 'tracking_id': {'readonly': True}, + 'inputs': {'readonly': True}, + 'inputs_link': {'readonly': True}, + 'outputs': {'readonly': True}, + 'outputs_link': {'readonly': True}, + 'tracked_properties': {'readonly': True}, + } + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'correlation': {'key': 'correlation', 'type': 'RunActionCorrelation'}, + 'status': {'key': 'status', 'type': 'WorkflowStatus'}, + 'code': {'key': 'code', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'object'}, + 'tracking_id': {'key': 'trackingId', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': 'object'}, + 'inputs_link': {'key': 'inputsLink', 'type': 'ContentLink'}, + 'outputs': {'key': 'outputs', 'type': 'object'}, + 'outputs_link': {'key': 'outputsLink', 'type': 'ContentLink'}, + 'tracked_properties': {'key': 'trackedProperties', 'type': 'object'}, + 'retry_history': {'key': 'retryHistory', 'type': '[RetryHistory]'}, + 'iteration_count': {'key': 'iterationCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(OperationResult, self).__init__(**kwargs) + self.tracking_id = None + self.inputs = None + self.inputs_link = None + self.outputs = None + self.outputs_link = None + self.tracked_properties = None + self.retry_history = kwargs.get('retry_history', None) + self.iteration_count = kwargs.get('iteration_count', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/operation_result_properties.py b/azure-mgmt-logic/azure/mgmt/logic/models/operation_result_properties.py new file mode 100644 index 000000000000..9e65b94ae7b9 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/operation_result_properties.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationResultProperties(Model): + """The run operation result properties. + + :param start_time: The start time of the workflow scope repetition. + :type start_time: datetime + :param end_time: The end time of the workflow scope repetition. + :type end_time: datetime + :param correlation: The correlation properties. + :type correlation: ~azure.mgmt.logic.models.RunActionCorrelation + :param status: The status of the workflow scope repetition. Possible + values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', + 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', + 'TimedOut', 'Aborted', 'Ignored' + :type status: str or ~azure.mgmt.logic.models.WorkflowStatus + :param code: The workflow scope repetition code. + :type code: str + :param error: + :type error: object + """ + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'correlation': {'key': 'correlation', 'type': 'RunActionCorrelation'}, + 'status': {'key': 'status', 'type': 'WorkflowStatus'}, + 'code': {'key': 'code', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(OperationResultProperties, self).__init__(**kwargs) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.correlation = kwargs.get('correlation', None) + self.status = kwargs.get('status', None) + self.code = kwargs.get('code', None) + self.error = kwargs.get('error', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/operation_result_properties_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/operation_result_properties_py3.py new file mode 100644 index 000000000000..33aa9fdbebcf --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/operation_result_properties_py3.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationResultProperties(Model): + """The run operation result properties. + + :param start_time: The start time of the workflow scope repetition. + :type start_time: datetime + :param end_time: The end time of the workflow scope repetition. + :type end_time: datetime + :param correlation: The correlation properties. + :type correlation: ~azure.mgmt.logic.models.RunActionCorrelation + :param status: The status of the workflow scope repetition. Possible + values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', + 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', + 'TimedOut', 'Aborted', 'Ignored' + :type status: str or ~azure.mgmt.logic.models.WorkflowStatus + :param code: The workflow scope repetition code. + :type code: str + :param error: + :type error: object + """ + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'correlation': {'key': 'correlation', 'type': 'RunActionCorrelation'}, + 'status': {'key': 'status', 'type': 'WorkflowStatus'}, + 'code': {'key': 'code', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'object'}, + } + + def __init__(self, *, start_time=None, end_time=None, correlation=None, status=None, code: str=None, error=None, **kwargs) -> None: + super(OperationResultProperties, self).__init__(**kwargs) + self.start_time = start_time + self.end_time = end_time + self.correlation = correlation + self.status = status + self.code = code + self.error = error diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/operation_result_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/operation_result_py3.py new file mode 100644 index 000000000000..f853db10b4e6 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/operation_result_py3.py @@ -0,0 +1,89 @@ +# 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 .operation_result_properties_py3 import OperationResultProperties + + +class OperationResult(OperationResultProperties): + """The operation result definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param start_time: The start time of the workflow scope repetition. + :type start_time: datetime + :param end_time: The end time of the workflow scope repetition. + :type end_time: datetime + :param correlation: The correlation properties. + :type correlation: ~azure.mgmt.logic.models.RunActionCorrelation + :param status: The status of the workflow scope repetition. Possible + values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', + 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', + 'TimedOut', 'Aborted', 'Ignored' + :type status: str or ~azure.mgmt.logic.models.WorkflowStatus + :param code: The workflow scope repetition code. + :type code: str + :param error: + :type error: object + :ivar tracking_id: Gets the tracking id. + :vartype tracking_id: str + :ivar inputs: Gets the inputs. + :vartype inputs: object + :ivar inputs_link: Gets the link to inputs. + :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink + :ivar outputs: Gets the outputs. + :vartype outputs: object + :ivar outputs_link: Gets the link to outputs. + :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink + :ivar tracked_properties: Gets the tracked properties. + :vartype tracked_properties: object + :param retry_history: Gets the retry histories. + :type retry_history: list[~azure.mgmt.logic.models.RetryHistory] + :param iteration_count: + :type iteration_count: int + """ + + _validation = { + 'tracking_id': {'readonly': True}, + 'inputs': {'readonly': True}, + 'inputs_link': {'readonly': True}, + 'outputs': {'readonly': True}, + 'outputs_link': {'readonly': True}, + 'tracked_properties': {'readonly': True}, + } + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'correlation': {'key': 'correlation', 'type': 'RunActionCorrelation'}, + 'status': {'key': 'status', 'type': 'WorkflowStatus'}, + 'code': {'key': 'code', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'object'}, + 'tracking_id': {'key': 'trackingId', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': 'object'}, + 'inputs_link': {'key': 'inputsLink', 'type': 'ContentLink'}, + 'outputs': {'key': 'outputs', 'type': 'object'}, + 'outputs_link': {'key': 'outputsLink', 'type': 'ContentLink'}, + 'tracked_properties': {'key': 'trackedProperties', 'type': 'object'}, + 'retry_history': {'key': 'retryHistory', 'type': '[RetryHistory]'}, + 'iteration_count': {'key': 'iterationCount', 'type': 'int'}, + } + + def __init__(self, *, start_time=None, end_time=None, correlation=None, status=None, code: str=None, error=None, retry_history=None, iteration_count: int=None, **kwargs) -> None: + super(OperationResult, self).__init__(start_time=start_time, end_time=end_time, correlation=correlation, status=status, code=code, error=error, **kwargs) + self.tracking_id = None + self.inputs = None + self.inputs_link = None + self.outputs = None + self.outputs_link = None + self.tracked_properties = None + self.retry_history = retry_history + self.iteration_count = iteration_count diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/partner_content.py b/azure-mgmt-logic/azure/mgmt/logic/models/partner_content.py old mode 100755 new mode 100644 index 8907c61d87f7..8e6050a643d9 --- a/azure-mgmt-logic/azure/mgmt/logic/models/partner_content.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/partner_content.py @@ -16,13 +16,13 @@ class PartnerContent(Model): """The integration account partner content. :param b2b: The B2B partner content. - :type b2b: :class:`B2BPartnerContent - ` + :type b2b: ~azure.mgmt.logic.models.B2BPartnerContent """ _attribute_map = { 'b2b': {'key': 'b2b', 'type': 'B2BPartnerContent'}, } - def __init__(self, b2b=None): - self.b2b = b2b + def __init__(self, **kwargs): + super(PartnerContent, self).__init__(**kwargs) + self.b2b = kwargs.get('b2b', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/partner_content_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/partner_content_py3.py new file mode 100644 index 000000000000..16398395e0b4 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/partner_content_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PartnerContent(Model): + """The integration account partner content. + + :param b2b: The B2B partner content. + :type b2b: ~azure.mgmt.logic.models.B2BPartnerContent + """ + + _attribute_map = { + 'b2b': {'key': 'b2b', 'type': 'B2BPartnerContent'}, + } + + def __init__(self, *, b2b=None, **kwargs) -> None: + super(PartnerContent, self).__init__(**kwargs) + self.b2b = b2b diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/recurrence_schedule.py b/azure-mgmt-logic/azure/mgmt/logic/models/recurrence_schedule.py old mode 100755 new mode 100644 index 1ca81ecd7090..7fdfd3fb5d71 --- a/azure-mgmt-logic/azure/mgmt/logic/models/recurrence_schedule.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/recurrence_schedule.py @@ -16,17 +16,16 @@ class RecurrenceSchedule(Model): """The recurrence schedule. :param minutes: The minutes. - :type minutes: list of int + :type minutes: list[int] :param hours: The hours. - :type hours: list of int + :type hours: list[int] :param week_days: The days of the week. - :type week_days: list of str or :class:`DaysOfWeek - ` + :type week_days: list[str or ~azure.mgmt.logic.models.DaysOfWeek] :param month_days: The month days. - :type month_days: list of int + :type month_days: list[int] :param monthly_occurrences: The monthly occurrences. - :type monthly_occurrences: list of :class:`RecurrenceScheduleOccurrence - ` + :type monthly_occurrences: + list[~azure.mgmt.logic.models.RecurrenceScheduleOccurrence] """ _attribute_map = { @@ -37,9 +36,10 @@ class RecurrenceSchedule(Model): 'monthly_occurrences': {'key': 'monthlyOccurrences', 'type': '[RecurrenceScheduleOccurrence]'}, } - def __init__(self, minutes=None, hours=None, week_days=None, month_days=None, monthly_occurrences=None): - self.minutes = minutes - self.hours = hours - self.week_days = week_days - self.month_days = month_days - self.monthly_occurrences = monthly_occurrences + def __init__(self, **kwargs): + super(RecurrenceSchedule, self).__init__(**kwargs) + self.minutes = kwargs.get('minutes', None) + self.hours = kwargs.get('hours', None) + self.week_days = kwargs.get('week_days', None) + self.month_days = kwargs.get('month_days', None) + self.monthly_occurrences = kwargs.get('monthly_occurrences', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/recurrence_schedule_occurrence.py b/azure-mgmt-logic/azure/mgmt/logic/models/recurrence_schedule_occurrence.py old mode 100755 new mode 100644 index 647d99342d43..b32dbc67e712 --- a/azure-mgmt-logic/azure/mgmt/logic/models/recurrence_schedule_occurrence.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/recurrence_schedule_occurrence.py @@ -13,11 +13,11 @@ class RecurrenceScheduleOccurrence(Model): - """The recurrence schedule occurence. + """The recurrence schedule occurrence. :param day: The day of the week. Possible values include: 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' - :type day: str or :class:`DayOfWeek ` + :type day: str or ~azure.mgmt.logic.models.DayOfWeek :param occurrence: The occurrence. :type occurrence: int """ @@ -27,6 +27,7 @@ class RecurrenceScheduleOccurrence(Model): 'occurrence': {'key': 'occurrence', 'type': 'int'}, } - def __init__(self, day=None, occurrence=None): - self.day = day - self.occurrence = occurrence + def __init__(self, **kwargs): + super(RecurrenceScheduleOccurrence, self).__init__(**kwargs) + self.day = kwargs.get('day', None) + self.occurrence = kwargs.get('occurrence', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/recurrence_schedule_occurrence_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/recurrence_schedule_occurrence_py3.py new file mode 100644 index 000000000000..1bdaee939cc9 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/recurrence_schedule_occurrence_py3.py @@ -0,0 +1,33 @@ +# 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 RecurrenceScheduleOccurrence(Model): + """The recurrence schedule occurrence. + + :param day: The day of the week. Possible values include: 'Sunday', + 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' + :type day: str or ~azure.mgmt.logic.models.DayOfWeek + :param occurrence: The occurrence. + :type occurrence: int + """ + + _attribute_map = { + 'day': {'key': 'day', 'type': 'DayOfWeek'}, + 'occurrence': {'key': 'occurrence', 'type': 'int'}, + } + + def __init__(self, *, day=None, occurrence: int=None, **kwargs) -> None: + super(RecurrenceScheduleOccurrence, self).__init__(**kwargs) + self.day = day + self.occurrence = occurrence diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/recurrence_schedule_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/recurrence_schedule_py3.py new file mode 100644 index 000000000000..68c42503da65 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/recurrence_schedule_py3.py @@ -0,0 +1,45 @@ +# 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 RecurrenceSchedule(Model): + """The recurrence schedule. + + :param minutes: The minutes. + :type minutes: list[int] + :param hours: The hours. + :type hours: list[int] + :param week_days: The days of the week. + :type week_days: list[str or ~azure.mgmt.logic.models.DaysOfWeek] + :param month_days: The month days. + :type month_days: list[int] + :param monthly_occurrences: The monthly occurrences. + :type monthly_occurrences: + list[~azure.mgmt.logic.models.RecurrenceScheduleOccurrence] + """ + + _attribute_map = { + 'minutes': {'key': 'minutes', 'type': '[int]'}, + 'hours': {'key': 'hours', 'type': '[int]'}, + 'week_days': {'key': 'weekDays', 'type': '[DaysOfWeek]'}, + 'month_days': {'key': 'monthDays', 'type': '[int]'}, + 'monthly_occurrences': {'key': 'monthlyOccurrences', 'type': '[RecurrenceScheduleOccurrence]'}, + } + + def __init__(self, *, minutes=None, hours=None, week_days=None, month_days=None, monthly_occurrences=None, **kwargs) -> None: + super(RecurrenceSchedule, self).__init__(**kwargs) + self.minutes = minutes + self.hours = hours + self.week_days = week_days + self.month_days = month_days + self.monthly_occurrences = monthly_occurrences diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/regenerate_action_parameter.py b/azure-mgmt-logic/azure/mgmt/logic/models/regenerate_action_parameter.py old mode 100755 new mode 100644 index cf8e283c57dd..3538c5b92b6c --- a/azure-mgmt-logic/azure/mgmt/logic/models/regenerate_action_parameter.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/regenerate_action_parameter.py @@ -17,12 +17,13 @@ class RegenerateActionParameter(Model): :param key_type: The key type. Possible values include: 'NotSpecified', 'Primary', 'Secondary' - :type key_type: str or :class:`KeyType ` + :type key_type: str or ~azure.mgmt.logic.models.KeyType """ _attribute_map = { 'key_type': {'key': 'keyType', 'type': 'KeyType'}, } - def __init__(self, key_type=None): - self.key_type = key_type + def __init__(self, **kwargs): + super(RegenerateActionParameter, self).__init__(**kwargs) + self.key_type = kwargs.get('key_type', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/regenerate_action_parameter_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/regenerate_action_parameter_py3.py new file mode 100644 index 000000000000..3594196789eb --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/regenerate_action_parameter_py3.py @@ -0,0 +1,29 @@ +# 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 RegenerateActionParameter(Model): + """The access key regenerate action content. + + :param key_type: The key type. Possible values include: 'NotSpecified', + 'Primary', 'Secondary' + :type key_type: str or ~azure.mgmt.logic.models.KeyType + """ + + _attribute_map = { + 'key_type': {'key': 'keyType', 'type': 'KeyType'}, + } + + def __init__(self, *, key_type=None, **kwargs) -> None: + super(RegenerateActionParameter, self).__init__(**kwargs) + self.key_type = key_type diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/repetition_index.py b/azure-mgmt-logic/azure/mgmt/logic/models/repetition_index.py new file mode 100644 index 000000000000..d929e8f1fd2e --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/repetition_index.py @@ -0,0 +1,38 @@ +# 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 RepetitionIndex(Model): + """The workflow run action repetition index. + + All required parameters must be populated in order to send to Azure. + + :param scope_name: The scope. + :type scope_name: str + :param item_index: Required. The index. + :type item_index: int + """ + + _validation = { + 'item_index': {'required': True}, + } + + _attribute_map = { + 'scope_name': {'key': 'scopeName', 'type': 'str'}, + 'item_index': {'key': 'itemIndex', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(RepetitionIndex, self).__init__(**kwargs) + self.scope_name = kwargs.get('scope_name', None) + self.item_index = kwargs.get('item_index', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/repetition_index_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/repetition_index_py3.py new file mode 100644 index 000000000000..8672b59d3c20 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/repetition_index_py3.py @@ -0,0 +1,38 @@ +# 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 RepetitionIndex(Model): + """The workflow run action repetition index. + + All required parameters must be populated in order to send to Azure. + + :param scope_name: The scope. + :type scope_name: str + :param item_index: Required. The index. + :type item_index: int + """ + + _validation = { + 'item_index': {'required': True}, + } + + _attribute_map = { + 'scope_name': {'key': 'scopeName', 'type': 'str'}, + 'item_index': {'key': 'itemIndex', 'type': 'int'}, + } + + def __init__(self, *, item_index: int, scope_name: str=None, **kwargs) -> None: + super(RepetitionIndex, self).__init__(**kwargs) + self.scope_name = scope_name + self.item_index = item_index diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/resource.py b/azure-mgmt-logic/azure/mgmt/logic/models/resource.py old mode 100755 new mode 100644 index 92415fd319ee..dc4a59ade8fd --- a/azure-mgmt-logic/azure/mgmt/logic/models/resource.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/resource.py @@ -27,7 +27,7 @@ class Resource(Model): :param location: The resource location. :type location: str :param tags: The resource tags. - :type tags: dict + :type tags: dict[str, str] """ _validation = { @@ -44,9 +44,10 @@ class Resource(Model): 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, location=None, tags=None): + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) self.id = None self.name = None self.type = None - self.location = location - self.tags = tags + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/resource_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/resource_py3.py new file mode 100644 index 000000000000..f081ebac6ded --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/resource_py3.py @@ -0,0 +1,53 @@ +# 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 base resource type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The 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/azure-mgmt-logic/azure/mgmt/logic/models/resource_reference.py b/azure-mgmt-logic/azure/mgmt/logic/models/resource_reference.py old mode 100755 new mode 100644 index 3b7a7a6b1939..4d809125c873 --- a/azure-mgmt-logic/azure/mgmt/logic/models/resource_reference.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/resource_reference.py @@ -38,7 +38,8 @@ class ResourceReference(Model): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self): + def __init__(self, **kwargs): + super(ResourceReference, self).__init__(**kwargs) self.id = None self.name = None self.type = None diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/resource_reference_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/resource_reference_py3.py new file mode 100644 index 000000000000..371ae58efb0e --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/resource_reference_py3.py @@ -0,0 +1,45 @@ +# 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 ResourceReference(Model): + """The resource reference. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: 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'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceReference, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/retry_history.py b/azure-mgmt-logic/azure/mgmt/logic/models/retry_history.py old mode 100755 new mode 100644 index 437514f6df40..462db65034cb --- a/azure-mgmt-logic/azure/mgmt/logic/models/retry_history.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/retry_history.py @@ -26,8 +26,7 @@ class RetryHistory(Model): :param service_request_id: Gets the service request Id. :type service_request_id: str :param error: Gets the error response. - :type error: :class:`ErrorResponse - ` + :type error: ~azure.mgmt.logic.models.ErrorResponse """ _attribute_map = { @@ -39,10 +38,11 @@ class RetryHistory(Model): 'error': {'key': 'error', 'type': 'ErrorResponse'}, } - def __init__(self, start_time=None, end_time=None, code=None, client_request_id=None, service_request_id=None, error=None): - self.start_time = start_time - self.end_time = end_time - self.code = code - self.client_request_id = client_request_id - self.service_request_id = service_request_id - self.error = error + def __init__(self, **kwargs): + super(RetryHistory, self).__init__(**kwargs) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.code = kwargs.get('code', None) + self.client_request_id = kwargs.get('client_request_id', None) + self.service_request_id = kwargs.get('service_request_id', None) + self.error = kwargs.get('error', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/retry_history_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/retry_history_py3.py new file mode 100644 index 000000000000..543926ea2398 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/retry_history_py3.py @@ -0,0 +1,48 @@ +# 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 RetryHistory(Model): + """The retry history. + + :param start_time: Gets the start time. + :type start_time: datetime + :param end_time: Gets the end time. + :type end_time: datetime + :param code: Gets the status code. + :type code: str + :param client_request_id: Gets the client request Id. + :type client_request_id: str + :param service_request_id: Gets the service request Id. + :type service_request_id: str + :param error: Gets the error response. + :type error: ~azure.mgmt.logic.models.ErrorResponse + """ + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'code': {'key': 'code', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'service_request_id': {'key': 'serviceRequestId', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ErrorResponse'}, + } + + def __init__(self, *, start_time=None, end_time=None, code: str=None, client_request_id: str=None, service_request_id: str=None, error=None, **kwargs) -> None: + super(RetryHistory, self).__init__(**kwargs) + self.start_time = start_time + self.end_time = end_time + self.code = code + self.client_request_id = client_request_id + self.service_request_id = service_request_id + self.error = error diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/run_action_correlation.py b/azure-mgmt-logic/azure/mgmt/logic/models/run_action_correlation.py new file mode 100644 index 000000000000..0eefdd86e0a1 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/run_action_correlation.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .run_correlation import RunCorrelation + + +class RunActionCorrelation(RunCorrelation): + """The workflow run action correlation properties. + + :param client_tracking_id: The client tracking identifier. + :type client_tracking_id: str + :param client_keywords: The client keywords. + :type client_keywords: list[str] + :param action_tracking_id: The action tracking identifier. + :type action_tracking_id: str + """ + + _attribute_map = { + 'client_tracking_id': {'key': 'clientTrackingId', 'type': 'str'}, + 'client_keywords': {'key': 'clientKeywords', 'type': '[str]'}, + 'action_tracking_id': {'key': 'actionTrackingId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RunActionCorrelation, self).__init__(**kwargs) + self.action_tracking_id = kwargs.get('action_tracking_id', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/run_action_correlation_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/run_action_correlation_py3.py new file mode 100644 index 000000000000..cd46a9dc3d81 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/run_action_correlation_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .run_correlation_py3 import RunCorrelation + + +class RunActionCorrelation(RunCorrelation): + """The workflow run action correlation properties. + + :param client_tracking_id: The client tracking identifier. + :type client_tracking_id: str + :param client_keywords: The client keywords. + :type client_keywords: list[str] + :param action_tracking_id: The action tracking identifier. + :type action_tracking_id: str + """ + + _attribute_map = { + 'client_tracking_id': {'key': 'clientTrackingId', 'type': 'str'}, + 'client_keywords': {'key': 'clientKeywords', 'type': '[str]'}, + 'action_tracking_id': {'key': 'actionTrackingId', 'type': 'str'}, + } + + def __init__(self, *, client_tracking_id: str=None, client_keywords=None, action_tracking_id: str=None, **kwargs) -> None: + super(RunActionCorrelation, self).__init__(client_tracking_id=client_tracking_id, client_keywords=client_keywords, **kwargs) + self.action_tracking_id = action_tracking_id diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/run_correlation.py b/azure-mgmt-logic/azure/mgmt/logic/models/run_correlation.py new file mode 100644 index 000000000000..20463c7ae904 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/run_correlation.py @@ -0,0 +1,32 @@ +# 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 RunCorrelation(Model): + """The correlation properties. + + :param client_tracking_id: The client tracking identifier. + :type client_tracking_id: str + :param client_keywords: The client keywords. + :type client_keywords: list[str] + """ + + _attribute_map = { + 'client_tracking_id': {'key': 'clientTrackingId', 'type': 'str'}, + 'client_keywords': {'key': 'clientKeywords', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(RunCorrelation, self).__init__(**kwargs) + self.client_tracking_id = kwargs.get('client_tracking_id', None) + self.client_keywords = kwargs.get('client_keywords', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/run_correlation_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/run_correlation_py3.py new file mode 100644 index 000000000000..f4c5a7e9f2fa --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/run_correlation_py3.py @@ -0,0 +1,32 @@ +# 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 RunCorrelation(Model): + """The correlation properties. + + :param client_tracking_id: The client tracking identifier. + :type client_tracking_id: str + :param client_keywords: The client keywords. + :type client_keywords: list[str] + """ + + _attribute_map = { + 'client_tracking_id': {'key': 'clientTrackingId', 'type': 'str'}, + 'client_keywords': {'key': 'clientKeywords', 'type': '[str]'}, + } + + def __init__(self, *, client_tracking_id: str=None, client_keywords=None, **kwargs) -> None: + super(RunCorrelation, self).__init__(**kwargs) + self.client_tracking_id = client_tracking_id + self.client_keywords = client_keywords diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/set_trigger_state_action_definition.py b/azure-mgmt-logic/azure/mgmt/logic/models/set_trigger_state_action_definition.py new file mode 100644 index 000000000000..526aa19de353 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/set_trigger_state_action_definition.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SetTriggerStateActionDefinition(Model): + """SetTriggerStateActionDefinition. + + All required parameters must be populated in order to send to Azure. + + :param source: Required. + :type source: ~azure.mgmt.logic.models.WorkflowTrigger + """ + + _validation = { + 'source': {'required': True}, + } + + _attribute_map = { + 'source': {'key': 'source', 'type': 'WorkflowTrigger'}, + } + + def __init__(self, **kwargs): + super(SetTriggerStateActionDefinition, self).__init__(**kwargs) + self.source = kwargs.get('source', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/set_trigger_state_action_definition_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/set_trigger_state_action_definition_py3.py new file mode 100644 index 000000000000..7a1cea7f3c86 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/set_trigger_state_action_definition_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SetTriggerStateActionDefinition(Model): + """SetTriggerStateActionDefinition. + + All required parameters must be populated in order to send to Azure. + + :param source: Required. + :type source: ~azure.mgmt.logic.models.WorkflowTrigger + """ + + _validation = { + 'source': {'required': True}, + } + + _attribute_map = { + 'source': {'key': 'source', 'type': 'WorkflowTrigger'}, + } + + def __init__(self, *, source, **kwargs) -> None: + super(SetTriggerStateActionDefinition, self).__init__(**kwargs) + self.source = source diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/sku.py b/azure-mgmt-logic/azure/mgmt/logic/models/sku.py old mode 100755 new mode 100644 index 6a1122711978..6f430383280c --- a/azure-mgmt-logic/azure/mgmt/logic/models/sku.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/sku.py @@ -15,12 +15,13 @@ class Sku(Model): """The sku type. - :param name: The name. Possible values include: 'NotSpecified', 'Free', - 'Shared', 'Basic', 'Standard', 'Premium' - :type name: str or :class:`SkuName ` + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name. Possible values include: 'NotSpecified', + 'Free', 'Shared', 'Basic', 'Standard', 'Premium' + :type name: str or ~azure.mgmt.logic.models.SkuName :param plan: The reference to plan. - :type plan: :class:`ResourceReference - ` + :type plan: ~azure.mgmt.logic.models.ResourceReference """ _validation = { @@ -32,6 +33,7 @@ class Sku(Model): 'plan': {'key': 'plan', 'type': 'ResourceReference'}, } - def __init__(self, name, plan=None): - self.name = name - self.plan = plan + def __init__(self, **kwargs): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.plan = kwargs.get('plan', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/sku_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/sku_py3.py new file mode 100644 index 000000000000..750447b6cdc2 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/sku_py3.py @@ -0,0 +1,39 @@ +# 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 type. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name. Possible values include: 'NotSpecified', + 'Free', 'Shared', 'Basic', 'Standard', 'Premium' + :type name: str or ~azure.mgmt.logic.models.SkuName + :param plan: The reference to plan. + :type plan: ~azure.mgmt.logic.models.ResourceReference + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'SkuName'}, + 'plan': {'key': 'plan', 'type': 'ResourceReference'}, + } + + def __init__(self, *, name, plan=None, **kwargs) -> None: + super(Sku, self).__init__(**kwargs) + self.name = name + self.plan = plan diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/sub_resource.py b/azure-mgmt-logic/azure/mgmt/logic/models/sub_resource.py old mode 100755 new mode 100644 index 8d6c477fb8f6..1e47e072835d --- a/azure-mgmt-logic/azure/mgmt/logic/models/sub_resource.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/sub_resource.py @@ -30,5 +30,6 @@ class SubResource(Model): 'id': {'key': 'id', 'type': 'str'}, } - def __init__(self): + def __init__(self, **kwargs): + super(SubResource, self).__init__(**kwargs) self.id = None diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/sub_resource_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/sub_resource_py3.py new file mode 100644 index 000000000000..5654b9bf9a14 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/sub_resource_py3.py @@ -0,0 +1,35 @@ +# 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 SubResource(Model): + """The sub resource type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SubResource, self).__init__(**kwargs) + self.id = None diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/tracking_event.py b/azure-mgmt-logic/azure/mgmt/logic/models/tracking_event.py new file mode 100644 index 000000000000..0148f09bddf3 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/tracking_event.py @@ -0,0 +1,56 @@ +# 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 TrackingEvent(Model): + """TrackingEvent. + + All required parameters must be populated in order to send to Azure. + + :param event_level: Required. Possible values include: 'LogAlways', + 'Critical', 'Error', 'Warning', 'Informational', 'Verbose' + :type event_level: str or ~azure.mgmt.logic.models.EventLevel + :param event_time: Required. + :type event_time: datetime + :param record_type: Required. Possible values include: 'NotSpecified', + 'Custom', 'AS2Message', 'AS2MDN', 'X12Interchange', 'X12FunctionalGroup', + 'X12TransactionSet', 'X12InterchangeAcknowledgment', + 'X12FunctionalGroupAcknowledgment', 'X12TransactionSetAcknowledgment', + 'EdifactInterchange', 'EdifactFunctionalGroup', 'EdifactTransactionSet', + 'EdifactInterchangeAcknowledgment', + 'EdifactFunctionalGroupAcknowledgment', + 'EdifactTransactionSetAcknowledgment' + :type record_type: str or ~azure.mgmt.logic.models.TrackingRecordType + :param error: + :type error: ~azure.mgmt.logic.models.TrackingEventErrorInfo + """ + + _validation = { + 'event_level': {'required': True}, + 'event_time': {'required': True}, + 'record_type': {'required': True}, + } + + _attribute_map = { + 'event_level': {'key': 'eventLevel', 'type': 'EventLevel'}, + 'event_time': {'key': 'eventTime', 'type': 'iso-8601'}, + 'record_type': {'key': 'recordType', 'type': 'TrackingRecordType'}, + 'error': {'key': 'error', 'type': 'TrackingEventErrorInfo'}, + } + + def __init__(self, **kwargs): + super(TrackingEvent, self).__init__(**kwargs) + self.event_level = kwargs.get('event_level', None) + self.event_time = kwargs.get('event_time', None) + self.record_type = kwargs.get('record_type', None) + self.error = kwargs.get('error', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/tracking_event_error_info.py b/azure-mgmt-logic/azure/mgmt/logic/models/tracking_event_error_info.py new file mode 100644 index 000000000000..c48b9766013d --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/tracking_event_error_info.py @@ -0,0 +1,32 @@ +# 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 TrackingEventErrorInfo(Model): + """TrackingEventErrorInfo. + + :param message: + :type message: str + :param code: + :type code: str + """ + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'}, + 'code': {'key': 'code', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TrackingEventErrorInfo, self).__init__(**kwargs) + self.message = kwargs.get('message', None) + self.code = kwargs.get('code', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/tracking_event_error_info_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/tracking_event_error_info_py3.py new file mode 100644 index 000000000000..1f32ee71cf18 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/tracking_event_error_info_py3.py @@ -0,0 +1,32 @@ +# 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 TrackingEventErrorInfo(Model): + """TrackingEventErrorInfo. + + :param message: + :type message: str + :param code: + :type code: str + """ + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'}, + 'code': {'key': 'code', 'type': 'str'}, + } + + def __init__(self, *, message: str=None, code: str=None, **kwargs) -> None: + super(TrackingEventErrorInfo, self).__init__(**kwargs) + self.message = message + self.code = code diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/tracking_event_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/tracking_event_py3.py new file mode 100644 index 000000000000..ba57b9107f57 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/tracking_event_py3.py @@ -0,0 +1,56 @@ +# 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 TrackingEvent(Model): + """TrackingEvent. + + All required parameters must be populated in order to send to Azure. + + :param event_level: Required. Possible values include: 'LogAlways', + 'Critical', 'Error', 'Warning', 'Informational', 'Verbose' + :type event_level: str or ~azure.mgmt.logic.models.EventLevel + :param event_time: Required. + :type event_time: datetime + :param record_type: Required. Possible values include: 'NotSpecified', + 'Custom', 'AS2Message', 'AS2MDN', 'X12Interchange', 'X12FunctionalGroup', + 'X12TransactionSet', 'X12InterchangeAcknowledgment', + 'X12FunctionalGroupAcknowledgment', 'X12TransactionSetAcknowledgment', + 'EdifactInterchange', 'EdifactFunctionalGroup', 'EdifactTransactionSet', + 'EdifactInterchangeAcknowledgment', + 'EdifactFunctionalGroupAcknowledgment', + 'EdifactTransactionSetAcknowledgment' + :type record_type: str or ~azure.mgmt.logic.models.TrackingRecordType + :param error: + :type error: ~azure.mgmt.logic.models.TrackingEventErrorInfo + """ + + _validation = { + 'event_level': {'required': True}, + 'event_time': {'required': True}, + 'record_type': {'required': True}, + } + + _attribute_map = { + 'event_level': {'key': 'eventLevel', 'type': 'EventLevel'}, + 'event_time': {'key': 'eventTime', 'type': 'iso-8601'}, + 'record_type': {'key': 'recordType', 'type': 'TrackingRecordType'}, + 'error': {'key': 'error', 'type': 'TrackingEventErrorInfo'}, + } + + def __init__(self, *, event_level, event_time, record_type, error=None, **kwargs) -> None: + super(TrackingEvent, self).__init__(**kwargs) + self.event_level = event_level + self.event_time = event_time + self.record_type = record_type + self.error = error diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/tracking_events_definition.py b/azure-mgmt-logic/azure/mgmt/logic/models/tracking_events_definition.py new file mode 100644 index 000000000000..7ac2420546cc --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/tracking_events_definition.py @@ -0,0 +1,45 @@ +# 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 TrackingEventsDefinition(Model): + """TrackingEventsDefinition. + + All required parameters must be populated in order to send to Azure. + + :param source_type: Required. + :type source_type: str + :param track_events_options: Possible values include: 'None', + 'DisableSourceInfoEnrich' + :type track_events_options: str or + ~azure.mgmt.logic.models.TrackEventsOperationOptions + :param events: Required. + :type events: list[~azure.mgmt.logic.models.TrackingEvent] + """ + + _validation = { + 'source_type': {'required': True}, + 'events': {'required': True}, + } + + _attribute_map = { + 'source_type': {'key': 'sourceType', 'type': 'str'}, + 'track_events_options': {'key': 'trackEventsOptions', 'type': 'TrackEventsOperationOptions'}, + 'events': {'key': 'events', 'type': '[TrackingEvent]'}, + } + + def __init__(self, **kwargs): + super(TrackingEventsDefinition, self).__init__(**kwargs) + self.source_type = kwargs.get('source_type', None) + self.track_events_options = kwargs.get('track_events_options', None) + self.events = kwargs.get('events', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/tracking_events_definition_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/tracking_events_definition_py3.py new file mode 100644 index 000000000000..97819d3dc968 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/tracking_events_definition_py3.py @@ -0,0 +1,45 @@ +# 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 TrackingEventsDefinition(Model): + """TrackingEventsDefinition. + + All required parameters must be populated in order to send to Azure. + + :param source_type: Required. + :type source_type: str + :param track_events_options: Possible values include: 'None', + 'DisableSourceInfoEnrich' + :type track_events_options: str or + ~azure.mgmt.logic.models.TrackEventsOperationOptions + :param events: Required. + :type events: list[~azure.mgmt.logic.models.TrackingEvent] + """ + + _validation = { + 'source_type': {'required': True}, + 'events': {'required': True}, + } + + _attribute_map = { + 'source_type': {'key': 'sourceType', 'type': 'str'}, + 'track_events_options': {'key': 'trackEventsOptions', 'type': 'TrackEventsOperationOptions'}, + 'events': {'key': 'events', 'type': '[TrackingEvent]'}, + } + + def __init__(self, *, source_type: str, events, track_events_options=None, **kwargs) -> None: + super(TrackingEventsDefinition, self).__init__(**kwargs) + self.source_type = source_type + self.track_events_options = track_events_options + self.events = events diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow.py old mode 100755 new mode 100644 index bcf25b58be16..6ba75fdbaead --- a/azure-mgmt-logic/azure/mgmt/logic/models/workflow.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow.py @@ -27,35 +27,33 @@ class Workflow(Resource): :param location: The resource location. :type location: str :param tags: The resource tags. - :type tags: dict + :type tags: dict[str, str] :ivar provisioning_state: Gets the provisioning state. Possible values include: 'NotSpecified', 'Accepted', 'Running', 'Ready', 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', 'Succeeded', 'Moving', 'Updating', 'Registering', 'Registered', 'Unregistering', 'Unregistered', 'Completed' - :vartype provisioning_state: str or :class:`WorkflowProvisioningState - ` + :vartype provisioning_state: str or + ~azure.mgmt.logic.models.WorkflowProvisioningState :ivar created_time: Gets the created time. :vartype created_time: datetime :ivar changed_time: Gets the changed time. :vartype changed_time: datetime :param state: The state. Possible values include: 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' - :type state: str or :class:`WorkflowState - ` + :type state: str or ~azure.mgmt.logic.models.WorkflowState :ivar version: Gets the version. :vartype version: str :ivar access_endpoint: Gets the access endpoint. :vartype access_endpoint: str :param sku: The sku. - :type sku: :class:`Sku ` + :type sku: ~azure.mgmt.logic.models.Sku :param integration_account: The integration account. - :type integration_account: :class:`ResourceReference - ` + :type integration_account: ~azure.mgmt.logic.models.ResourceReference :param definition: The definition. :type definition: object :param parameters: The parameters. - :type parameters: dict + :type parameters: dict[str, ~azure.mgmt.logic.models.WorkflowParameter] """ _validation = { @@ -87,15 +85,15 @@ class Workflow(Resource): 'parameters': {'key': 'properties.parameters', 'type': '{WorkflowParameter}'}, } - def __init__(self, location=None, tags=None, state=None, sku=None, integration_account=None, definition=None, parameters=None): - super(Workflow, self).__init__(location=location, tags=tags) + def __init__(self, **kwargs): + super(Workflow, self).__init__(**kwargs) self.provisioning_state = None self.created_time = None self.changed_time = None - self.state = state + self.state = kwargs.get('state', None) self.version = None self.access_endpoint = None - self.sku = sku - self.integration_account = integration_account - self.definition = definition - self.parameters = parameters + self.sku = kwargs.get('sku', None) + self.integration_account = kwargs.get('integration_account', None) + self.definition = kwargs.get('definition', None) + self.parameters = kwargs.get('parameters', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_filter.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_filter.py old mode 100755 new mode 100644 index c2aad0f66f76..0175b536c69b --- a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_filter.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_filter.py @@ -17,13 +17,13 @@ class WorkflowFilter(Model): :param state: The state of workflows. Possible values include: 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' - :type state: str or :class:`WorkflowState - ` + :type state: str or ~azure.mgmt.logic.models.WorkflowState """ _attribute_map = { 'state': {'key': 'state', 'type': 'WorkflowState'}, } - def __init__(self, state=None): - self.state = state + def __init__(self, **kwargs): + super(WorkflowFilter, self).__init__(**kwargs) + self.state = kwargs.get('state', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_filter_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_filter_py3.py new file mode 100644 index 000000000000..7efc6c47d063 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_filter_py3.py @@ -0,0 +1,29 @@ +# 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 WorkflowFilter(Model): + """The workflow filter. + + :param state: The state of workflows. Possible values include: + 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' + :type state: str or ~azure.mgmt.logic.models.WorkflowState + """ + + _attribute_map = { + 'state': {'key': 'state', 'type': 'WorkflowState'}, + } + + def __init__(self, *, state=None, **kwargs) -> None: + super(WorkflowFilter, self).__init__(**kwargs) + self.state = state diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_output_parameter.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_output_parameter.py old mode 100755 new mode 100644 index 240d886ab136..cb568ef000f2 --- a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_output_parameter.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_output_parameter.py @@ -20,8 +20,7 @@ class WorkflowOutputParameter(WorkflowParameter): :param type: The type. Possible values include: 'NotSpecified', 'String', 'SecureString', 'Int', 'Float', 'Bool', 'Array', 'Object', 'SecureObject' - :type type: str or :class:`ParameterType - ` + :type type: str or ~azure.mgmt.logic.models.ParameterType :param value: The value. :type value: object :param metadata: The metadata. @@ -44,6 +43,6 @@ class WorkflowOutputParameter(WorkflowParameter): 'error': {'key': 'error', 'type': 'object'}, } - def __init__(self, type=None, value=None, metadata=None, description=None): - super(WorkflowOutputParameter, self).__init__(type=type, value=value, metadata=metadata, description=description) + def __init__(self, **kwargs): + super(WorkflowOutputParameter, self).__init__(**kwargs) self.error = None diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_output_parameter_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_output_parameter_py3.py new file mode 100644 index 000000000000..56d6c1a336f5 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_output_parameter_py3.py @@ -0,0 +1,48 @@ +# 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 .workflow_parameter_py3 import WorkflowParameter + + +class WorkflowOutputParameter(WorkflowParameter): + """The workflow output parameter. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param type: The type. Possible values include: 'NotSpecified', 'String', + 'SecureString', 'Int', 'Float', 'Bool', 'Array', 'Object', 'SecureObject' + :type type: str or ~azure.mgmt.logic.models.ParameterType + :param value: The value. + :type value: object + :param metadata: The metadata. + :type metadata: object + :param description: The description. + :type description: str + :ivar error: Gets the error. + :vartype error: object + """ + + _validation = { + 'error': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'ParameterType'}, + 'value': {'key': 'value', 'type': 'object'}, + 'metadata': {'key': 'metadata', 'type': 'object'}, + 'description': {'key': 'description', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'object'}, + } + + def __init__(self, *, type=None, value=None, metadata=None, description: str=None, **kwargs) -> None: + super(WorkflowOutputParameter, self).__init__(type=type, value=value, metadata=metadata, description=description, **kwargs) + self.error = None diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_paged.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_paged.py old mode 100755 new mode 100644 index 1c178f528481..8b19166fae8b --- a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_paged.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_paged.py @@ -14,7 +14,7 @@ class WorkflowPaged(Paged): """ - A paging container for iterating over a list of Workflow object + A paging container for iterating over a list of :class:`Workflow ` object """ _attribute_map = { diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_parameter.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_parameter.py old mode 100755 new mode 100644 index 84e620b343f9..14c6c49ec41f --- a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_parameter.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_parameter.py @@ -17,8 +17,7 @@ class WorkflowParameter(Model): :param type: The type. Possible values include: 'NotSpecified', 'String', 'SecureString', 'Int', 'Float', 'Bool', 'Array', 'Object', 'SecureObject' - :type type: str or :class:`ParameterType - ` + :type type: str or ~azure.mgmt.logic.models.ParameterType :param value: The value. :type value: object :param metadata: The metadata. @@ -34,8 +33,9 @@ class WorkflowParameter(Model): 'description': {'key': 'description', 'type': 'str'}, } - def __init__(self, type=None, value=None, metadata=None, description=None): - self.type = type - self.value = value - self.metadata = metadata - self.description = description + def __init__(self, **kwargs): + super(WorkflowParameter, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.value = kwargs.get('value', None) + self.metadata = kwargs.get('metadata', None) + self.description = kwargs.get('description', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_parameter_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_parameter_py3.py new file mode 100644 index 000000000000..f40a0753d708 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_parameter_py3.py @@ -0,0 +1,41 @@ +# 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 WorkflowParameter(Model): + """The workflow parameters. + + :param type: The type. Possible values include: 'NotSpecified', 'String', + 'SecureString', 'Int', 'Float', 'Bool', 'Array', 'Object', 'SecureObject' + :type type: str or ~azure.mgmt.logic.models.ParameterType + :param value: The value. + :type value: object + :param metadata: The metadata. + :type metadata: object + :param description: The description. + :type description: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'ParameterType'}, + 'value': {'key': 'value', 'type': 'object'}, + 'metadata': {'key': 'metadata', 'type': 'object'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, type=None, value=None, metadata=None, description: str=None, **kwargs) -> None: + super(WorkflowParameter, self).__init__(**kwargs) + self.type = type + self.value = value + self.metadata = metadata + self.description = description diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_py3.py new file mode 100644 index 000000000000..2183f7ec9e8e --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_py3.py @@ -0,0 +1,99 @@ +# 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 Workflow(Resource): + """The workflow type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :ivar provisioning_state: Gets the provisioning state. Possible values + include: 'NotSpecified', 'Accepted', 'Running', 'Ready', 'Creating', + 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', 'Succeeded', + 'Moving', 'Updating', 'Registering', 'Registered', 'Unregistering', + 'Unregistered', 'Completed' + :vartype provisioning_state: str or + ~azure.mgmt.logic.models.WorkflowProvisioningState + :ivar created_time: Gets the created time. + :vartype created_time: datetime + :ivar changed_time: Gets the changed time. + :vartype changed_time: datetime + :param state: The state. Possible values include: 'NotSpecified', + 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' + :type state: str or ~azure.mgmt.logic.models.WorkflowState + :ivar version: Gets the version. + :vartype version: str + :ivar access_endpoint: Gets the access endpoint. + :vartype access_endpoint: str + :param sku: The sku. + :type sku: ~azure.mgmt.logic.models.Sku + :param integration_account: The integration account. + :type integration_account: ~azure.mgmt.logic.models.ResourceReference + :param definition: The definition. + :type definition: object + :param parameters: The parameters. + :type parameters: dict[str, ~azure.mgmt.logic.models.WorkflowParameter] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'created_time': {'readonly': True}, + 'changed_time': {'readonly': True}, + 'version': {'readonly': True}, + 'access_endpoint': {'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}'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'WorkflowProvisioningState'}, + 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'WorkflowState'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'access_endpoint': {'key': 'properties.accessEndpoint', 'type': 'str'}, + 'sku': {'key': 'properties.sku', 'type': 'Sku'}, + 'integration_account': {'key': 'properties.integrationAccount', 'type': 'ResourceReference'}, + 'definition': {'key': 'properties.definition', 'type': 'object'}, + 'parameters': {'key': 'properties.parameters', 'type': '{WorkflowParameter}'}, + } + + def __init__(self, *, location: str=None, tags=None, state=None, sku=None, integration_account=None, definition=None, parameters=None, **kwargs) -> None: + super(Workflow, self).__init__(location=location, tags=tags, **kwargs) + self.provisioning_state = None + self.created_time = None + self.changed_time = None + self.state = state + self.version = None + self.access_endpoint = None + self.sku = sku + self.integration_account = integration_account + self.definition = definition + self.parameters = parameters diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run.py old mode 100755 new mode 100644 index 6a03dc149b72..29b942f78095 --- a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run.py @@ -20,6 +20,8 @@ class WorkflowRun(SubResource): :ivar id: The resource id. :vartype id: str + :ivar wait_end_time: Gets the wait end time. + :vartype wait_end_time: datetime :ivar start_time: Gets the start time. :vartype start_time: datetime :ivar end_time: Gets the end time. @@ -27,8 +29,7 @@ class WorkflowRun(SubResource): :ivar status: Gets the status. Possible values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' - :vartype status: str or :class:`WorkflowStatus - ` + :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus :ivar code: Gets the code. :vartype code: str :ivar error: Gets the error. @@ -36,19 +37,16 @@ class WorkflowRun(SubResource): :ivar correlation_id: Gets the correlation id. :vartype correlation_id: str :param correlation: The run correlation. - :type correlation: :class:`Correlation - ` + :type correlation: ~azure.mgmt.logic.models.Correlation :ivar workflow: Gets the reference to workflow version. - :vartype workflow: :class:`ResourceReference - ` + :vartype workflow: ~azure.mgmt.logic.models.ResourceReference :ivar trigger: Gets the fired trigger. - :vartype trigger: :class:`WorkflowRunTrigger - ` + :vartype trigger: ~azure.mgmt.logic.models.WorkflowRunTrigger :ivar outputs: Gets the outputs. - :vartype outputs: dict + :vartype outputs: dict[str, + ~azure.mgmt.logic.models.WorkflowOutputParameter] :ivar response: Gets the response of the flow run. - :vartype response: :class:`WorkflowRunTrigger - ` + :vartype response: ~azure.mgmt.logic.models.WorkflowRunTrigger :ivar name: Gets the workflow run name. :vartype name: str :ivar type: Gets the workflow run type. @@ -57,6 +55,7 @@ class WorkflowRun(SubResource): _validation = { 'id': {'readonly': True}, + 'wait_end_time': {'readonly': True}, 'start_time': {'readonly': True}, 'end_time': {'readonly': True}, 'status': {'readonly': True}, @@ -73,6 +72,7 @@ class WorkflowRun(SubResource): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, + 'wait_end_time': {'key': 'properties.waitEndTime', 'type': 'iso-8601'}, 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, 'status': {'key': 'properties.status', 'type': 'WorkflowStatus'}, @@ -88,15 +88,16 @@ class WorkflowRun(SubResource): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, correlation=None): - super(WorkflowRun, self).__init__() + def __init__(self, **kwargs): + super(WorkflowRun, self).__init__(**kwargs) + self.wait_end_time = None self.start_time = None self.end_time = None self.status = None self.code = None self.error = None self.correlation_id = None - self.correlation = correlation + self.correlation = kwargs.get('correlation', None) self.workflow = None self.trigger = None self.outputs = None diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action.py old mode 100755 new mode 100644 index 6691ac2a175d..109e7abd552a --- a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action.py @@ -27,8 +27,7 @@ class WorkflowRunAction(SubResource): :ivar status: Gets the status. Possible values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' - :vartype status: str or :class:`WorkflowStatus - ` + :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus :ivar code: Gets the code. :vartype code: str :ivar error: Gets the error. @@ -36,19 +35,15 @@ class WorkflowRunAction(SubResource): :ivar tracking_id: Gets the tracking id. :vartype tracking_id: str :param correlation: The correlation properties. - :type correlation: :class:`Correlation - ` + :type correlation: ~azure.mgmt.logic.models.Correlation :ivar inputs_link: Gets the link to inputs. - :vartype inputs_link: :class:`ContentLink - ` + :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink :ivar outputs_link: Gets the link to outputs. - :vartype outputs_link: :class:`ContentLink - ` + :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink :ivar tracked_properties: Gets the tracked properties. :vartype tracked_properties: object :param retry_history: Gets the retry histories. - :type retry_history: list of :class:`RetryHistory - ` + :type retry_history: list[~azure.mgmt.logic.models.RetryHistory] :ivar name: Gets the workflow run action name. :vartype name: str :ivar type: Gets the workflow run action type. @@ -87,18 +82,18 @@ class WorkflowRunAction(SubResource): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, correlation=None, retry_history=None): - super(WorkflowRunAction, self).__init__() + def __init__(self, **kwargs): + super(WorkflowRunAction, self).__init__(**kwargs) self.start_time = None self.end_time = None self.status = None self.code = None self.error = None self.tracking_id = None - self.correlation = correlation + self.correlation = kwargs.get('correlation', None) self.inputs_link = None self.outputs_link = None self.tracked_properties = None - self.retry_history = retry_history + self.retry_history = kwargs.get('retry_history', None) self.name = None self.type = None diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_filter.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_filter.py old mode 100755 new mode 100644 index 99e1240f58d5..ae0f4aea8ea1 --- a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_filter.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_filter.py @@ -19,13 +19,13 @@ class WorkflowRunActionFilter(Model): 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' - :type status: str or :class:`WorkflowStatus - ` + :type status: str or ~azure.mgmt.logic.models.WorkflowStatus """ _attribute_map = { 'status': {'key': 'status', 'type': 'WorkflowStatus'}, } - def __init__(self, status=None): - self.status = status + def __init__(self, **kwargs): + super(WorkflowRunActionFilter, self).__init__(**kwargs) + self.status = kwargs.get('status', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_filter_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_filter_py3.py new file mode 100644 index 000000000000..a2bdf89cd7f1 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_filter_py3.py @@ -0,0 +1,31 @@ +# 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 WorkflowRunActionFilter(Model): + """The workflow run action filter. + + :param status: The status of workflow run action. Possible values include: + 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', + 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', + 'Ignored' + :type status: str or ~azure.mgmt.logic.models.WorkflowStatus + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'WorkflowStatus'}, + } + + def __init__(self, *, status=None, **kwargs) -> None: + super(WorkflowRunActionFilter, self).__init__(**kwargs) + self.status = status diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_paged.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_paged.py old mode 100755 new mode 100644 index fa92d01ae335..4f541f4f2d8e --- a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_paged.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_paged.py @@ -14,7 +14,7 @@ class WorkflowRunActionPaged(Paged): """ - A paging container for iterating over a list of WorkflowRunAction object + A paging container for iterating over a list of :class:`WorkflowRunAction ` object """ _attribute_map = { diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_py3.py new file mode 100644 index 000000000000..c2bdbc2c31ef --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_py3.py @@ -0,0 +1,99 @@ +# 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 .sub_resource_py3 import SubResource + + +class WorkflowRunAction(SubResource): + """The workflow run action. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar start_time: Gets the start time. + :vartype start_time: datetime + :ivar end_time: Gets the end time. + :vartype end_time: datetime + :ivar status: Gets the status. Possible values include: 'NotSpecified', + 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', + 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' + :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus + :ivar code: Gets the code. + :vartype code: str + :ivar error: Gets the error. + :vartype error: object + :ivar tracking_id: Gets the tracking id. + :vartype tracking_id: str + :param correlation: The correlation properties. + :type correlation: ~azure.mgmt.logic.models.Correlation + :ivar inputs_link: Gets the link to inputs. + :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink + :ivar outputs_link: Gets the link to outputs. + :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink + :ivar tracked_properties: Gets the tracked properties. + :vartype tracked_properties: object + :param retry_history: Gets the retry histories. + :type retry_history: list[~azure.mgmt.logic.models.RetryHistory] + :ivar name: Gets the workflow run action name. + :vartype name: str + :ivar type: Gets the workflow run action type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'status': {'readonly': True}, + 'code': {'readonly': True}, + 'error': {'readonly': True}, + 'tracking_id': {'readonly': True}, + 'inputs_link': {'readonly': True}, + 'outputs_link': {'readonly': True}, + 'tracked_properties': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'status': {'key': 'properties.status', 'type': 'WorkflowStatus'}, + 'code': {'key': 'properties.code', 'type': 'str'}, + 'error': {'key': 'properties.error', 'type': 'object'}, + 'tracking_id': {'key': 'properties.trackingId', 'type': 'str'}, + 'correlation': {'key': 'properties.correlation', 'type': 'Correlation'}, + 'inputs_link': {'key': 'properties.inputsLink', 'type': 'ContentLink'}, + 'outputs_link': {'key': 'properties.outputsLink', 'type': 'ContentLink'}, + 'tracked_properties': {'key': 'properties.trackedProperties', 'type': 'object'}, + 'retry_history': {'key': 'properties.retryHistory', 'type': '[RetryHistory]'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, correlation=None, retry_history=None, **kwargs) -> None: + super(WorkflowRunAction, self).__init__(**kwargs) + self.start_time = None + self.end_time = None + self.status = None + self.code = None + self.error = None + self.tracking_id = None + self.correlation = correlation + self.inputs_link = None + self.outputs_link = None + self.tracked_properties = None + self.retry_history = retry_history + self.name = None + self.type = None diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_repetition_definition.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_repetition_definition.py new file mode 100644 index 000000000000..0c66a57624a2 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_repetition_definition.py @@ -0,0 +1,117 @@ +# 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 WorkflowRunActionRepetitionDefinition(Resource): + """The workflow run action repetition definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param start_time: The start time of the workflow scope repetition. + :type start_time: datetime + :param end_time: The end time of the workflow scope repetition. + :type end_time: datetime + :param correlation: The correlation properties. + :type correlation: ~azure.mgmt.logic.models.RunActionCorrelation + :param status: The status of the workflow scope repetition. Possible + values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', + 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', + 'TimedOut', 'Aborted', 'Ignored' + :type status: str or ~azure.mgmt.logic.models.WorkflowStatus + :param code: The workflow scope repetition code. + :type code: str + :param error: + :type error: object + :ivar tracking_id: Gets the tracking id. + :vartype tracking_id: str + :ivar inputs: Gets the inputs. + :vartype inputs: object + :ivar inputs_link: Gets the link to inputs. + :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink + :ivar outputs: Gets the outputs. + :vartype outputs: object + :ivar outputs_link: Gets the link to outputs. + :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink + :ivar tracked_properties: Gets the tracked properties. + :vartype tracked_properties: object + :param retry_history: Gets the retry histories. + :type retry_history: list[~azure.mgmt.logic.models.RetryHistory] + :param iteration_count: + :type iteration_count: int + :param repetition_indexes: The repetition indexes. + :type repetition_indexes: list[~azure.mgmt.logic.models.RepetitionIndex] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tracking_id': {'readonly': True}, + 'inputs': {'readonly': True}, + 'inputs_link': {'readonly': True}, + 'outputs': {'readonly': True}, + 'outputs_link': {'readonly': True}, + 'tracked_properties': {'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}'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'correlation': {'key': 'properties.correlation', 'type': 'RunActionCorrelation'}, + 'status': {'key': 'properties.status', 'type': 'WorkflowStatus'}, + 'code': {'key': 'properties.code', 'type': 'str'}, + 'error': {'key': 'properties.error', 'type': 'object'}, + 'tracking_id': {'key': 'properties.trackingId', 'type': 'str'}, + 'inputs': {'key': 'properties.inputs', 'type': 'object'}, + 'inputs_link': {'key': 'properties.inputsLink', 'type': 'ContentLink'}, + 'outputs': {'key': 'properties.outputs', 'type': 'object'}, + 'outputs_link': {'key': 'properties.outputsLink', 'type': 'ContentLink'}, + 'tracked_properties': {'key': 'properties.trackedProperties', 'type': 'object'}, + 'retry_history': {'key': 'properties.retryHistory', 'type': '[RetryHistory]'}, + 'iteration_count': {'key': 'properties.iterationCount', 'type': 'int'}, + 'repetition_indexes': {'key': 'properties.repetitionIndexes', 'type': '[RepetitionIndex]'}, + } + + def __init__(self, **kwargs): + super(WorkflowRunActionRepetitionDefinition, self).__init__(**kwargs) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.correlation = kwargs.get('correlation', None) + self.status = kwargs.get('status', None) + self.code = kwargs.get('code', None) + self.error = kwargs.get('error', None) + self.tracking_id = None + self.inputs = None + self.inputs_link = None + self.outputs = None + self.outputs_link = None + self.tracked_properties = None + self.retry_history = kwargs.get('retry_history', None) + self.iteration_count = kwargs.get('iteration_count', None) + self.repetition_indexes = kwargs.get('repetition_indexes', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_repetition_definition_collection.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_repetition_definition_collection.py new file mode 100644 index 000000000000..2579dd8d91d5 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_repetition_definition_collection.py @@ -0,0 +1,29 @@ +# 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 WorkflowRunActionRepetitionDefinitionCollection(Model): + """A collection of workflow run action repetitions. + + :param value: + :type value: + list[~azure.mgmt.logic.models.WorkflowRunActionRepetitionDefinition] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[WorkflowRunActionRepetitionDefinition]'}, + } + + def __init__(self, **kwargs): + super(WorkflowRunActionRepetitionDefinitionCollection, self).__init__(**kwargs) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_repetition_definition_collection_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_repetition_definition_collection_py3.py new file mode 100644 index 000000000000..8e91a4d9e493 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_repetition_definition_collection_py3.py @@ -0,0 +1,29 @@ +# 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 WorkflowRunActionRepetitionDefinitionCollection(Model): + """A collection of workflow run action repetitions. + + :param value: + :type value: + list[~azure.mgmt.logic.models.WorkflowRunActionRepetitionDefinition] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[WorkflowRunActionRepetitionDefinition]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(WorkflowRunActionRepetitionDefinitionCollection, self).__init__(**kwargs) + self.value = value diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_repetition_definition_paged.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_repetition_definition_paged.py new file mode 100644 index 000000000000..edb3bdb62a07 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_repetition_definition_paged.py @@ -0,0 +1,27 @@ +# 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 WorkflowRunActionRepetitionDefinitionPaged(Paged): + """ + A paging container for iterating over a list of :class:`WorkflowRunActionRepetitionDefinition ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[WorkflowRunActionRepetitionDefinition]'} + } + + def __init__(self, *args, **kwargs): + + super(WorkflowRunActionRepetitionDefinitionPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_repetition_definition_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_repetition_definition_py3.py new file mode 100644 index 000000000000..d2f922d27aef --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_action_repetition_definition_py3.py @@ -0,0 +1,117 @@ +# 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 WorkflowRunActionRepetitionDefinition(Resource): + """The workflow run action repetition definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param start_time: The start time of the workflow scope repetition. + :type start_time: datetime + :param end_time: The end time of the workflow scope repetition. + :type end_time: datetime + :param correlation: The correlation properties. + :type correlation: ~azure.mgmt.logic.models.RunActionCorrelation + :param status: The status of the workflow scope repetition. Possible + values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', + 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', + 'TimedOut', 'Aborted', 'Ignored' + :type status: str or ~azure.mgmt.logic.models.WorkflowStatus + :param code: The workflow scope repetition code. + :type code: str + :param error: + :type error: object + :ivar tracking_id: Gets the tracking id. + :vartype tracking_id: str + :ivar inputs: Gets the inputs. + :vartype inputs: object + :ivar inputs_link: Gets the link to inputs. + :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink + :ivar outputs: Gets the outputs. + :vartype outputs: object + :ivar outputs_link: Gets the link to outputs. + :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink + :ivar tracked_properties: Gets the tracked properties. + :vartype tracked_properties: object + :param retry_history: Gets the retry histories. + :type retry_history: list[~azure.mgmt.logic.models.RetryHistory] + :param iteration_count: + :type iteration_count: int + :param repetition_indexes: The repetition indexes. + :type repetition_indexes: list[~azure.mgmt.logic.models.RepetitionIndex] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tracking_id': {'readonly': True}, + 'inputs': {'readonly': True}, + 'inputs_link': {'readonly': True}, + 'outputs': {'readonly': True}, + 'outputs_link': {'readonly': True}, + 'tracked_properties': {'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}'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'correlation': {'key': 'properties.correlation', 'type': 'RunActionCorrelation'}, + 'status': {'key': 'properties.status', 'type': 'WorkflowStatus'}, + 'code': {'key': 'properties.code', 'type': 'str'}, + 'error': {'key': 'properties.error', 'type': 'object'}, + 'tracking_id': {'key': 'properties.trackingId', 'type': 'str'}, + 'inputs': {'key': 'properties.inputs', 'type': 'object'}, + 'inputs_link': {'key': 'properties.inputsLink', 'type': 'ContentLink'}, + 'outputs': {'key': 'properties.outputs', 'type': 'object'}, + 'outputs_link': {'key': 'properties.outputsLink', 'type': 'ContentLink'}, + 'tracked_properties': {'key': 'properties.trackedProperties', 'type': 'object'}, + 'retry_history': {'key': 'properties.retryHistory', 'type': '[RetryHistory]'}, + 'iteration_count': {'key': 'properties.iterationCount', 'type': 'int'}, + 'repetition_indexes': {'key': 'properties.repetitionIndexes', 'type': '[RepetitionIndex]'}, + } + + def __init__(self, *, location: str=None, tags=None, start_time=None, end_time=None, correlation=None, status=None, code: str=None, error=None, retry_history=None, iteration_count: int=None, repetition_indexes=None, **kwargs) -> None: + super(WorkflowRunActionRepetitionDefinition, self).__init__(location=location, tags=tags, **kwargs) + self.start_time = start_time + self.end_time = end_time + self.correlation = correlation + self.status = status + self.code = code + self.error = error + self.tracking_id = None + self.inputs = None + self.inputs_link = None + self.outputs = None + self.outputs_link = None + self.tracked_properties = None + self.retry_history = retry_history + self.iteration_count = iteration_count + self.repetition_indexes = repetition_indexes diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_filter.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_filter.py old mode 100755 new mode 100644 index 8f0c070b3b9a..99f92563b4a8 --- a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_filter.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_filter.py @@ -19,13 +19,13 @@ class WorkflowRunFilter(Model): 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' - :type status: str or :class:`WorkflowStatus - ` + :type status: str or ~azure.mgmt.logic.models.WorkflowStatus """ _attribute_map = { 'status': {'key': 'status', 'type': 'WorkflowStatus'}, } - def __init__(self, status=None): - self.status = status + def __init__(self, **kwargs): + super(WorkflowRunFilter, self).__init__(**kwargs) + self.status = kwargs.get('status', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_filter_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_filter_py3.py new file mode 100644 index 000000000000..b118d686766e --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_filter_py3.py @@ -0,0 +1,31 @@ +# 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 WorkflowRunFilter(Model): + """The workflow run filter. + + :param status: The status of workflow run. Possible values include: + 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', + 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', + 'Ignored' + :type status: str or ~azure.mgmt.logic.models.WorkflowStatus + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'WorkflowStatus'}, + } + + def __init__(self, *, status=None, **kwargs) -> None: + super(WorkflowRunFilter, self).__init__(**kwargs) + self.status = status diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_paged.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_paged.py old mode 100755 new mode 100644 index f9f54e39856b..877053124bea --- a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_paged.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_paged.py @@ -14,7 +14,7 @@ class WorkflowRunPaged(Paged): """ - A paging container for iterating over a list of WorkflowRun object + A paging container for iterating over a list of :class:`WorkflowRun ` object """ _attribute_map = { diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_py3.py new file mode 100644 index 000000000000..4346f0b4550a --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_py3.py @@ -0,0 +1,106 @@ +# 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 .sub_resource_py3 import SubResource + + +class WorkflowRun(SubResource): + """The workflow run. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar wait_end_time: Gets the wait end time. + :vartype wait_end_time: datetime + :ivar start_time: Gets the start time. + :vartype start_time: datetime + :ivar end_time: Gets the end time. + :vartype end_time: datetime + :ivar status: Gets the status. Possible values include: 'NotSpecified', + 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', + 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' + :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus + :ivar code: Gets the code. + :vartype code: str + :ivar error: Gets the error. + :vartype error: object + :ivar correlation_id: Gets the correlation id. + :vartype correlation_id: str + :param correlation: The run correlation. + :type correlation: ~azure.mgmt.logic.models.Correlation + :ivar workflow: Gets the reference to workflow version. + :vartype workflow: ~azure.mgmt.logic.models.ResourceReference + :ivar trigger: Gets the fired trigger. + :vartype trigger: ~azure.mgmt.logic.models.WorkflowRunTrigger + :ivar outputs: Gets the outputs. + :vartype outputs: dict[str, + ~azure.mgmt.logic.models.WorkflowOutputParameter] + :ivar response: Gets the response of the flow run. + :vartype response: ~azure.mgmt.logic.models.WorkflowRunTrigger + :ivar name: Gets the workflow run name. + :vartype name: str + :ivar type: Gets the workflow run type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'wait_end_time': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'status': {'readonly': True}, + 'code': {'readonly': True}, + 'error': {'readonly': True}, + 'correlation_id': {'readonly': True}, + 'workflow': {'readonly': True}, + 'trigger': {'readonly': True}, + 'outputs': {'readonly': True}, + 'response': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'wait_end_time': {'key': 'properties.waitEndTime', 'type': 'iso-8601'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'status': {'key': 'properties.status', 'type': 'WorkflowStatus'}, + 'code': {'key': 'properties.code', 'type': 'str'}, + 'error': {'key': 'properties.error', 'type': 'object'}, + 'correlation_id': {'key': 'properties.correlationId', 'type': 'str'}, + 'correlation': {'key': 'properties.correlation', 'type': 'Correlation'}, + 'workflow': {'key': 'properties.workflow', 'type': 'ResourceReference'}, + 'trigger': {'key': 'properties.trigger', 'type': 'WorkflowRunTrigger'}, + 'outputs': {'key': 'properties.outputs', 'type': '{WorkflowOutputParameter}'}, + 'response': {'key': 'properties.response', 'type': 'WorkflowRunTrigger'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, correlation=None, **kwargs) -> None: + super(WorkflowRun, self).__init__(**kwargs) + self.wait_end_time = None + self.start_time = None + self.end_time = None + self.status = None + self.code = None + self.error = None + self.correlation_id = None + self.correlation = correlation + self.workflow = None + self.trigger = None + self.outputs = None + self.response = None + self.name = None + self.type = None diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_trigger.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_trigger.py old mode 100755 new mode 100644 index 8d44f8a3c007..5601c36ac0ed --- a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_trigger.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_trigger.py @@ -23,13 +23,13 @@ class WorkflowRunTrigger(Model): :ivar inputs: Gets the inputs. :vartype inputs: object :ivar inputs_link: Gets the link to inputs. - :vartype inputs_link: :class:`ContentLink - ` + :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink :ivar outputs: Gets the outputs. :vartype outputs: object :ivar outputs_link: Gets the link to outputs. - :vartype outputs_link: :class:`ContentLink - ` + :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink + :ivar scheduled_time: Gets the scheduled time. + :vartype scheduled_time: datetime :ivar start_time: Gets the start time. :vartype start_time: datetime :ivar end_time: Gets the end time. @@ -37,15 +37,13 @@ class WorkflowRunTrigger(Model): :ivar tracking_id: Gets the tracking id. :vartype tracking_id: str :param correlation: The run correlation. - :type correlation: :class:`Correlation - ` + :type correlation: ~azure.mgmt.logic.models.Correlation :ivar code: Gets the code. :vartype code: str :ivar status: Gets the status. Possible values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' - :vartype status: str or :class:`WorkflowStatus - ` + :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus :ivar error: Gets the error. :vartype error: object :ivar tracked_properties: Gets the tracked properties. @@ -58,6 +56,7 @@ class WorkflowRunTrigger(Model): 'inputs_link': {'readonly': True}, 'outputs': {'readonly': True}, 'outputs_link': {'readonly': True}, + 'scheduled_time': {'readonly': True}, 'start_time': {'readonly': True}, 'end_time': {'readonly': True}, 'tracking_id': {'readonly': True}, @@ -73,6 +72,7 @@ class WorkflowRunTrigger(Model): 'inputs_link': {'key': 'inputsLink', 'type': 'ContentLink'}, 'outputs': {'key': 'outputs', 'type': 'object'}, 'outputs_link': {'key': 'outputsLink', 'type': 'ContentLink'}, + 'scheduled_time': {'key': 'scheduledTime', 'type': 'iso-8601'}, 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, 'tracking_id': {'key': 'trackingId', 'type': 'str'}, @@ -83,16 +83,18 @@ class WorkflowRunTrigger(Model): 'tracked_properties': {'key': 'trackedProperties', 'type': 'object'}, } - def __init__(self, correlation=None): + def __init__(self, **kwargs): + super(WorkflowRunTrigger, self).__init__(**kwargs) self.name = None self.inputs = None self.inputs_link = None self.outputs = None self.outputs_link = None + self.scheduled_time = None self.start_time = None self.end_time = None self.tracking_id = None - self.correlation = correlation + self.correlation = kwargs.get('correlation', None) self.code = None self.status = None self.error = None diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_trigger_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_trigger_py3.py new file mode 100644 index 000000000000..eae9e8073abb --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_run_trigger_py3.py @@ -0,0 +1,101 @@ +# 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 WorkflowRunTrigger(Model): + """The workflow run trigger. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Gets the name. + :vartype name: str + :ivar inputs: Gets the inputs. + :vartype inputs: object + :ivar inputs_link: Gets the link to inputs. + :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink + :ivar outputs: Gets the outputs. + :vartype outputs: object + :ivar outputs_link: Gets the link to outputs. + :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink + :ivar scheduled_time: Gets the scheduled time. + :vartype scheduled_time: datetime + :ivar start_time: Gets the start time. + :vartype start_time: datetime + :ivar end_time: Gets the end time. + :vartype end_time: datetime + :ivar tracking_id: Gets the tracking id. + :vartype tracking_id: str + :param correlation: The run correlation. + :type correlation: ~azure.mgmt.logic.models.Correlation + :ivar code: Gets the code. + :vartype code: str + :ivar status: Gets the status. Possible values include: 'NotSpecified', + 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', + 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' + :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus + :ivar error: Gets the error. + :vartype error: object + :ivar tracked_properties: Gets the tracked properties. + :vartype tracked_properties: object + """ + + _validation = { + 'name': {'readonly': True}, + 'inputs': {'readonly': True}, + 'inputs_link': {'readonly': True}, + 'outputs': {'readonly': True}, + 'outputs_link': {'readonly': True}, + 'scheduled_time': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'tracking_id': {'readonly': True}, + 'code': {'readonly': True}, + 'status': {'readonly': True}, + 'error': {'readonly': True}, + 'tracked_properties': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': 'object'}, + 'inputs_link': {'key': 'inputsLink', 'type': 'ContentLink'}, + 'outputs': {'key': 'outputs', 'type': 'object'}, + 'outputs_link': {'key': 'outputsLink', 'type': 'ContentLink'}, + 'scheduled_time': {'key': 'scheduledTime', 'type': 'iso-8601'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'tracking_id': {'key': 'trackingId', 'type': 'str'}, + 'correlation': {'key': 'correlation', 'type': 'Correlation'}, + 'code': {'key': 'code', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'WorkflowStatus'}, + 'error': {'key': 'error', 'type': 'object'}, + 'tracked_properties': {'key': 'trackedProperties', 'type': 'object'}, + } + + def __init__(self, *, correlation=None, **kwargs) -> None: + super(WorkflowRunTrigger, self).__init__(**kwargs) + self.name = None + self.inputs = None + self.inputs_link = None + self.outputs = None + self.outputs_link = None + self.scheduled_time = None + self.start_time = None + self.end_time = None + self.tracking_id = None + self.correlation = correlation + self.code = None + self.status = None + self.error = None + self.tracked_properties = None diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger.py old mode 100755 new mode 100644 index 138b372983e0..2555cd97ca74 --- a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger.py @@ -26,31 +26,26 @@ class WorkflowTrigger(SubResource): 'Moving', 'Updating', 'Registering', 'Registered', 'Unregistering', 'Unregistered', 'Completed' :vartype provisioning_state: str or - :class:`WorkflowTriggerProvisioningState - ` + ~azure.mgmt.logic.models.WorkflowTriggerProvisioningState :ivar created_time: Gets the created time. :vartype created_time: datetime :ivar changed_time: Gets the changed time. :vartype changed_time: datetime :ivar state: Gets the state. Possible values include: 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' - :vartype state: str or :class:`WorkflowState - ` + :vartype state: str or ~azure.mgmt.logic.models.WorkflowState :ivar status: Gets the status. Possible values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' - :vartype status: str or :class:`WorkflowStatus - ` + :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus :ivar last_execution_time: Gets the last execution time. :vartype last_execution_time: datetime :ivar next_execution_time: Gets the next execution time. :vartype next_execution_time: datetime :ivar recurrence: Gets the workflow trigger recurrence. - :vartype recurrence: :class:`WorkflowTriggerRecurrence - ` + :vartype recurrence: ~azure.mgmt.logic.models.WorkflowTriggerRecurrence :ivar workflow: Gets the reference to workflow. - :vartype workflow: :class:`ResourceReference - ` + :vartype workflow: ~azure.mgmt.logic.models.ResourceReference :ivar name: Gets the workflow trigger name. :vartype name: str :ivar type: Gets the workflow trigger type. @@ -87,8 +82,8 @@ class WorkflowTrigger(SubResource): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self): - super(WorkflowTrigger, self).__init__() + def __init__(self, **kwargs): + super(WorkflowTrigger, self).__init__(**kwargs) self.provisioning_state = None self.created_time = None self.changed_time = None diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_callback_url.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_callback_url.py old mode 100755 new mode 100644 index e2d2b9f9b624..77e7b4cdc13e --- a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_callback_url.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_callback_url.py @@ -28,10 +28,10 @@ class WorkflowTriggerCallbackUrl(Model): :vartype relative_path: str :param relative_path_parameters: Gets the workflow trigger callback URL relative path parameters. - :type relative_path_parameters: list of str + :type relative_path_parameters: list[str] :param queries: Gets the workflow trigger callback URL query parameters. - :type queries: :class:`WorkflowTriggerListCallbackUrlQueries - ` + :type queries: + ~azure.mgmt.logic.models.WorkflowTriggerListCallbackUrlQueries """ _validation = { @@ -50,10 +50,11 @@ class WorkflowTriggerCallbackUrl(Model): 'queries': {'key': 'queries', 'type': 'WorkflowTriggerListCallbackUrlQueries'}, } - def __init__(self, relative_path_parameters=None, queries=None): + def __init__(self, **kwargs): + super(WorkflowTriggerCallbackUrl, self).__init__(**kwargs) self.value = None self.method = None self.base_path = None self.relative_path = None - self.relative_path_parameters = relative_path_parameters - self.queries = queries + self.relative_path_parameters = kwargs.get('relative_path_parameters', None) + self.queries = kwargs.get('queries', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_callback_url_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_callback_url_py3.py new file mode 100644 index 000000000000..99f6c9c7f080 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_callback_url_py3.py @@ -0,0 +1,60 @@ +# 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 WorkflowTriggerCallbackUrl(Model): + """The workflow trigger callback URL. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: Gets the workflow trigger callback URL. + :vartype value: str + :ivar method: Gets the workflow trigger callback URL HTTP method. + :vartype method: str + :ivar base_path: Gets the workflow trigger callback URL base path. + :vartype base_path: str + :ivar relative_path: Gets the workflow trigger callback URL relative path. + :vartype relative_path: str + :param relative_path_parameters: Gets the workflow trigger callback URL + relative path parameters. + :type relative_path_parameters: list[str] + :param queries: Gets the workflow trigger callback URL query parameters. + :type queries: + ~azure.mgmt.logic.models.WorkflowTriggerListCallbackUrlQueries + """ + + _validation = { + 'value': {'readonly': True}, + 'method': {'readonly': True}, + 'base_path': {'readonly': True}, + 'relative_path': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'method': {'key': 'method', 'type': 'str'}, + 'base_path': {'key': 'basePath', 'type': 'str'}, + 'relative_path': {'key': 'relativePath', 'type': 'str'}, + 'relative_path_parameters': {'key': 'relativePathParameters', 'type': '[str]'}, + 'queries': {'key': 'queries', 'type': 'WorkflowTriggerListCallbackUrlQueries'}, + } + + def __init__(self, *, relative_path_parameters=None, queries=None, **kwargs) -> None: + super(WorkflowTriggerCallbackUrl, self).__init__(**kwargs) + self.value = None + self.method = None + self.base_path = None + self.relative_path = None + self.relative_path_parameters = relative_path_parameters + self.queries = queries diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_filter.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_filter.py old mode 100755 new mode 100644 index 30ddf75393ee..7ea79307eccf --- a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_filter.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_filter.py @@ -17,13 +17,13 @@ class WorkflowTriggerFilter(Model): :param state: The state of workflow trigger. Possible values include: 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' - :type state: str or :class:`WorkflowState - ` + :type state: str or ~azure.mgmt.logic.models.WorkflowState """ _attribute_map = { 'state': {'key': 'state', 'type': 'WorkflowState'}, } - def __init__(self, state=None): - self.state = state + def __init__(self, **kwargs): + super(WorkflowTriggerFilter, self).__init__(**kwargs) + self.state = kwargs.get('state', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_filter_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_filter_py3.py new file mode 100644 index 000000000000..2a321508bebb --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_filter_py3.py @@ -0,0 +1,29 @@ +# 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 WorkflowTriggerFilter(Model): + """The workflow trigger filter. + + :param state: The state of workflow trigger. Possible values include: + 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' + :type state: str or ~azure.mgmt.logic.models.WorkflowState + """ + + _attribute_map = { + 'state': {'key': 'state', 'type': 'WorkflowState'}, + } + + def __init__(self, *, state=None, **kwargs) -> None: + super(WorkflowTriggerFilter, self).__init__(**kwargs) + self.state = state diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_history.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_history.py old mode 100755 new mode 100644 index d6fbc396a876..1ff54dbeaf1b --- a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_history.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_history.py @@ -27,8 +27,7 @@ class WorkflowTriggerHistory(SubResource): :ivar status: Gets the status. Possible values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' - :vartype status: str or :class:`WorkflowStatus - ` + :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus :ivar code: Gets the code. :vartype code: str :ivar error: Gets the error. @@ -36,19 +35,15 @@ class WorkflowTriggerHistory(SubResource): :ivar tracking_id: Gets the tracking id. :vartype tracking_id: str :param correlation: The run correlation. - :type correlation: :class:`Correlation - ` + :type correlation: ~azure.mgmt.logic.models.Correlation :ivar inputs_link: Gets the link to input parameters. - :vartype inputs_link: :class:`ContentLink - ` + :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink :ivar outputs_link: Gets the link to output parameters. - :vartype outputs_link: :class:`ContentLink - ` + :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink :ivar fired: Gets a value indicating whether trigger was fired. :vartype fired: bool :ivar run: Gets the reference to workflow run. - :vartype run: :class:`ResourceReference - ` + :vartype run: ~azure.mgmt.logic.models.ResourceReference :ivar name: Gets the workflow trigger history name. :vartype name: str :ivar type: Gets the workflow trigger history type. @@ -88,15 +83,15 @@ class WorkflowTriggerHistory(SubResource): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, correlation=None): - super(WorkflowTriggerHistory, self).__init__() + def __init__(self, **kwargs): + super(WorkflowTriggerHistory, self).__init__(**kwargs) self.start_time = None self.end_time = None self.status = None self.code = None self.error = None self.tracking_id = None - self.correlation = correlation + self.correlation = kwargs.get('correlation', None) self.inputs_link = None self.outputs_link = None self.fired = None diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_history_filter.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_history_filter.py old mode 100755 new mode 100644 index 49fc022d99e2..082b1dfd11bf --- a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_history_filter.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_history_filter.py @@ -19,13 +19,13 @@ class WorkflowTriggerHistoryFilter(Model): include: 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' - :type status: str or :class:`WorkflowStatus - ` + :type status: str or ~azure.mgmt.logic.models.WorkflowStatus """ _attribute_map = { 'status': {'key': 'status', 'type': 'WorkflowStatus'}, } - def __init__(self, status=None): - self.status = status + def __init__(self, **kwargs): + super(WorkflowTriggerHistoryFilter, self).__init__(**kwargs) + self.status = kwargs.get('status', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_history_filter_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_history_filter_py3.py new file mode 100644 index 000000000000..e696821bfff2 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_history_filter_py3.py @@ -0,0 +1,31 @@ +# 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 WorkflowTriggerHistoryFilter(Model): + """The workflow trigger history filter. + + :param status: The status of workflow trigger history. Possible values + include: 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', + 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', + 'Aborted', 'Ignored' + :type status: str or ~azure.mgmt.logic.models.WorkflowStatus + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'WorkflowStatus'}, + } + + def __init__(self, *, status=None, **kwargs) -> None: + super(WorkflowTriggerHistoryFilter, self).__init__(**kwargs) + self.status = status diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_history_paged.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_history_paged.py old mode 100755 new mode 100644 index d52e650406f2..87124d3bd7f6 --- a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_history_paged.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_history_paged.py @@ -14,7 +14,7 @@ class WorkflowTriggerHistoryPaged(Paged): """ - A paging container for iterating over a list of WorkflowTriggerHistory object + A paging container for iterating over a list of :class:`WorkflowTriggerHistory ` object """ _attribute_map = { diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_history_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_history_py3.py new file mode 100644 index 000000000000..315faa696b02 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_history_py3.py @@ -0,0 +1,100 @@ +# 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 .sub_resource_py3 import SubResource + + +class WorkflowTriggerHistory(SubResource): + """The workflow trigger history. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar start_time: Gets the start time. + :vartype start_time: datetime + :ivar end_time: Gets the end time. + :vartype end_time: datetime + :ivar status: Gets the status. Possible values include: 'NotSpecified', + 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', + 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' + :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus + :ivar code: Gets the code. + :vartype code: str + :ivar error: Gets the error. + :vartype error: object + :ivar tracking_id: Gets the tracking id. + :vartype tracking_id: str + :param correlation: The run correlation. + :type correlation: ~azure.mgmt.logic.models.Correlation + :ivar inputs_link: Gets the link to input parameters. + :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink + :ivar outputs_link: Gets the link to output parameters. + :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink + :ivar fired: Gets a value indicating whether trigger was fired. + :vartype fired: bool + :ivar run: Gets the reference to workflow run. + :vartype run: ~azure.mgmt.logic.models.ResourceReference + :ivar name: Gets the workflow trigger history name. + :vartype name: str + :ivar type: Gets the workflow trigger history type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'status': {'readonly': True}, + 'code': {'readonly': True}, + 'error': {'readonly': True}, + 'tracking_id': {'readonly': True}, + 'inputs_link': {'readonly': True}, + 'outputs_link': {'readonly': True}, + 'fired': {'readonly': True}, + 'run': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'status': {'key': 'properties.status', 'type': 'WorkflowStatus'}, + 'code': {'key': 'properties.code', 'type': 'str'}, + 'error': {'key': 'properties.error', 'type': 'object'}, + 'tracking_id': {'key': 'properties.trackingId', 'type': 'str'}, + 'correlation': {'key': 'properties.correlation', 'type': 'Correlation'}, + 'inputs_link': {'key': 'properties.inputsLink', 'type': 'ContentLink'}, + 'outputs_link': {'key': 'properties.outputsLink', 'type': 'ContentLink'}, + 'fired': {'key': 'properties.fired', 'type': 'bool'}, + 'run': {'key': 'properties.run', 'type': 'ResourceReference'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, correlation=None, **kwargs) -> None: + super(WorkflowTriggerHistory, self).__init__(**kwargs) + self.start_time = None + self.end_time = None + self.status = None + self.code = None + self.error = None + self.tracking_id = None + self.correlation = correlation + self.inputs_link = None + self.outputs_link = None + self.fired = None + self.run = None + self.name = None + self.type = None diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_list_callback_url_queries.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_list_callback_url_queries.py old mode 100755 new mode 100644 index 87c9086bf449..99ed8eac51b9 --- a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_list_callback_url_queries.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_list_callback_url_queries.py @@ -23,6 +23,8 @@ class WorkflowTriggerListCallbackUrlQueries(Model): :type sv: str :param sig: The SAS signature. :type sig: str + :param se: The SAS timestamp. + :type se: str """ _attribute_map = { @@ -30,10 +32,13 @@ class WorkflowTriggerListCallbackUrlQueries(Model): 'sp': {'key': 'sp', 'type': 'str'}, 'sv': {'key': 'sv', 'type': 'str'}, 'sig': {'key': 'sig', 'type': 'str'}, + 'se': {'key': 'se', 'type': 'str'}, } - def __init__(self, api_version=None, sp=None, sv=None, sig=None): - self.api_version = api_version - self.sp = sp - self.sv = sv - self.sig = sig + def __init__(self, **kwargs): + super(WorkflowTriggerListCallbackUrlQueries, self).__init__(**kwargs) + self.api_version = kwargs.get('api_version', None) + self.sp = kwargs.get('sp', None) + self.sv = kwargs.get('sv', None) + self.sig = kwargs.get('sig', None) + self.se = kwargs.get('se', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_list_callback_url_queries_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_list_callback_url_queries_py3.py new file mode 100644 index 000000000000..e87101e2da19 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_list_callback_url_queries_py3.py @@ -0,0 +1,44 @@ +# 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 WorkflowTriggerListCallbackUrlQueries(Model): + """Gets the workflow trigger callback URL query parameters. + + :param api_version: The api version. + :type api_version: str + :param sp: The SAS permissions. + :type sp: str + :param sv: The SAS version. + :type sv: str + :param sig: The SAS signature. + :type sig: str + :param se: The SAS timestamp. + :type se: str + """ + + _attribute_map = { + 'api_version': {'key': 'api-version', 'type': 'str'}, + 'sp': {'key': 'sp', 'type': 'str'}, + 'sv': {'key': 'sv', 'type': 'str'}, + 'sig': {'key': 'sig', 'type': 'str'}, + 'se': {'key': 'se', 'type': 'str'}, + } + + def __init__(self, *, api_version: str=None, sp: str=None, sv: str=None, sig: str=None, se: str=None, **kwargs) -> None: + super(WorkflowTriggerListCallbackUrlQueries, self).__init__(**kwargs) + self.api_version = api_version + self.sp = sp + self.sv = sv + self.sig = sig + self.se = se diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_paged.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_paged.py old mode 100755 new mode 100644 index 2bc137a1f644..b433baa67e6e --- a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_paged.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_paged.py @@ -14,7 +14,7 @@ class WorkflowTriggerPaged(Paged): """ - A paging container for iterating over a list of WorkflowTrigger object + A paging container for iterating over a list of :class:`WorkflowTrigger ` object """ _attribute_map = { diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_py3.py new file mode 100644 index 000000000000..361c7a1a45a2 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_py3.py @@ -0,0 +1,97 @@ +# 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 .sub_resource_py3 import SubResource + + +class WorkflowTrigger(SubResource): + """The workflow trigger. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar provisioning_state: Gets the provisioning state. Possible values + include: 'NotSpecified', 'Accepted', 'Running', 'Ready', 'Creating', + 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', 'Succeeded', + 'Moving', 'Updating', 'Registering', 'Registered', 'Unregistering', + 'Unregistered', 'Completed' + :vartype provisioning_state: str or + ~azure.mgmt.logic.models.WorkflowTriggerProvisioningState + :ivar created_time: Gets the created time. + :vartype created_time: datetime + :ivar changed_time: Gets the changed time. + :vartype changed_time: datetime + :ivar state: Gets the state. Possible values include: 'NotSpecified', + 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' + :vartype state: str or ~azure.mgmt.logic.models.WorkflowState + :ivar status: Gets the status. Possible values include: 'NotSpecified', + 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', + 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' + :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus + :ivar last_execution_time: Gets the last execution time. + :vartype last_execution_time: datetime + :ivar next_execution_time: Gets the next execution time. + :vartype next_execution_time: datetime + :ivar recurrence: Gets the workflow trigger recurrence. + :vartype recurrence: ~azure.mgmt.logic.models.WorkflowTriggerRecurrence + :ivar workflow: Gets the reference to workflow. + :vartype workflow: ~azure.mgmt.logic.models.ResourceReference + :ivar name: Gets the workflow trigger name. + :vartype name: str + :ivar type: Gets the workflow trigger type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'created_time': {'readonly': True}, + 'changed_time': {'readonly': True}, + 'state': {'readonly': True}, + 'status': {'readonly': True}, + 'last_execution_time': {'readonly': True}, + 'next_execution_time': {'readonly': True}, + 'recurrence': {'readonly': True}, + 'workflow': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'WorkflowTriggerProvisioningState'}, + 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'WorkflowState'}, + 'status': {'key': 'properties.status', 'type': 'WorkflowStatus'}, + 'last_execution_time': {'key': 'properties.lastExecutionTime', 'type': 'iso-8601'}, + 'next_execution_time': {'key': 'properties.nextExecutionTime', 'type': 'iso-8601'}, + 'recurrence': {'key': 'properties.recurrence', 'type': 'WorkflowTriggerRecurrence'}, + 'workflow': {'key': 'properties.workflow', 'type': 'ResourceReference'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(WorkflowTrigger, self).__init__(**kwargs) + self.provisioning_state = None + self.created_time = None + self.changed_time = None + self.state = None + self.status = None + self.last_execution_time = None + self.next_execution_time = None + self.recurrence = None + self.workflow = None + self.name = None + self.type = None diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_recurrence.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_recurrence.py old mode 100755 new mode 100644 index 77007c330ca7..36bc585fbfff --- a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_recurrence.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_recurrence.py @@ -17,34 +17,33 @@ class WorkflowTriggerRecurrence(Model): :param frequency: The frequency. Possible values include: 'NotSpecified', 'Second', 'Minute', 'Hour', 'Day', 'Week', 'Month', 'Year' - :type frequency: str or :class:`RecurrenceFrequency - ` + :type frequency: str or ~azure.mgmt.logic.models.RecurrenceFrequency :param interval: The interval. :type interval: int :param start_time: The start time. - :type start_time: datetime + :type start_time: str :param end_time: The end time. - :type end_time: datetime + :type end_time: str :param time_zone: The time zone. :type time_zone: str :param schedule: The recurrence schedule. - :type schedule: :class:`RecurrenceSchedule - ` + :type schedule: ~azure.mgmt.logic.models.RecurrenceSchedule """ _attribute_map = { 'frequency': {'key': 'frequency', 'type': 'RecurrenceFrequency'}, 'interval': {'key': 'interval', 'type': 'int'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'start_time': {'key': 'startTime', 'type': 'str'}, + 'end_time': {'key': 'endTime', 'type': 'str'}, 'time_zone': {'key': 'timeZone', 'type': 'str'}, 'schedule': {'key': 'schedule', 'type': 'RecurrenceSchedule'}, } - def __init__(self, frequency=None, interval=None, start_time=None, end_time=None, time_zone=None, schedule=None): - self.frequency = frequency - self.interval = interval - self.start_time = start_time - self.end_time = end_time - self.time_zone = time_zone - self.schedule = schedule + def __init__(self, **kwargs): + super(WorkflowTriggerRecurrence, self).__init__(**kwargs) + self.frequency = kwargs.get('frequency', None) + self.interval = kwargs.get('interval', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.time_zone = kwargs.get('time_zone', None) + self.schedule = kwargs.get('schedule', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_recurrence_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_recurrence_py3.py new file mode 100644 index 000000000000..b437623a94f6 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_trigger_recurrence_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class WorkflowTriggerRecurrence(Model): + """The workflow trigger recurrence. + + :param frequency: The frequency. Possible values include: 'NotSpecified', + 'Second', 'Minute', 'Hour', 'Day', 'Week', 'Month', 'Year' + :type frequency: str or ~azure.mgmt.logic.models.RecurrenceFrequency + :param interval: The interval. + :type interval: int + :param start_time: The start time. + :type start_time: str + :param end_time: The end time. + :type end_time: str + :param time_zone: The time zone. + :type time_zone: str + :param schedule: The recurrence schedule. + :type schedule: ~azure.mgmt.logic.models.RecurrenceSchedule + """ + + _attribute_map = { + 'frequency': {'key': 'frequency', 'type': 'RecurrenceFrequency'}, + 'interval': {'key': 'interval', 'type': 'int'}, + 'start_time': {'key': 'startTime', 'type': 'str'}, + 'end_time': {'key': 'endTime', 'type': 'str'}, + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + 'schedule': {'key': 'schedule', 'type': 'RecurrenceSchedule'}, + } + + def __init__(self, *, frequency=None, interval: int=None, start_time: str=None, end_time: str=None, time_zone: str=None, schedule=None, **kwargs) -> None: + super(WorkflowTriggerRecurrence, self).__init__(**kwargs) + self.frequency = frequency + self.interval = interval + self.start_time = start_time + self.end_time = end_time + self.time_zone = time_zone + self.schedule = schedule diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_version.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_version.py old mode 100755 new mode 100644 index d2f092ce7117..dfff86d6a134 --- a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_version.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_version.py @@ -27,28 +27,26 @@ class WorkflowVersion(Resource): :param location: The resource location. :type location: str :param tags: The resource tags. - :type tags: dict + :type tags: dict[str, str] :ivar created_time: Gets the created time. :vartype created_time: datetime :ivar changed_time: Gets the changed time. :vartype changed_time: datetime :param state: The state. Possible values include: 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' - :type state: str or :class:`WorkflowState - ` + :type state: str or ~azure.mgmt.logic.models.WorkflowState :ivar version: Gets the version. :vartype version: str :ivar access_endpoint: Gets the access endpoint. :vartype access_endpoint: str :param sku: The sku. - :type sku: :class:`Sku ` + :type sku: ~azure.mgmt.logic.models.Sku :param integration_account: The integration account. - :type integration_account: :class:`ResourceReference - ` + :type integration_account: ~azure.mgmt.logic.models.ResourceReference :param definition: The definition. :type definition: object :param parameters: The parameters. - :type parameters: dict + :type parameters: dict[str, ~azure.mgmt.logic.models.WorkflowParameter] """ _validation = { @@ -78,14 +76,14 @@ class WorkflowVersion(Resource): 'parameters': {'key': 'properties.parameters', 'type': '{WorkflowParameter}'}, } - def __init__(self, location=None, tags=None, state=None, sku=None, integration_account=None, definition=None, parameters=None): - super(WorkflowVersion, self).__init__(location=location, tags=tags) + def __init__(self, **kwargs): + super(WorkflowVersion, self).__init__(**kwargs) self.created_time = None self.changed_time = None - self.state = state + self.state = kwargs.get('state', None) self.version = None self.access_endpoint = None - self.sku = sku - self.integration_account = integration_account - self.definition = definition - self.parameters = parameters + self.sku = kwargs.get('sku', None) + self.integration_account = kwargs.get('integration_account', None) + self.definition = kwargs.get('definition', None) + self.parameters = kwargs.get('parameters', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_version_paged.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_version_paged.py old mode 100755 new mode 100644 index 5dd0c479f322..10cc6a74589d --- a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_version_paged.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_version_paged.py @@ -14,7 +14,7 @@ class WorkflowVersionPaged(Paged): """ - A paging container for iterating over a list of WorkflowVersion object + A paging container for iterating over a list of :class:`WorkflowVersion ` object """ _attribute_map = { diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/workflow_version_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_version_py3.py new file mode 100644 index 000000000000..dfc3e8d65951 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/workflow_version_py3.py @@ -0,0 +1,89 @@ +# 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 WorkflowVersion(Resource): + """The workflow version. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :ivar created_time: Gets the created time. + :vartype created_time: datetime + :ivar changed_time: Gets the changed time. + :vartype changed_time: datetime + :param state: The state. Possible values include: 'NotSpecified', + 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' + :type state: str or ~azure.mgmt.logic.models.WorkflowState + :ivar version: Gets the version. + :vartype version: str + :ivar access_endpoint: Gets the access endpoint. + :vartype access_endpoint: str + :param sku: The sku. + :type sku: ~azure.mgmt.logic.models.Sku + :param integration_account: The integration account. + :type integration_account: ~azure.mgmt.logic.models.ResourceReference + :param definition: The definition. + :type definition: object + :param parameters: The parameters. + :type parameters: dict[str, ~azure.mgmt.logic.models.WorkflowParameter] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_time': {'readonly': True}, + 'changed_time': {'readonly': True}, + 'version': {'readonly': True}, + 'access_endpoint': {'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}'}, + 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'WorkflowState'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'access_endpoint': {'key': 'properties.accessEndpoint', 'type': 'str'}, + 'sku': {'key': 'properties.sku', 'type': 'Sku'}, + 'integration_account': {'key': 'properties.integrationAccount', 'type': 'ResourceReference'}, + 'definition': {'key': 'properties.definition', 'type': 'object'}, + 'parameters': {'key': 'properties.parameters', 'type': '{WorkflowParameter}'}, + } + + def __init__(self, *, location: str=None, tags=None, state=None, sku=None, integration_account=None, definition=None, parameters=None, **kwargs) -> None: + super(WorkflowVersion, self).__init__(location=location, tags=tags, **kwargs) + self.created_time = None + self.changed_time = None + self.state = state + self.version = None + self.access_endpoint = None + self.sku = sku + self.integration_account = integration_account + self.definition = definition + self.parameters = parameters diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_acknowledgement_settings.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_acknowledgement_settings.py old mode 100755 new mode 100644 index 23c78d9db55a..f3dd83d1ac68 --- a/azure-mgmt-logic/azure/mgmt/logic/models/x12_acknowledgement_settings.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_acknowledgement_settings.py @@ -15,35 +15,37 @@ class X12AcknowledgementSettings(Model): """The X12 agreement acknowledgement settings. - :param need_technical_acknowledgement: The value indicating whether - technical acknowledgement is needed. + All required parameters must be populated in order to send to Azure. + + :param need_technical_acknowledgement: Required. The value indicating + whether technical acknowledgement is needed. :type need_technical_acknowledgement: bool - :param batch_technical_acknowledgements: The value indicating whether to - batch the technical acknowledgements. + :param batch_technical_acknowledgements: Required. The value indicating + whether to batch the technical acknowledgements. :type batch_technical_acknowledgements: bool - :param need_functional_acknowledgement: The value indicating whether - functional acknowledgement is needed. + :param need_functional_acknowledgement: Required. The value indicating + whether functional acknowledgement is needed. :type need_functional_acknowledgement: bool :param functional_acknowledgement_version: The functional acknowledgement version. :type functional_acknowledgement_version: str - :param batch_functional_acknowledgements: The value indicating whether to - batch functional acknowledgements. + :param batch_functional_acknowledgements: Required. The value indicating + whether to batch functional acknowledgements. :type batch_functional_acknowledgements: bool - :param need_implementation_acknowledgement: The value indicating whether - implementation acknowledgement is needed. + :param need_implementation_acknowledgement: Required. The value indicating + whether implementation acknowledgement is needed. :type need_implementation_acknowledgement: bool :param implementation_acknowledgement_version: The implementation acknowledgement version. :type implementation_acknowledgement_version: str - :param batch_implementation_acknowledgements: The value indicating whether - to batch implementation acknowledgements. + :param batch_implementation_acknowledgements: Required. The value + indicating whether to batch implementation acknowledgements. :type batch_implementation_acknowledgements: bool - :param need_loop_for_valid_messages: The value indicating whether a loop - is needed for valid messages. + :param need_loop_for_valid_messages: Required. The value indicating + whether a loop is needed for valid messages. :type need_loop_for_valid_messages: bool - :param send_synchronous_acknowledgement: The value indicating whether to - send synchronous acknowledgement. + :param send_synchronous_acknowledgement: Required. The value indicating + whether to send synchronous acknowledgement. :type send_synchronous_acknowledgement: bool :param acknowledgement_control_number_prefix: The acknowledgement control number prefix. @@ -51,14 +53,14 @@ class X12AcknowledgementSettings(Model): :param acknowledgement_control_number_suffix: The acknowledgement control number suffix. :type acknowledgement_control_number_suffix: str - :param acknowledgement_control_number_lower_bound: The acknowledgement - control number lower bound. + :param acknowledgement_control_number_lower_bound: Required. The + acknowledgement control number lower bound. :type acknowledgement_control_number_lower_bound: int - :param acknowledgement_control_number_upper_bound: The acknowledgement - control number upper bound. + :param acknowledgement_control_number_upper_bound: Required. The + acknowledgement control number upper bound. :type acknowledgement_control_number_upper_bound: int - :param rollover_acknowledgement_control_number: The value indicating - whether to rollover acknowledgement control number. + :param rollover_acknowledgement_control_number: Required. The value + indicating whether to rollover acknowledgement control number. :type rollover_acknowledgement_control_number: bool """ @@ -94,19 +96,20 @@ class X12AcknowledgementSettings(Model): 'rollover_acknowledgement_control_number': {'key': 'rolloverAcknowledgementControlNumber', 'type': 'bool'}, } - def __init__(self, need_technical_acknowledgement, batch_technical_acknowledgements, need_functional_acknowledgement, batch_functional_acknowledgements, need_implementation_acknowledgement, batch_implementation_acknowledgements, need_loop_for_valid_messages, send_synchronous_acknowledgement, acknowledgement_control_number_lower_bound, acknowledgement_control_number_upper_bound, rollover_acknowledgement_control_number, functional_acknowledgement_version=None, implementation_acknowledgement_version=None, acknowledgement_control_number_prefix=None, acknowledgement_control_number_suffix=None): - self.need_technical_acknowledgement = need_technical_acknowledgement - self.batch_technical_acknowledgements = batch_technical_acknowledgements - self.need_functional_acknowledgement = need_functional_acknowledgement - self.functional_acknowledgement_version = functional_acknowledgement_version - self.batch_functional_acknowledgements = batch_functional_acknowledgements - self.need_implementation_acknowledgement = need_implementation_acknowledgement - self.implementation_acknowledgement_version = implementation_acknowledgement_version - self.batch_implementation_acknowledgements = batch_implementation_acknowledgements - self.need_loop_for_valid_messages = need_loop_for_valid_messages - self.send_synchronous_acknowledgement = send_synchronous_acknowledgement - self.acknowledgement_control_number_prefix = acknowledgement_control_number_prefix - self.acknowledgement_control_number_suffix = acknowledgement_control_number_suffix - self.acknowledgement_control_number_lower_bound = acknowledgement_control_number_lower_bound - self.acknowledgement_control_number_upper_bound = acknowledgement_control_number_upper_bound - self.rollover_acknowledgement_control_number = rollover_acknowledgement_control_number + def __init__(self, **kwargs): + super(X12AcknowledgementSettings, self).__init__(**kwargs) + self.need_technical_acknowledgement = kwargs.get('need_technical_acknowledgement', None) + self.batch_technical_acknowledgements = kwargs.get('batch_technical_acknowledgements', None) + self.need_functional_acknowledgement = kwargs.get('need_functional_acknowledgement', None) + self.functional_acknowledgement_version = kwargs.get('functional_acknowledgement_version', None) + self.batch_functional_acknowledgements = kwargs.get('batch_functional_acknowledgements', None) + self.need_implementation_acknowledgement = kwargs.get('need_implementation_acknowledgement', None) + self.implementation_acknowledgement_version = kwargs.get('implementation_acknowledgement_version', None) + self.batch_implementation_acknowledgements = kwargs.get('batch_implementation_acknowledgements', None) + self.need_loop_for_valid_messages = kwargs.get('need_loop_for_valid_messages', None) + self.send_synchronous_acknowledgement = kwargs.get('send_synchronous_acknowledgement', None) + self.acknowledgement_control_number_prefix = kwargs.get('acknowledgement_control_number_prefix', None) + self.acknowledgement_control_number_suffix = kwargs.get('acknowledgement_control_number_suffix', None) + self.acknowledgement_control_number_lower_bound = kwargs.get('acknowledgement_control_number_lower_bound', None) + self.acknowledgement_control_number_upper_bound = kwargs.get('acknowledgement_control_number_upper_bound', None) + self.rollover_acknowledgement_control_number = kwargs.get('rollover_acknowledgement_control_number', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_acknowledgement_settings_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_acknowledgement_settings_py3.py new file mode 100644 index 000000000000..6e81eb7728e1 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_acknowledgement_settings_py3.py @@ -0,0 +1,115 @@ +# 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 X12AcknowledgementSettings(Model): + """The X12 agreement acknowledgement settings. + + All required parameters must be populated in order to send to Azure. + + :param need_technical_acknowledgement: Required. The value indicating + whether technical acknowledgement is needed. + :type need_technical_acknowledgement: bool + :param batch_technical_acknowledgements: Required. The value indicating + whether to batch the technical acknowledgements. + :type batch_technical_acknowledgements: bool + :param need_functional_acknowledgement: Required. The value indicating + whether functional acknowledgement is needed. + :type need_functional_acknowledgement: bool + :param functional_acknowledgement_version: The functional acknowledgement + version. + :type functional_acknowledgement_version: str + :param batch_functional_acknowledgements: Required. The value indicating + whether to batch functional acknowledgements. + :type batch_functional_acknowledgements: bool + :param need_implementation_acknowledgement: Required. The value indicating + whether implementation acknowledgement is needed. + :type need_implementation_acknowledgement: bool + :param implementation_acknowledgement_version: The implementation + acknowledgement version. + :type implementation_acknowledgement_version: str + :param batch_implementation_acknowledgements: Required. The value + indicating whether to batch implementation acknowledgements. + :type batch_implementation_acknowledgements: bool + :param need_loop_for_valid_messages: Required. The value indicating + whether a loop is needed for valid messages. + :type need_loop_for_valid_messages: bool + :param send_synchronous_acknowledgement: Required. The value indicating + whether to send synchronous acknowledgement. + :type send_synchronous_acknowledgement: bool + :param acknowledgement_control_number_prefix: The acknowledgement control + number prefix. + :type acknowledgement_control_number_prefix: str + :param acknowledgement_control_number_suffix: The acknowledgement control + number suffix. + :type acknowledgement_control_number_suffix: str + :param acknowledgement_control_number_lower_bound: Required. The + acknowledgement control number lower bound. + :type acknowledgement_control_number_lower_bound: int + :param acknowledgement_control_number_upper_bound: Required. The + acknowledgement control number upper bound. + :type acknowledgement_control_number_upper_bound: int + :param rollover_acknowledgement_control_number: Required. The value + indicating whether to rollover acknowledgement control number. + :type rollover_acknowledgement_control_number: bool + """ + + _validation = { + 'need_technical_acknowledgement': {'required': True}, + 'batch_technical_acknowledgements': {'required': True}, + 'need_functional_acknowledgement': {'required': True}, + 'batch_functional_acknowledgements': {'required': True}, + 'need_implementation_acknowledgement': {'required': True}, + 'batch_implementation_acknowledgements': {'required': True}, + 'need_loop_for_valid_messages': {'required': True}, + 'send_synchronous_acknowledgement': {'required': True}, + 'acknowledgement_control_number_lower_bound': {'required': True}, + 'acknowledgement_control_number_upper_bound': {'required': True}, + 'rollover_acknowledgement_control_number': {'required': True}, + } + + _attribute_map = { + 'need_technical_acknowledgement': {'key': 'needTechnicalAcknowledgement', 'type': 'bool'}, + 'batch_technical_acknowledgements': {'key': 'batchTechnicalAcknowledgements', 'type': 'bool'}, + 'need_functional_acknowledgement': {'key': 'needFunctionalAcknowledgement', 'type': 'bool'}, + 'functional_acknowledgement_version': {'key': 'functionalAcknowledgementVersion', 'type': 'str'}, + 'batch_functional_acknowledgements': {'key': 'batchFunctionalAcknowledgements', 'type': 'bool'}, + 'need_implementation_acknowledgement': {'key': 'needImplementationAcknowledgement', 'type': 'bool'}, + 'implementation_acknowledgement_version': {'key': 'implementationAcknowledgementVersion', 'type': 'str'}, + 'batch_implementation_acknowledgements': {'key': 'batchImplementationAcknowledgements', 'type': 'bool'}, + 'need_loop_for_valid_messages': {'key': 'needLoopForValidMessages', 'type': 'bool'}, + 'send_synchronous_acknowledgement': {'key': 'sendSynchronousAcknowledgement', 'type': 'bool'}, + 'acknowledgement_control_number_prefix': {'key': 'acknowledgementControlNumberPrefix', 'type': 'str'}, + 'acknowledgement_control_number_suffix': {'key': 'acknowledgementControlNumberSuffix', 'type': 'str'}, + 'acknowledgement_control_number_lower_bound': {'key': 'acknowledgementControlNumberLowerBound', 'type': 'int'}, + 'acknowledgement_control_number_upper_bound': {'key': 'acknowledgementControlNumberUpperBound', 'type': 'int'}, + 'rollover_acknowledgement_control_number': {'key': 'rolloverAcknowledgementControlNumber', 'type': 'bool'}, + } + + def __init__(self, *, need_technical_acknowledgement: bool, batch_technical_acknowledgements: bool, need_functional_acknowledgement: bool, batch_functional_acknowledgements: bool, need_implementation_acknowledgement: bool, batch_implementation_acknowledgements: bool, need_loop_for_valid_messages: bool, send_synchronous_acknowledgement: bool, acknowledgement_control_number_lower_bound: int, acknowledgement_control_number_upper_bound: int, rollover_acknowledgement_control_number: bool, functional_acknowledgement_version: str=None, implementation_acknowledgement_version: str=None, acknowledgement_control_number_prefix: str=None, acknowledgement_control_number_suffix: str=None, **kwargs) -> None: + super(X12AcknowledgementSettings, self).__init__(**kwargs) + self.need_technical_acknowledgement = need_technical_acknowledgement + self.batch_technical_acknowledgements = batch_technical_acknowledgements + self.need_functional_acknowledgement = need_functional_acknowledgement + self.functional_acknowledgement_version = functional_acknowledgement_version + self.batch_functional_acknowledgements = batch_functional_acknowledgements + self.need_implementation_acknowledgement = need_implementation_acknowledgement + self.implementation_acknowledgement_version = implementation_acknowledgement_version + self.batch_implementation_acknowledgements = batch_implementation_acknowledgements + self.need_loop_for_valid_messages = need_loop_for_valid_messages + self.send_synchronous_acknowledgement = send_synchronous_acknowledgement + self.acknowledgement_control_number_prefix = acknowledgement_control_number_prefix + self.acknowledgement_control_number_suffix = acknowledgement_control_number_suffix + self.acknowledgement_control_number_lower_bound = acknowledgement_control_number_lower_bound + self.acknowledgement_control_number_upper_bound = acknowledgement_control_number_upper_bound + self.rollover_acknowledgement_control_number = rollover_acknowledgement_control_number diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_agreement_content.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_agreement_content.py old mode 100755 new mode 100644 index 8029801f5125..0daa2f398e66 --- a/azure-mgmt-logic/azure/mgmt/logic/models/x12_agreement_content.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_agreement_content.py @@ -15,12 +15,12 @@ class X12AgreementContent(Model): """The X12 agreement content. - :param receive_agreement: The X12 one-way receive agreement. - :type receive_agreement: :class:`X12OneWayAgreement - ` - :param send_agreement: The X12 one-way send agreement. - :type send_agreement: :class:`X12OneWayAgreement - ` + All required parameters must be populated in order to send to Azure. + + :param receive_agreement: Required. The X12 one-way receive agreement. + :type receive_agreement: ~azure.mgmt.logic.models.X12OneWayAgreement + :param send_agreement: Required. The X12 one-way send agreement. + :type send_agreement: ~azure.mgmt.logic.models.X12OneWayAgreement """ _validation = { @@ -33,6 +33,7 @@ class X12AgreementContent(Model): 'send_agreement': {'key': 'sendAgreement', 'type': 'X12OneWayAgreement'}, } - def __init__(self, receive_agreement, send_agreement): - self.receive_agreement = receive_agreement - self.send_agreement = send_agreement + def __init__(self, **kwargs): + super(X12AgreementContent, self).__init__(**kwargs) + self.receive_agreement = kwargs.get('receive_agreement', None) + self.send_agreement = kwargs.get('send_agreement', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_agreement_content_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_agreement_content_py3.py new file mode 100644 index 000000000000..7ddf670913ea --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_agreement_content_py3.py @@ -0,0 +1,39 @@ +# 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 X12AgreementContent(Model): + """The X12 agreement content. + + All required parameters must be populated in order to send to Azure. + + :param receive_agreement: Required. The X12 one-way receive agreement. + :type receive_agreement: ~azure.mgmt.logic.models.X12OneWayAgreement + :param send_agreement: Required. The X12 one-way send agreement. + :type send_agreement: ~azure.mgmt.logic.models.X12OneWayAgreement + """ + + _validation = { + 'receive_agreement': {'required': True}, + 'send_agreement': {'required': True}, + } + + _attribute_map = { + 'receive_agreement': {'key': 'receiveAgreement', 'type': 'X12OneWayAgreement'}, + 'send_agreement': {'key': 'sendAgreement', 'type': 'X12OneWayAgreement'}, + } + + def __init__(self, *, receive_agreement, send_agreement, **kwargs) -> None: + super(X12AgreementContent, self).__init__(**kwargs) + self.receive_agreement = receive_agreement + self.send_agreement = send_agreement diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_delimiter_overrides.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_delimiter_overrides.py old mode 100755 new mode 100644 index 3ebdd18493c5..ee545215c677 --- a/azure-mgmt-logic/azure/mgmt/logic/models/x12_delimiter_overrides.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_delimiter_overrides.py @@ -15,24 +15,26 @@ class X12DelimiterOverrides(Model): """The X12 delimiter override settings. + All required parameters must be populated in order to send to Azure. + :param protocol_version: The protocol version. :type protocol_version: str :param message_id: The message id. :type message_id: str - :param data_element_separator: The data element separator. + :param data_element_separator: Required. The data element separator. :type data_element_separator: int - :param component_separator: The component separator. + :param component_separator: Required. The component separator. :type component_separator: int - :param segment_terminator: The segment terminator. + :param segment_terminator: Required. The segment terminator. :type segment_terminator: int - :param segment_terminator_suffix: The segment terminator suffix. Possible - values include: 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' - :type segment_terminator_suffix: str or :class:`SegmentTerminatorSuffix - ` - :param replace_character: The replacement character. + :param segment_terminator_suffix: Required. The segment terminator suffix. + Possible values include: 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' + :type segment_terminator_suffix: str or + ~azure.mgmt.logic.models.SegmentTerminatorSuffix + :param replace_character: Required. The replacement character. :type replace_character: int - :param replace_separators_in_payload: The value indicating whether to - replace separators in payload. + :param replace_separators_in_payload: Required. The value indicating + whether to replace separators in payload. :type replace_separators_in_payload: bool :param target_namespace: The target namespace on which this delimiter settings has to be applied. @@ -60,13 +62,14 @@ class X12DelimiterOverrides(Model): 'target_namespace': {'key': 'targetNamespace', 'type': 'str'}, } - def __init__(self, data_element_separator, component_separator, segment_terminator, segment_terminator_suffix, replace_character, replace_separators_in_payload, protocol_version=None, message_id=None, target_namespace=None): - self.protocol_version = protocol_version - self.message_id = message_id - self.data_element_separator = data_element_separator - self.component_separator = component_separator - self.segment_terminator = segment_terminator - self.segment_terminator_suffix = segment_terminator_suffix - self.replace_character = replace_character - self.replace_separators_in_payload = replace_separators_in_payload - self.target_namespace = target_namespace + def __init__(self, **kwargs): + super(X12DelimiterOverrides, self).__init__(**kwargs) + self.protocol_version = kwargs.get('protocol_version', None) + self.message_id = kwargs.get('message_id', None) + self.data_element_separator = kwargs.get('data_element_separator', None) + self.component_separator = kwargs.get('component_separator', None) + self.segment_terminator = kwargs.get('segment_terminator', None) + self.segment_terminator_suffix = kwargs.get('segment_terminator_suffix', None) + self.replace_character = kwargs.get('replace_character', None) + self.replace_separators_in_payload = kwargs.get('replace_separators_in_payload', None) + self.target_namespace = kwargs.get('target_namespace', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_delimiter_overrides_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_delimiter_overrides_py3.py new file mode 100644 index 000000000000..c2333de8a794 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_delimiter_overrides_py3.py @@ -0,0 +1,75 @@ +# 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 X12DelimiterOverrides(Model): + """The X12 delimiter override settings. + + All required parameters must be populated in order to send to Azure. + + :param protocol_version: The protocol version. + :type protocol_version: str + :param message_id: The message id. + :type message_id: str + :param data_element_separator: Required. The data element separator. + :type data_element_separator: int + :param component_separator: Required. The component separator. + :type component_separator: int + :param segment_terminator: Required. The segment terminator. + :type segment_terminator: int + :param segment_terminator_suffix: Required. The segment terminator suffix. + Possible values include: 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' + :type segment_terminator_suffix: str or + ~azure.mgmt.logic.models.SegmentTerminatorSuffix + :param replace_character: Required. The replacement character. + :type replace_character: int + :param replace_separators_in_payload: Required. The value indicating + whether to replace separators in payload. + :type replace_separators_in_payload: bool + :param target_namespace: The target namespace on which this delimiter + settings has to be applied. + :type target_namespace: str + """ + + _validation = { + 'data_element_separator': {'required': True}, + 'component_separator': {'required': True}, + 'segment_terminator': {'required': True}, + 'segment_terminator_suffix': {'required': True}, + 'replace_character': {'required': True}, + 'replace_separators_in_payload': {'required': True}, + } + + _attribute_map = { + 'protocol_version': {'key': 'protocolVersion', 'type': 'str'}, + 'message_id': {'key': 'messageId', 'type': 'str'}, + 'data_element_separator': {'key': 'dataElementSeparator', 'type': 'int'}, + 'component_separator': {'key': 'componentSeparator', 'type': 'int'}, + 'segment_terminator': {'key': 'segmentTerminator', 'type': 'int'}, + 'segment_terminator_suffix': {'key': 'segmentTerminatorSuffix', 'type': 'SegmentTerminatorSuffix'}, + 'replace_character': {'key': 'replaceCharacter', 'type': 'int'}, + 'replace_separators_in_payload': {'key': 'replaceSeparatorsInPayload', 'type': 'bool'}, + 'target_namespace': {'key': 'targetNamespace', 'type': 'str'}, + } + + def __init__(self, *, data_element_separator: int, component_separator: int, segment_terminator: int, segment_terminator_suffix, replace_character: int, replace_separators_in_payload: bool, protocol_version: str=None, message_id: str=None, target_namespace: str=None, **kwargs) -> None: + super(X12DelimiterOverrides, self).__init__(**kwargs) + self.protocol_version = protocol_version + self.message_id = message_id + self.data_element_separator = data_element_separator + self.component_separator = component_separator + self.segment_terminator = segment_terminator + self.segment_terminator_suffix = segment_terminator_suffix + self.replace_character = replace_character + self.replace_separators_in_payload = replace_separators_in_payload + self.target_namespace = target_namespace diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_envelope_override.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_envelope_override.py old mode 100755 new mode 100644 index 78659ec17db7..fe2bc38c8ed3 --- a/azure-mgmt-logic/azure/mgmt/logic/models/x12_envelope_override.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_envelope_override.py @@ -15,33 +15,33 @@ class X12EnvelopeOverride(Model): """The X12 envelope override settings. - :param target_namespace: The target namespace on which this envelope - settings has to be applied. + All required parameters must be populated in order to send to Azure. + + :param target_namespace: Required. The target namespace on which this + envelope settings has to be applied. :type target_namespace: str - :param protocol_version: The protocol version on which this envelope - settings has to be applied. + :param protocol_version: Required. The protocol version on which this + envelope settings has to be applied. :type protocol_version: str - :param message_id: The message id on which this envelope settings has to - be applied. + :param message_id: Required. The message id on which this envelope + settings has to be applied. :type message_id: str - :param responsible_agency_code: The responsible agency code. + :param responsible_agency_code: Required. The responsible agency code. :type responsible_agency_code: str - :param header_version: The header version. + :param header_version: Required. The header version. :type header_version: str - :param sender_application_id: The sender application id. + :param sender_application_id: Required. The sender application id. :type sender_application_id: str - :param receiver_application_id: The receiver application id. + :param receiver_application_id: Required. The receiver application id. :type receiver_application_id: str :param functional_identifier_code: The functional identifier code. :type functional_identifier_code: str - :param date_format: The date format. Possible values include: + :param date_format: Required. The date format. Possible values include: 'NotSpecified', 'CCYYMMDD', 'YYMMDD' - :type date_format: str or :class:`X12DateFormat - ` - :param time_format: The time format. Possible values include: + :type date_format: str or ~azure.mgmt.logic.models.X12DateFormat + :param time_format: Required. The time format. Possible values include: 'NotSpecified', 'HHMM', 'HHMMSS', 'HHMMSSdd', 'HHMMSSd' - :type time_format: str or :class:`X12TimeFormat - ` + :type time_format: str or ~azure.mgmt.logic.models.X12TimeFormat """ _validation = { @@ -69,14 +69,15 @@ class X12EnvelopeOverride(Model): 'time_format': {'key': 'timeFormat', 'type': 'X12TimeFormat'}, } - def __init__(self, target_namespace, protocol_version, message_id, responsible_agency_code, header_version, sender_application_id, receiver_application_id, date_format, time_format, functional_identifier_code=None): - self.target_namespace = target_namespace - self.protocol_version = protocol_version - self.message_id = message_id - self.responsible_agency_code = responsible_agency_code - self.header_version = header_version - self.sender_application_id = sender_application_id - self.receiver_application_id = receiver_application_id - self.functional_identifier_code = functional_identifier_code - self.date_format = date_format - self.time_format = time_format + def __init__(self, **kwargs): + super(X12EnvelopeOverride, self).__init__(**kwargs) + self.target_namespace = kwargs.get('target_namespace', None) + self.protocol_version = kwargs.get('protocol_version', None) + self.message_id = kwargs.get('message_id', None) + self.responsible_agency_code = kwargs.get('responsible_agency_code', None) + self.header_version = kwargs.get('header_version', None) + self.sender_application_id = kwargs.get('sender_application_id', None) + self.receiver_application_id = kwargs.get('receiver_application_id', None) + self.functional_identifier_code = kwargs.get('functional_identifier_code', None) + self.date_format = kwargs.get('date_format', None) + self.time_format = kwargs.get('time_format', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_envelope_override_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_envelope_override_py3.py new file mode 100644 index 000000000000..4c25df099fef --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_envelope_override_py3.py @@ -0,0 +1,83 @@ +# 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 X12EnvelopeOverride(Model): + """The X12 envelope override settings. + + All required parameters must be populated in order to send to Azure. + + :param target_namespace: Required. The target namespace on which this + envelope settings has to be applied. + :type target_namespace: str + :param protocol_version: Required. The protocol version on which this + envelope settings has to be applied. + :type protocol_version: str + :param message_id: Required. The message id on which this envelope + settings has to be applied. + :type message_id: str + :param responsible_agency_code: Required. The responsible agency code. + :type responsible_agency_code: str + :param header_version: Required. The header version. + :type header_version: str + :param sender_application_id: Required. The sender application id. + :type sender_application_id: str + :param receiver_application_id: Required. The receiver application id. + :type receiver_application_id: str + :param functional_identifier_code: The functional identifier code. + :type functional_identifier_code: str + :param date_format: Required. The date format. Possible values include: + 'NotSpecified', 'CCYYMMDD', 'YYMMDD' + :type date_format: str or ~azure.mgmt.logic.models.X12DateFormat + :param time_format: Required. The time format. Possible values include: + 'NotSpecified', 'HHMM', 'HHMMSS', 'HHMMSSdd', 'HHMMSSd' + :type time_format: str or ~azure.mgmt.logic.models.X12TimeFormat + """ + + _validation = { + 'target_namespace': {'required': True}, + 'protocol_version': {'required': True}, + 'message_id': {'required': True}, + 'responsible_agency_code': {'required': True}, + 'header_version': {'required': True}, + 'sender_application_id': {'required': True}, + 'receiver_application_id': {'required': True}, + 'date_format': {'required': True}, + 'time_format': {'required': True}, + } + + _attribute_map = { + 'target_namespace': {'key': 'targetNamespace', 'type': 'str'}, + 'protocol_version': {'key': 'protocolVersion', 'type': 'str'}, + 'message_id': {'key': 'messageId', 'type': 'str'}, + 'responsible_agency_code': {'key': 'responsibleAgencyCode', 'type': 'str'}, + 'header_version': {'key': 'headerVersion', 'type': 'str'}, + 'sender_application_id': {'key': 'senderApplicationId', 'type': 'str'}, + 'receiver_application_id': {'key': 'receiverApplicationId', 'type': 'str'}, + 'functional_identifier_code': {'key': 'functionalIdentifierCode', 'type': 'str'}, + 'date_format': {'key': 'dateFormat', 'type': 'X12DateFormat'}, + 'time_format': {'key': 'timeFormat', 'type': 'X12TimeFormat'}, + } + + def __init__(self, *, target_namespace: str, protocol_version: str, message_id: str, responsible_agency_code: str, header_version: str, sender_application_id: str, receiver_application_id: str, date_format, time_format, functional_identifier_code: str=None, **kwargs) -> None: + super(X12EnvelopeOverride, self).__init__(**kwargs) + self.target_namespace = target_namespace + self.protocol_version = protocol_version + self.message_id = message_id + self.responsible_agency_code = responsible_agency_code + self.header_version = header_version + self.sender_application_id = sender_application_id + self.receiver_application_id = receiver_application_id + self.functional_identifier_code = functional_identifier_code + self.date_format = date_format + self.time_format = time_format diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_envelope_settings.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_envelope_settings.py old mode 100755 new mode 100644 index 1259b7910a80..135261790cb2 --- a/azure-mgmt-logic/azure/mgmt/logic/models/x12_envelope_settings.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_envelope_settings.py @@ -15,52 +15,55 @@ class X12EnvelopeSettings(Model): """The X12 agreement envelope settings. - :param control_standards_id: The controls standards id. + All required parameters must be populated in order to send to Azure. + + :param control_standards_id: Required. The controls standards id. :type control_standards_id: int - :param use_control_standards_id_as_repetition_character: The value - indicating whether to use control standards id as repetition character. + :param use_control_standards_id_as_repetition_character: Required. The + value indicating whether to use control standards id as repetition + character. :type use_control_standards_id_as_repetition_character: bool - :param sender_application_id: The sender application id. + :param sender_application_id: Required. The sender application id. :type sender_application_id: str - :param receiver_application_id: The receiver application id. + :param receiver_application_id: Required. The receiver application id. :type receiver_application_id: str - :param control_version_number: The control version number. + :param control_version_number: Required. The control version number. :type control_version_number: str - :param interchange_control_number_lower_bound: The interchange control - number lower bound. + :param interchange_control_number_lower_bound: Required. The interchange + control number lower bound. :type interchange_control_number_lower_bound: int - :param interchange_control_number_upper_bound: The interchange control - number upper bound. + :param interchange_control_number_upper_bound: Required. The interchange + control number upper bound. :type interchange_control_number_upper_bound: int - :param rollover_interchange_control_number: The value indicating whether - to rollover interchange control number. + :param rollover_interchange_control_number: Required. The value indicating + whether to rollover interchange control number. :type rollover_interchange_control_number: bool - :param enable_default_group_headers: The value indicating whether to - enable default group headers. + :param enable_default_group_headers: Required. The value indicating + whether to enable default group headers. :type enable_default_group_headers: bool :param functional_group_id: The functional group id. :type functional_group_id: str - :param group_control_number_lower_bound: The group control number lower - bound. + :param group_control_number_lower_bound: Required. The group control + number lower bound. :type group_control_number_lower_bound: int - :param group_control_number_upper_bound: The group control number upper - bound. + :param group_control_number_upper_bound: Required. The group control + number upper bound. :type group_control_number_upper_bound: int - :param rollover_group_control_number: The value indicating whether to - rollover group control number. + :param rollover_group_control_number: Required. The value indicating + whether to rollover group control number. :type rollover_group_control_number: bool - :param group_header_agency_code: The group header agency code. + :param group_header_agency_code: Required. The group header agency code. :type group_header_agency_code: str - :param group_header_version: The group header version. + :param group_header_version: Required. The group header version. :type group_header_version: str - :param transaction_set_control_number_lower_bound: The transaction set - control number lower bound. + :param transaction_set_control_number_lower_bound: Required. The + transaction set control number lower bound. :type transaction_set_control_number_lower_bound: int - :param transaction_set_control_number_upper_bound: The transaction set - control number upper bound. + :param transaction_set_control_number_upper_bound: Required. The + transaction set control number upper bound. :type transaction_set_control_number_upper_bound: int - :param rollover_transaction_set_control_number: The value indicating - whether to rollover transaction set control number. + :param rollover_transaction_set_control_number: Required. The value + indicating whether to rollover transaction set control number. :type rollover_transaction_set_control_number: bool :param transaction_set_control_number_prefix: The transaction set control number prefix. @@ -68,21 +71,22 @@ class X12EnvelopeSettings(Model): :param transaction_set_control_number_suffix: The transaction set control number suffix. :type transaction_set_control_number_suffix: str - :param overwrite_existing_transaction_set_control_number: The value - indicating whether to overwrite existing transaction set control number. + :param overwrite_existing_transaction_set_control_number: Required. The + value indicating whether to overwrite existing transaction set control + number. :type overwrite_existing_transaction_set_control_number: bool - :param group_header_date_format: The group header date format. Possible - values include: 'NotSpecified', 'CCYYMMDD', 'YYMMDD' - :type group_header_date_format: str or :class:`X12DateFormat - ` - :param group_header_time_format: The group header time format. Possible - values include: 'NotSpecified', 'HHMM', 'HHMMSS', 'HHMMSSdd', 'HHMMSSd' - :type group_header_time_format: str or :class:`X12TimeFormat - ` - :param usage_indicator: The usage indicator. Possible values include: - 'NotSpecified', 'Test', 'Information', 'Production' - :type usage_indicator: str or :class:`UsageIndicator - ` + :param group_header_date_format: Required. The group header date format. + Possible values include: 'NotSpecified', 'CCYYMMDD', 'YYMMDD' + :type group_header_date_format: str or + ~azure.mgmt.logic.models.X12DateFormat + :param group_header_time_format: Required. The group header time format. + Possible values include: 'NotSpecified', 'HHMM', 'HHMMSS', 'HHMMSSdd', + 'HHMMSSd' + :type group_header_time_format: str or + ~azure.mgmt.logic.models.X12TimeFormat + :param usage_indicator: Required. The usage indicator. Possible values + include: 'NotSpecified', 'Test', 'Information', 'Production' + :type usage_indicator: str or ~azure.mgmt.logic.models.UsageIndicator """ _validation = { @@ -136,28 +140,29 @@ class X12EnvelopeSettings(Model): 'usage_indicator': {'key': 'usageIndicator', 'type': 'UsageIndicator'}, } - def __init__(self, control_standards_id, use_control_standards_id_as_repetition_character, sender_application_id, receiver_application_id, control_version_number, interchange_control_number_lower_bound, interchange_control_number_upper_bound, rollover_interchange_control_number, enable_default_group_headers, group_control_number_lower_bound, group_control_number_upper_bound, rollover_group_control_number, group_header_agency_code, group_header_version, transaction_set_control_number_lower_bound, transaction_set_control_number_upper_bound, rollover_transaction_set_control_number, overwrite_existing_transaction_set_control_number, group_header_date_format, group_header_time_format, usage_indicator, functional_group_id=None, transaction_set_control_number_prefix=None, transaction_set_control_number_suffix=None): - self.control_standards_id = control_standards_id - self.use_control_standards_id_as_repetition_character = use_control_standards_id_as_repetition_character - self.sender_application_id = sender_application_id - self.receiver_application_id = receiver_application_id - self.control_version_number = control_version_number - self.interchange_control_number_lower_bound = interchange_control_number_lower_bound - self.interchange_control_number_upper_bound = interchange_control_number_upper_bound - self.rollover_interchange_control_number = rollover_interchange_control_number - self.enable_default_group_headers = enable_default_group_headers - self.functional_group_id = functional_group_id - self.group_control_number_lower_bound = group_control_number_lower_bound - self.group_control_number_upper_bound = group_control_number_upper_bound - self.rollover_group_control_number = rollover_group_control_number - self.group_header_agency_code = group_header_agency_code - self.group_header_version = group_header_version - self.transaction_set_control_number_lower_bound = transaction_set_control_number_lower_bound - self.transaction_set_control_number_upper_bound = transaction_set_control_number_upper_bound - self.rollover_transaction_set_control_number = rollover_transaction_set_control_number - self.transaction_set_control_number_prefix = transaction_set_control_number_prefix - self.transaction_set_control_number_suffix = transaction_set_control_number_suffix - self.overwrite_existing_transaction_set_control_number = overwrite_existing_transaction_set_control_number - self.group_header_date_format = group_header_date_format - self.group_header_time_format = group_header_time_format - self.usage_indicator = usage_indicator + def __init__(self, **kwargs): + super(X12EnvelopeSettings, self).__init__(**kwargs) + self.control_standards_id = kwargs.get('control_standards_id', None) + self.use_control_standards_id_as_repetition_character = kwargs.get('use_control_standards_id_as_repetition_character', None) + self.sender_application_id = kwargs.get('sender_application_id', None) + self.receiver_application_id = kwargs.get('receiver_application_id', None) + self.control_version_number = kwargs.get('control_version_number', None) + self.interchange_control_number_lower_bound = kwargs.get('interchange_control_number_lower_bound', None) + self.interchange_control_number_upper_bound = kwargs.get('interchange_control_number_upper_bound', None) + self.rollover_interchange_control_number = kwargs.get('rollover_interchange_control_number', None) + self.enable_default_group_headers = kwargs.get('enable_default_group_headers', None) + self.functional_group_id = kwargs.get('functional_group_id', None) + self.group_control_number_lower_bound = kwargs.get('group_control_number_lower_bound', None) + self.group_control_number_upper_bound = kwargs.get('group_control_number_upper_bound', None) + self.rollover_group_control_number = kwargs.get('rollover_group_control_number', None) + self.group_header_agency_code = kwargs.get('group_header_agency_code', None) + self.group_header_version = kwargs.get('group_header_version', None) + self.transaction_set_control_number_lower_bound = kwargs.get('transaction_set_control_number_lower_bound', None) + self.transaction_set_control_number_upper_bound = kwargs.get('transaction_set_control_number_upper_bound', None) + self.rollover_transaction_set_control_number = kwargs.get('rollover_transaction_set_control_number', None) + self.transaction_set_control_number_prefix = kwargs.get('transaction_set_control_number_prefix', None) + self.transaction_set_control_number_suffix = kwargs.get('transaction_set_control_number_suffix', None) + self.overwrite_existing_transaction_set_control_number = kwargs.get('overwrite_existing_transaction_set_control_number', None) + self.group_header_date_format = kwargs.get('group_header_date_format', None) + self.group_header_time_format = kwargs.get('group_header_time_format', None) + self.usage_indicator = kwargs.get('usage_indicator', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_envelope_settings_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_envelope_settings_py3.py new file mode 100644 index 000000000000..8a4bf0b5b7ea --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_envelope_settings_py3.py @@ -0,0 +1,168 @@ +# 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 X12EnvelopeSettings(Model): + """The X12 agreement envelope settings. + + All required parameters must be populated in order to send to Azure. + + :param control_standards_id: Required. The controls standards id. + :type control_standards_id: int + :param use_control_standards_id_as_repetition_character: Required. The + value indicating whether to use control standards id as repetition + character. + :type use_control_standards_id_as_repetition_character: bool + :param sender_application_id: Required. The sender application id. + :type sender_application_id: str + :param receiver_application_id: Required. The receiver application id. + :type receiver_application_id: str + :param control_version_number: Required. The control version number. + :type control_version_number: str + :param interchange_control_number_lower_bound: Required. The interchange + control number lower bound. + :type interchange_control_number_lower_bound: int + :param interchange_control_number_upper_bound: Required. The interchange + control number upper bound. + :type interchange_control_number_upper_bound: int + :param rollover_interchange_control_number: Required. The value indicating + whether to rollover interchange control number. + :type rollover_interchange_control_number: bool + :param enable_default_group_headers: Required. The value indicating + whether to enable default group headers. + :type enable_default_group_headers: bool + :param functional_group_id: The functional group id. + :type functional_group_id: str + :param group_control_number_lower_bound: Required. The group control + number lower bound. + :type group_control_number_lower_bound: int + :param group_control_number_upper_bound: Required. The group control + number upper bound. + :type group_control_number_upper_bound: int + :param rollover_group_control_number: Required. The value indicating + whether to rollover group control number. + :type rollover_group_control_number: bool + :param group_header_agency_code: Required. The group header agency code. + :type group_header_agency_code: str + :param group_header_version: Required. The group header version. + :type group_header_version: str + :param transaction_set_control_number_lower_bound: Required. The + transaction set control number lower bound. + :type transaction_set_control_number_lower_bound: int + :param transaction_set_control_number_upper_bound: Required. The + transaction set control number upper bound. + :type transaction_set_control_number_upper_bound: int + :param rollover_transaction_set_control_number: Required. The value + indicating whether to rollover transaction set control number. + :type rollover_transaction_set_control_number: bool + :param transaction_set_control_number_prefix: The transaction set control + number prefix. + :type transaction_set_control_number_prefix: str + :param transaction_set_control_number_suffix: The transaction set control + number suffix. + :type transaction_set_control_number_suffix: str + :param overwrite_existing_transaction_set_control_number: Required. The + value indicating whether to overwrite existing transaction set control + number. + :type overwrite_existing_transaction_set_control_number: bool + :param group_header_date_format: Required. The group header date format. + Possible values include: 'NotSpecified', 'CCYYMMDD', 'YYMMDD' + :type group_header_date_format: str or + ~azure.mgmt.logic.models.X12DateFormat + :param group_header_time_format: Required. The group header time format. + Possible values include: 'NotSpecified', 'HHMM', 'HHMMSS', 'HHMMSSdd', + 'HHMMSSd' + :type group_header_time_format: str or + ~azure.mgmt.logic.models.X12TimeFormat + :param usage_indicator: Required. The usage indicator. Possible values + include: 'NotSpecified', 'Test', 'Information', 'Production' + :type usage_indicator: str or ~azure.mgmt.logic.models.UsageIndicator + """ + + _validation = { + 'control_standards_id': {'required': True}, + 'use_control_standards_id_as_repetition_character': {'required': True}, + 'sender_application_id': {'required': True}, + 'receiver_application_id': {'required': True}, + 'control_version_number': {'required': True}, + 'interchange_control_number_lower_bound': {'required': True}, + 'interchange_control_number_upper_bound': {'required': True}, + 'rollover_interchange_control_number': {'required': True}, + 'enable_default_group_headers': {'required': True}, + 'group_control_number_lower_bound': {'required': True}, + 'group_control_number_upper_bound': {'required': True}, + 'rollover_group_control_number': {'required': True}, + 'group_header_agency_code': {'required': True}, + 'group_header_version': {'required': True}, + 'transaction_set_control_number_lower_bound': {'required': True}, + 'transaction_set_control_number_upper_bound': {'required': True}, + 'rollover_transaction_set_control_number': {'required': True}, + 'overwrite_existing_transaction_set_control_number': {'required': True}, + 'group_header_date_format': {'required': True}, + 'group_header_time_format': {'required': True}, + 'usage_indicator': {'required': True}, + } + + _attribute_map = { + 'control_standards_id': {'key': 'controlStandardsId', 'type': 'int'}, + 'use_control_standards_id_as_repetition_character': {'key': 'useControlStandardsIdAsRepetitionCharacter', 'type': 'bool'}, + 'sender_application_id': {'key': 'senderApplicationId', 'type': 'str'}, + 'receiver_application_id': {'key': 'receiverApplicationId', 'type': 'str'}, + 'control_version_number': {'key': 'controlVersionNumber', 'type': 'str'}, + 'interchange_control_number_lower_bound': {'key': 'interchangeControlNumberLowerBound', 'type': 'int'}, + 'interchange_control_number_upper_bound': {'key': 'interchangeControlNumberUpperBound', 'type': 'int'}, + 'rollover_interchange_control_number': {'key': 'rolloverInterchangeControlNumber', 'type': 'bool'}, + 'enable_default_group_headers': {'key': 'enableDefaultGroupHeaders', 'type': 'bool'}, + 'functional_group_id': {'key': 'functionalGroupId', 'type': 'str'}, + 'group_control_number_lower_bound': {'key': 'groupControlNumberLowerBound', 'type': 'int'}, + 'group_control_number_upper_bound': {'key': 'groupControlNumberUpperBound', 'type': 'int'}, + 'rollover_group_control_number': {'key': 'rolloverGroupControlNumber', 'type': 'bool'}, + 'group_header_agency_code': {'key': 'groupHeaderAgencyCode', 'type': 'str'}, + 'group_header_version': {'key': 'groupHeaderVersion', 'type': 'str'}, + 'transaction_set_control_number_lower_bound': {'key': 'transactionSetControlNumberLowerBound', 'type': 'int'}, + 'transaction_set_control_number_upper_bound': {'key': 'transactionSetControlNumberUpperBound', 'type': 'int'}, + 'rollover_transaction_set_control_number': {'key': 'rolloverTransactionSetControlNumber', 'type': 'bool'}, + 'transaction_set_control_number_prefix': {'key': 'transactionSetControlNumberPrefix', 'type': 'str'}, + 'transaction_set_control_number_suffix': {'key': 'transactionSetControlNumberSuffix', 'type': 'str'}, + 'overwrite_existing_transaction_set_control_number': {'key': 'overwriteExistingTransactionSetControlNumber', 'type': 'bool'}, + 'group_header_date_format': {'key': 'groupHeaderDateFormat', 'type': 'X12DateFormat'}, + 'group_header_time_format': {'key': 'groupHeaderTimeFormat', 'type': 'X12TimeFormat'}, + 'usage_indicator': {'key': 'usageIndicator', 'type': 'UsageIndicator'}, + } + + def __init__(self, *, control_standards_id: int, use_control_standards_id_as_repetition_character: bool, sender_application_id: str, receiver_application_id: str, control_version_number: str, interchange_control_number_lower_bound: int, interchange_control_number_upper_bound: int, rollover_interchange_control_number: bool, enable_default_group_headers: bool, group_control_number_lower_bound: int, group_control_number_upper_bound: int, rollover_group_control_number: bool, group_header_agency_code: str, group_header_version: str, transaction_set_control_number_lower_bound: int, transaction_set_control_number_upper_bound: int, rollover_transaction_set_control_number: bool, overwrite_existing_transaction_set_control_number: bool, group_header_date_format, group_header_time_format, usage_indicator, functional_group_id: str=None, transaction_set_control_number_prefix: str=None, transaction_set_control_number_suffix: str=None, **kwargs) -> None: + super(X12EnvelopeSettings, self).__init__(**kwargs) + self.control_standards_id = control_standards_id + self.use_control_standards_id_as_repetition_character = use_control_standards_id_as_repetition_character + self.sender_application_id = sender_application_id + self.receiver_application_id = receiver_application_id + self.control_version_number = control_version_number + self.interchange_control_number_lower_bound = interchange_control_number_lower_bound + self.interchange_control_number_upper_bound = interchange_control_number_upper_bound + self.rollover_interchange_control_number = rollover_interchange_control_number + self.enable_default_group_headers = enable_default_group_headers + self.functional_group_id = functional_group_id + self.group_control_number_lower_bound = group_control_number_lower_bound + self.group_control_number_upper_bound = group_control_number_upper_bound + self.rollover_group_control_number = rollover_group_control_number + self.group_header_agency_code = group_header_agency_code + self.group_header_version = group_header_version + self.transaction_set_control_number_lower_bound = transaction_set_control_number_lower_bound + self.transaction_set_control_number_upper_bound = transaction_set_control_number_upper_bound + self.rollover_transaction_set_control_number = rollover_transaction_set_control_number + self.transaction_set_control_number_prefix = transaction_set_control_number_prefix + self.transaction_set_control_number_suffix = transaction_set_control_number_suffix + self.overwrite_existing_transaction_set_control_number = overwrite_existing_transaction_set_control_number + self.group_header_date_format = group_header_date_format + self.group_header_time_format = group_header_time_format + self.usage_indicator = usage_indicator diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_framing_settings.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_framing_settings.py old mode 100755 new mode 100644 index 8eed3e84f592..ef590fc24825 --- a/azure-mgmt-logic/azure/mgmt/logic/models/x12_framing_settings.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_framing_settings.py @@ -15,25 +15,26 @@ class X12FramingSettings(Model): """The X12 agreement framing settings. - :param data_element_separator: The data element separator. + All required parameters must be populated in order to send to Azure. + + :param data_element_separator: Required. The data element separator. :type data_element_separator: int - :param component_separator: The component separator. + :param component_separator: Required. The component separator. :type component_separator: int - :param replace_separators_in_payload: The value indicating whether to - replace separators in payload. + :param replace_separators_in_payload: Required. The value indicating + whether to replace separators in payload. :type replace_separators_in_payload: bool - :param replace_character: The replacement character. + :param replace_character: Required. The replacement character. :type replace_character: int - :param segment_terminator: The segment terminator. + :param segment_terminator: Required. The segment terminator. :type segment_terminator: int - :param character_set: The X12 character set. Possible values include: - 'NotSpecified', 'Basic', 'Extended', 'UTF8' - :type character_set: str or :class:`X12CharacterSet - ` - :param segment_terminator_suffix: The segment terminator suffix. Possible - values include: 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' - :type segment_terminator_suffix: str or :class:`SegmentTerminatorSuffix - ` + :param character_set: Required. The X12 character set. Possible values + include: 'NotSpecified', 'Basic', 'Extended', 'UTF8' + :type character_set: str or ~azure.mgmt.logic.models.X12CharacterSet + :param segment_terminator_suffix: Required. The segment terminator suffix. + Possible values include: 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' + :type segment_terminator_suffix: str or + ~azure.mgmt.logic.models.SegmentTerminatorSuffix """ _validation = { @@ -56,11 +57,12 @@ class X12FramingSettings(Model): 'segment_terminator_suffix': {'key': 'segmentTerminatorSuffix', 'type': 'SegmentTerminatorSuffix'}, } - def __init__(self, data_element_separator, component_separator, replace_separators_in_payload, replace_character, segment_terminator, character_set, segment_terminator_suffix): - self.data_element_separator = data_element_separator - self.component_separator = component_separator - self.replace_separators_in_payload = replace_separators_in_payload - self.replace_character = replace_character - self.segment_terminator = segment_terminator - self.character_set = character_set - self.segment_terminator_suffix = segment_terminator_suffix + def __init__(self, **kwargs): + super(X12FramingSettings, self).__init__(**kwargs) + self.data_element_separator = kwargs.get('data_element_separator', None) + self.component_separator = kwargs.get('component_separator', None) + self.replace_separators_in_payload = kwargs.get('replace_separators_in_payload', None) + self.replace_character = kwargs.get('replace_character', None) + self.segment_terminator = kwargs.get('segment_terminator', None) + self.character_set = kwargs.get('character_set', None) + self.segment_terminator_suffix = kwargs.get('segment_terminator_suffix', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_framing_settings_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_framing_settings_py3.py new file mode 100644 index 000000000000..9696f6411129 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_framing_settings_py3.py @@ -0,0 +1,68 @@ +# 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 X12FramingSettings(Model): + """The X12 agreement framing settings. + + All required parameters must be populated in order to send to Azure. + + :param data_element_separator: Required. The data element separator. + :type data_element_separator: int + :param component_separator: Required. The component separator. + :type component_separator: int + :param replace_separators_in_payload: Required. The value indicating + whether to replace separators in payload. + :type replace_separators_in_payload: bool + :param replace_character: Required. The replacement character. + :type replace_character: int + :param segment_terminator: Required. The segment terminator. + :type segment_terminator: int + :param character_set: Required. The X12 character set. Possible values + include: 'NotSpecified', 'Basic', 'Extended', 'UTF8' + :type character_set: str or ~azure.mgmt.logic.models.X12CharacterSet + :param segment_terminator_suffix: Required. The segment terminator suffix. + Possible values include: 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' + :type segment_terminator_suffix: str or + ~azure.mgmt.logic.models.SegmentTerminatorSuffix + """ + + _validation = { + 'data_element_separator': {'required': True}, + 'component_separator': {'required': True}, + 'replace_separators_in_payload': {'required': True}, + 'replace_character': {'required': True}, + 'segment_terminator': {'required': True}, + 'character_set': {'required': True}, + 'segment_terminator_suffix': {'required': True}, + } + + _attribute_map = { + 'data_element_separator': {'key': 'dataElementSeparator', 'type': 'int'}, + 'component_separator': {'key': 'componentSeparator', 'type': 'int'}, + 'replace_separators_in_payload': {'key': 'replaceSeparatorsInPayload', 'type': 'bool'}, + 'replace_character': {'key': 'replaceCharacter', 'type': 'int'}, + 'segment_terminator': {'key': 'segmentTerminator', 'type': 'int'}, + 'character_set': {'key': 'characterSet', 'type': 'X12CharacterSet'}, + 'segment_terminator_suffix': {'key': 'segmentTerminatorSuffix', 'type': 'SegmentTerminatorSuffix'}, + } + + def __init__(self, *, data_element_separator: int, component_separator: int, replace_separators_in_payload: bool, replace_character: int, segment_terminator: int, character_set, segment_terminator_suffix, **kwargs) -> None: + super(X12FramingSettings, self).__init__(**kwargs) + self.data_element_separator = data_element_separator + self.component_separator = component_separator + self.replace_separators_in_payload = replace_separators_in_payload + self.replace_character = replace_character + self.segment_terminator = segment_terminator + self.character_set = character_set + self.segment_terminator_suffix = segment_terminator_suffix diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_message_filter.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_message_filter.py old mode 100755 new mode 100644 index c94f3ae195fd..a560cb141ce8 --- a/azure-mgmt-logic/azure/mgmt/logic/models/x12_message_filter.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_message_filter.py @@ -15,10 +15,12 @@ class X12MessageFilter(Model): """The X12 message filter for odata query. - :param message_filter_type: The message filter type. Possible values - include: 'NotSpecified', 'Include', 'Exclude' - :type message_filter_type: str or :class:`MessageFilterType - ` + All required parameters must be populated in order to send to Azure. + + :param message_filter_type: Required. The message filter type. Possible + values include: 'NotSpecified', 'Include', 'Exclude' + :type message_filter_type: str or + ~azure.mgmt.logic.models.MessageFilterType """ _validation = { @@ -29,5 +31,6 @@ class X12MessageFilter(Model): 'message_filter_type': {'key': 'messageFilterType', 'type': 'MessageFilterType'}, } - def __init__(self, message_filter_type): - self.message_filter_type = message_filter_type + def __init__(self, **kwargs): + super(X12MessageFilter, self).__init__(**kwargs) + self.message_filter_type = kwargs.get('message_filter_type', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_message_filter_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_message_filter_py3.py new file mode 100644 index 000000000000..beb332725f2d --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_message_filter_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class X12MessageFilter(Model): + """The X12 message filter for odata query. + + All required parameters must be populated in order to send to Azure. + + :param message_filter_type: Required. The message filter type. Possible + values include: 'NotSpecified', 'Include', 'Exclude' + :type message_filter_type: str or + ~azure.mgmt.logic.models.MessageFilterType + """ + + _validation = { + 'message_filter_type': {'required': True}, + } + + _attribute_map = { + 'message_filter_type': {'key': 'messageFilterType', 'type': 'MessageFilterType'}, + } + + def __init__(self, *, message_filter_type, **kwargs) -> None: + super(X12MessageFilter, self).__init__(**kwargs) + self.message_filter_type = message_filter_type diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_message_identifier.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_message_identifier.py old mode 100755 new mode 100644 index 6ba040afb41a..97cd0c89c7c3 --- a/azure-mgmt-logic/azure/mgmt/logic/models/x12_message_identifier.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_message_identifier.py @@ -15,7 +15,9 @@ class X12MessageIdentifier(Model): """The X12 message identifier. - :param message_id: The message id. + All required parameters must be populated in order to send to Azure. + + :param message_id: Required. The message id. :type message_id: str """ @@ -27,5 +29,6 @@ class X12MessageIdentifier(Model): 'message_id': {'key': 'messageId', 'type': 'str'}, } - def __init__(self, message_id): - self.message_id = message_id + def __init__(self, **kwargs): + super(X12MessageIdentifier, self).__init__(**kwargs) + self.message_id = kwargs.get('message_id', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_message_identifier_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_message_identifier_py3.py new file mode 100644 index 000000000000..1d7fcee46c94 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_message_identifier_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class X12MessageIdentifier(Model): + """The X12 message identifier. + + All required parameters must be populated in order to send to Azure. + + :param message_id: Required. The message id. + :type message_id: str + """ + + _validation = { + 'message_id': {'required': True}, + } + + _attribute_map = { + 'message_id': {'key': 'messageId', 'type': 'str'}, + } + + def __init__(self, *, message_id: str, **kwargs) -> None: + super(X12MessageIdentifier, self).__init__(**kwargs) + self.message_id = message_id diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_one_way_agreement.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_one_way_agreement.py old mode 100755 new mode 100644 index ebe2e28c269c..7d5038dceef5 --- a/azure-mgmt-logic/azure/mgmt/logic/models/x12_one_way_agreement.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_one_way_agreement.py @@ -13,17 +13,18 @@ class X12OneWayAgreement(Model): - """The X12 oneway agreement. - - :param sender_business_identity: The sender business identity - :type sender_business_identity: :class:`BusinessIdentity - ` - :param receiver_business_identity: The receiver business identity - :type receiver_business_identity: :class:`BusinessIdentity - ` - :param protocol_settings: The X12 protocol settings. - :type protocol_settings: :class:`X12ProtocolSettings - ` + """The X12 one-way agreement. + + All required parameters must be populated in order to send to Azure. + + :param sender_business_identity: Required. The sender business identity + :type sender_business_identity: ~azure.mgmt.logic.models.BusinessIdentity + :param receiver_business_identity: Required. The receiver business + identity + :type receiver_business_identity: + ~azure.mgmt.logic.models.BusinessIdentity + :param protocol_settings: Required. The X12 protocol settings. + :type protocol_settings: ~azure.mgmt.logic.models.X12ProtocolSettings """ _validation = { @@ -38,7 +39,8 @@ class X12OneWayAgreement(Model): 'protocol_settings': {'key': 'protocolSettings', 'type': 'X12ProtocolSettings'}, } - def __init__(self, sender_business_identity, receiver_business_identity, protocol_settings): - self.sender_business_identity = sender_business_identity - self.receiver_business_identity = receiver_business_identity - self.protocol_settings = protocol_settings + def __init__(self, **kwargs): + super(X12OneWayAgreement, self).__init__(**kwargs) + self.sender_business_identity = kwargs.get('sender_business_identity', None) + self.receiver_business_identity = kwargs.get('receiver_business_identity', None) + self.protocol_settings = kwargs.get('protocol_settings', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_one_way_agreement_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_one_way_agreement_py3.py new file mode 100644 index 000000000000..3caddb04ea2c --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_one_way_agreement_py3.py @@ -0,0 +1,46 @@ +# 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 X12OneWayAgreement(Model): + """The X12 one-way agreement. + + All required parameters must be populated in order to send to Azure. + + :param sender_business_identity: Required. The sender business identity + :type sender_business_identity: ~azure.mgmt.logic.models.BusinessIdentity + :param receiver_business_identity: Required. The receiver business + identity + :type receiver_business_identity: + ~azure.mgmt.logic.models.BusinessIdentity + :param protocol_settings: Required. The X12 protocol settings. + :type protocol_settings: ~azure.mgmt.logic.models.X12ProtocolSettings + """ + + _validation = { + 'sender_business_identity': {'required': True}, + 'receiver_business_identity': {'required': True}, + 'protocol_settings': {'required': True}, + } + + _attribute_map = { + 'sender_business_identity': {'key': 'senderBusinessIdentity', 'type': 'BusinessIdentity'}, + 'receiver_business_identity': {'key': 'receiverBusinessIdentity', 'type': 'BusinessIdentity'}, + 'protocol_settings': {'key': 'protocolSettings', 'type': 'X12ProtocolSettings'}, + } + + def __init__(self, *, sender_business_identity, receiver_business_identity, protocol_settings, **kwargs) -> None: + super(X12OneWayAgreement, self).__init__(**kwargs) + self.sender_business_identity = sender_business_identity + self.receiver_business_identity = receiver_business_identity + self.protocol_settings = protocol_settings diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_processing_settings.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_processing_settings.py old mode 100755 new mode 100644 index 1b6d3253cd18..cf116affd990 --- a/azure-mgmt-logic/azure/mgmt/logic/models/x12_processing_settings.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_processing_settings.py @@ -15,23 +15,25 @@ class X12ProcessingSettings(Model): """The X12 processing settings. - :param mask_security_info: The value indicating whether to mask security - information. + All required parameters must be populated in order to send to Azure. + + :param mask_security_info: Required. The value indicating whether to mask + security information. :type mask_security_info: bool - :param convert_implied_decimal: The value indicating whether to convert - numerical type to implied decimal. + :param convert_implied_decimal: Required. The value indicating whether to + convert numerical type to implied decimal. :type convert_implied_decimal: bool - :param preserve_interchange: The value indicating whether to preserve - interchange. + :param preserve_interchange: Required. The value indicating whether to + preserve interchange. :type preserve_interchange: bool - :param suspend_interchange_on_error: The value indicating whether to - suspend interchange on error. + :param suspend_interchange_on_error: Required. The value indicating + whether to suspend interchange on error. :type suspend_interchange_on_error: bool - :param create_empty_xml_tags_for_trailing_separators: The value indicating - whether to create empty xml tags for trailing separators. + :param create_empty_xml_tags_for_trailing_separators: Required. The value + indicating whether to create empty xml tags for trailing separators. :type create_empty_xml_tags_for_trailing_separators: bool - :param use_dot_as_decimal_separator: The value indicating whether to use - dot as decimal separator. + :param use_dot_as_decimal_separator: Required. The value indicating + whether to use dot as decimal separator. :type use_dot_as_decimal_separator: bool """ @@ -53,10 +55,11 @@ class X12ProcessingSettings(Model): 'use_dot_as_decimal_separator': {'key': 'useDotAsDecimalSeparator', 'type': 'bool'}, } - def __init__(self, mask_security_info, convert_implied_decimal, preserve_interchange, suspend_interchange_on_error, create_empty_xml_tags_for_trailing_separators, use_dot_as_decimal_separator): - self.mask_security_info = mask_security_info - self.convert_implied_decimal = convert_implied_decimal - self.preserve_interchange = preserve_interchange - self.suspend_interchange_on_error = suspend_interchange_on_error - self.create_empty_xml_tags_for_trailing_separators = create_empty_xml_tags_for_trailing_separators - self.use_dot_as_decimal_separator = use_dot_as_decimal_separator + def __init__(self, **kwargs): + super(X12ProcessingSettings, self).__init__(**kwargs) + self.mask_security_info = kwargs.get('mask_security_info', None) + self.convert_implied_decimal = kwargs.get('convert_implied_decimal', None) + self.preserve_interchange = kwargs.get('preserve_interchange', None) + self.suspend_interchange_on_error = kwargs.get('suspend_interchange_on_error', None) + self.create_empty_xml_tags_for_trailing_separators = kwargs.get('create_empty_xml_tags_for_trailing_separators', None) + self.use_dot_as_decimal_separator = kwargs.get('use_dot_as_decimal_separator', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_processing_settings_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_processing_settings_py3.py new file mode 100644 index 000000000000..915cf16ee01c --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_processing_settings_py3.py @@ -0,0 +1,65 @@ +# 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 X12ProcessingSettings(Model): + """The X12 processing settings. + + All required parameters must be populated in order to send to Azure. + + :param mask_security_info: Required. The value indicating whether to mask + security information. + :type mask_security_info: bool + :param convert_implied_decimal: Required. The value indicating whether to + convert numerical type to implied decimal. + :type convert_implied_decimal: bool + :param preserve_interchange: Required. The value indicating whether to + preserve interchange. + :type preserve_interchange: bool + :param suspend_interchange_on_error: Required. The value indicating + whether to suspend interchange on error. + :type suspend_interchange_on_error: bool + :param create_empty_xml_tags_for_trailing_separators: Required. The value + indicating whether to create empty xml tags for trailing separators. + :type create_empty_xml_tags_for_trailing_separators: bool + :param use_dot_as_decimal_separator: Required. The value indicating + whether to use dot as decimal separator. + :type use_dot_as_decimal_separator: bool + """ + + _validation = { + 'mask_security_info': {'required': True}, + 'convert_implied_decimal': {'required': True}, + 'preserve_interchange': {'required': True}, + 'suspend_interchange_on_error': {'required': True}, + 'create_empty_xml_tags_for_trailing_separators': {'required': True}, + 'use_dot_as_decimal_separator': {'required': True}, + } + + _attribute_map = { + 'mask_security_info': {'key': 'maskSecurityInfo', 'type': 'bool'}, + 'convert_implied_decimal': {'key': 'convertImpliedDecimal', 'type': 'bool'}, + 'preserve_interchange': {'key': 'preserveInterchange', 'type': 'bool'}, + 'suspend_interchange_on_error': {'key': 'suspendInterchangeOnError', 'type': 'bool'}, + 'create_empty_xml_tags_for_trailing_separators': {'key': 'createEmptyXmlTagsForTrailingSeparators', 'type': 'bool'}, + 'use_dot_as_decimal_separator': {'key': 'useDotAsDecimalSeparator', 'type': 'bool'}, + } + + def __init__(self, *, mask_security_info: bool, convert_implied_decimal: bool, preserve_interchange: bool, suspend_interchange_on_error: bool, create_empty_xml_tags_for_trailing_separators: bool, use_dot_as_decimal_separator: bool, **kwargs) -> None: + super(X12ProcessingSettings, self).__init__(**kwargs) + self.mask_security_info = mask_security_info + self.convert_implied_decimal = convert_implied_decimal + self.preserve_interchange = preserve_interchange + self.suspend_interchange_on_error = suspend_interchange_on_error + self.create_empty_xml_tags_for_trailing_separators = create_empty_xml_tags_for_trailing_separators + self.use_dot_as_decimal_separator = use_dot_as_decimal_separator diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_protocol_settings.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_protocol_settings.py old mode 100755 new mode 100644 index 3e316cee0a5a..ab1d7ac4d471 --- a/azure-mgmt-logic/azure/mgmt/logic/models/x12_protocol_settings.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_protocol_settings.py @@ -15,42 +15,38 @@ class X12ProtocolSettings(Model): """The X12 agreement protocol settings. - :param validation_settings: The X12 validation settings. - :type validation_settings: :class:`X12ValidationSettings - ` - :param framing_settings: The X12 framing settings. - :type framing_settings: :class:`X12FramingSettings - ` - :param envelope_settings: The X12 envelope settings. - :type envelope_settings: :class:`X12EnvelopeSettings - ` - :param acknowledgement_settings: The X12 acknowledgment settings. - :type acknowledgement_settings: :class:`X12AcknowledgementSettings - ` - :param message_filter: The X12 message filter. - :type message_filter: :class:`X12MessageFilter - ` - :param security_settings: The X12 security settings. - :type security_settings: :class:`X12SecuritySettings - ` - :param processing_settings: The X12 processing settings. - :type processing_settings: :class:`X12ProcessingSettings - ` + All required parameters must be populated in order to send to Azure. + + :param validation_settings: Required. The X12 validation settings. + :type validation_settings: ~azure.mgmt.logic.models.X12ValidationSettings + :param framing_settings: Required. The X12 framing settings. + :type framing_settings: ~azure.mgmt.logic.models.X12FramingSettings + :param envelope_settings: Required. The X12 envelope settings. + :type envelope_settings: ~azure.mgmt.logic.models.X12EnvelopeSettings + :param acknowledgement_settings: Required. The X12 acknowledgment + settings. + :type acknowledgement_settings: + ~azure.mgmt.logic.models.X12AcknowledgementSettings + :param message_filter: Required. The X12 message filter. + :type message_filter: ~azure.mgmt.logic.models.X12MessageFilter + :param security_settings: Required. The X12 security settings. + :type security_settings: ~azure.mgmt.logic.models.X12SecuritySettings + :param processing_settings: Required. The X12 processing settings. + :type processing_settings: ~azure.mgmt.logic.models.X12ProcessingSettings :param envelope_overrides: The X12 envelope override settings. - :type envelope_overrides: list of :class:`X12EnvelopeOverride - ` + :type envelope_overrides: + list[~azure.mgmt.logic.models.X12EnvelopeOverride] :param validation_overrides: The X12 validation override settings. - :type validation_overrides: list of :class:`X12ValidationOverride - ` + :type validation_overrides: + list[~azure.mgmt.logic.models.X12ValidationOverride] :param message_filter_list: The X12 message filter list. - :type message_filter_list: list of :class:`X12MessageIdentifier - ` - :param schema_references: The X12 schema references. - :type schema_references: list of :class:`X12SchemaReference - ` + :type message_filter_list: + list[~azure.mgmt.logic.models.X12MessageIdentifier] + :param schema_references: Required. The X12 schema references. + :type schema_references: list[~azure.mgmt.logic.models.X12SchemaReference] :param x12_delimiter_overrides: The X12 delimiter override settings. - :type x12_delimiter_overrides: list of :class:`X12DelimiterOverrides - ` + :type x12_delimiter_overrides: + list[~azure.mgmt.logic.models.X12DelimiterOverrides] """ _validation = { @@ -79,16 +75,17 @@ class X12ProtocolSettings(Model): 'x12_delimiter_overrides': {'key': 'x12DelimiterOverrides', 'type': '[X12DelimiterOverrides]'}, } - def __init__(self, validation_settings, framing_settings, envelope_settings, acknowledgement_settings, message_filter, security_settings, processing_settings, schema_references, envelope_overrides=None, validation_overrides=None, message_filter_list=None, x12_delimiter_overrides=None): - self.validation_settings = validation_settings - self.framing_settings = framing_settings - self.envelope_settings = envelope_settings - self.acknowledgement_settings = acknowledgement_settings - self.message_filter = message_filter - self.security_settings = security_settings - self.processing_settings = processing_settings - self.envelope_overrides = envelope_overrides - self.validation_overrides = validation_overrides - self.message_filter_list = message_filter_list - self.schema_references = schema_references - self.x12_delimiter_overrides = x12_delimiter_overrides + def __init__(self, **kwargs): + super(X12ProtocolSettings, self).__init__(**kwargs) + self.validation_settings = kwargs.get('validation_settings', None) + self.framing_settings = kwargs.get('framing_settings', None) + self.envelope_settings = kwargs.get('envelope_settings', None) + self.acknowledgement_settings = kwargs.get('acknowledgement_settings', None) + self.message_filter = kwargs.get('message_filter', None) + self.security_settings = kwargs.get('security_settings', None) + self.processing_settings = kwargs.get('processing_settings', None) + self.envelope_overrides = kwargs.get('envelope_overrides', None) + self.validation_overrides = kwargs.get('validation_overrides', None) + self.message_filter_list = kwargs.get('message_filter_list', None) + self.schema_references = kwargs.get('schema_references', None) + self.x12_delimiter_overrides = kwargs.get('x12_delimiter_overrides', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_protocol_settings_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_protocol_settings_py3.py new file mode 100644 index 000000000000..3f328db1133e --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_protocol_settings_py3.py @@ -0,0 +1,91 @@ +# 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 X12ProtocolSettings(Model): + """The X12 agreement protocol settings. + + All required parameters must be populated in order to send to Azure. + + :param validation_settings: Required. The X12 validation settings. + :type validation_settings: ~azure.mgmt.logic.models.X12ValidationSettings + :param framing_settings: Required. The X12 framing settings. + :type framing_settings: ~azure.mgmt.logic.models.X12FramingSettings + :param envelope_settings: Required. The X12 envelope settings. + :type envelope_settings: ~azure.mgmt.logic.models.X12EnvelopeSettings + :param acknowledgement_settings: Required. The X12 acknowledgment + settings. + :type acknowledgement_settings: + ~azure.mgmt.logic.models.X12AcknowledgementSettings + :param message_filter: Required. The X12 message filter. + :type message_filter: ~azure.mgmt.logic.models.X12MessageFilter + :param security_settings: Required. The X12 security settings. + :type security_settings: ~azure.mgmt.logic.models.X12SecuritySettings + :param processing_settings: Required. The X12 processing settings. + :type processing_settings: ~azure.mgmt.logic.models.X12ProcessingSettings + :param envelope_overrides: The X12 envelope override settings. + :type envelope_overrides: + list[~azure.mgmt.logic.models.X12EnvelopeOverride] + :param validation_overrides: The X12 validation override settings. + :type validation_overrides: + list[~azure.mgmt.logic.models.X12ValidationOverride] + :param message_filter_list: The X12 message filter list. + :type message_filter_list: + list[~azure.mgmt.logic.models.X12MessageIdentifier] + :param schema_references: Required. The X12 schema references. + :type schema_references: list[~azure.mgmt.logic.models.X12SchemaReference] + :param x12_delimiter_overrides: The X12 delimiter override settings. + :type x12_delimiter_overrides: + list[~azure.mgmt.logic.models.X12DelimiterOverrides] + """ + + _validation = { + 'validation_settings': {'required': True}, + 'framing_settings': {'required': True}, + 'envelope_settings': {'required': True}, + 'acknowledgement_settings': {'required': True}, + 'message_filter': {'required': True}, + 'security_settings': {'required': True}, + 'processing_settings': {'required': True}, + 'schema_references': {'required': True}, + } + + _attribute_map = { + 'validation_settings': {'key': 'validationSettings', 'type': 'X12ValidationSettings'}, + 'framing_settings': {'key': 'framingSettings', 'type': 'X12FramingSettings'}, + 'envelope_settings': {'key': 'envelopeSettings', 'type': 'X12EnvelopeSettings'}, + 'acknowledgement_settings': {'key': 'acknowledgementSettings', 'type': 'X12AcknowledgementSettings'}, + 'message_filter': {'key': 'messageFilter', 'type': 'X12MessageFilter'}, + 'security_settings': {'key': 'securitySettings', 'type': 'X12SecuritySettings'}, + 'processing_settings': {'key': 'processingSettings', 'type': 'X12ProcessingSettings'}, + 'envelope_overrides': {'key': 'envelopeOverrides', 'type': '[X12EnvelopeOverride]'}, + 'validation_overrides': {'key': 'validationOverrides', 'type': '[X12ValidationOverride]'}, + 'message_filter_list': {'key': 'messageFilterList', 'type': '[X12MessageIdentifier]'}, + 'schema_references': {'key': 'schemaReferences', 'type': '[X12SchemaReference]'}, + 'x12_delimiter_overrides': {'key': 'x12DelimiterOverrides', 'type': '[X12DelimiterOverrides]'}, + } + + def __init__(self, *, validation_settings, framing_settings, envelope_settings, acknowledgement_settings, message_filter, security_settings, processing_settings, schema_references, envelope_overrides=None, validation_overrides=None, message_filter_list=None, x12_delimiter_overrides=None, **kwargs) -> None: + super(X12ProtocolSettings, self).__init__(**kwargs) + self.validation_settings = validation_settings + self.framing_settings = framing_settings + self.envelope_settings = envelope_settings + self.acknowledgement_settings = acknowledgement_settings + self.message_filter = message_filter + self.security_settings = security_settings + self.processing_settings = processing_settings + self.envelope_overrides = envelope_overrides + self.validation_overrides = validation_overrides + self.message_filter_list = message_filter_list + self.schema_references = schema_references + self.x12_delimiter_overrides = x12_delimiter_overrides diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_schema_reference.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_schema_reference.py old mode 100755 new mode 100644 index 37bad10d9dc5..dc8519933d95 --- a/azure-mgmt-logic/azure/mgmt/logic/models/x12_schema_reference.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_schema_reference.py @@ -15,13 +15,15 @@ class X12SchemaReference(Model): """The X12 schema reference. - :param message_id: The message id. + All required parameters must be populated in order to send to Azure. + + :param message_id: Required. The message id. :type message_id: str :param sender_application_id: The sender application id. :type sender_application_id: str - :param schema_version: The schema version. + :param schema_version: Required. The schema version. :type schema_version: str - :param schema_name: The schema name. + :param schema_name: Required. The schema name. :type schema_name: str """ @@ -38,8 +40,9 @@ class X12SchemaReference(Model): 'schema_name': {'key': 'schemaName', 'type': 'str'}, } - def __init__(self, message_id, schema_version, schema_name, sender_application_id=None): - self.message_id = message_id - self.sender_application_id = sender_application_id - self.schema_version = schema_version - self.schema_name = schema_name + def __init__(self, **kwargs): + super(X12SchemaReference, self).__init__(**kwargs) + self.message_id = kwargs.get('message_id', None) + self.sender_application_id = kwargs.get('sender_application_id', None) + self.schema_version = kwargs.get('schema_version', None) + self.schema_name = kwargs.get('schema_name', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_schema_reference_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_schema_reference_py3.py new file mode 100644 index 000000000000..e57f4d8806d4 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_schema_reference_py3.py @@ -0,0 +1,48 @@ +# 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 X12SchemaReference(Model): + """The X12 schema reference. + + All required parameters must be populated in order to send to Azure. + + :param message_id: Required. The message id. + :type message_id: str + :param sender_application_id: The sender application id. + :type sender_application_id: str + :param schema_version: Required. The schema version. + :type schema_version: str + :param schema_name: Required. The schema name. + :type schema_name: str + """ + + _validation = { + 'message_id': {'required': True}, + 'schema_version': {'required': True}, + 'schema_name': {'required': True}, + } + + _attribute_map = { + 'message_id': {'key': 'messageId', 'type': 'str'}, + 'sender_application_id': {'key': 'senderApplicationId', 'type': 'str'}, + 'schema_version': {'key': 'schemaVersion', 'type': 'str'}, + 'schema_name': {'key': 'schemaName', 'type': 'str'}, + } + + def __init__(self, *, message_id: str, schema_version: str, schema_name: str, sender_application_id: str=None, **kwargs) -> None: + super(X12SchemaReference, self).__init__(**kwargs) + self.message_id = message_id + self.sender_application_id = sender_application_id + self.schema_version = schema_version + self.schema_name = schema_name diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_security_settings.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_security_settings.py old mode 100755 new mode 100644 index 09e61426ca83..96f57189b72e --- a/azure-mgmt-logic/azure/mgmt/logic/models/x12_security_settings.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_security_settings.py @@ -15,11 +15,13 @@ class X12SecuritySettings(Model): """The X12 agreement security settings. - :param authorization_qualifier: The authorization qualifier. + All required parameters must be populated in order to send to Azure. + + :param authorization_qualifier: Required. The authorization qualifier. :type authorization_qualifier: str :param authorization_value: The authorization value. :type authorization_value: str - :param security_qualifier: The security qualifier. + :param security_qualifier: Required. The security qualifier. :type security_qualifier: str :param password_value: The password value. :type password_value: str @@ -37,8 +39,9 @@ class X12SecuritySettings(Model): 'password_value': {'key': 'passwordValue', 'type': 'str'}, } - def __init__(self, authorization_qualifier, security_qualifier, authorization_value=None, password_value=None): - self.authorization_qualifier = authorization_qualifier - self.authorization_value = authorization_value - self.security_qualifier = security_qualifier - self.password_value = password_value + def __init__(self, **kwargs): + super(X12SecuritySettings, self).__init__(**kwargs) + self.authorization_qualifier = kwargs.get('authorization_qualifier', None) + self.authorization_value = kwargs.get('authorization_value', None) + self.security_qualifier = kwargs.get('security_qualifier', None) + self.password_value = kwargs.get('password_value', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_security_settings_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_security_settings_py3.py new file mode 100644 index 000000000000..fd3591dffd2a --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_security_settings_py3.py @@ -0,0 +1,47 @@ +# 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 X12SecuritySettings(Model): + """The X12 agreement security settings. + + All required parameters must be populated in order to send to Azure. + + :param authorization_qualifier: Required. The authorization qualifier. + :type authorization_qualifier: str + :param authorization_value: The authorization value. + :type authorization_value: str + :param security_qualifier: Required. The security qualifier. + :type security_qualifier: str + :param password_value: The password value. + :type password_value: str + """ + + _validation = { + 'authorization_qualifier': {'required': True}, + 'security_qualifier': {'required': True}, + } + + _attribute_map = { + 'authorization_qualifier': {'key': 'authorizationQualifier', 'type': 'str'}, + 'authorization_value': {'key': 'authorizationValue', 'type': 'str'}, + 'security_qualifier': {'key': 'securityQualifier', 'type': 'str'}, + 'password_value': {'key': 'passwordValue', 'type': 'str'}, + } + + def __init__(self, *, authorization_qualifier: str, security_qualifier: str, authorization_value: str=None, password_value: str=None, **kwargs) -> None: + super(X12SecuritySettings, self).__init__(**kwargs) + self.authorization_qualifier = authorization_qualifier + self.authorization_value = authorization_value + self.security_qualifier = security_qualifier + self.password_value = password_value diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_validation_override.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_validation_override.py old mode 100755 new mode 100644 index 322ad7353ecd..1b5e384734ca --- a/azure-mgmt-logic/azure/mgmt/logic/models/x12_validation_override.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_validation_override.py @@ -15,28 +15,31 @@ class X12ValidationOverride(Model): """The X12 validation override settings. - :param message_id: The message id on which the validation settings has to - be applied. + All required parameters must be populated in order to send to Azure. + + :param message_id: Required. The message id on which the validation + settings has to be applied. :type message_id: str - :param validate_edi_types: The value indicating whether to validate EDI - types. + :param validate_edi_types: Required. The value indicating whether to + validate EDI types. :type validate_edi_types: bool - :param validate_xsd_types: The value indicating whether to validate XSD - types. + :param validate_xsd_types: Required. The value indicating whether to + validate XSD types. :type validate_xsd_types: bool - :param allow_leading_and_trailing_spaces_and_zeroes: The value indicating - whether to allow leading and trailing spaces and zeroes. + :param allow_leading_and_trailing_spaces_and_zeroes: Required. The value + indicating whether to allow leading and trailing spaces and zeroes. :type allow_leading_and_trailing_spaces_and_zeroes: bool - :param validate_character_set: The value indicating whether to validate - character Set. + :param validate_character_set: Required. The value indicating whether to + validate character Set. :type validate_character_set: bool - :param trim_leading_and_trailing_spaces_and_zeroes: The value indicating - whether to trim leading and trailing spaces and zeroes. + :param trim_leading_and_trailing_spaces_and_zeroes: Required. The value + indicating whether to trim leading and trailing spaces and zeroes. :type trim_leading_and_trailing_spaces_and_zeroes: bool - :param trailing_separator_policy: The trailing separator policy. Possible - values include: 'NotSpecified', 'NotAllowed', 'Optional', 'Mandatory' - :type trailing_separator_policy: str or :class:`TrailingSeparatorPolicy - ` + :param trailing_separator_policy: Required. The trailing separator policy. + Possible values include: 'NotSpecified', 'NotAllowed', 'Optional', + 'Mandatory' + :type trailing_separator_policy: str or + ~azure.mgmt.logic.models.TrailingSeparatorPolicy """ _validation = { @@ -59,11 +62,12 @@ class X12ValidationOverride(Model): 'trailing_separator_policy': {'key': 'trailingSeparatorPolicy', 'type': 'TrailingSeparatorPolicy'}, } - def __init__(self, message_id, validate_edi_types, validate_xsd_types, allow_leading_and_trailing_spaces_and_zeroes, validate_character_set, trim_leading_and_trailing_spaces_and_zeroes, trailing_separator_policy): - self.message_id = message_id - self.validate_edi_types = validate_edi_types - self.validate_xsd_types = validate_xsd_types - self.allow_leading_and_trailing_spaces_and_zeroes = allow_leading_and_trailing_spaces_and_zeroes - self.validate_character_set = validate_character_set - self.trim_leading_and_trailing_spaces_and_zeroes = trim_leading_and_trailing_spaces_and_zeroes - self.trailing_separator_policy = trailing_separator_policy + def __init__(self, **kwargs): + super(X12ValidationOverride, self).__init__(**kwargs) + self.message_id = kwargs.get('message_id', None) + self.validate_edi_types = kwargs.get('validate_edi_types', None) + self.validate_xsd_types = kwargs.get('validate_xsd_types', None) + self.allow_leading_and_trailing_spaces_and_zeroes = kwargs.get('allow_leading_and_trailing_spaces_and_zeroes', None) + self.validate_character_set = kwargs.get('validate_character_set', None) + self.trim_leading_and_trailing_spaces_and_zeroes = kwargs.get('trim_leading_and_trailing_spaces_and_zeroes', None) + self.trailing_separator_policy = kwargs.get('trailing_separator_policy', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_validation_override_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_validation_override_py3.py new file mode 100644 index 000000000000..9f80ba560202 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_validation_override_py3.py @@ -0,0 +1,73 @@ +# 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 X12ValidationOverride(Model): + """The X12 validation override settings. + + All required parameters must be populated in order to send to Azure. + + :param message_id: Required. The message id on which the validation + settings has to be applied. + :type message_id: str + :param validate_edi_types: Required. The value indicating whether to + validate EDI types. + :type validate_edi_types: bool + :param validate_xsd_types: Required. The value indicating whether to + validate XSD types. + :type validate_xsd_types: bool + :param allow_leading_and_trailing_spaces_and_zeroes: Required. The value + indicating whether to allow leading and trailing spaces and zeroes. + :type allow_leading_and_trailing_spaces_and_zeroes: bool + :param validate_character_set: Required. The value indicating whether to + validate character Set. + :type validate_character_set: bool + :param trim_leading_and_trailing_spaces_and_zeroes: Required. The value + indicating whether to trim leading and trailing spaces and zeroes. + :type trim_leading_and_trailing_spaces_and_zeroes: bool + :param trailing_separator_policy: Required. The trailing separator policy. + Possible values include: 'NotSpecified', 'NotAllowed', 'Optional', + 'Mandatory' + :type trailing_separator_policy: str or + ~azure.mgmt.logic.models.TrailingSeparatorPolicy + """ + + _validation = { + 'message_id': {'required': True}, + 'validate_edi_types': {'required': True}, + 'validate_xsd_types': {'required': True}, + 'allow_leading_and_trailing_spaces_and_zeroes': {'required': True}, + 'validate_character_set': {'required': True}, + 'trim_leading_and_trailing_spaces_and_zeroes': {'required': True}, + 'trailing_separator_policy': {'required': True}, + } + + _attribute_map = { + 'message_id': {'key': 'messageId', 'type': 'str'}, + 'validate_edi_types': {'key': 'validateEdiTypes', 'type': 'bool'}, + 'validate_xsd_types': {'key': 'validateXsdTypes', 'type': 'bool'}, + 'allow_leading_and_trailing_spaces_and_zeroes': {'key': 'allowLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, + 'validate_character_set': {'key': 'validateCharacterSet', 'type': 'bool'}, + 'trim_leading_and_trailing_spaces_and_zeroes': {'key': 'trimLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, + 'trailing_separator_policy': {'key': 'trailingSeparatorPolicy', 'type': 'TrailingSeparatorPolicy'}, + } + + def __init__(self, *, message_id: str, validate_edi_types: bool, validate_xsd_types: bool, allow_leading_and_trailing_spaces_and_zeroes: bool, validate_character_set: bool, trim_leading_and_trailing_spaces_and_zeroes: bool, trailing_separator_policy, **kwargs) -> None: + super(X12ValidationOverride, self).__init__(**kwargs) + self.message_id = message_id + self.validate_edi_types = validate_edi_types + self.validate_xsd_types = validate_xsd_types + self.allow_leading_and_trailing_spaces_and_zeroes = allow_leading_and_trailing_spaces_and_zeroes + self.validate_character_set = validate_character_set + self.trim_leading_and_trailing_spaces_and_zeroes = trim_leading_and_trailing_spaces_and_zeroes + self.trailing_separator_policy = trailing_separator_policy diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_validation_settings.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_validation_settings.py old mode 100755 new mode 100644 index 670aa9f2efab..107e1849a2c5 --- a/azure-mgmt-logic/azure/mgmt/logic/models/x12_validation_settings.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_validation_settings.py @@ -15,37 +15,40 @@ class X12ValidationSettings(Model): """The X12 agreement validation settings. - :param validate_character_set: The value indicating whether to validate - character set in the message. + All required parameters must be populated in order to send to Azure. + + :param validate_character_set: Required. The value indicating whether to + validate character set in the message. :type validate_character_set: bool - :param check_duplicate_interchange_control_number: The value indicating - whether to check for duplicate interchange control number. + :param check_duplicate_interchange_control_number: Required. The value + indicating whether to check for duplicate interchange control number. :type check_duplicate_interchange_control_number: bool - :param interchange_control_number_validity_days: The validity period of - interchange control number. + :param interchange_control_number_validity_days: Required. The validity + period of interchange control number. :type interchange_control_number_validity_days: int - :param check_duplicate_group_control_number: The value indicating whether - to check for duplicate group control number. + :param check_duplicate_group_control_number: Required. The value + indicating whether to check for duplicate group control number. :type check_duplicate_group_control_number: bool - :param check_duplicate_transaction_set_control_number: The value + :param check_duplicate_transaction_set_control_number: Required. The value indicating whether to check for duplicate transaction set control number. :type check_duplicate_transaction_set_control_number: bool - :param validate_edi_types: The value indicating whether to Whether to - validate EDI types. + :param validate_edi_types: Required. The value indicating whether to + Whether to validate EDI types. :type validate_edi_types: bool - :param validate_xsd_types: The value indicating whether to Whether to - validate XSD types. + :param validate_xsd_types: Required. The value indicating whether to + Whether to validate XSD types. :type validate_xsd_types: bool - :param allow_leading_and_trailing_spaces_and_zeroes: The value indicating - whether to allow leading and trailing spaces and zeroes. + :param allow_leading_and_trailing_spaces_and_zeroes: Required. The value + indicating whether to allow leading and trailing spaces and zeroes. :type allow_leading_and_trailing_spaces_and_zeroes: bool - :param trim_leading_and_trailing_spaces_and_zeroes: The value indicating - whether to trim leading and trailing spaces and zeroes. + :param trim_leading_and_trailing_spaces_and_zeroes: Required. The value + indicating whether to trim leading and trailing spaces and zeroes. :type trim_leading_and_trailing_spaces_and_zeroes: bool - :param trailing_separator_policy: The trailing separator policy. Possible - values include: 'NotSpecified', 'NotAllowed', 'Optional', 'Mandatory' - :type trailing_separator_policy: str or :class:`TrailingSeparatorPolicy - ` + :param trailing_separator_policy: Required. The trailing separator policy. + Possible values include: 'NotSpecified', 'NotAllowed', 'Optional', + 'Mandatory' + :type trailing_separator_policy: str or + ~azure.mgmt.logic.models.TrailingSeparatorPolicy """ _validation = { @@ -74,14 +77,15 @@ class X12ValidationSettings(Model): 'trailing_separator_policy': {'key': 'trailingSeparatorPolicy', 'type': 'TrailingSeparatorPolicy'}, } - def __init__(self, validate_character_set, check_duplicate_interchange_control_number, interchange_control_number_validity_days, check_duplicate_group_control_number, check_duplicate_transaction_set_control_number, validate_edi_types, validate_xsd_types, allow_leading_and_trailing_spaces_and_zeroes, trim_leading_and_trailing_spaces_and_zeroes, trailing_separator_policy): - self.validate_character_set = validate_character_set - self.check_duplicate_interchange_control_number = check_duplicate_interchange_control_number - self.interchange_control_number_validity_days = interchange_control_number_validity_days - self.check_duplicate_group_control_number = check_duplicate_group_control_number - self.check_duplicate_transaction_set_control_number = check_duplicate_transaction_set_control_number - self.validate_edi_types = validate_edi_types - self.validate_xsd_types = validate_xsd_types - self.allow_leading_and_trailing_spaces_and_zeroes = allow_leading_and_trailing_spaces_and_zeroes - self.trim_leading_and_trailing_spaces_and_zeroes = trim_leading_and_trailing_spaces_and_zeroes - self.trailing_separator_policy = trailing_separator_policy + def __init__(self, **kwargs): + super(X12ValidationSettings, self).__init__(**kwargs) + self.validate_character_set = kwargs.get('validate_character_set', None) + self.check_duplicate_interchange_control_number = kwargs.get('check_duplicate_interchange_control_number', None) + self.interchange_control_number_validity_days = kwargs.get('interchange_control_number_validity_days', None) + self.check_duplicate_group_control_number = kwargs.get('check_duplicate_group_control_number', None) + self.check_duplicate_transaction_set_control_number = kwargs.get('check_duplicate_transaction_set_control_number', None) + self.validate_edi_types = kwargs.get('validate_edi_types', None) + self.validate_xsd_types = kwargs.get('validate_xsd_types', None) + self.allow_leading_and_trailing_spaces_and_zeroes = kwargs.get('allow_leading_and_trailing_spaces_and_zeroes', None) + self.trim_leading_and_trailing_spaces_and_zeroes = kwargs.get('trim_leading_and_trailing_spaces_and_zeroes', None) + self.trailing_separator_policy = kwargs.get('trailing_separator_policy', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/x12_validation_settings_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/x12_validation_settings_py3.py new file mode 100644 index 000000000000..3873b10dfce9 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/x12_validation_settings_py3.py @@ -0,0 +1,91 @@ +# 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 X12ValidationSettings(Model): + """The X12 agreement validation settings. + + All required parameters must be populated in order to send to Azure. + + :param validate_character_set: Required. The value indicating whether to + validate character set in the message. + :type validate_character_set: bool + :param check_duplicate_interchange_control_number: Required. The value + indicating whether to check for duplicate interchange control number. + :type check_duplicate_interchange_control_number: bool + :param interchange_control_number_validity_days: Required. The validity + period of interchange control number. + :type interchange_control_number_validity_days: int + :param check_duplicate_group_control_number: Required. The value + indicating whether to check for duplicate group control number. + :type check_duplicate_group_control_number: bool + :param check_duplicate_transaction_set_control_number: Required. The value + indicating whether to check for duplicate transaction set control number. + :type check_duplicate_transaction_set_control_number: bool + :param validate_edi_types: Required. The value indicating whether to + Whether to validate EDI types. + :type validate_edi_types: bool + :param validate_xsd_types: Required. The value indicating whether to + Whether to validate XSD types. + :type validate_xsd_types: bool + :param allow_leading_and_trailing_spaces_and_zeroes: Required. The value + indicating whether to allow leading and trailing spaces and zeroes. + :type allow_leading_and_trailing_spaces_and_zeroes: bool + :param trim_leading_and_trailing_spaces_and_zeroes: Required. The value + indicating whether to trim leading and trailing spaces and zeroes. + :type trim_leading_and_trailing_spaces_and_zeroes: bool + :param trailing_separator_policy: Required. The trailing separator policy. + Possible values include: 'NotSpecified', 'NotAllowed', 'Optional', + 'Mandatory' + :type trailing_separator_policy: str or + ~azure.mgmt.logic.models.TrailingSeparatorPolicy + """ + + _validation = { + 'validate_character_set': {'required': True}, + 'check_duplicate_interchange_control_number': {'required': True}, + 'interchange_control_number_validity_days': {'required': True}, + 'check_duplicate_group_control_number': {'required': True}, + 'check_duplicate_transaction_set_control_number': {'required': True}, + 'validate_edi_types': {'required': True}, + 'validate_xsd_types': {'required': True}, + 'allow_leading_and_trailing_spaces_and_zeroes': {'required': True}, + 'trim_leading_and_trailing_spaces_and_zeroes': {'required': True}, + 'trailing_separator_policy': {'required': True}, + } + + _attribute_map = { + 'validate_character_set': {'key': 'validateCharacterSet', 'type': 'bool'}, + 'check_duplicate_interchange_control_number': {'key': 'checkDuplicateInterchangeControlNumber', 'type': 'bool'}, + 'interchange_control_number_validity_days': {'key': 'interchangeControlNumberValidityDays', 'type': 'int'}, + 'check_duplicate_group_control_number': {'key': 'checkDuplicateGroupControlNumber', 'type': 'bool'}, + 'check_duplicate_transaction_set_control_number': {'key': 'checkDuplicateTransactionSetControlNumber', 'type': 'bool'}, + 'validate_edi_types': {'key': 'validateEdiTypes', 'type': 'bool'}, + 'validate_xsd_types': {'key': 'validateXsdTypes', 'type': 'bool'}, + 'allow_leading_and_trailing_spaces_and_zeroes': {'key': 'allowLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, + 'trim_leading_and_trailing_spaces_and_zeroes': {'key': 'trimLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, + 'trailing_separator_policy': {'key': 'trailingSeparatorPolicy', 'type': 'TrailingSeparatorPolicy'}, + } + + def __init__(self, *, validate_character_set: bool, check_duplicate_interchange_control_number: bool, interchange_control_number_validity_days: int, check_duplicate_group_control_number: bool, check_duplicate_transaction_set_control_number: bool, validate_edi_types: bool, validate_xsd_types: bool, allow_leading_and_trailing_spaces_and_zeroes: bool, trim_leading_and_trailing_spaces_and_zeroes: bool, trailing_separator_policy, **kwargs) -> None: + super(X12ValidationSettings, self).__init__(**kwargs) + self.validate_character_set = validate_character_set + self.check_duplicate_interchange_control_number = check_duplicate_interchange_control_number + self.interchange_control_number_validity_days = interchange_control_number_validity_days + self.check_duplicate_group_control_number = check_duplicate_group_control_number + self.check_duplicate_transaction_set_control_number = check_duplicate_transaction_set_control_number + self.validate_edi_types = validate_edi_types + self.validate_xsd_types = validate_xsd_types + self.allow_leading_and_trailing_spaces_and_zeroes = allow_leading_and_trailing_spaces_and_zeroes + self.trim_leading_and_trailing_spaces_and_zeroes = trim_leading_and_trailing_spaces_and_zeroes + self.trailing_separator_policy = trailing_separator_policy diff --git a/azure-mgmt-logic/azure/mgmt/logic/operations/__init__.py b/azure-mgmt-logic/azure/mgmt/logic/operations/__init__.py old mode 100755 new mode 100644 index d554e3620607..b2facd3995b3 --- a/azure-mgmt-logic/azure/mgmt/logic/operations/__init__.py +++ b/azure-mgmt-logic/azure/mgmt/logic/operations/__init__.py @@ -15,7 +15,12 @@ from .workflow_trigger_histories_operations import WorkflowTriggerHistoriesOperations from .workflow_runs_operations import WorkflowRunsOperations from .workflow_run_actions_operations import WorkflowRunActionsOperations +from .workflow_run_action_repetitions_operations import WorkflowRunActionRepetitionsOperations +from .workflow_run_action_scoped_repetitions_operations import WorkflowRunActionScopedRepetitionsOperations +from .workflow_run_operations import WorkflowRunOperations from .integration_accounts_operations import IntegrationAccountsOperations +from .integration_account_assemblies_operations import IntegrationAccountAssembliesOperations +from .integration_account_batch_configurations_operations import IntegrationAccountBatchConfigurationsOperations from .schemas_operations import SchemasOperations from .maps_operations import MapsOperations from .partners_operations import PartnersOperations @@ -30,7 +35,12 @@ 'WorkflowTriggerHistoriesOperations', 'WorkflowRunsOperations', 'WorkflowRunActionsOperations', + 'WorkflowRunActionRepetitionsOperations', + 'WorkflowRunActionScopedRepetitionsOperations', + 'WorkflowRunOperations', 'IntegrationAccountsOperations', + 'IntegrationAccountAssembliesOperations', + 'IntegrationAccountBatchConfigurationsOperations', 'SchemasOperations', 'MapsOperations', 'PartnersOperations', diff --git a/azure-mgmt-logic/azure/mgmt/logic/operations/agreements_operations.py b/azure-mgmt-logic/azure/mgmt/logic/operations/agreements_operations.py old mode 100755 new mode 100644 index 57f34d27e366..865610bc4e8b --- a/azure-mgmt-logic/azure/mgmt/logic/operations/agreements_operations.py +++ b/azure-mgmt-logic/azure/mgmt/logic/operations/agreements_operations.py @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -import uuid from .. import models @@ -22,10 +22,12 @@ class AgreementsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version. Constant value: "2016-06-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -52,15 +54,16 @@ def list_by_integration_accounts( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`IntegrationAccountAgreementPaged - ` + :return: An iterator like instance of IntegrationAccountAgreement + :rtype: + ~azure.mgmt.logic.models.IntegrationAccountAgreementPaged[~azure.mgmt.logic.models.IntegrationAccountAgreement] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements' + url = self.list_by_integration_accounts.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -93,7 +96,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -111,6 +114,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_integration_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements'} def get( self, resource_group_name, integration_account_name, agreement_name, custom_headers=None, raw=False, **operation_config): @@ -127,14 +131,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`IntegrationAccountAgreement - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: IntegrationAccountAgreement or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.IntegrationAccountAgreement or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -159,7 +162,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -176,6 +179,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}'} def create_or_update( self, resource_group_name, integration_account_name, agreement_name, agreement, custom_headers=None, raw=False, **operation_config): @@ -188,21 +192,19 @@ def create_or_update( :param agreement_name: The integration account agreement name. :type agreement_name: str :param agreement: The integration account agreement. - :type agreement: :class:`IntegrationAccountAgreement - ` + :type agreement: ~azure.mgmt.logic.models.IntegrationAccountAgreement :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`. - :rtype: :class:`IntegrationAccountAgreement - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: IntegrationAccountAgreement or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.IntegrationAccountAgreement or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -231,7 +233,7 @@ def create_or_update( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -250,6 +252,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}'} def delete( self, resource_group_name, integration_account_name, agreement_name, custom_headers=None, raw=False, **operation_config): @@ -266,13 +269,12 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}' + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -297,7 +299,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -307,3 +309,80 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}'} + + def list_content_callback_url( + self, resource_group_name, integration_account_name, agreement_name, not_after=None, key_type=None, custom_headers=None, raw=False, **operation_config): + """Get the content callback url. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param agreement_name: The integration account agreement name. + :type agreement_name: str + :param not_after: The expiry time. + :type not_after: datetime + :param key_type: The key type. Possible values include: + 'NotSpecified', 'Primary', 'Secondary' + :type key_type: str or ~azure.mgmt.logic.models.KeyType + :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: WorkflowTriggerCallbackUrl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.WorkflowTriggerCallbackUrl or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + list_content_callback_url1 = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) + + # Construct URL + url = self.list_content_callback_url.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), + 'agreementName': self._serialize.url("agreement_name", agreement_name, '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(list_content_callback_url1, 'GetCallbackUrlParameters') + + # 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]: + 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('WorkflowTriggerCallbackUrl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_content_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}/listContentCallbackUrl'} diff --git a/azure-mgmt-logic/azure/mgmt/logic/operations/certificates_operations.py b/azure-mgmt-logic/azure/mgmt/logic/operations/certificates_operations.py old mode 100755 new mode 100644 index af9925bef912..615cbe579cec --- a/azure-mgmt-logic/azure/mgmt/logic/operations/certificates_operations.py +++ b/azure-mgmt-logic/azure/mgmt/logic/operations/certificates_operations.py @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -import uuid from .. import models @@ -22,10 +22,12 @@ class CertificatesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version. Constant value: "2016-06-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -50,15 +52,16 @@ def list_by_integration_accounts( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`IntegrationAccountCertificatePaged - ` + :return: An iterator like instance of IntegrationAccountCertificate + :rtype: + ~azure.mgmt.logic.models.IntegrationAccountCertificatePaged[~azure.mgmt.logic.models.IntegrationAccountCertificate] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates' + url = self.list_by_integration_accounts.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -89,7 +92,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -107,6 +110,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_integration_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates'} def get( self, resource_group_name, integration_account_name, certificate_name, custom_headers=None, raw=False, **operation_config): @@ -123,14 +127,14 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`IntegrationAccountCertificate - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: IntegrationAccountCertificate or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.logic.models.IntegrationAccountCertificate or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -155,7 +159,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -172,6 +176,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}'} def create_or_update( self, resource_group_name, integration_account_name, certificate_name, certificate, custom_headers=None, raw=False, **operation_config): @@ -184,21 +189,21 @@ def create_or_update( :param certificate_name: The integration account certificate name. :type certificate_name: str :param certificate: The integration account certificate. - :type certificate: :class:`IntegrationAccountCertificate - ` + :type certificate: + ~azure.mgmt.logic.models.IntegrationAccountCertificate :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`. - :rtype: :class:`IntegrationAccountCertificate - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: IntegrationAccountCertificate or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.logic.models.IntegrationAccountCertificate or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -227,7 +232,7 @@ def create_or_update( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -246,6 +251,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}'} def delete( self, resource_group_name, integration_account_name, certificate_name, custom_headers=None, raw=False, **operation_config): @@ -262,13 +268,12 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}' + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -293,7 +298,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -303,3 +308,4 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}'} diff --git a/azure-mgmt-logic/azure/mgmt/logic/operations/integration_account_assemblies_operations.py b/azure-mgmt-logic/azure/mgmt/logic/operations/integration_account_assemblies_operations.py new file mode 100644 index 000000000000..ebfb06ee9381 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/operations/integration_account_assemblies_operations.py @@ -0,0 +1,369 @@ +# 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 IntegrationAccountAssembliesOperations(object): + """IntegrationAccountAssembliesOperations 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: The API version. Constant value: "2016-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2016-06-01" + + self.config = config + + def list( + self, resource_group_name, integration_account_name, custom_headers=None, raw=False, **operation_config): + """List the assemblies for an integration account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_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 AssemblyDefinition + :rtype: + ~azure.mgmt.logic.models.AssemblyDefinitionPaged[~azure.mgmt.logic.models.AssemblyDefinition] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, '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.AssemblyDefinitionPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.AssemblyDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies'} + + def get( + self, resource_group_name, integration_account_name, assembly_artifact_name, custom_headers=None, raw=False, **operation_config): + """Get an assembly for an integration account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param assembly_artifact_name: The assembly artifact name. + :type assembly_artifact_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: AssemblyDefinition or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.AssemblyDefinition or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), + 'assemblyArtifactName': self._serialize.url("assembly_artifact_name", assembly_artifact_name, '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('AssemblyDefinition', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}'} + + def create_or_update( + self, resource_group_name, integration_account_name, assembly_artifact_name, assembly_artifact, custom_headers=None, raw=False, **operation_config): + """Create or update an assembly for an integration account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param assembly_artifact_name: The assembly artifact name. + :type assembly_artifact_name: str + :param assembly_artifact: The assembly artifact. + :type assembly_artifact: ~azure.mgmt.logic.models.AssemblyDefinition + :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: AssemblyDefinition or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.AssemblyDefinition or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), + 'assemblyArtifactName': self._serialize.url("assembly_artifact_name", assembly_artifact_name, '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(assembly_artifact, 'AssemblyDefinition') + + # 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('AssemblyDefinition', response) + if response.status_code == 201: + deserialized = self._deserialize('AssemblyDefinition', 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.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}'} + + def delete( + self, resource_group_name, integration_account_name, assembly_artifact_name, custom_headers=None, raw=False, **operation_config): + """Delete an assembly for an integration account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param assembly_artifact_name: The assembly artifact name. + :type assembly_artifact_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 = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), + 'assemblyArtifactName': self._serialize.url("assembly_artifact_name", assembly_artifact_name, '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.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}'} + + def list_content_callback_url( + self, resource_group_name, integration_account_name, assembly_artifact_name, custom_headers=None, raw=False, **operation_config): + """Get the content callback url for an integration account assembly. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param assembly_artifact_name: The assembly artifact name. + :type assembly_artifact_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: WorkflowTriggerCallbackUrl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.WorkflowTriggerCallbackUrl or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_content_callback_url.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), + 'assemblyArtifactName': self._serialize.url("assembly_artifact_name", assembly_artifact_name, '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.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('WorkflowTriggerCallbackUrl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_content_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}/listContentCallbackUrl'} diff --git a/azure-mgmt-logic/azure/mgmt/logic/operations/integration_account_batch_configurations_operations.py b/azure-mgmt-logic/azure/mgmt/logic/operations/integration_account_batch_configurations_operations.py new file mode 100644 index 000000000000..297b62c6bf2b --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/operations/integration_account_batch_configurations_operations.py @@ -0,0 +1,304 @@ +# 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 IntegrationAccountBatchConfigurationsOperations(object): + """IntegrationAccountBatchConfigurationsOperations 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: The API version. Constant value: "2016-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2016-06-01" + + self.config = config + + def list( + self, resource_group_name, integration_account_name, custom_headers=None, raw=False, **operation_config): + """List the batch configurations for an integration account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_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 BatchConfiguration + :rtype: + ~azure.mgmt.logic.models.BatchConfigurationPaged[~azure.mgmt.logic.models.BatchConfiguration] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, '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.BatchConfigurationPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.BatchConfigurationPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations'} + + def get( + self, resource_group_name, integration_account_name, batch_configuration_name, custom_headers=None, raw=False, **operation_config): + """Get a batch configuration for an integration account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param batch_configuration_name: The batch configuration name. + :type batch_configuration_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: BatchConfiguration or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.BatchConfiguration or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), + 'batchConfigurationName': self._serialize.url("batch_configuration_name", batch_configuration_name, '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('BatchConfiguration', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}'} + + def create_or_update( + self, resource_group_name, integration_account_name, batch_configuration_name, batch_configuration, custom_headers=None, raw=False, **operation_config): + """Create or update a batch configuration for an integration account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param batch_configuration_name: The batch configuration name. + :type batch_configuration_name: str + :param batch_configuration: The batch configuration. + :type batch_configuration: ~azure.mgmt.logic.models.BatchConfiguration + :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: BatchConfiguration or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.BatchConfiguration or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), + 'batchConfigurationName': self._serialize.url("batch_configuration_name", batch_configuration_name, '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(batch_configuration, 'BatchConfiguration') + + # 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('BatchConfiguration', response) + if response.status_code == 201: + deserialized = self._deserialize('BatchConfiguration', 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.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}'} + + def delete( + self, resource_group_name, integration_account_name, batch_configuration_name, custom_headers=None, raw=False, **operation_config): + """Delete a batch configuration for an integration account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param batch_configuration_name: The batch configuration name. + :type batch_configuration_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 = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), + 'batchConfigurationName': self._serialize.url("batch_configuration_name", batch_configuration_name, '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.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}'} diff --git a/azure-mgmt-logic/azure/mgmt/logic/operations/integration_accounts_operations.py b/azure-mgmt-logic/azure/mgmt/logic/operations/integration_accounts_operations.py old mode 100755 new mode 100644 index 54463bdb92b9..692acc1e3dd6 --- a/azure-mgmt-logic/azure/mgmt/logic/operations/integration_accounts_operations.py +++ b/azure-mgmt-logic/azure/mgmt/logic/operations/integration_accounts_operations.py @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -import uuid from .. import models @@ -22,10 +22,12 @@ class IntegrationAccountsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version. Constant value: "2016-06-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -46,15 +48,16 @@ def list_by_subscription( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`IntegrationAccountPaged - ` + :return: An iterator like instance of IntegrationAccount + :rtype: + ~azure.mgmt.logic.models.IntegrationAccountPaged[~azure.mgmt.logic.models.IntegrationAccount] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.Logic/integrationAccounts' + url = self.list_by_subscription.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -83,7 +86,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -101,6 +104,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Logic/integrationAccounts'} def list_by_resource_group( self, resource_group_name, top=None, custom_headers=None, raw=False, **operation_config): @@ -115,15 +119,16 @@ def list_by_resource_group( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`IntegrationAccountPaged - ` + :return: An iterator like instance of IntegrationAccount + :rtype: + ~azure.mgmt.logic.models.IntegrationAccountPaged[~azure.mgmt.logic.models.IntegrationAccount] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts' + url = self.list_by_resource_group.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') @@ -153,7 +158,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -171,6 +176,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts'} def get( self, resource_group_name, integration_account_name, custom_headers=None, raw=False, **operation_config): @@ -185,14 +191,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`IntegrationAccount - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: IntegrationAccount or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.IntegrationAccount or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -216,7 +221,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -233,6 +238,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}'} def create_or_update( self, resource_group_name, integration_account_name, integration_account, custom_headers=None, raw=False, **operation_config): @@ -243,21 +249,19 @@ def create_or_update( :param integration_account_name: The integration account name. :type integration_account_name: str :param integration_account: The integration account. - :type integration_account: :class:`IntegrationAccount - ` + :type integration_account: ~azure.mgmt.logic.models.IntegrationAccount :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`. - :rtype: :class:`IntegrationAccount - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: IntegrationAccount or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.IntegrationAccount or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -285,7 +289,7 @@ def create_or_update( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -304,6 +308,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}'} def update( self, resource_group_name, integration_account_name, integration_account, custom_headers=None, raw=False, **operation_config): @@ -314,21 +319,19 @@ def update( :param integration_account_name: The integration account name. :type integration_account_name: str :param integration_account: The integration account. - :type integration_account: :class:`IntegrationAccount - ` + :type integration_account: ~azure.mgmt.logic.models.IntegrationAccount :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`. - :rtype: :class:`IntegrationAccount - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: IntegrationAccount or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.IntegrationAccount or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}' + url = self.update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -356,7 +359,7 @@ def update( # Construct and send request request = self._client.patch(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -373,6 +376,7 @@ def update( return client_raw_response return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}'} def delete( self, resource_group_name, integration_account_name, custom_headers=None, raw=False, **operation_config): @@ -387,13 +391,12 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}' + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -417,7 +420,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -427,6 +430,7 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}'} def get_callback_url( self, resource_group_name, integration_account_name, not_after=None, key_type=None, custom_headers=None, raw=False, **operation_config): @@ -440,22 +444,21 @@ def get_callback_url( :type not_after: datetime :param key_type: The key type. Possible values include: 'NotSpecified', 'Primary', 'Secondary' - :type key_type: str or :class:`KeyType - ` + :type key_type: str or ~azure.mgmt.logic.models.KeyType :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`. - :rtype: :class:`CallbackUrl ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: CallbackUrl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.CallbackUrl or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ parameters = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/listCallbackUrl' + url = self.get_callback_url.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -483,7 +486,7 @@ def get_callback_url( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -500,3 +503,216 @@ def get_callback_url( return client_raw_response return deserialized + get_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/listCallbackUrl'} + + def list_key_vault_keys( + self, resource_group_name, integration_account_name, key_vault, skip_token=None, custom_headers=None, raw=False, **operation_config): + """Gets the integration account's Key Vault keys. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param key_vault: The key vault reference. + :type key_vault: ~azure.mgmt.logic.models.KeyVaultReference + :param skip_token: The skip token. + :type skip_token: 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 KeyVaultKey + :rtype: + ~azure.mgmt.logic.models.KeyVaultKeyPaged[~azure.mgmt.logic.models.KeyVaultKey] + :raises: :class:`CloudError` + """ + list_key_vault_keys1 = models.ListKeyVaultKeysDefinition(key_vault=key_vault, skip_token=skip_token) + + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_key_vault_keys.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, '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 body + body_content = self._serialize.body(list_key_vault_keys1, 'ListKeyVaultKeysDefinition') + + # 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]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.KeyVaultKeyPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.KeyVaultKeyPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_key_vault_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/listKeyVaultKeys'} + + def log_tracking_events( + self, resource_group_name, integration_account_name, log_tracking_events, custom_headers=None, raw=False, **operation_config): + """Logs the integration account's tracking events. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param log_tracking_events: The callback URL parameters. + :type log_tracking_events: + ~azure.mgmt.logic.models.TrackingEventsDefinition + :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.log_tracking_events.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, '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(log_tracking_events, 'TrackingEventsDefinition') + + # 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]: + 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 + log_tracking_events.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/logTrackingEvents'} + + def regenerate_access_key( + self, resource_group_name, integration_account_name, key_type=None, custom_headers=None, raw=False, **operation_config): + """Regenerates the integration account access key. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param key_type: The key type. Possible values include: + 'NotSpecified', 'Primary', 'Secondary' + :type key_type: str or ~azure.mgmt.logic.models.KeyType + :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: IntegrationAccount or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.IntegrationAccount or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + regenerate_access_key1 = models.RegenerateActionParameter(key_type=key_type) + + # Construct URL + url = self.regenerate_access_key.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, '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(regenerate_access_key1, 'RegenerateActionParameter') + + # 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]: + 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('IntegrationAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + regenerate_access_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/regenerateAccessKey'} diff --git a/azure-mgmt-logic/azure/mgmt/logic/operations/maps_operations.py b/azure-mgmt-logic/azure/mgmt/logic/operations/maps_operations.py old mode 100755 new mode 100644 index ef7e28bf303e..555e97bdf0e9 --- a/azure-mgmt-logic/azure/mgmt/logic/operations/maps_operations.py +++ b/azure-mgmt-logic/azure/mgmt/logic/operations/maps_operations.py @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -import uuid from .. import models @@ -22,10 +22,12 @@ class MapsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version. Constant value: "2016-06-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -52,15 +54,16 @@ def list_by_integration_accounts( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`IntegrationAccountMapPaged - ` + :return: An iterator like instance of IntegrationAccountMap + :rtype: + ~azure.mgmt.logic.models.IntegrationAccountMapPaged[~azure.mgmt.logic.models.IntegrationAccountMap] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps' + url = self.list_by_integration_accounts.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -93,7 +96,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -111,6 +114,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_integration_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps'} def get( self, resource_group_name, integration_account_name, map_name, custom_headers=None, raw=False, **operation_config): @@ -127,14 +131,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`IntegrationAccountMap - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: IntegrationAccountMap or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.IntegrationAccountMap or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -159,7 +162,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -176,6 +179,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}'} def create_or_update( self, resource_group_name, integration_account_name, map_name, map, custom_headers=None, raw=False, **operation_config): @@ -188,21 +192,19 @@ def create_or_update( :param map_name: The integration account map name. :type map_name: str :param map: The integration account map. - :type map: :class:`IntegrationAccountMap - ` + :type map: ~azure.mgmt.logic.models.IntegrationAccountMap :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`. - :rtype: :class:`IntegrationAccountMap - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: IntegrationAccountMap or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.IntegrationAccountMap or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -231,7 +233,7 @@ def create_or_update( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -250,6 +252,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}'} def delete( self, resource_group_name, integration_account_name, map_name, custom_headers=None, raw=False, **operation_config): @@ -266,13 +269,12 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}' + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -297,7 +299,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -307,3 +309,80 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}'} + + def list_content_callback_url( + self, resource_group_name, integration_account_name, map_name, not_after=None, key_type=None, custom_headers=None, raw=False, **operation_config): + """Get the content callback url. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param map_name: The integration account map name. + :type map_name: str + :param not_after: The expiry time. + :type not_after: datetime + :param key_type: The key type. Possible values include: + 'NotSpecified', 'Primary', 'Secondary' + :type key_type: str or ~azure.mgmt.logic.models.KeyType + :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: WorkflowTriggerCallbackUrl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.WorkflowTriggerCallbackUrl or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + list_content_callback_url1 = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) + + # Construct URL + url = self.list_content_callback_url.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), + 'mapName': self._serialize.url("map_name", map_name, '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(list_content_callback_url1, 'GetCallbackUrlParameters') + + # 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]: + 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('WorkflowTriggerCallbackUrl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_content_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}/listContentCallbackUrl'} diff --git a/azure-mgmt-logic/azure/mgmt/logic/operations/partners_operations.py b/azure-mgmt-logic/azure/mgmt/logic/operations/partners_operations.py old mode 100755 new mode 100644 index 506ae85389b8..4000d7a2cd2e --- a/azure-mgmt-logic/azure/mgmt/logic/operations/partners_operations.py +++ b/azure-mgmt-logic/azure/mgmt/logic/operations/partners_operations.py @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -import uuid from .. import models @@ -22,10 +22,12 @@ class PartnersOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version. Constant value: "2016-06-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -52,15 +54,16 @@ def list_by_integration_accounts( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`IntegrationAccountPartnerPaged - ` + :return: An iterator like instance of IntegrationAccountPartner + :rtype: + ~azure.mgmt.logic.models.IntegrationAccountPartnerPaged[~azure.mgmt.logic.models.IntegrationAccountPartner] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners' + url = self.list_by_integration_accounts.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -93,7 +96,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -111,6 +114,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_integration_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners'} def get( self, resource_group_name, integration_account_name, partner_name, custom_headers=None, raw=False, **operation_config): @@ -127,14 +131,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`IntegrationAccountPartner - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: IntegrationAccountPartner or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.IntegrationAccountPartner or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -159,7 +162,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -176,6 +179,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}'} def create_or_update( self, resource_group_name, integration_account_name, partner_name, partner, custom_headers=None, raw=False, **operation_config): @@ -188,21 +192,19 @@ def create_or_update( :param partner_name: The integration account partner name. :type partner_name: str :param partner: The integration account partner. - :type partner: :class:`IntegrationAccountPartner - ` + :type partner: ~azure.mgmt.logic.models.IntegrationAccountPartner :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`. - :rtype: :class:`IntegrationAccountPartner - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: IntegrationAccountPartner or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.IntegrationAccountPartner or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -231,7 +233,7 @@ def create_or_update( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -250,6 +252,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}'} def delete( self, resource_group_name, integration_account_name, partner_name, custom_headers=None, raw=False, **operation_config): @@ -266,13 +269,12 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}' + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -297,7 +299,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -307,3 +309,80 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}'} + + def list_content_callback_url( + self, resource_group_name, integration_account_name, partner_name, not_after=None, key_type=None, custom_headers=None, raw=False, **operation_config): + """Get the content callback url. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param partner_name: The integration account partner name. + :type partner_name: str + :param not_after: The expiry time. + :type not_after: datetime + :param key_type: The key type. Possible values include: + 'NotSpecified', 'Primary', 'Secondary' + :type key_type: str or ~azure.mgmt.logic.models.KeyType + :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: WorkflowTriggerCallbackUrl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.WorkflowTriggerCallbackUrl or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + list_content_callback_url1 = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) + + # Construct URL + url = self.list_content_callback_url.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), + 'partnerName': self._serialize.url("partner_name", partner_name, '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(list_content_callback_url1, 'GetCallbackUrlParameters') + + # 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]: + 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('WorkflowTriggerCallbackUrl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_content_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}/listContentCallbackUrl'} diff --git a/azure-mgmt-logic/azure/mgmt/logic/operations/schemas_operations.py b/azure-mgmt-logic/azure/mgmt/logic/operations/schemas_operations.py old mode 100755 new mode 100644 index 4cdf009ea660..49970966db56 --- a/azure-mgmt-logic/azure/mgmt/logic/operations/schemas_operations.py +++ b/azure-mgmt-logic/azure/mgmt/logic/operations/schemas_operations.py @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -import uuid from .. import models @@ -22,10 +22,12 @@ class SchemasOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version. Constant value: "2016-06-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -52,15 +54,16 @@ def list_by_integration_accounts( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`IntegrationAccountSchemaPaged - ` + :return: An iterator like instance of IntegrationAccountSchema + :rtype: + ~azure.mgmt.logic.models.IntegrationAccountSchemaPaged[~azure.mgmt.logic.models.IntegrationAccountSchema] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas' + url = self.list_by_integration_accounts.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -93,7 +96,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -111,6 +114,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_integration_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas'} def get( self, resource_group_name, integration_account_name, schema_name, custom_headers=None, raw=False, **operation_config): @@ -127,14 +131,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`IntegrationAccountSchema - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: IntegrationAccountSchema or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.IntegrationAccountSchema or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -159,7 +162,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -176,6 +179,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}'} def create_or_update( self, resource_group_name, integration_account_name, schema_name, schema, custom_headers=None, raw=False, **operation_config): @@ -188,21 +192,19 @@ def create_or_update( :param schema_name: The integration account schema name. :type schema_name: str :param schema: The integration account schema. - :type schema: :class:`IntegrationAccountSchema - ` + :type schema: ~azure.mgmt.logic.models.IntegrationAccountSchema :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`. - :rtype: :class:`IntegrationAccountSchema - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: IntegrationAccountSchema or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.IntegrationAccountSchema or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -231,7 +233,7 @@ def create_or_update( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -250,6 +252,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}'} def delete( self, resource_group_name, integration_account_name, schema_name, custom_headers=None, raw=False, **operation_config): @@ -266,13 +269,12 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}' + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -297,7 +299,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -307,3 +309,80 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}'} + + def list_content_callback_url( + self, resource_group_name, integration_account_name, schema_name, not_after=None, key_type=None, custom_headers=None, raw=False, **operation_config): + """Get the content callback url. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param schema_name: The integration account schema name. + :type schema_name: str + :param not_after: The expiry time. + :type not_after: datetime + :param key_type: The key type. Possible values include: + 'NotSpecified', 'Primary', 'Secondary' + :type key_type: str or ~azure.mgmt.logic.models.KeyType + :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: WorkflowTriggerCallbackUrl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.WorkflowTriggerCallbackUrl or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + list_content_callback_url1 = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) + + # Construct URL + url = self.list_content_callback_url.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), + 'schemaName': self._serialize.url("schema_name", schema_name, '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(list_content_callback_url1, 'GetCallbackUrlParameters') + + # 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]: + 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('WorkflowTriggerCallbackUrl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_content_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}/listContentCallbackUrl'} diff --git a/azure-mgmt-logic/azure/mgmt/logic/operations/sessions_operations.py b/azure-mgmt-logic/azure/mgmt/logic/operations/sessions_operations.py old mode 100755 new mode 100644 index 832beec92a25..dce104362e52 --- a/azure-mgmt-logic/azure/mgmt/logic/operations/sessions_operations.py +++ b/azure-mgmt-logic/azure/mgmt/logic/operations/sessions_operations.py @@ -9,8 +9,8 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.pipeline import ClientRawResponse import uuid +from msrest.pipeline import ClientRawResponse from .. import models @@ -21,10 +21,12 @@ class SessionsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version. Constant value: "2016-06-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -51,8 +53,9 @@ def list_by_integration_accounts( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`IntegrationAccountSessionPaged - ` + :return: An iterator like instance of IntegrationAccountSession + :rtype: + ~azure.mgmt.logic.models.IntegrationAccountSessionPaged[~azure.mgmt.logic.models.IntegrationAccountSession] :raises: :class:`ErrorResponseException` """ @@ -60,7 +63,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions' + url = self.list_by_integration_accounts.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -93,7 +96,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) @@ -109,6 +112,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_integration_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions'} def get( self, resource_group_name, integration_account_name, session_name, custom_headers=None, raw=False, **operation_config): @@ -125,15 +129,14 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`IntegrationAccountSession - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: IntegrationAccountSession or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.IntegrationAccountSession or + ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorResponseException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -158,7 +161,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) @@ -173,6 +176,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}'} def create_or_update( self, resource_group_name, integration_account_name, session_name, session, custom_headers=None, raw=False, **operation_config): @@ -185,22 +189,20 @@ def create_or_update( :param session_name: The integration account session name. :type session_name: str :param session: The integration account session. - :type session: :class:`IntegrationAccountSession - ` + :type session: ~azure.mgmt.logic.models.IntegrationAccountSession :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`. - :rtype: :class:`IntegrationAccountSession - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: IntegrationAccountSession or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.IntegrationAccountSession or + ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorResponseException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -229,7 +231,7 @@ def create_or_update( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 201]: raise models.ErrorResponseException(self._deserialize, response) @@ -246,6 +248,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}'} def delete( self, resource_group_name, integration_account_name, session_name, custom_headers=None, raw=False, **operation_config): @@ -262,14 +265,13 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorResponseException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}' + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -294,7 +296,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: raise models.ErrorResponseException(self._deserialize, response) @@ -302,3 +304,4 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}'} diff --git a/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_run_action_repetitions_operations.py b/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_run_action_repetitions_operations.py new file mode 100644 index 000000000000..8124908c44ab --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_run_action_repetitions_operations.py @@ -0,0 +1,268 @@ +# 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 WorkflowRunActionRepetitionsOperations(object): + """WorkflowRunActionRepetitionsOperations 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: The API version. Constant value: "2016-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2016-06-01" + + self.config = config + + def list( + self, resource_group_name, workflow_name, run_name, action_name, custom_headers=None, raw=False, **operation_config): + """Get all of a workflow run action repetitions. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param action_name: The workflow action name. + :type action_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 + WorkflowRunActionRepetitionDefinition + :rtype: + ~azure.mgmt.logic.models.WorkflowRunActionRepetitionDefinitionPaged[~azure.mgmt.logic.models.WorkflowRunActionRepetitionDefinition] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), + 'runName': self._serialize.url("run_name", run_name, 'str'), + 'actionName': self._serialize.url("action_name", action_name, '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.WorkflowRunActionRepetitionDefinitionPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.WorkflowRunActionRepetitionDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions'} + + def get( + self, resource_group_name, workflow_name, run_name, action_name, repetition_name, custom_headers=None, raw=False, **operation_config): + """Get a workflow run action repetition. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param action_name: The workflow action name. + :type action_name: str + :param repetition_name: The workflow repetition. + :type repetition_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: WorkflowRunActionRepetitionDefinition or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.logic.models.WorkflowRunActionRepetitionDefinition + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), + 'runName': self._serialize.url("run_name", run_name, 'str'), + 'actionName': self._serialize.url("action_name", action_name, 'str'), + 'repetitionName': self._serialize.url("repetition_name", repetition_name, '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('WorkflowRunActionRepetitionDefinition', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}'} + + def list_expression_traces( + self, resource_group_name, workflow_name, run_name, action_name, repetition_name, custom_headers=None, raw=False, **operation_config): + """Lists a workflow run expression trace. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param action_name: The workflow action name. + :type action_name: str + :param repetition_name: The workflow repetition. + :type repetition_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 ExpressionRoot + :rtype: + ~azure.mgmt.logic.models.ExpressionRootPaged[~azure.mgmt.logic.models.ExpressionRoot] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_expression_traces.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), + 'runName': self._serialize.url("run_name", run_name, 'str'), + 'actionName': self._serialize.url("action_name", action_name, 'str'), + 'repetitionName': self._serialize.url("repetition_name", repetition_name, '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.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 + + return response + + # Deserialize response + deserialized = models.ExpressionRootPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ExpressionRootPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_expression_traces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/listExpressionTraces'} diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/backup_vault_configs_operations.py b/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_run_action_scoped_repetitions_operations.py similarity index 59% rename from azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/backup_vault_configs_operations.py rename to azure-mgmt-logic/azure/mgmt/logic/operations/workflow_run_action_scoped_repetitions_operations.py index cd5ff1134f3a..9c48bbd0fc19 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/backup_vault_configs_operations.py +++ b/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_run_action_scoped_repetitions_operations.py @@ -16,54 +16,59 @@ from .. import models -class BackupVaultConfigsOperations(object): - """BackupVaultConfigsOperations operations. +class WorkflowRunActionScopedRepetitionsOperations(object): + """WorkflowRunActionScopedRepetitionsOperations operations. :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Client Api Version. Constant value: "2016-12-01". + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2016-06-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2016-12-01" + self.api_version = "2016-06-01" self.config = config - def get( - self, resource_group_name, vault_name, custom_headers=None, raw=False, **operation_config): - """Fetches vault config. + def list( + self, resource_group_name, workflow_name, run_name, action_name, custom_headers=None, raw=False, **operation_config): + """List the workflow run action scoped repetitions. - :param resource_group_name: The name of the resource group where the - recovery services vault is present. + :param resource_group_name: The resource group name. :type resource_group_name: str - :param vault_name: The name of the recovery services vault. - :type vault_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param action_name: The workflow action name. + :type action_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: :class:`BackupVaultConfig - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`BackupVaultConfig - ` or - :class:`ClientRawResponse` + :return: WorkflowRunActionRepetitionDefinitionCollection or + ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.logic.models.WorkflowRunActionRepetitionDefinitionCollection + or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vaultName': self._serialize.url("vault_name", vault_name, 'str') + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), + 'runName': self._serialize.url("run_name", run_name, 'str'), + 'actionName': self._serialize.url("action_name", action_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -83,7 +88,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -93,46 +98,49 @@ def get( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('BackupVaultConfig', response) + deserialized = self._deserialize('WorkflowRunActionRepetitionDefinitionCollection', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions'} - def update( - self, resource_group_name, vault_name, backup_vault_config, custom_headers=None, raw=False, **operation_config): - """Updates vault config model type. + def get( + self, resource_group_name, workflow_name, run_name, action_name, repetition_name, custom_headers=None, raw=False, **operation_config): + """Get a workflow run action scoped repetition. - :param resource_group_name: The name of the resource group where the - recovery services vault is present. + :param resource_group_name: The resource group name. :type resource_group_name: str - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param backup_vault_config: Backup vault config. - :type backup_vault_config: :class:`BackupVaultConfig - ` + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param action_name: The workflow action name. + :type action_name: str + :param repetition_name: The workflow repetition. + :type repetition_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: :class:`BackupVaultConfig - ` or - :class:`ClientRawResponse` if + :return: WorkflowRunActionRepetitionDefinition or ClientRawResponse if raw=true - :rtype: :class:`BackupVaultConfig - ` or - :class:`ClientRawResponse` + :rtype: ~azure.mgmt.logic.models.WorkflowRunActionRepetitionDefinition + or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vaultName': self._serialize.url("vault_name", vault_name, 'str') + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), + 'runName': self._serialize.url("run_name", run_name, 'str'), + 'actionName': self._serialize.url("action_name", action_name, 'str'), + 'repetitionName': self._serialize.url("repetition_name", repetition_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -150,13 +158,9 @@ def update( 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(backup_vault_config, 'BackupVaultConfig') - # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, **operation_config) + 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) @@ -166,10 +170,11 @@ def update( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('BackupVaultConfig', response) + deserialized = self._deserialize('WorkflowRunActionRepetitionDefinition', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions/{repetitionName}'} diff --git a/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_run_actions_operations.py b/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_run_actions_operations.py old mode 100755 new mode 100644 index 3e0c5dcc6bc4..12b74f6eb764 --- a/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_run_actions_operations.py +++ b/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_run_actions_operations.py @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -import uuid from .. import models @@ -22,10 +22,12 @@ class WorkflowRunActionsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version. Constant value: "2016-06-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -54,15 +56,16 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`WorkflowRunActionPaged - ` + :return: An iterator like instance of WorkflowRunAction + :rtype: + ~azure.mgmt.logic.models.WorkflowRunActionPaged[~azure.mgmt.logic.models.WorkflowRunAction] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -96,7 +99,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -114,6 +117,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions'} def get( self, resource_group_name, workflow_name, run_name, action_name, custom_headers=None, raw=False, **operation_config): @@ -132,14 +136,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`WorkflowRunAction - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: WorkflowRunAction or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.WorkflowRunAction or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -165,7 +168,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -182,3 +185,81 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}'} + + def list_expression_traces( + self, resource_group_name, workflow_name, run_name, action_name, custom_headers=None, raw=False, **operation_config): + """Lists a workflow run expression trace. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param action_name: The workflow action name. + :type action_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 ExpressionRoot + :rtype: + ~azure.mgmt.logic.models.ExpressionRootPaged[~azure.mgmt.logic.models.ExpressionRoot] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_expression_traces.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), + 'runName': self._serialize.url("run_name", run_name, 'str'), + 'actionName': self._serialize.url("action_name", action_name, '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.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 + + return response + + # Deserialize response + deserialized = models.ExpressionRootPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ExpressionRootPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_expression_traces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/listExpressionTraces'} diff --git a/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_run_operations.py b/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_run_operations.py new file mode 100644 index 000000000000..a034b81249e9 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_run_operations.py @@ -0,0 +1,106 @@ +# 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 WorkflowRunOperations(object): + """WorkflowRunOperations 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: The API version. Constant value: "2016-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2016-06-01" + + self.config = config + + def get( + self, resource_group_name, workflow_name, run_name, operation_id, custom_headers=None, raw=False, **operation_config): + """Gets an operation for a run. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param operation_id: The workflow operation id. + :type operation_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: WorkflowRun or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.WorkflowRun or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), + 'runName': self._serialize.url("run_name", run_name, 'str'), + 'operationId': self._serialize.url("operation_id", operation_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('WorkflowRun', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/operations/{operationId}'} diff --git a/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_runs_operations.py b/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_runs_operations.py old mode 100755 new mode 100644 index cdb0aabcb275..4e2a94efb342 --- a/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_runs_operations.py +++ b/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_runs_operations.py @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -import uuid from .. import models @@ -22,10 +22,12 @@ class WorkflowRunsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version. Constant value: "2016-06-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -52,15 +54,16 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`WorkflowRunPaged - ` + :return: An iterator like instance of WorkflowRun + :rtype: + ~azure.mgmt.logic.models.WorkflowRunPaged[~azure.mgmt.logic.models.WorkflowRun] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -93,7 +96,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -111,6 +114,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs'} def get( self, resource_group_name, workflow_name, run_name, custom_headers=None, raw=False, **operation_config): @@ -127,13 +131,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`WorkflowRun ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: WorkflowRun or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.WorkflowRun or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -158,7 +162,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -175,6 +179,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}'} def cancel( self, resource_group_name, workflow_name, run_name, custom_headers=None, raw=False, **operation_config): @@ -191,13 +196,12 @@ def cancel( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/cancel' + url = self.cancel.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -222,7 +226,7 @@ def cancel( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -232,3 +236,4 @@ def cancel( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/cancel'} diff --git a/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_trigger_histories_operations.py b/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_trigger_histories_operations.py old mode 100755 new mode 100644 index 9cf1e02d4293..2a4d74d93221 --- a/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_trigger_histories_operations.py +++ b/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_trigger_histories_operations.py @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -import uuid from .. import models @@ -22,10 +22,12 @@ class WorkflowTriggerHistoriesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version. Constant value: "2016-06-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -54,15 +56,16 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`WorkflowTriggerHistoryPaged - ` + :return: An iterator like instance of WorkflowTriggerHistory + :rtype: + ~azure.mgmt.logic.models.WorkflowTriggerHistoryPaged[~azure.mgmt.logic.models.WorkflowTriggerHistory] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -96,7 +99,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -114,6 +117,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories'} def get( self, resource_group_name, workflow_name, trigger_name, history_name, custom_headers=None, raw=False, **operation_config): @@ -133,14 +137,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`WorkflowTriggerHistory - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: WorkflowTriggerHistory or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.WorkflowTriggerHistory or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -166,7 +169,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -183,6 +186,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName}'} def resubmit( self, resource_group_name, workflow_name, trigger_name, history_name, custom_headers=None, raw=False, **operation_config): @@ -202,13 +206,12 @@ def resubmit( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName}/resubmit' + url = self.resubmit.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -234,7 +237,7 @@ def resubmit( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [202]: exp = CloudError(response) @@ -244,3 +247,4 @@ def resubmit( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + resubmit.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName}/resubmit'} diff --git a/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_triggers_operations.py b/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_triggers_operations.py old mode 100755 new mode 100644 index 23209acd7b49..7d84a2859d11 --- a/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_triggers_operations.py +++ b/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_triggers_operations.py @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -import uuid from .. import models @@ -22,10 +22,12 @@ class WorkflowTriggersOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version. Constant value: "2016-06-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -52,15 +54,16 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`WorkflowTriggerPaged - ` + :return: An iterator like instance of WorkflowTrigger + :rtype: + ~azure.mgmt.logic.models.WorkflowTriggerPaged[~azure.mgmt.logic.models.WorkflowTrigger] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -93,7 +96,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -111,6 +114,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/'} def get( self, resource_group_name, workflow_name, trigger_name, custom_headers=None, raw=False, **operation_config): @@ -127,14 +131,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`WorkflowTrigger - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: WorkflowTrigger or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.WorkflowTrigger or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -159,7 +162,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -176,6 +179,64 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}'} + + def reset( + self, resource_group_name, workflow_name, trigger_name, custom_headers=None, raw=False, **operation_config): + """Resets a workflow trigger. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param trigger_name: The workflow trigger name. + :type trigger_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.reset.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), + 'triggerName': self._serialize.url("trigger_name", trigger_name, '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.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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + reset.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/reset'} def run( self, resource_group_name, workflow_name, trigger_name, custom_headers=None, raw=False, **operation_config): @@ -192,14 +253,13 @@ def run( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: object - :rtype: :class:`ClientRawResponse` - if raw=true + :return: object or ClientRawResponse if raw=true + :rtype: object or ~msrest.pipeline.ClientRawResponse :raises: :class:`HttpOperationError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/run' + url = self.run.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -224,7 +284,7 @@ def run( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code < 200 or response.status_code >= 300: raise HttpOperationError(self._deserialize, response, 'object') @@ -232,10 +292,141 @@ def run( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + run.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/run'} + + def get_schema_json( + self, resource_group_name, workflow_name, trigger_name, custom_headers=None, raw=False, **operation_config): + """Get the trigger schema as JSON. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param trigger_name: The workflow trigger name. + :type trigger_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: JsonSchema or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.JsonSchema or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_schema_json.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), + 'triggerName': self._serialize.url("trigger_name", trigger_name, '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('JsonSchema', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_schema_json.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/schemas/json'} + + def set_state( + self, resource_group_name, workflow_name, trigger_name, source, custom_headers=None, raw=False, **operation_config): + """Sets the state of a workflow trigger. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param trigger_name: The workflow trigger name. + :type trigger_name: str + :param source: + :type source: ~azure.mgmt.logic.models.WorkflowTrigger + :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` + """ + set_state1 = models.SetTriggerStateActionDefinition(source=source) + + # Construct URL + url = self.set_state.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), + 'triggerName': self._serialize.url("trigger_name", trigger_name, '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(set_state1, 'SetTriggerStateActionDefinition') + + # 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]: + 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 + set_state.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/setState'} def list_callback_url( self, resource_group_name, workflow_name, trigger_name, custom_headers=None, raw=False, **operation_config): - """Gets the callback URL for a workflow trigger. + """Get the callback URL for a workflow trigger. :param resource_group_name: The resource group name. :type resource_group_name: str @@ -248,14 +439,13 @@ def list_callback_url( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`WorkflowTriggerCallbackUrl - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: WorkflowTriggerCallbackUrl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.WorkflowTriggerCallbackUrl or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/listCallbackUrl' + url = self.list_callback_url.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -280,7 +470,7 @@ def list_callback_url( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -297,3 +487,4 @@ def list_callback_url( return client_raw_response return deserialized + list_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/listCallbackUrl'} diff --git a/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_versions_operations.py b/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_versions_operations.py old mode 100755 new mode 100644 index 55eb113e6084..f6dffba9225b --- a/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_versions_operations.py +++ b/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_versions_operations.py @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -import uuid from .. import models @@ -22,10 +22,12 @@ class WorkflowVersionsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version. Constant value: "2016-06-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -50,15 +52,16 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`WorkflowVersionPaged - ` + :return: An iterator like instance of WorkflowVersion + :rtype: + ~azure.mgmt.logic.models.WorkflowVersionPaged[~azure.mgmt.logic.models.WorkflowVersion] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -89,7 +92,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -107,6 +110,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions'} def get( self, resource_group_name, workflow_name, version_id, custom_headers=None, raw=False, **operation_config): @@ -123,14 +127,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`WorkflowVersion - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: WorkflowVersion or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.WorkflowVersion or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions/{versionId}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -155,7 +158,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -172,10 +175,11 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions/{versionId}'} def list_callback_url( self, resource_group_name, workflow_name, version_id, trigger_name, not_after=None, key_type=None, custom_headers=None, raw=False, **operation_config): - """Lists the callback URL for a trigger of a workflow version. + """Get the callback url for a trigger of a workflow version. :param resource_group_name: The resource group name. :type resource_group_name: str @@ -189,17 +193,15 @@ def list_callback_url( :type not_after: datetime :param key_type: The key type. Possible values include: 'NotSpecified', 'Primary', 'Secondary' - :type key_type: str or :class:`KeyType - ` + :type key_type: str or ~azure.mgmt.logic.models.KeyType :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`. - :rtype: :class:`WorkflowTriggerCallbackUrl - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: WorkflowTriggerCallbackUrl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.WorkflowTriggerCallbackUrl or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ parameters = None @@ -207,7 +209,7 @@ def list_callback_url( parameters = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions/{versionId}/triggers/{triggerName}/listCallbackUrl' + url = self.list_callback_url.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -240,7 +242,7 @@ def list_callback_url( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -257,3 +259,4 @@ def list_callback_url( return client_raw_response return deserialized + list_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions/{versionId}/triggers/{triggerName}/listCallbackUrl'} diff --git a/azure-mgmt-logic/azure/mgmt/logic/operations/workflows_operations.py b/azure-mgmt-logic/azure/mgmt/logic/operations/workflows_operations.py old mode 100755 new mode 100644 index 2aab563b196e..297d0375d8a8 --- a/azure-mgmt-logic/azure/mgmt/logic/operations/workflows_operations.py +++ b/azure-mgmt-logic/azure/mgmt/logic/operations/workflows_operations.py @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -import uuid from .. import models @@ -22,10 +22,12 @@ class WorkflowsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version. Constant value: "2016-06-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -48,14 +50,16 @@ def list_by_subscription( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`WorkflowPaged ` + :return: An iterator like instance of Workflow + :rtype: + ~azure.mgmt.logic.models.WorkflowPaged[~azure.mgmt.logic.models.Workflow] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.Logic/workflows' + url = self.list_by_subscription.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -86,7 +90,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -104,6 +108,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Logic/workflows'} def list_by_resource_group( self, resource_group_name, top=None, filter=None, custom_headers=None, raw=False, **operation_config): @@ -120,14 +125,16 @@ def list_by_resource_group( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`WorkflowPaged ` + :return: An iterator like instance of Workflow + :rtype: + ~azure.mgmt.logic.models.WorkflowPaged[~azure.mgmt.logic.models.Workflow] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows' + url = self.list_by_resource_group.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') @@ -159,7 +166,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -177,6 +184,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows'} def get( self, resource_group_name, workflow_name, custom_headers=None, raw=False, **operation_config): @@ -191,13 +199,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`Workflow ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: Workflow or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.Workflow or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -221,7 +229,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -238,6 +246,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}'} def create_or_update( self, resource_group_name, workflow_name, workflow, custom_headers=None, raw=False, **operation_config): @@ -248,19 +257,19 @@ def create_or_update( :param workflow_name: The workflow name. :type workflow_name: str :param workflow: The workflow. - :type workflow: :class:`Workflow ` + :type workflow: ~azure.mgmt.logic.models.Workflow :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`. - :rtype: :class:`Workflow ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: Workflow or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.Workflow or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -288,7 +297,7 @@ def create_or_update( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -307,6 +316,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}'} def update( self, resource_group_name, workflow_name, workflow, custom_headers=None, raw=False, **operation_config): @@ -317,19 +327,19 @@ def update( :param workflow_name: The workflow name. :type workflow_name: str :param workflow: The workflow. - :type workflow: :class:`Workflow ` + :type workflow: ~azure.mgmt.logic.models.Workflow :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`. - :rtype: :class:`Workflow ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: Workflow or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.Workflow or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}' + url = self.update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -357,7 +367,7 @@ def update( # Construct and send request request = self._client.patch(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -374,6 +384,7 @@ def update( return client_raw_response return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}'} def delete( self, resource_group_name, workflow_name, custom_headers=None, raw=False, **operation_config): @@ -388,13 +399,12 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}' + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -418,7 +428,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -428,6 +438,7 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}'} def disable( self, resource_group_name, workflow_name, custom_headers=None, raw=False, **operation_config): @@ -442,13 +453,12 @@ def disable( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/disable' + url = self.disable.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -472,7 +482,7 @@ def disable( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -482,6 +492,7 @@ def disable( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + disable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/disable'} def enable( self, resource_group_name, workflow_name, custom_headers=None, raw=False, **operation_config): @@ -496,13 +507,12 @@ def enable( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/enable' + url = self.enable.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -526,7 +536,7 @@ def enable( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -536,6 +546,7 @@ def enable( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + enable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/enable'} def generate_upgraded_definition( self, resource_group_name, workflow_name, target_schema_version=None, custom_headers=None, raw=False, **operation_config): @@ -552,15 +563,14 @@ def generate_upgraded_definition( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: object - :rtype: :class:`ClientRawResponse` - if raw=true + :return: object or ClientRawResponse if raw=true + :rtype: object or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ parameters = models.GenerateUpgradedDefinitionParameters(target_schema_version=target_schema_version) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/generateUpgradedDefinition' + url = self.generate_upgraded_definition.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -588,7 +598,7 @@ def generate_upgraded_definition( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -605,6 +615,80 @@ def generate_upgraded_definition( return client_raw_response return deserialized + generate_upgraded_definition.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/generateUpgradedDefinition'} + + def list_callback_url( + self, resource_group_name, workflow_name, not_after=None, key_type=None, custom_headers=None, raw=False, **operation_config): + """Get the workflow callback Url. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param not_after: The expiry time. + :type not_after: datetime + :param key_type: The key type. Possible values include: + 'NotSpecified', 'Primary', 'Secondary' + :type key_type: str or ~azure.mgmt.logic.models.KeyType + :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: WorkflowTriggerCallbackUrl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.WorkflowTriggerCallbackUrl or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + list_callback_url1 = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) + + # Construct URL + url = self.list_callback_url.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, '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(list_callback_url1, 'GetCallbackUrlParameters') + + # 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]: + 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('WorkflowTriggerCallbackUrl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/listCallbackUrl'} def list_swagger( self, resource_group_name, workflow_name, custom_headers=None, raw=False, **operation_config): @@ -619,13 +703,12 @@ def list_swagger( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: object - :rtype: :class:`ClientRawResponse` - if raw=true + :return: object or ClientRawResponse if raw=true + :rtype: object or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/listSwagger' + url = self.list_swagger.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -649,7 +732,7 @@ def list_swagger( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -666,6 +749,67 @@ def list_swagger( return client_raw_response return deserialized + list_swagger.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/listSwagger'} + + def move( + self, resource_group_name, workflow_name, move, custom_headers=None, raw=False, **operation_config): + """Moves an existing workflow. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param move: The workflow to move. + :type move: ~azure.mgmt.logic.models.Workflow + :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.move.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, '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(move, 'Workflow') + + # 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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/move'} def regenerate_access_key( self, resource_group_name, workflow_name, key_type=None, custom_headers=None, raw=False, **operation_config): @@ -677,22 +821,20 @@ def regenerate_access_key( :type workflow_name: str :param key_type: The key type. Possible values include: 'NotSpecified', 'Primary', 'Secondary' - :type key_type: str or :class:`KeyType - ` + :type key_type: str or ~azure.mgmt.logic.models.KeyType :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`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ key_type1 = models.RegenerateActionParameter(key_type=key_type) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/regenerateAccessKey' + url = self.regenerate_access_key.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -720,7 +862,67 @@ def regenerate_access_key( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + 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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + regenerate_access_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/regenerateAccessKey'} + + def validate_workflow( + self, resource_group_name, workflow_name, validate, custom_headers=None, raw=False, **operation_config): + """Validates the workflow. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param validate: The workflow. + :type validate: ~azure.mgmt.logic.models.Workflow + :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.validate_workflow.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, '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(validate, 'Workflow') + + # 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]: exp = CloudError(response) @@ -730,6 +932,7 @@ def regenerate_access_key( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + validate_workflow.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/validate'} def validate( self, resource_group_name, location, workflow_name, workflow, custom_headers=None, raw=False, **operation_config): @@ -742,19 +945,18 @@ def validate( :param workflow_name: The workflow name. :type workflow_name: str :param workflow: The workflow definition. - :type workflow: :class:`Workflow ` + :type workflow: ~azure.mgmt.logic.models.Workflow :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`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/locations/{location}/workflows/{workflowName}/validate' + url = self.validate.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -783,7 +985,7 @@ def validate( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -793,3 +995,4 @@ def validate( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + validate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/locations/{location}/workflows/{workflowName}/validate'} diff --git a/azure-mgmt-logic/azure/mgmt/logic/version.py b/azure-mgmt-logic/azure/mgmt/logic/version.py old mode 100755 new mode 100644 index be75d8eae586..7f225c6aab41 --- a/azure-mgmt-logic/azure/mgmt/logic/version.py +++ b/azure-mgmt-logic/azure/mgmt/logic/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "2.1.0" +VERSION = "3.0.0" diff --git a/azure-mgmt-logic/build.json b/azure-mgmt-logic/build.json deleted file mode 100644 index 583e4cec186d..000000000000 --- a/azure-mgmt-logic/build.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "autorest": "1.0.1-20170417-2300-nightly", - "date": "2017-04-18T20:13:42Z", - "version": "2.1.0" -} \ No newline at end of file diff --git a/azure-mgmt-logic/sdk_packaging.toml b/azure-mgmt-logic/sdk_packaging.toml new file mode 100644 index 000000000000..32ac78a065f1 --- /dev/null +++ b/azure-mgmt-logic/sdk_packaging.toml @@ -0,0 +1,5 @@ +[packaging] +package_name = "azure-mgmt-logic" +package_pprint_name = "Logic Apps Management" +package_doc_id = "logic-apps" +is_stable = false diff --git a/azure-mgmt-logic/setup.cfg b/azure-mgmt-logic/setup.cfg index 0be29eb3bc63..856f4164982c 100644 --- a/azure-mgmt-logic/setup.cfg +++ b/azure-mgmt-logic/setup.cfg @@ -1,3 +1,3 @@ [bdist_wheel] universal=1 -azure-namespace-package=azure-mgmt-nspkg +azure-namespace-package=azure-mgmt-nspkg \ No newline at end of file diff --git a/azure-mgmt-logic/setup.py b/azure-mgmt-logic/setup.py index 5ca355093fe4..17ac0d37f0d3 100644 --- a/azure-mgmt-logic/setup.py +++ b/azure-mgmt-logic/setup.py @@ -6,15 +6,25 @@ # license information. #-------------------------------------------------------------------------- -from setuptools import setup +import re +import os.path +from io import open +from setuptools import find_packages, setup try: from azure_bdist_wheel import cmdclass except ImportError: from distutils import log as logger logger.warn("Wheel is not available, disabling bdist_wheel hook") cmdclass = {} -from io import open -import re + +# Change the PACKAGE_NAME only to change folder and different name +PACKAGE_NAME = "azure-mgmt-logic" +PACKAGE_PPRINT_NAME = "Logic Apps Management" + +# a-b-c => a/b/c +package_folder_path = PACKAGE_NAME.replace('-', '/') +# a-b-c => a.b.c +namespace_name = PACKAGE_NAME.replace('-', '.') # azure v0.x is not compatible with this package # azure v0.x used to have a __version__ attribute (newer versions don't) @@ -32,7 +42,7 @@ pass # Version extraction inspired from 'requests' -with open('azure/mgmt/logic/version.py', 'r') as fd: +with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) @@ -45,37 +55,30 @@ history = f.read() setup( - name='azure-mgmt-logic', + name=PACKAGE_NAME, version=version, - description='Microsoft Azure Logic Apps Resource Management Client Library for Python', + description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), long_description=readme + '\n\n' + history, license='MIT License', author='Microsoft Corporation', - author_email='ptvshelp@microsoft.com', + author_email='azpysdkhelp@microsoft.com', url='https://github.com/Azure/azure-sdk-for-python', classifiers=[ - 'Development Status :: 5 - Production/Stable', + 'Development Status :: 4 - Beta', 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'License :: OSI Approved :: MIT License', ], zip_safe=False, - packages=[ - 'azure', - 'azure.mgmt', - 'azure.mgmt.logic', - 'azure.mgmt.logic.models', - 'azure.mgmt.logic.operations', - ], + packages=find_packages(exclude=["tests"]), install_requires=[ - 'azure-common~=1.1.5', - 'msrestazure~=0.4.7', + 'msrestazure>=0.4.27,<2.0.0', + 'azure-common~=1.1', ], cmdclass=cmdclass ) diff --git a/azure-mgmt-msi/HISTORY.rst b/azure-mgmt-msi/HISTORY.rst index eb40145d0723..a07bf95f2f42 100644 --- a/azure-mgmt-msi/HISTORY.rst +++ b/azure-mgmt-msi/HISTORY.rst @@ -3,6 +3,42 @@ Release History =============== +0.2.0 (2018-05-25) +++++++++++++++++++ + +**Features** + +- Client class can be used as a context manager to keep the underlying HTTP session open for performance + +**General Breaking changes** + +This version uses a next-generation code generator that *might* introduce breaking changes. + +- Model signatures now use only keyword-argument syntax. All positional arguments must be re-written as keyword-arguments. + To keep auto-completion in most cases, models are now generated for Python 2 and Python 3. Python 3 uses the "*" syntax for keyword-only arguments. +- Enum types now use the "str" mixin (class AzureEnum(str, Enum)) to improve the behavior when unrecognized enum values are encountered. + While this is not a breaking change, the distinctions are important, and are documented here: + https://docs.python.org/3/library/enum.html#others + At a glance: + + - "is" should not be used at all. + - "format" will return the string value, where "%s" string formatting will return `NameOfEnum.stringvalue`. Format syntax should be prefered. + +- New Long Running Operation: + + - Return type changes from `msrestazure.azure_operation.AzureOperationPoller` to `msrest.polling.LROPoller`. External API is the same. + - Return type is now **always** a `msrest.polling.LROPoller`, regardless of the optional parameters used. + - The behavior has changed when using `raw=True`. Instead of returning the initial call result as `ClientRawResponse`, + without polling, now this returns an LROPoller. After polling, the final resource will be returned as a `ClientRawResponse`. + - New `polling` parameter. The default behavior is `Polling=True` which will poll using ARM algorithm. When `Polling=False`, + the response of the initial call will be returned without polling. + - `polling` parameter accepts instances of subclasses of `msrest.polling.PollingMethod`. + - `add_done_callback` will no longer raise if called after polling is finished, but will instead execute the callback right away. + +**Bugfixes** + +- Compatibility of the sdist with wheel 0.31.0 + 0.1.0 (2017-12-13) ++++++++++++++++++ diff --git a/azure-mgmt-msi/README.rst b/azure-mgmt-msi/README.rst index 977379507943..6d2ecf1dd4b2 100644 --- a/azure-mgmt-msi/README.rst +++ b/azure-mgmt-msi/README.rst @@ -37,8 +37,8 @@ Usage ===== For code examples, see `MSI Management -`__ -on readthedocs.org. +`__ +on docs.microsoft.com. Provide Feedback diff --git a/azure-mgmt-msi/azure/mgmt/msi/managed_service_identity_client.py b/azure-mgmt-msi/azure/mgmt/msi/managed_service_identity_client.py index dc077f97118a..f1804dfe67e9 100644 --- a/azure-mgmt-msi/azure/mgmt/msi/managed_service_identity_client.py +++ b/azure-mgmt-msi/azure/mgmt/msi/managed_service_identity_client.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import ServiceClient +from msrest.service_client import SDKClient from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION @@ -51,7 +51,7 @@ def __init__( self.subscription_id = subscription_id -class ManagedServiceIdentityClient(object): +class ManagedServiceIdentityClient(SDKClient): """The Managed Service Identity Client. :ivar config: Configuration for client. @@ -75,7 +75,7 @@ def __init__( self, credentials, subscription_id, base_url=None): self.config = ManagedServiceIdentityClientConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) + super(ManagedServiceIdentityClient, 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-08-31-preview' diff --git a/azure-mgmt-msi/azure/mgmt/msi/models/__init__.py b/azure-mgmt-msi/azure/mgmt/msi/models/__init__.py index ce703380e057..1bf860b5697d 100644 --- a/azure-mgmt-msi/azure/mgmt/msi/models/__init__.py +++ b/azure-mgmt-msi/azure/mgmt/msi/models/__init__.py @@ -9,9 +9,14 @@ # regenerated. # -------------------------------------------------------------------------- -from .identity import Identity -from .operation_display import OperationDisplay -from .operation import Operation +try: + from .identity_py3 import Identity + from .operation_display_py3 import OperationDisplay + from .operation_py3 import Operation +except (SyntaxError, ImportError): + from .identity import Identity + from .operation_display import OperationDisplay + from .operation import Operation from .operation_paged import OperationPaged from .identity_paged import IdentityPaged from .managed_service_identity_client_enums import ( diff --git a/azure-mgmt-msi/azure/mgmt/msi/models/identity.py b/azure-mgmt-msi/azure/mgmt/msi/models/identity.py index 27effe81cc32..ab8be27563c5 100644 --- a/azure-mgmt-msi/azure/mgmt/msi/models/identity.py +++ b/azure-mgmt-msi/azure/mgmt/msi/models/identity.py @@ -65,11 +65,12 @@ class Identity(Model): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, location=None, tags=None): + def __init__(self, **kwargs): + super(Identity, self).__init__(**kwargs) self.id = None self.name = None - self.location = location - self.tags = tags + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) self.tenant_id = None self.principal_id = None self.client_id = None diff --git a/azure-mgmt-msi/azure/mgmt/msi/models/identity_py3.py b/azure-mgmt-msi/azure/mgmt/msi/models/identity_py3.py new file mode 100644 index 000000000000..9bdc6aeac153 --- /dev/null +++ b/azure-mgmt-msi/azure/mgmt/msi/models/identity_py3.py @@ -0,0 +1,78 @@ +# 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 Identity(Model): + """Describes an identity resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The id of the created identity. + :vartype id: str + :ivar name: The name of the created identity. + :vartype name: str + :param location: The Azure region where the identity lives. + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar tenant_id: The id of the tenant which the identity belongs to. + :vartype tenant_id: str + :ivar principal_id: The id of the service principal object associated with + the created identity. + :vartype principal_id: str + :ivar client_id: The id of the app associated with the identity. This is a + random generated UUID by MSI. + :vartype client_id: str + :ivar client_secret_url: The ManagedServiceIdentity DataPlane URL that + can be queried to obtain the identity credentials. + :vartype client_secret_url: str + :ivar type: The type of resource i.e. + Microsoft.ManagedIdentity/userAssignedIdentities. Possible values include: + 'Microsoft.ManagedIdentity/userAssignedIdentities' + :vartype type: str or ~azure.mgmt.msi.models.UserAssignedIdentities + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + 'client_secret_url': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, + 'principal_id': {'key': 'properties.principalId', 'type': 'str'}, + 'client_id': {'key': 'properties.clientId', 'type': 'str'}, + 'client_secret_url': {'key': 'properties.clientSecretUrl', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: + super(Identity, self).__init__(**kwargs) + self.id = None + self.name = None + self.location = location + self.tags = tags + self.tenant_id = None + self.principal_id = None + self.client_id = None + self.client_secret_url = None + self.type = None diff --git a/azure-mgmt-msi/azure/mgmt/msi/models/managed_service_identity_client_enums.py b/azure-mgmt-msi/azure/mgmt/msi/models/managed_service_identity_client_enums.py index a22c288f08c5..1be9ca0449b3 100644 --- a/azure-mgmt-msi/azure/mgmt/msi/models/managed_service_identity_client_enums.py +++ b/azure-mgmt-msi/azure/mgmt/msi/models/managed_service_identity_client_enums.py @@ -12,6 +12,6 @@ from enum import Enum -class UserAssignedIdentities(Enum): +class UserAssignedIdentities(str, Enum): microsoft_managed_identityuser_assigned_identities = "Microsoft.ManagedIdentity/userAssignedIdentities" diff --git a/azure-mgmt-msi/azure/mgmt/msi/models/operation.py b/azure-mgmt-msi/azure/mgmt/msi/models/operation.py index 9d7b328d4ca5..3123b2729c32 100644 --- a/azure-mgmt-msi/azure/mgmt/msi/models/operation.py +++ b/azure-mgmt-msi/azure/mgmt/msi/models/operation.py @@ -30,6 +30,7 @@ class Operation(Model): 'display': {'key': 'display', 'type': 'OperationDisplay'}, } - def __init__(self, name=None, display=None): - self.name = name - self.display = display + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) diff --git a/azure-mgmt-msi/azure/mgmt/msi/models/operation_display.py b/azure-mgmt-msi/azure/mgmt/msi/models/operation_display.py index 5a6f7abbe6f9..9129b1f8145d 100644 --- a/azure-mgmt-msi/azure/mgmt/msi/models/operation_display.py +++ b/azure-mgmt-msi/azure/mgmt/msi/models/operation_display.py @@ -37,8 +37,9 @@ class OperationDisplay(Model): 'description': {'key': 'description', 'type': 'str'}, } - def __init__(self, provider=None, operation=None, resource=None, description=None): - self.provider = provider - self.operation = operation - self.resource = resource - self.description = description + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.operation = kwargs.get('operation', None) + self.resource = kwargs.get('resource', None) + self.description = kwargs.get('description', None) diff --git a/azure-mgmt-msi/azure/mgmt/msi/models/operation_display_py3.py b/azure-mgmt-msi/azure/mgmt/msi/models/operation_display_py3.py new file mode 100644 index 000000000000..c0ce73c19513 --- /dev/null +++ b/azure-mgmt-msi/azure/mgmt/msi/models/operation_display_py3.py @@ -0,0 +1,45 @@ +# 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): + """Operation Display. + + The object that describes the operation. + + :param provider: Resource Provider Name. Friendly name of the resource + provider. + :type provider: str + :param operation: Operation Type. The type of operation. For example: + read, write, delete. + :type operation: str + :param resource: Resource Type. The resource type on which the operation + is performed. + :type resource: str + :param description: Operation description. A description of the operation. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, operation: str=None, resource: str=None, description: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.operation = operation + self.resource = resource + self.description = description diff --git a/azure-mgmt-msi/azure/mgmt/msi/models/operation_py3.py b/azure-mgmt-msi/azure/mgmt/msi/models/operation_py3.py new file mode 100644 index 000000000000..f4aff37fc086 --- /dev/null +++ b/azure-mgmt-msi/azure/mgmt/msi/models/operation_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Operation(Model): + """Microsoft.ManagedIdentity Operation. + + Operation supported by the Microsoft.ManagedIdentity REST API. + + :param name: Operation Name. The name of the REST Operation. This is of + the format {provider}/{resource}/{operation}. + :type name: str + :param display: Operation Display. The object that describes the + operation. + :type display: ~azure.mgmt.msi.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/azure-mgmt-msi/azure/mgmt/msi/operations/operations.py b/azure-mgmt-msi/azure/mgmt/msi/operations/operations.py index 8b6bc1a05c26..11e7cf98f86a 100644 --- a/azure-mgmt-msi/azure/mgmt/msi/operations/operations.py +++ b/azure-mgmt-msi/azure/mgmt/msi/operations/operations.py @@ -22,7 +22,7 @@ class Operations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Version of API to invoke. Constant value: "2015-08-31-preview". """ @@ -55,7 +55,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/providers/Microsoft.ManagedIdentity/operations' + url = self.list.metadata['url'] # Construct parameters query_parameters = {} @@ -78,7 +78,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -96,3 +96,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/providers/Microsoft.ManagedIdentity/operations'} diff --git a/azure-mgmt-msi/azure/mgmt/msi/operations/user_assigned_identities_operations.py b/azure-mgmt-msi/azure/mgmt/msi/operations/user_assigned_identities_operations.py index eeb135c746a4..e01790fc5582 100644 --- a/azure-mgmt-msi/azure/mgmt/msi/operations/user_assigned_identities_operations.py +++ b/azure-mgmt-msi/azure/mgmt/msi/operations/user_assigned_identities_operations.py @@ -22,7 +22,7 @@ class UserAssignedIdentitiesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Version of API to invoke. Constant value: "2015-08-31-preview". """ @@ -56,7 +56,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.ManagedIdentity/userAssignedIdentities' + url = self.list_by_subscription.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -83,7 +83,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -101,6 +101,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ManagedIdentity/userAssignedIdentities'} def list_by_resource_group( self, resource_group_name, custom_headers=None, raw=False, **operation_config): @@ -124,7 +125,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities' + url = self.list_by_resource_group.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') @@ -152,7 +153,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -170,6 +171,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities'} def create_or_update( self, resource_group_name, resource_name, location=None, tags=None, custom_headers=None, raw=False, **operation_config): @@ -198,7 +200,7 @@ def create_or_update( parameters = models.Identity(location=location, tags=tags) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -226,7 +228,7 @@ def create_or_update( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -245,6 +247,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}'} def update( self, resource_group_name, resource_name, location=None, tags=None, custom_headers=None, raw=False, **operation_config): @@ -272,7 +275,7 @@ def update( parameters = models.Identity(location=location, tags=tags) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}' + url = self.update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -300,7 +303,7 @@ def update( # Construct and send request request = self._client.patch(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -317,6 +320,7 @@ def update( return client_raw_response return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}'} def get( self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): @@ -338,7 +342,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -362,7 +366,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -379,6 +383,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}'} def delete( self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): @@ -399,7 +404,7 @@ def delete( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}' + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -423,7 +428,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -433,3 +438,4 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}'} diff --git a/azure-mgmt-msi/azure/mgmt/msi/version.py b/azure-mgmt-msi/azure/mgmt/msi/version.py index e0ec669828cb..9bd1dfac7ecb 100644 --- a/azure-mgmt-msi/azure/mgmt/msi/version.py +++ b/azure-mgmt-msi/azure/mgmt/msi/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.1.0" +VERSION = "0.2.0" diff --git a/azure-mgmt-msi/sdk_packaging.toml b/azure-mgmt-msi/sdk_packaging.toml new file mode 100644 index 000000000000..e10e556882e3 --- /dev/null +++ b/azure-mgmt-msi/sdk_packaging.toml @@ -0,0 +1,5 @@ +[packaging] +package_name = "azure-mgmt-msi" +package_pprint_name = "MSI Management" +package_doc_id = "activedirectory" +is_stable = false diff --git a/azure-mgmt-msi/setup.py b/azure-mgmt-msi/setup.py index 068d98844699..54211cbc9f6b 100644 --- a/azure-mgmt-msi/setup.py +++ b/azure-mgmt-msi/setup.py @@ -77,7 +77,7 @@ zip_safe=False, packages=find_packages(exclude=["tests"]), install_requires=[ - 'msrestazure~=0.4.11', + 'msrestazure>=0.4.27,<2.0.0', 'azure-common~=1.1', ], cmdclass=cmdclass diff --git a/azure-mgmt-notificationhubs/HISTORY.rst b/azure-mgmt-notificationhubs/HISTORY.rst index 0fc9a54a4469..cd91317f4237 100644 --- a/azure-mgmt-notificationhubs/HISTORY.rst +++ b/azure-mgmt-notificationhubs/HISTORY.rst @@ -3,6 +3,62 @@ Release History =============== +2.0.0 (2018-05-25) +++++++++++++++++++ + +**Features** + +- Model NamespaceResource has a new parameter updated_at +- Model NamespaceResource has a new parameter metric_id +- Model NamespaceResource has a new parameter data_center +- Model NamespaceCreateOrUpdateParameters has a new parameter updated_at +- Model NamespaceCreateOrUpdateParameters has a new parameter metric_id +- Model NamespaceCreateOrUpdateParameters has a new parameter data_center +- Added operation NotificationHubsOperations.check_notification_hub_availability +- Added operation group Operations +- Client class can be used as a context manager to keep the underlying HTTP session open for performance + +**Breaking changes** + +- Operation NotificationHubsOperations.create_or_update_authorization_rule has a new signature +- Operation NamespacesOperations.create_or_update_authorization_rule has a new signature +- Removed operation NotificationHubsOperations.check_availability (replaced by NotificationHubsOperations.check_notification_hub_availability) +- Model SharedAccessAuthorizationRuleResource has a new signature +- Model SharedAccessAuthorizationRuleProperties has a new signature +- Model SharedAccessAuthorizationRuleCreateOrUpdateParameters has a new signature +- Removed operation group NameOperations (replaced by NotificationHubsOperations.check_notification_hub_availability) +- Removed operation group HubsOperations (merged in NotificationHubsOperations) + +**General Breaking changes** + +This version uses a next-generation code generator that *might* introduce breaking changes. + +- Model signatures now use only keyword-argument syntax. All positional arguments must be re-written as keyword-arguments. + To keep auto-completion in most cases, models are now generated for Python 2 and Python 3. Python 3 uses the "*" syntax for keyword-only arguments. +- Enum types now use the "str" mixin (class AzureEnum(str, Enum)) to improve the behavior when unrecognized enum values are encountered. + While this is not a breaking change, the distinctions are important, and are documented here: + https://docs.python.org/3/library/enum.html#others + At a glance: + + - "is" should not be used at all. + - "format" will return the string value, where "%s" string formatting will return `NameOfEnum.stringvalue`. Format syntax should be prefered. + +- New Long Running Operation: + + - Return type changes from `msrestazure.azure_operation.AzureOperationPoller` to `msrest.polling.LROPoller`. External API is the same. + - Return type is now **always** a `msrest.polling.LROPoller`, regardless of the optional parameters used. + - The behavior has changed when using `raw=True`. Instead of returning the initial call result as `ClientRawResponse`, + without polling, now this returns an LROPoller. After polling, the final resource will be returned as a `ClientRawResponse`. + - New `polling` parameter. The default behavior is `Polling=True` which will poll using ARM algorithm. When `Polling=False`, + the response of the initial call will be returned without polling. + - `polling` parameter accepts instances of subclasses of `msrest.polling.PollingMethod`. + - `add_done_callback` will no longer raise if called after polling is finished, but will instead execute the callback right away. + +**Bugfixes** + +- Compatibility of the sdist with wheel 0.31.0 + + 1.0.0 (2017-06-27) ++++++++++++++++++ diff --git a/azure-mgmt-notificationhubs/README.rst b/azure-mgmt-notificationhubs/README.rst index e1e3d6b71d1b..c2993d6f867c 100644 --- a/azure-mgmt-notificationhubs/README.rst +++ b/azure-mgmt-notificationhubs/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Notification Hubs Management Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. +This package has been tested with Python 2.7, 3.4, 3.5 and 3.6. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. @@ -37,8 +37,8 @@ Usage ===== For code examples, see `Notification Hubs Management -`__ -on readthedocs.org. +`__ +on docs.microsoft.com. Provide Feedback diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/__init__.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/__init__.py index e131516f02d1..fa659d0d218c 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/__init__.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/__init__.py @@ -9,30 +9,61 @@ # regenerated. # -------------------------------------------------------------------------- -from .check_name_availability_request_parameters import CheckNameAvailabilityRequestParameters -from .check_name_availability_response import CheckNameAvailabilityResponse -from .sku import Sku -from .check_availability_parameters import CheckAvailabilityParameters -from .check_availability_result import CheckAvailabilityResult -from .namespace_create_or_update_parameters import NamespaceCreateOrUpdateParameters -from .namespace_patch_parameters import NamespacePatchParameters -from .namespace_resource import NamespaceResource -from .shared_access_authorization_rule_properties import SharedAccessAuthorizationRuleProperties -from .shared_access_authorization_rule_create_or_update_parameters import SharedAccessAuthorizationRuleCreateOrUpdateParameters -from .shared_access_authorization_rule_resource import SharedAccessAuthorizationRuleResource -from .resource_list_keys import ResourceListKeys -from .policykey_resource import PolicykeyResource -from .apns_credential import ApnsCredential -from .wns_credential import WnsCredential -from .gcm_credential import GcmCredential -from .mpns_credential import MpnsCredential -from .adm_credential import AdmCredential -from .baidu_credential import BaiduCredential -from .notification_hub_create_or_update_parameters import NotificationHubCreateOrUpdateParameters -from .notification_hub_resource import NotificationHubResource -from .pns_credentials_resource import PnsCredentialsResource -from .resource import Resource -from .sub_resource import SubResource +try: + from .operation_display_py3 import OperationDisplay + from .operation_py3 import Operation + from .error_response_py3 import ErrorResponse, ErrorResponseException + from .sku_py3 import Sku + from .check_availability_parameters_py3 import CheckAvailabilityParameters + from .check_availability_result_py3 import CheckAvailabilityResult + from .namespace_create_or_update_parameters_py3 import NamespaceCreateOrUpdateParameters + from .namespace_patch_parameters_py3 import NamespacePatchParameters + from .namespace_resource_py3 import NamespaceResource + from .shared_access_authorization_rule_properties_py3 import SharedAccessAuthorizationRuleProperties + from .shared_access_authorization_rule_create_or_update_parameters_py3 import SharedAccessAuthorizationRuleCreateOrUpdateParameters + from .shared_access_authorization_rule_resource_py3 import SharedAccessAuthorizationRuleResource + from .shared_access_authorization_rule_list_result_py3 import SharedAccessAuthorizationRuleListResult + from .resource_list_keys_py3 import ResourceListKeys + from .policykey_resource_py3 import PolicykeyResource + from .apns_credential_py3 import ApnsCredential + from .wns_credential_py3 import WnsCredential + from .gcm_credential_py3 import GcmCredential + from .mpns_credential_py3 import MpnsCredential + from .adm_credential_py3 import AdmCredential + from .baidu_credential_py3 import BaiduCredential + from .notification_hub_create_or_update_parameters_py3 import NotificationHubCreateOrUpdateParameters + from .notification_hub_resource_py3 import NotificationHubResource + from .pns_credentials_resource_py3 import PnsCredentialsResource + from .resource_py3 import Resource + from .sub_resource_py3 import SubResource +except (SyntaxError, ImportError): + from .operation_display import OperationDisplay + from .operation import Operation + from .error_response import ErrorResponse, ErrorResponseException + from .sku import Sku + from .check_availability_parameters import CheckAvailabilityParameters + from .check_availability_result import CheckAvailabilityResult + from .namespace_create_or_update_parameters import NamespaceCreateOrUpdateParameters + from .namespace_patch_parameters import NamespacePatchParameters + from .namespace_resource import NamespaceResource + from .shared_access_authorization_rule_properties import SharedAccessAuthorizationRuleProperties + from .shared_access_authorization_rule_create_or_update_parameters import SharedAccessAuthorizationRuleCreateOrUpdateParameters + from .shared_access_authorization_rule_resource import SharedAccessAuthorizationRuleResource + from .shared_access_authorization_rule_list_result import SharedAccessAuthorizationRuleListResult + from .resource_list_keys import ResourceListKeys + from .policykey_resource import PolicykeyResource + from .apns_credential import ApnsCredential + from .wns_credential import WnsCredential + from .gcm_credential import GcmCredential + from .mpns_credential import MpnsCredential + from .adm_credential import AdmCredential + from .baidu_credential import BaiduCredential + from .notification_hub_create_or_update_parameters import NotificationHubCreateOrUpdateParameters + from .notification_hub_resource import NotificationHubResource + from .pns_credentials_resource import PnsCredentialsResource + from .resource import Resource + from .sub_resource import SubResource +from .operation_paged import OperationPaged from .namespace_resource_paged import NamespaceResourcePaged from .shared_access_authorization_rule_resource_paged import SharedAccessAuthorizationRuleResourcePaged from .notification_hub_resource_paged import NotificationHubResourcePaged @@ -43,8 +74,9 @@ ) __all__ = [ - 'CheckNameAvailabilityRequestParameters', - 'CheckNameAvailabilityResponse', + 'OperationDisplay', + 'Operation', + 'ErrorResponse', 'ErrorResponseException', 'Sku', 'CheckAvailabilityParameters', 'CheckAvailabilityResult', @@ -54,6 +86,7 @@ 'SharedAccessAuthorizationRuleProperties', 'SharedAccessAuthorizationRuleCreateOrUpdateParameters', 'SharedAccessAuthorizationRuleResource', + 'SharedAccessAuthorizationRuleListResult', 'ResourceListKeys', 'PolicykeyResource', 'ApnsCredential', @@ -67,6 +100,7 @@ 'PnsCredentialsResource', 'Resource', 'SubResource', + 'OperationPaged', 'NamespaceResourcePaged', 'SharedAccessAuthorizationRuleResourcePaged', 'NotificationHubResourcePaged', diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/adm_credential.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/adm_credential.py index 3d06c0e26e9e..de14a2dff39b 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/adm_credential.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/adm_credential.py @@ -29,7 +29,8 @@ class AdmCredential(Model): 'auth_token_url': {'key': 'properties.authTokenUrl', 'type': 'str'}, } - def __init__(self, client_id=None, client_secret=None, auth_token_url=None): - self.client_id = client_id - self.client_secret = client_secret - self.auth_token_url = auth_token_url + def __init__(self, **kwargs): + super(AdmCredential, self).__init__(**kwargs) + self.client_id = kwargs.get('client_id', None) + self.client_secret = kwargs.get('client_secret', None) + self.auth_token_url = kwargs.get('auth_token_url', None) diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/adm_credential_py3.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/adm_credential_py3.py new file mode 100644 index 000000000000..eccb8b0f07ca --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/adm_credential_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AdmCredential(Model): + """Description of a NotificationHub AdmCredential. + + :param client_id: The client identifier. + :type client_id: str + :param client_secret: The credential secret access key. + :type client_secret: str + :param auth_token_url: The URL of the authorization token. + :type auth_token_url: str + """ + + _attribute_map = { + 'client_id': {'key': 'properties.clientId', 'type': 'str'}, + 'client_secret': {'key': 'properties.clientSecret', 'type': 'str'}, + 'auth_token_url': {'key': 'properties.authTokenUrl', 'type': 'str'}, + } + + def __init__(self, *, client_id: str=None, client_secret: str=None, auth_token_url: str=None, **kwargs) -> None: + super(AdmCredential, self).__init__(**kwargs) + self.client_id = client_id + self.client_secret = client_secret + self.auth_token_url = auth_token_url diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/apns_credential.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/apns_credential.py index 2832b2385635..823a6dd3ec2d 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/apns_credential.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/apns_credential.py @@ -47,12 +47,13 @@ class ApnsCredential(Model): 'token': {'key': 'properties.token', 'type': 'str'}, } - def __init__(self, apns_certificate=None, certificate_key=None, endpoint=None, thumbprint=None, key_id=None, app_name=None, app_id=None, token=None): - self.apns_certificate = apns_certificate - self.certificate_key = certificate_key - self.endpoint = endpoint - self.thumbprint = thumbprint - self.key_id = key_id - self.app_name = app_name - self.app_id = app_id - self.token = token + def __init__(self, **kwargs): + super(ApnsCredential, self).__init__(**kwargs) + self.apns_certificate = kwargs.get('apns_certificate', None) + self.certificate_key = kwargs.get('certificate_key', None) + self.endpoint = kwargs.get('endpoint', None) + self.thumbprint = kwargs.get('thumbprint', None) + self.key_id = kwargs.get('key_id', None) + self.app_name = kwargs.get('app_name', None) + self.app_id = kwargs.get('app_id', None) + self.token = kwargs.get('token', None) diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/apns_credential_py3.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/apns_credential_py3.py new file mode 100644 index 000000000000..295a024f5eb2 --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/apns_credential_py3.py @@ -0,0 +1,59 @@ +# 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 ApnsCredential(Model): + """Description of a NotificationHub ApnsCredential. + + :param apns_certificate: The APNS certificate. + :type apns_certificate: str + :param certificate_key: The certificate key. + :type certificate_key: str + :param endpoint: The endpoint of this credential. + :type endpoint: str + :param thumbprint: The Apns certificate Thumbprint + :type thumbprint: str + :param key_id: A 10-character key identifier (kid) key, obtained from your + developer account + :type key_id: str + :param app_name: The name of the application + :type app_name: str + :param app_id: The issuer (iss) registered claim key, whose value is your + 10-character Team ID, obtained from your developer account + :type app_id: str + :param token: Provider Authentication Token, obtained through your + developer account + :type token: str + """ + + _attribute_map = { + 'apns_certificate': {'key': 'properties.apnsCertificate', 'type': 'str'}, + 'certificate_key': {'key': 'properties.certificateKey', 'type': 'str'}, + 'endpoint': {'key': 'properties.endpoint', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'key_id': {'key': 'properties.keyId', 'type': 'str'}, + 'app_name': {'key': 'properties.appName', 'type': 'str'}, + 'app_id': {'key': 'properties.appId', 'type': 'str'}, + 'token': {'key': 'properties.token', 'type': 'str'}, + } + + def __init__(self, *, apns_certificate: str=None, certificate_key: str=None, endpoint: str=None, thumbprint: str=None, key_id: str=None, app_name: str=None, app_id: str=None, token: str=None, **kwargs) -> None: + super(ApnsCredential, self).__init__(**kwargs) + self.apns_certificate = apns_certificate + self.certificate_key = certificate_key + self.endpoint = endpoint + self.thumbprint = thumbprint + self.key_id = key_id + self.app_name = app_name + self.app_id = app_id + self.token = token diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/baidu_credential.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/baidu_credential.py index 668631f8d4f2..e43621a5307b 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/baidu_credential.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/baidu_credential.py @@ -29,7 +29,8 @@ class BaiduCredential(Model): 'baidu_secret_key': {'key': 'properties.baiduSecretKey', 'type': 'str'}, } - def __init__(self, baidu_api_key=None, baidu_end_point=None, baidu_secret_key=None): - self.baidu_api_key = baidu_api_key - self.baidu_end_point = baidu_end_point - self.baidu_secret_key = baidu_secret_key + def __init__(self, **kwargs): + super(BaiduCredential, self).__init__(**kwargs) + self.baidu_api_key = kwargs.get('baidu_api_key', None) + self.baidu_end_point = kwargs.get('baidu_end_point', None) + self.baidu_secret_key = kwargs.get('baidu_secret_key', None) diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/baidu_credential_py3.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/baidu_credential_py3.py new file mode 100644 index 000000000000..97d634443cbb --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/baidu_credential_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BaiduCredential(Model): + """Description of a NotificationHub BaiduCredential. + + :param baidu_api_key: Baidu Api Key. + :type baidu_api_key: str + :param baidu_end_point: Baidu Endpoint. + :type baidu_end_point: str + :param baidu_secret_key: Baidu Secret Key + :type baidu_secret_key: str + """ + + _attribute_map = { + 'baidu_api_key': {'key': 'properties.baiduApiKey', 'type': 'str'}, + 'baidu_end_point': {'key': 'properties.baiduEndPoint', 'type': 'str'}, + 'baidu_secret_key': {'key': 'properties.baiduSecretKey', 'type': 'str'}, + } + + def __init__(self, *, baidu_api_key: str=None, baidu_end_point: str=None, baidu_secret_key: str=None, **kwargs) -> None: + super(BaiduCredential, self).__init__(**kwargs) + self.baidu_api_key = baidu_api_key + self.baidu_end_point = baidu_end_point + self.baidu_secret_key = baidu_secret_key diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/check_availability_parameters.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/check_availability_parameters.py index 2e1604aafba2..3ed36a8e0bf3 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/check_availability_parameters.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/check_availability_parameters.py @@ -19,18 +19,20 @@ class CheckAvailabilityParameters(Model): 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 - :param name: Resource name + :param name: Required. Resource name :type name: str :ivar type: Resource type :vartype type: str - :param location: Resource location + :param location: Required. Resource location :type location: str :param tags: Resource tags - :type tags: dict + :type tags: dict[str, str] :param sku: The sku of the created namespace - :type sku: :class:`Sku ` + :type sku: ~azure.mgmt.notificationhubs.models.Sku :param is_availiable: True if the name is available and can be used to create new Namespace/NotificationHub. Otherwise false. :type is_availiable: bool @@ -53,11 +55,12 @@ class CheckAvailabilityParameters(Model): 'is_availiable': {'key': 'isAvailiable', 'type': 'bool'}, } - def __init__(self, name, location, tags=None, sku=None, is_availiable=None): + def __init__(self, **kwargs): + super(CheckAvailabilityParameters, self).__init__(**kwargs) self.id = None - self.name = name + self.name = kwargs.get('name', None) self.type = None - self.location = location - self.tags = tags - self.sku = sku - self.is_availiable = is_availiable + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.sku = kwargs.get('sku', None) + self.is_availiable = kwargs.get('is_availiable', None) diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/check_availability_parameters_py3.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/check_availability_parameters_py3.py new file mode 100644 index 000000000000..9913fc3c1b0b --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/check_availability_parameters_py3.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.serialization import Model + + +class CheckAvailabilityParameters(Model): + """Parameters supplied to the Check Name Availability for Namespace and + NotificationHubs. + + 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 + :param name: Required. Resource name + :type name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The sku of the created namespace + :type sku: ~azure.mgmt.notificationhubs.models.Sku + :param is_availiable: True if the name is available and can be used to + create new Namespace/NotificationHub. Otherwise false. + :type is_availiable: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'required': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'is_availiable': {'key': 'isAvailiable', 'type': 'bool'}, + } + + def __init__(self, *, name: str, location: str, tags=None, sku=None, is_availiable: bool=None, **kwargs) -> None: + super(CheckAvailabilityParameters, self).__init__(**kwargs) + self.id = None + self.name = name + self.type = None + self.location = location + self.tags = tags + self.sku = sku + self.is_availiable = is_availiable diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/check_availability_result.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/check_availability_result.py index a759ce71f7bd..8ad9a11c440b 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/check_availability_result.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/check_availability_result.py @@ -27,9 +27,9 @@ class CheckAvailabilityResult(Resource): :param location: Resource location :type location: str :param tags: Resource tags - :type tags: dict + :type tags: dict[str, str] :param sku: The sku of the created namespace - :type sku: :class:`Sku ` + :type sku: ~azure.mgmt.notificationhubs.models.Sku :param is_availiable: True if the name is available and can be used to create new Namespace/NotificationHub. Otherwise false. :type is_availiable: bool @@ -39,7 +39,6 @@ class CheckAvailabilityResult(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'location': {'required': True}, } _attribute_map = { @@ -52,6 +51,6 @@ class CheckAvailabilityResult(Resource): 'is_availiable': {'key': 'isAvailiable', 'type': 'bool'}, } - def __init__(self, location, tags=None, sku=None, is_availiable=None): - super(CheckAvailabilityResult, self).__init__(location=location, tags=tags, sku=sku) - self.is_availiable = is_availiable + def __init__(self, **kwargs): + super(CheckAvailabilityResult, self).__init__(**kwargs) + self.is_availiable = kwargs.get('is_availiable', None) diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/check_availability_result_py3.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/check_availability_result_py3.py new file mode 100644 index 000000000000..64e1ab2ad7de --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/check_availability_result_py3.py @@ -0,0 +1,56 @@ +# 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 CheckAvailabilityResult(Resource): + """Description of a CheckAvailibility 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 location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The sku of the created namespace + :type sku: ~azure.mgmt.notificationhubs.models.Sku + :param is_availiable: True if the name is available and can be used to + create new Namespace/NotificationHub. Otherwise false. + :type is_availiable: bool + """ + + _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}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'is_availiable': {'key': 'isAvailiable', 'type': 'bool'}, + } + + def __init__(self, *, location: str=None, tags=None, sku=None, is_availiable: bool=None, **kwargs) -> None: + super(CheckAvailabilityResult, self).__init__(location=location, tags=tags, sku=sku, **kwargs) + self.is_availiable = is_availiable diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/check_name_availability_response.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/check_name_availability_response.py deleted file mode 100644 index 40cf42202048..000000000000 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/check_name_availability_response.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 CheckNameAvailabilityResponse(Model): - """CheckNameAvailabilityResponse. - - :param name_available: Checks if the namespace name is available - :type name_available: bool - :param reason: States the reason due to which the namespace name is not - available - :type reason: str - :param message: The messsage returned when checking for namespace name - availability - :type message: str - """ - - _attribute_map = { - 'name_available': {'key': 'NameAvailable', 'type': 'bool'}, - 'reason': {'key': 'Reason', 'type': 'str'}, - 'message': {'key': 'Message', 'type': 'str'}, - } - - def __init__(self, name_available=None, reason=None, message=None): - self.name_available = name_available - self.reason = reason - self.message = message diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/error_response.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/error_response.py new file mode 100644 index 000000000000..6d7907d66fd4 --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/error_response.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class ErrorResponse(Model): + """Error reponse indicates NotificationHubs service is not able to process the + incoming request. The reason is provided in the error message. + + :param code: Error code. + :type code: str + :param message: Error message indicating why the operation failed. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/error_response_py3.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/error_response_py3.py new file mode 100644 index 000000000000..22530f8dc898 --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/error_response_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class ErrorResponse(Model): + """Error reponse indicates NotificationHubs service is not able to process the + incoming request. The reason is provided in the error message. + + :param code: Error code. + :type code: str + :param message: Error message indicating why the operation failed. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.code = code + self.message = message + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/gcm_credential.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/gcm_credential.py index 83df4fe01316..e7567286c25d 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/gcm_credential.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/gcm_credential.py @@ -26,6 +26,7 @@ class GcmCredential(Model): 'google_api_key': {'key': 'properties.googleApiKey', 'type': 'str'}, } - def __init__(self, gcm_endpoint=None, google_api_key=None): - self.gcm_endpoint = gcm_endpoint - self.google_api_key = google_api_key + def __init__(self, **kwargs): + super(GcmCredential, self).__init__(**kwargs) + self.gcm_endpoint = kwargs.get('gcm_endpoint', None) + self.google_api_key = kwargs.get('google_api_key', None) diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/gcm_credential_py3.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/gcm_credential_py3.py new file mode 100644 index 000000000000..a9f09bfd7a58 --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/gcm_credential_py3.py @@ -0,0 +1,32 @@ +# 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 GcmCredential(Model): + """Description of a NotificationHub GcmCredential. + + :param gcm_endpoint: The GCM endpoint. + :type gcm_endpoint: str + :param google_api_key: The Google API key. + :type google_api_key: str + """ + + _attribute_map = { + 'gcm_endpoint': {'key': 'properties.gcmEndpoint', 'type': 'str'}, + 'google_api_key': {'key': 'properties.googleApiKey', 'type': 'str'}, + } + + def __init__(self, *, gcm_endpoint: str=None, google_api_key: str=None, **kwargs) -> None: + super(GcmCredential, self).__init__(**kwargs) + self.gcm_endpoint = gcm_endpoint + self.google_api_key = google_api_key diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/mpns_credential.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/mpns_credential.py index 133ac5287a5c..95ff2e76a3f5 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/mpns_credential.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/mpns_credential.py @@ -29,7 +29,8 @@ class MpnsCredential(Model): 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, } - def __init__(self, mpns_certificate=None, certificate_key=None, thumbprint=None): - self.mpns_certificate = mpns_certificate - self.certificate_key = certificate_key - self.thumbprint = thumbprint + def __init__(self, **kwargs): + super(MpnsCredential, self).__init__(**kwargs) + self.mpns_certificate = kwargs.get('mpns_certificate', None) + self.certificate_key = kwargs.get('certificate_key', None) + self.thumbprint = kwargs.get('thumbprint', None) diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/mpns_credential_py3.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/mpns_credential_py3.py new file mode 100644 index 000000000000..a1d2da085167 --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/mpns_credential_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MpnsCredential(Model): + """Description of a NotificationHub MpnsCredential. + + :param mpns_certificate: The MPNS certificate. + :type mpns_certificate: str + :param certificate_key: The certificate key for this credential. + :type certificate_key: str + :param thumbprint: The Mpns certificate Thumbprint + :type thumbprint: str + """ + + _attribute_map = { + 'mpns_certificate': {'key': 'properties.mpnsCertificate', 'type': 'str'}, + 'certificate_key': {'key': 'properties.certificateKey', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + } + + def __init__(self, *, mpns_certificate: str=None, certificate_key: str=None, thumbprint: str=None, **kwargs) -> None: + super(MpnsCredential, self).__init__(**kwargs) + self.mpns_certificate = mpns_certificate + self.certificate_key = certificate_key + self.thumbprint = thumbprint diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_create_or_update_parameters.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_create_or_update_parameters.py index cbc9efd9298b..4e7ebeb7beb4 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_create_or_update_parameters.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_create_or_update_parameters.py @@ -27,9 +27,9 @@ class NamespaceCreateOrUpdateParameters(Resource): :param location: Resource location :type location: str :param tags: Resource tags - :type tags: dict + :type tags: dict[str, str] :param sku: The sku of the created namespace - :type sku: :class:`Sku ` + :type sku: ~azure.mgmt.notificationhubs.models.Sku :param namespace_create_or_update_parameters_name: The name of the namespace. :type namespace_create_or_update_parameters_name: str @@ -41,11 +41,15 @@ class NamespaceCreateOrUpdateParameters(Resource): USEast AsiaSoutheast AsiaBrazil SouthJapan EastJapan WestNorth EuropeWest Europe :type region: str + :ivar metric_id: Identifier for Azure Insights metrics + :vartype metric_id: str :param status: Status of the namespace. It can be any of these values:1 = Created/Active2 = Creating3 = Suspended4 = Deleting :type status: str :param created_at: The time the namespace was created. :type created_at: datetime + :param updated_at: The time the namespace was updated. + :type updated_at: datetime :param service_bus_endpoint: Endpoint you can use to perform NotificationHub operations. :type service_bus_endpoint: str @@ -58,17 +62,19 @@ class NamespaceCreateOrUpdateParameters(Resource): :type enabled: bool :param critical: Whether or not the namespace is set as Critical. :type critical: bool + :param data_center: Data center for the namespace + :type data_center: str :param namespace_type: The namespace type. Possible values include: 'Messaging', 'NotificationHub' - :type namespace_type: str or :class:`NamespaceType - ` + :type namespace_type: str or + ~azure.mgmt.notificationhubs.models.NamespaceType """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'location': {'required': True}, + 'metric_id': {'readonly': True}, } _attribute_map = { @@ -81,26 +87,32 @@ class NamespaceCreateOrUpdateParameters(Resource): 'namespace_create_or_update_parameters_name': {'key': 'properties.name', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'region': {'key': 'properties.region', 'type': 'str'}, + 'metric_id': {'key': 'properties.metricId', 'type': 'str'}, 'status': {'key': 'properties.status', 'type': 'str'}, 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, 'service_bus_endpoint': {'key': 'properties.serviceBusEndpoint', 'type': 'str'}, 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, 'scale_unit': {'key': 'properties.scaleUnit', 'type': 'str'}, 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, 'critical': {'key': 'properties.critical', 'type': 'bool'}, + 'data_center': {'key': 'properties.dataCenter', 'type': 'str'}, 'namespace_type': {'key': 'properties.namespaceType', 'type': 'NamespaceType'}, } - def __init__(self, location, tags=None, sku=None, namespace_create_or_update_parameters_name=None, provisioning_state=None, region=None, status=None, created_at=None, service_bus_endpoint=None, subscription_id=None, scale_unit=None, enabled=None, critical=None, namespace_type=None): - super(NamespaceCreateOrUpdateParameters, self).__init__(location=location, tags=tags, sku=sku) - self.namespace_create_or_update_parameters_name = namespace_create_or_update_parameters_name - self.provisioning_state = provisioning_state - self.region = region - self.status = status - self.created_at = created_at - self.service_bus_endpoint = service_bus_endpoint - self.subscription_id = subscription_id - self.scale_unit = scale_unit - self.enabled = enabled - self.critical = critical - self.namespace_type = namespace_type + def __init__(self, **kwargs): + super(NamespaceCreateOrUpdateParameters, self).__init__(**kwargs) + self.namespace_create_or_update_parameters_name = kwargs.get('namespace_create_or_update_parameters_name', None) + self.provisioning_state = kwargs.get('provisioning_state', None) + self.region = kwargs.get('region', None) + self.metric_id = None + self.status = kwargs.get('status', None) + self.created_at = kwargs.get('created_at', None) + self.updated_at = kwargs.get('updated_at', None) + self.service_bus_endpoint = kwargs.get('service_bus_endpoint', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.scale_unit = kwargs.get('scale_unit', None) + self.enabled = kwargs.get('enabled', None) + self.critical = kwargs.get('critical', None) + self.data_center = kwargs.get('data_center', None) + self.namespace_type = kwargs.get('namespace_type', None) diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_create_or_update_parameters_py3.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_create_or_update_parameters_py3.py new file mode 100644 index 000000000000..f851a4d3507d --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_create_or_update_parameters_py3.py @@ -0,0 +1,118 @@ +# 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 NamespaceCreateOrUpdateParameters(Resource): + """Parameters supplied to the CreateOrUpdate Namespace operation. + + 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 sku: The sku of the created namespace + :type sku: ~azure.mgmt.notificationhubs.models.Sku + :param namespace_create_or_update_parameters_name: The name of the + namespace. + :type namespace_create_or_update_parameters_name: str + :param provisioning_state: Provisioning state of the Namespace. + :type provisioning_state: str + :param region: Specifies the targeted region in which the namespace should + be created. It can be any of the following values: Australia EastAustralia + SoutheastCentral USEast USEast US 2West USNorth Central USSouth Central + USEast AsiaSoutheast AsiaBrazil SouthJapan EastJapan WestNorth EuropeWest + Europe + :type region: str + :ivar metric_id: Identifier for Azure Insights metrics + :vartype metric_id: str + :param status: Status of the namespace. It can be any of these values:1 = + Created/Active2 = Creating3 = Suspended4 = Deleting + :type status: str + :param created_at: The time the namespace was created. + :type created_at: datetime + :param updated_at: The time the namespace was updated. + :type updated_at: datetime + :param service_bus_endpoint: Endpoint you can use to perform + NotificationHub operations. + :type service_bus_endpoint: str + :param subscription_id: The Id of the Azure subscription associated with + the namespace. + :type subscription_id: str + :param scale_unit: ScaleUnit where the namespace gets created + :type scale_unit: str + :param enabled: Whether or not the namespace is currently enabled. + :type enabled: bool + :param critical: Whether or not the namespace is set as Critical. + :type critical: bool + :param data_center: Data center for the namespace + :type data_center: str + :param namespace_type: The namespace type. Possible values include: + 'Messaging', 'NotificationHub' + :type namespace_type: str or + ~azure.mgmt.notificationhubs.models.NamespaceType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'metric_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'namespace_create_or_update_parameters_name': {'key': 'properties.name', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'region': {'key': 'properties.region', 'type': 'str'}, + 'metric_id': {'key': 'properties.metricId', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, + 'service_bus_endpoint': {'key': 'properties.serviceBusEndpoint', 'type': 'str'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + 'scale_unit': {'key': 'properties.scaleUnit', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'critical': {'key': 'properties.critical', 'type': 'bool'}, + 'data_center': {'key': 'properties.dataCenter', 'type': 'str'}, + 'namespace_type': {'key': 'properties.namespaceType', 'type': 'NamespaceType'}, + } + + def __init__(self, *, location: str=None, tags=None, sku=None, namespace_create_or_update_parameters_name: str=None, provisioning_state: str=None, region: str=None, status: str=None, created_at=None, updated_at=None, service_bus_endpoint: str=None, subscription_id: str=None, scale_unit: str=None, enabled: bool=None, critical: bool=None, data_center: str=None, namespace_type=None, **kwargs) -> None: + super(NamespaceCreateOrUpdateParameters, self).__init__(location=location, tags=tags, sku=sku, **kwargs) + self.namespace_create_or_update_parameters_name = namespace_create_or_update_parameters_name + self.provisioning_state = provisioning_state + self.region = region + self.metric_id = None + self.status = status + self.created_at = created_at + self.updated_at = updated_at + self.service_bus_endpoint = service_bus_endpoint + self.subscription_id = subscription_id + self.scale_unit = scale_unit + self.enabled = enabled + self.critical = critical + self.data_center = data_center + self.namespace_type = namespace_type diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_patch_parameters.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_patch_parameters.py index 9a523c84ceed..f75f66bd3b55 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_patch_parameters.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_patch_parameters.py @@ -16,9 +16,9 @@ class NamespacePatchParameters(Model): """Parameters supplied to the Patch Namespace operation. :param tags: Resource tags - :type tags: dict + :type tags: dict[str, str] :param sku: The sku of the created namespace - :type sku: :class:`Sku ` + :type sku: ~azure.mgmt.notificationhubs.models.Sku """ _attribute_map = { @@ -26,6 +26,7 @@ class NamespacePatchParameters(Model): 'sku': {'key': 'sku', 'type': 'Sku'}, } - def __init__(self, tags=None, sku=None): - self.tags = tags - self.sku = sku + def __init__(self, **kwargs): + super(NamespacePatchParameters, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.sku = kwargs.get('sku', None) diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_patch_parameters_py3.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_patch_parameters_py3.py new file mode 100644 index 000000000000..d7b1b8473e75 --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_patch_parameters_py3.py @@ -0,0 +1,32 @@ +# 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 NamespacePatchParameters(Model): + """Parameters supplied to the Patch Namespace operation. + + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The sku of the created namespace + :type sku: ~azure.mgmt.notificationhubs.models.Sku + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, *, tags=None, sku=None, **kwargs) -> None: + super(NamespacePatchParameters, self).__init__(**kwargs) + self.tags = tags + self.sku = sku diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_resource.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_resource.py index 93eb3b0ee4e8..0014bd7600ec 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_resource.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_resource.py @@ -27,9 +27,9 @@ class NamespaceResource(Resource): :param location: Resource location :type location: str :param tags: Resource tags - :type tags: dict + :type tags: dict[str, str] :param sku: The sku of the created namespace - :type sku: :class:`Sku ` + :type sku: ~azure.mgmt.notificationhubs.models.Sku :param namespace_resource_name: The name of the namespace. :type namespace_resource_name: str :param provisioning_state: Provisioning state of the Namespace. @@ -40,11 +40,15 @@ class NamespaceResource(Resource): USEast AsiaSoutheast AsiaBrazil SouthJapan EastJapan WestNorth EuropeWest Europe :type region: str + :ivar metric_id: Identifier for Azure Insights metrics + :vartype metric_id: str :param status: Status of the namespace. It can be any of these values:1 = Created/Active2 = Creating3 = Suspended4 = Deleting :type status: str :param created_at: The time the namespace was created. :type created_at: datetime + :param updated_at: The time the namespace was updated. + :type updated_at: datetime :param service_bus_endpoint: Endpoint you can use to perform NotificationHub operations. :type service_bus_endpoint: str @@ -57,17 +61,19 @@ class NamespaceResource(Resource): :type enabled: bool :param critical: Whether or not the namespace is set as Critical. :type critical: bool + :param data_center: Data center for the namespace + :type data_center: str :param namespace_type: The namespace type. Possible values include: 'Messaging', 'NotificationHub' - :type namespace_type: str or :class:`NamespaceType - ` + :type namespace_type: str or + ~azure.mgmt.notificationhubs.models.NamespaceType """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'location': {'required': True}, + 'metric_id': {'readonly': True}, } _attribute_map = { @@ -80,26 +86,32 @@ class NamespaceResource(Resource): 'namespace_resource_name': {'key': 'properties.name', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'region': {'key': 'properties.region', 'type': 'str'}, + 'metric_id': {'key': 'properties.metricId', 'type': 'str'}, 'status': {'key': 'properties.status', 'type': 'str'}, 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, 'service_bus_endpoint': {'key': 'properties.serviceBusEndpoint', 'type': 'str'}, 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, 'scale_unit': {'key': 'properties.scaleUnit', 'type': 'str'}, 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, 'critical': {'key': 'properties.critical', 'type': 'bool'}, + 'data_center': {'key': 'properties.dataCenter', 'type': 'str'}, 'namespace_type': {'key': 'properties.namespaceType', 'type': 'NamespaceType'}, } - def __init__(self, location, tags=None, sku=None, namespace_resource_name=None, provisioning_state=None, region=None, status=None, created_at=None, service_bus_endpoint=None, subscription_id=None, scale_unit=None, enabled=None, critical=None, namespace_type=None): - super(NamespaceResource, self).__init__(location=location, tags=tags, sku=sku) - self.namespace_resource_name = namespace_resource_name - self.provisioning_state = provisioning_state - self.region = region - self.status = status - self.created_at = created_at - self.service_bus_endpoint = service_bus_endpoint - self.subscription_id = subscription_id - self.scale_unit = scale_unit - self.enabled = enabled - self.critical = critical - self.namespace_type = namespace_type + def __init__(self, **kwargs): + super(NamespaceResource, self).__init__(**kwargs) + self.namespace_resource_name = kwargs.get('namespace_resource_name', None) + self.provisioning_state = kwargs.get('provisioning_state', None) + self.region = kwargs.get('region', None) + self.metric_id = None + self.status = kwargs.get('status', None) + self.created_at = kwargs.get('created_at', None) + self.updated_at = kwargs.get('updated_at', None) + self.service_bus_endpoint = kwargs.get('service_bus_endpoint', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.scale_unit = kwargs.get('scale_unit', None) + self.enabled = kwargs.get('enabled', None) + self.critical = kwargs.get('critical', None) + self.data_center = kwargs.get('data_center', None) + self.namespace_type = kwargs.get('namespace_type', None) diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_resource_paged.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_resource_paged.py index 0ded738bc09c..3cab77ffaf99 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_resource_paged.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_resource_paged.py @@ -14,7 +14,7 @@ class NamespaceResourcePaged(Paged): """ - A paging container for iterating over a list of NamespaceResource object + A paging container for iterating over a list of :class:`NamespaceResource ` object """ _attribute_map = { diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_resource_py3.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_resource_py3.py new file mode 100644 index 000000000000..bbd58e897f9e --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_resource_py3.py @@ -0,0 +1,117 @@ +# 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 NamespaceResource(Resource): + """Description of a Namespace 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 location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The sku of the created namespace + :type sku: ~azure.mgmt.notificationhubs.models.Sku + :param namespace_resource_name: The name of the namespace. + :type namespace_resource_name: str + :param provisioning_state: Provisioning state of the Namespace. + :type provisioning_state: str + :param region: Specifies the targeted region in which the namespace should + be created. It can be any of the following values: Australia EastAustralia + SoutheastCentral USEast USEast US 2West USNorth Central USSouth Central + USEast AsiaSoutheast AsiaBrazil SouthJapan EastJapan WestNorth EuropeWest + Europe + :type region: str + :ivar metric_id: Identifier for Azure Insights metrics + :vartype metric_id: str + :param status: Status of the namespace. It can be any of these values:1 = + Created/Active2 = Creating3 = Suspended4 = Deleting + :type status: str + :param created_at: The time the namespace was created. + :type created_at: datetime + :param updated_at: The time the namespace was updated. + :type updated_at: datetime + :param service_bus_endpoint: Endpoint you can use to perform + NotificationHub operations. + :type service_bus_endpoint: str + :param subscription_id: The Id of the Azure subscription associated with + the namespace. + :type subscription_id: str + :param scale_unit: ScaleUnit where the namespace gets created + :type scale_unit: str + :param enabled: Whether or not the namespace is currently enabled. + :type enabled: bool + :param critical: Whether or not the namespace is set as Critical. + :type critical: bool + :param data_center: Data center for the namespace + :type data_center: str + :param namespace_type: The namespace type. Possible values include: + 'Messaging', 'NotificationHub' + :type namespace_type: str or + ~azure.mgmt.notificationhubs.models.NamespaceType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'metric_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'namespace_resource_name': {'key': 'properties.name', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'region': {'key': 'properties.region', 'type': 'str'}, + 'metric_id': {'key': 'properties.metricId', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, + 'service_bus_endpoint': {'key': 'properties.serviceBusEndpoint', 'type': 'str'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + 'scale_unit': {'key': 'properties.scaleUnit', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'critical': {'key': 'properties.critical', 'type': 'bool'}, + 'data_center': {'key': 'properties.dataCenter', 'type': 'str'}, + 'namespace_type': {'key': 'properties.namespaceType', 'type': 'NamespaceType'}, + } + + def __init__(self, *, location: str=None, tags=None, sku=None, namespace_resource_name: str=None, provisioning_state: str=None, region: str=None, status: str=None, created_at=None, updated_at=None, service_bus_endpoint: str=None, subscription_id: str=None, scale_unit: str=None, enabled: bool=None, critical: bool=None, data_center: str=None, namespace_type=None, **kwargs) -> None: + super(NamespaceResource, self).__init__(location=location, tags=tags, sku=sku, **kwargs) + self.namespace_resource_name = namespace_resource_name + self.provisioning_state = provisioning_state + self.region = region + self.metric_id = None + self.status = status + self.created_at = created_at + self.updated_at = updated_at + self.service_bus_endpoint = service_bus_endpoint + self.subscription_id = subscription_id + self.scale_unit = scale_unit + self.enabled = enabled + self.critical = critical + self.data_center = data_center + self.namespace_type = namespace_type diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hub_create_or_update_parameters.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hub_create_or_update_parameters.py index 306984aa11b4..e82f1174d70a 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hub_create_or_update_parameters.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hub_create_or_update_parameters.py @@ -27,9 +27,9 @@ class NotificationHubCreateOrUpdateParameters(Resource): :param location: Resource location :type location: str :param tags: Resource tags - :type tags: dict + :type tags: dict[str, str] :param sku: The sku of the created namespace - :type sku: :class:`Sku ` + :type sku: ~azure.mgmt.notificationhubs.models.Sku :param notification_hub_create_or_update_parameters_name: The NotificationHub name. :type notification_hub_create_or_update_parameters_name: str @@ -38,35 +38,28 @@ class NotificationHubCreateOrUpdateParameters(Resource): :type registration_ttl: str :param authorization_rules: The AuthorizationRules of the created NotificationHub - :type authorization_rules: list of - :class:`SharedAccessAuthorizationRuleProperties - ` + :type authorization_rules: + list[~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleProperties] :param apns_credential: The ApnsCredential of the created NotificationHub - :type apns_credential: :class:`ApnsCredential - ` + :type apns_credential: ~azure.mgmt.notificationhubs.models.ApnsCredential :param wns_credential: The WnsCredential of the created NotificationHub - :type wns_credential: :class:`WnsCredential - ` + :type wns_credential: ~azure.mgmt.notificationhubs.models.WnsCredential :param gcm_credential: The GcmCredential of the created NotificationHub - :type gcm_credential: :class:`GcmCredential - ` + :type gcm_credential: ~azure.mgmt.notificationhubs.models.GcmCredential :param mpns_credential: The MpnsCredential of the created NotificationHub - :type mpns_credential: :class:`MpnsCredential - ` + :type mpns_credential: ~azure.mgmt.notificationhubs.models.MpnsCredential :param adm_credential: The AdmCredential of the created NotificationHub - :type adm_credential: :class:`AdmCredential - ` + :type adm_credential: ~azure.mgmt.notificationhubs.models.AdmCredential :param baidu_credential: The BaiduCredential of the created NotificationHub - :type baidu_credential: :class:`BaiduCredential - ` + :type baidu_credential: + ~azure.mgmt.notificationhubs.models.BaiduCredential """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'location': {'required': True}, } _attribute_map = { @@ -87,14 +80,14 @@ class NotificationHubCreateOrUpdateParameters(Resource): 'baidu_credential': {'key': 'properties.baiduCredential', 'type': 'BaiduCredential'}, } - def __init__(self, location, tags=None, sku=None, notification_hub_create_or_update_parameters_name=None, registration_ttl=None, authorization_rules=None, apns_credential=None, wns_credential=None, gcm_credential=None, mpns_credential=None, adm_credential=None, baidu_credential=None): - super(NotificationHubCreateOrUpdateParameters, self).__init__(location=location, tags=tags, sku=sku) - self.notification_hub_create_or_update_parameters_name = notification_hub_create_or_update_parameters_name - self.registration_ttl = registration_ttl - self.authorization_rules = authorization_rules - self.apns_credential = apns_credential - self.wns_credential = wns_credential - self.gcm_credential = gcm_credential - self.mpns_credential = mpns_credential - self.adm_credential = adm_credential - self.baidu_credential = baidu_credential + def __init__(self, **kwargs): + super(NotificationHubCreateOrUpdateParameters, self).__init__(**kwargs) + self.notification_hub_create_or_update_parameters_name = kwargs.get('notification_hub_create_or_update_parameters_name', None) + self.registration_ttl = kwargs.get('registration_ttl', None) + self.authorization_rules = kwargs.get('authorization_rules', None) + self.apns_credential = kwargs.get('apns_credential', None) + self.wns_credential = kwargs.get('wns_credential', None) + self.gcm_credential = kwargs.get('gcm_credential', None) + self.mpns_credential = kwargs.get('mpns_credential', None) + self.adm_credential = kwargs.get('adm_credential', None) + self.baidu_credential = kwargs.get('baidu_credential', None) diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hub_create_or_update_parameters_py3.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hub_create_or_update_parameters_py3.py new file mode 100644 index 000000000000..7b97c00d588f --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hub_create_or_update_parameters_py3.py @@ -0,0 +1,93 @@ +# 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 NotificationHubCreateOrUpdateParameters(Resource): + """Parameters supplied to the CreateOrUpdate NotificationHub operation. + + 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 sku: The sku of the created namespace + :type sku: ~azure.mgmt.notificationhubs.models.Sku + :param notification_hub_create_or_update_parameters_name: The + NotificationHub name. + :type notification_hub_create_or_update_parameters_name: str + :param registration_ttl: The RegistrationTtl of the created + NotificationHub + :type registration_ttl: str + :param authorization_rules: The AuthorizationRules of the created + NotificationHub + :type authorization_rules: + list[~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleProperties] + :param apns_credential: The ApnsCredential of the created NotificationHub + :type apns_credential: ~azure.mgmt.notificationhubs.models.ApnsCredential + :param wns_credential: The WnsCredential of the created NotificationHub + :type wns_credential: ~azure.mgmt.notificationhubs.models.WnsCredential + :param gcm_credential: The GcmCredential of the created NotificationHub + :type gcm_credential: ~azure.mgmt.notificationhubs.models.GcmCredential + :param mpns_credential: The MpnsCredential of the created NotificationHub + :type mpns_credential: ~azure.mgmt.notificationhubs.models.MpnsCredential + :param adm_credential: The AdmCredential of the created NotificationHub + :type adm_credential: ~azure.mgmt.notificationhubs.models.AdmCredential + :param baidu_credential: The BaiduCredential of the created + NotificationHub + :type baidu_credential: + ~azure.mgmt.notificationhubs.models.BaiduCredential + """ + + _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}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'notification_hub_create_or_update_parameters_name': {'key': 'properties.name', 'type': 'str'}, + 'registration_ttl': {'key': 'properties.registrationTtl', 'type': 'str'}, + 'authorization_rules': {'key': 'properties.authorizationRules', 'type': '[SharedAccessAuthorizationRuleProperties]'}, + 'apns_credential': {'key': 'properties.apnsCredential', 'type': 'ApnsCredential'}, + 'wns_credential': {'key': 'properties.wnsCredential', 'type': 'WnsCredential'}, + 'gcm_credential': {'key': 'properties.gcmCredential', 'type': 'GcmCredential'}, + 'mpns_credential': {'key': 'properties.mpnsCredential', 'type': 'MpnsCredential'}, + 'adm_credential': {'key': 'properties.admCredential', 'type': 'AdmCredential'}, + 'baidu_credential': {'key': 'properties.baiduCredential', 'type': 'BaiduCredential'}, + } + + def __init__(self, *, location: str=None, tags=None, sku=None, notification_hub_create_or_update_parameters_name: str=None, registration_ttl: str=None, authorization_rules=None, apns_credential=None, wns_credential=None, gcm_credential=None, mpns_credential=None, adm_credential=None, baidu_credential=None, **kwargs) -> None: + super(NotificationHubCreateOrUpdateParameters, self).__init__(location=location, tags=tags, sku=sku, **kwargs) + self.notification_hub_create_or_update_parameters_name = notification_hub_create_or_update_parameters_name + self.registration_ttl = registration_ttl + self.authorization_rules = authorization_rules + self.apns_credential = apns_credential + self.wns_credential = wns_credential + self.gcm_credential = gcm_credential + self.mpns_credential = mpns_credential + self.adm_credential = adm_credential + self.baidu_credential = baidu_credential diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hub_resource.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hub_resource.py index 233af3f8bce2..388cf54b763a 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hub_resource.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hub_resource.py @@ -27,9 +27,9 @@ class NotificationHubResource(Resource): :param location: Resource location :type location: str :param tags: Resource tags - :type tags: dict + :type tags: dict[str, str] :param sku: The sku of the created namespace - :type sku: :class:`Sku ` + :type sku: ~azure.mgmt.notificationhubs.models.Sku :param notification_hub_resource_name: The NotificationHub name. :type notification_hub_resource_name: str :param registration_ttl: The RegistrationTtl of the created @@ -37,35 +37,28 @@ class NotificationHubResource(Resource): :type registration_ttl: str :param authorization_rules: The AuthorizationRules of the created NotificationHub - :type authorization_rules: list of - :class:`SharedAccessAuthorizationRuleProperties - ` + :type authorization_rules: + list[~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleProperties] :param apns_credential: The ApnsCredential of the created NotificationHub - :type apns_credential: :class:`ApnsCredential - ` + :type apns_credential: ~azure.mgmt.notificationhubs.models.ApnsCredential :param wns_credential: The WnsCredential of the created NotificationHub - :type wns_credential: :class:`WnsCredential - ` + :type wns_credential: ~azure.mgmt.notificationhubs.models.WnsCredential :param gcm_credential: The GcmCredential of the created NotificationHub - :type gcm_credential: :class:`GcmCredential - ` + :type gcm_credential: ~azure.mgmt.notificationhubs.models.GcmCredential :param mpns_credential: The MpnsCredential of the created NotificationHub - :type mpns_credential: :class:`MpnsCredential - ` + :type mpns_credential: ~azure.mgmt.notificationhubs.models.MpnsCredential :param adm_credential: The AdmCredential of the created NotificationHub - :type adm_credential: :class:`AdmCredential - ` + :type adm_credential: ~azure.mgmt.notificationhubs.models.AdmCredential :param baidu_credential: The BaiduCredential of the created NotificationHub - :type baidu_credential: :class:`BaiduCredential - ` + :type baidu_credential: + ~azure.mgmt.notificationhubs.models.BaiduCredential """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'location': {'required': True}, } _attribute_map = { @@ -86,14 +79,14 @@ class NotificationHubResource(Resource): 'baidu_credential': {'key': 'properties.baiduCredential', 'type': 'BaiduCredential'}, } - def __init__(self, location, tags=None, sku=None, notification_hub_resource_name=None, registration_ttl=None, authorization_rules=None, apns_credential=None, wns_credential=None, gcm_credential=None, mpns_credential=None, adm_credential=None, baidu_credential=None): - super(NotificationHubResource, self).__init__(location=location, tags=tags, sku=sku) - self.notification_hub_resource_name = notification_hub_resource_name - self.registration_ttl = registration_ttl - self.authorization_rules = authorization_rules - self.apns_credential = apns_credential - self.wns_credential = wns_credential - self.gcm_credential = gcm_credential - self.mpns_credential = mpns_credential - self.adm_credential = adm_credential - self.baidu_credential = baidu_credential + def __init__(self, **kwargs): + super(NotificationHubResource, self).__init__(**kwargs) + self.notification_hub_resource_name = kwargs.get('notification_hub_resource_name', None) + self.registration_ttl = kwargs.get('registration_ttl', None) + self.authorization_rules = kwargs.get('authorization_rules', None) + self.apns_credential = kwargs.get('apns_credential', None) + self.wns_credential = kwargs.get('wns_credential', None) + self.gcm_credential = kwargs.get('gcm_credential', None) + self.mpns_credential = kwargs.get('mpns_credential', None) + self.adm_credential = kwargs.get('adm_credential', None) + self.baidu_credential = kwargs.get('baidu_credential', None) diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hub_resource_paged.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hub_resource_paged.py index 819adbfbd274..8ed446880895 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hub_resource_paged.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hub_resource_paged.py @@ -14,7 +14,7 @@ class NotificationHubResourcePaged(Paged): """ - A paging container for iterating over a list of NotificationHubResource object + A paging container for iterating over a list of :class:`NotificationHubResource ` object """ _attribute_map = { diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hub_resource_py3.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hub_resource_py3.py new file mode 100644 index 000000000000..d59ebe406ca3 --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hub_resource_py3.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 .resource_py3 import Resource + + +class NotificationHubResource(Resource): + """Description of a NotificationHub 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 location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The sku of the created namespace + :type sku: ~azure.mgmt.notificationhubs.models.Sku + :param notification_hub_resource_name: The NotificationHub name. + :type notification_hub_resource_name: str + :param registration_ttl: The RegistrationTtl of the created + NotificationHub + :type registration_ttl: str + :param authorization_rules: The AuthorizationRules of the created + NotificationHub + :type authorization_rules: + list[~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleProperties] + :param apns_credential: The ApnsCredential of the created NotificationHub + :type apns_credential: ~azure.mgmt.notificationhubs.models.ApnsCredential + :param wns_credential: The WnsCredential of the created NotificationHub + :type wns_credential: ~azure.mgmt.notificationhubs.models.WnsCredential + :param gcm_credential: The GcmCredential of the created NotificationHub + :type gcm_credential: ~azure.mgmt.notificationhubs.models.GcmCredential + :param mpns_credential: The MpnsCredential of the created NotificationHub + :type mpns_credential: ~azure.mgmt.notificationhubs.models.MpnsCredential + :param adm_credential: The AdmCredential of the created NotificationHub + :type adm_credential: ~azure.mgmt.notificationhubs.models.AdmCredential + :param baidu_credential: The BaiduCredential of the created + NotificationHub + :type baidu_credential: + ~azure.mgmt.notificationhubs.models.BaiduCredential + """ + + _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}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'notification_hub_resource_name': {'key': 'properties.name', 'type': 'str'}, + 'registration_ttl': {'key': 'properties.registrationTtl', 'type': 'str'}, + 'authorization_rules': {'key': 'properties.authorizationRules', 'type': '[SharedAccessAuthorizationRuleProperties]'}, + 'apns_credential': {'key': 'properties.apnsCredential', 'type': 'ApnsCredential'}, + 'wns_credential': {'key': 'properties.wnsCredential', 'type': 'WnsCredential'}, + 'gcm_credential': {'key': 'properties.gcmCredential', 'type': 'GcmCredential'}, + 'mpns_credential': {'key': 'properties.mpnsCredential', 'type': 'MpnsCredential'}, + 'adm_credential': {'key': 'properties.admCredential', 'type': 'AdmCredential'}, + 'baidu_credential': {'key': 'properties.baiduCredential', 'type': 'BaiduCredential'}, + } + + def __init__(self, *, location: str=None, tags=None, sku=None, notification_hub_resource_name: str=None, registration_ttl: str=None, authorization_rules=None, apns_credential=None, wns_credential=None, gcm_credential=None, mpns_credential=None, adm_credential=None, baidu_credential=None, **kwargs) -> None: + super(NotificationHubResource, self).__init__(location=location, tags=tags, sku=sku, **kwargs) + self.notification_hub_resource_name = notification_hub_resource_name + self.registration_ttl = registration_ttl + self.authorization_rules = authorization_rules + self.apns_credential = apns_credential + self.wns_credential = wns_credential + self.gcm_credential = gcm_credential + self.mpns_credential = mpns_credential + self.adm_credential = adm_credential + self.baidu_credential = baidu_credential diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hubs_management_client_enums.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hubs_management_client_enums.py index 22f7e592f2a4..f97b28ab81f5 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hubs_management_client_enums.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/notification_hubs_management_client_enums.py @@ -12,20 +12,20 @@ from enum import Enum -class SkuName(Enum): +class SkuName(str, Enum): free = "Free" basic = "Basic" standard = "Standard" -class NamespaceType(Enum): +class NamespaceType(str, Enum): messaging = "Messaging" notification_hub = "NotificationHub" -class AccessRights(Enum): +class AccessRights(str, Enum): manage = "Manage" send = "Send" diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/operation.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/operation.py new file mode 100644 index 000000000000..56c433b420ba --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/operation.py @@ -0,0 +1,39 @@ +# 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): + """A NotificationHubs REST API operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Operation name: {provider}/{resource}/{operation} + :vartype name: str + :param display: The object that represents the operation. + :type display: ~azure.mgmt.notificationhubs.models.OperationDisplay + """ + + _validation = { + 'name': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = kwargs.get('display', None) diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/operation_display.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/operation_display.py new file mode 100644 index 000000000000..1a0166fb286b --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/operation_display.py @@ -0,0 +1,46 @@ +# 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): + """The object that represents the operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: Service provider: Microsoft.NotificationHubs + :vartype provider: str + :ivar resource: Resource on which the operation is performed: Invoice, + etc. + :vartype resource: str + :ivar operation: Operation type: Read, write, delete, etc. + :vartype operation: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + } + + _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 = None + self.resource = None + self.operation = None diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/operation_display_py3.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/operation_display_py3.py new file mode 100644 index 000000000000..cd9b2cf5306c --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/operation_display_py3.py @@ -0,0 +1,46 @@ +# 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): + """The object that represents the operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: Service provider: Microsoft.NotificationHubs + :vartype provider: str + :ivar resource: Resource on which the operation is performed: Invoice, + etc. + :vartype resource: str + :ivar operation: Operation type: Read, write, delete, etc. + :vartype operation: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/operation_paged.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/operation_paged.py new file mode 100644 index 000000000000..3a2eba438979 --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/operation_paged.py @@ -0,0 +1,27 @@ +# 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/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/operation_py3.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/operation_py3.py new file mode 100644 index 000000000000..be95b7117c54 --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/operation_py3.py @@ -0,0 +1,39 @@ +# 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): + """A NotificationHubs REST API operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Operation name: {provider}/{resource}/{operation} + :vartype name: str + :param display: The object that represents the operation. + :type display: ~azure.mgmt.notificationhubs.models.OperationDisplay + """ + + _validation = { + 'name': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, *, display=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = display diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/pns_credentials_resource.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/pns_credentials_resource.py index 0e369f63ab8f..9e4a6a1ec3ec 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/pns_credentials_resource.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/pns_credentials_resource.py @@ -27,35 +27,29 @@ class PnsCredentialsResource(Resource): :param location: Resource location :type location: str :param tags: Resource tags - :type tags: dict + :type tags: dict[str, str] :param sku: The sku of the created namespace - :type sku: :class:`Sku ` + :type sku: ~azure.mgmt.notificationhubs.models.Sku :param apns_credential: The ApnsCredential of the created NotificationHub - :type apns_credential: :class:`ApnsCredential - ` + :type apns_credential: ~azure.mgmt.notificationhubs.models.ApnsCredential :param wns_credential: The WnsCredential of the created NotificationHub - :type wns_credential: :class:`WnsCredential - ` + :type wns_credential: ~azure.mgmt.notificationhubs.models.WnsCredential :param gcm_credential: The GcmCredential of the created NotificationHub - :type gcm_credential: :class:`GcmCredential - ` + :type gcm_credential: ~azure.mgmt.notificationhubs.models.GcmCredential :param mpns_credential: The MpnsCredential of the created NotificationHub - :type mpns_credential: :class:`MpnsCredential - ` + :type mpns_credential: ~azure.mgmt.notificationhubs.models.MpnsCredential :param adm_credential: The AdmCredential of the created NotificationHub - :type adm_credential: :class:`AdmCredential - ` + :type adm_credential: ~azure.mgmt.notificationhubs.models.AdmCredential :param baidu_credential: The BaiduCredential of the created NotificationHub - :type baidu_credential: :class:`BaiduCredential - ` + :type baidu_credential: + ~azure.mgmt.notificationhubs.models.BaiduCredential """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'location': {'required': True}, } _attribute_map = { @@ -73,11 +67,11 @@ class PnsCredentialsResource(Resource): 'baidu_credential': {'key': 'properties.baiduCredential', 'type': 'BaiduCredential'}, } - def __init__(self, location, tags=None, sku=None, apns_credential=None, wns_credential=None, gcm_credential=None, mpns_credential=None, adm_credential=None, baidu_credential=None): - super(PnsCredentialsResource, self).__init__(location=location, tags=tags, sku=sku) - self.apns_credential = apns_credential - self.wns_credential = wns_credential - self.gcm_credential = gcm_credential - self.mpns_credential = mpns_credential - self.adm_credential = adm_credential - self.baidu_credential = baidu_credential + def __init__(self, **kwargs): + super(PnsCredentialsResource, self).__init__(**kwargs) + self.apns_credential = kwargs.get('apns_credential', None) + self.wns_credential = kwargs.get('wns_credential', None) + self.gcm_credential = kwargs.get('gcm_credential', None) + self.mpns_credential = kwargs.get('mpns_credential', None) + self.adm_credential = kwargs.get('adm_credential', None) + self.baidu_credential = kwargs.get('baidu_credential', None) diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/pns_credentials_resource_py3.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/pns_credentials_resource_py3.py new file mode 100644 index 000000000000..b15189f06d4a --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/pns_credentials_resource_py3.py @@ -0,0 +1,77 @@ +# 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 PnsCredentialsResource(Resource): + """Description of a NotificationHub PNS Credentials. + + 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 sku: The sku of the created namespace + :type sku: ~azure.mgmt.notificationhubs.models.Sku + :param apns_credential: The ApnsCredential of the created NotificationHub + :type apns_credential: ~azure.mgmt.notificationhubs.models.ApnsCredential + :param wns_credential: The WnsCredential of the created NotificationHub + :type wns_credential: ~azure.mgmt.notificationhubs.models.WnsCredential + :param gcm_credential: The GcmCredential of the created NotificationHub + :type gcm_credential: ~azure.mgmt.notificationhubs.models.GcmCredential + :param mpns_credential: The MpnsCredential of the created NotificationHub + :type mpns_credential: ~azure.mgmt.notificationhubs.models.MpnsCredential + :param adm_credential: The AdmCredential of the created NotificationHub + :type adm_credential: ~azure.mgmt.notificationhubs.models.AdmCredential + :param baidu_credential: The BaiduCredential of the created + NotificationHub + :type baidu_credential: + ~azure.mgmt.notificationhubs.models.BaiduCredential + """ + + _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}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'apns_credential': {'key': 'properties.apnsCredential', 'type': 'ApnsCredential'}, + 'wns_credential': {'key': 'properties.wnsCredential', 'type': 'WnsCredential'}, + 'gcm_credential': {'key': 'properties.gcmCredential', 'type': 'GcmCredential'}, + 'mpns_credential': {'key': 'properties.mpnsCredential', 'type': 'MpnsCredential'}, + 'adm_credential': {'key': 'properties.admCredential', 'type': 'AdmCredential'}, + 'baidu_credential': {'key': 'properties.baiduCredential', 'type': 'BaiduCredential'}, + } + + def __init__(self, *, location: str=None, tags=None, sku=None, apns_credential=None, wns_credential=None, gcm_credential=None, mpns_credential=None, adm_credential=None, baidu_credential=None, **kwargs) -> None: + super(PnsCredentialsResource, self).__init__(location=location, tags=tags, sku=sku, **kwargs) + self.apns_credential = apns_credential + self.wns_credential = wns_credential + self.gcm_credential = gcm_credential + self.mpns_credential = mpns_credential + self.adm_credential = adm_credential + self.baidu_credential = baidu_credential diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/policykey_resource.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/policykey_resource.py index d9b962aa9ecd..af72abe54bd8 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/policykey_resource.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/policykey_resource.py @@ -25,5 +25,6 @@ class PolicykeyResource(Model): 'policy_key': {'key': 'policyKey', 'type': 'str'}, } - def __init__(self, policy_key=None): - self.policy_key = policy_key + def __init__(self, **kwargs): + super(PolicykeyResource, self).__init__(**kwargs) + self.policy_key = kwargs.get('policy_key', None) diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/policykey_resource_py3.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/policykey_resource_py3.py new file mode 100644 index 000000000000..e9c003053af0 --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/policykey_resource_py3.py @@ -0,0 +1,30 @@ +# 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 PolicykeyResource(Model): + """Namespace/NotificationHub Regenerate Keys. + + :param policy_key: Name of the key that has to be regenerated for the + Namespace/Notification Hub Authorization Rule. The value can be Primary + Key/Secondary Key. + :type policy_key: str + """ + + _attribute_map = { + 'policy_key': {'key': 'policyKey', 'type': 'str'}, + } + + def __init__(self, *, policy_key: str=None, **kwargs) -> None: + super(PolicykeyResource, self).__init__(**kwargs) + self.policy_key = policy_key diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/resource.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/resource.py index 3bdc4969b50b..45dfdd515b7c 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/resource.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/resource.py @@ -27,16 +27,15 @@ class Resource(Model): :param location: Resource location :type location: str :param tags: Resource tags - :type tags: dict + :type tags: dict[str, str] :param sku: The sku of the created namespace - :type sku: :class:`Sku ` + :type sku: ~azure.mgmt.notificationhubs.models.Sku """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'location': {'required': True}, } _attribute_map = { @@ -48,10 +47,11 @@ class Resource(Model): 'sku': {'key': 'sku', 'type': 'Sku'}, } - def __init__(self, location, tags=None, sku=None): + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) self.id = None self.name = None self.type = None - self.location = location - self.tags = tags - self.sku = sku + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.sku = kwargs.get('sku', None) diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/resource_list_keys.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/resource_list_keys.py index 88e8c44886f9..9ef2a841ab02 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/resource_list_keys.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/resource_list_keys.py @@ -37,9 +37,10 @@ class ResourceListKeys(Model): 'key_name': {'key': 'keyName', 'type': 'str'}, } - def __init__(self, primary_connection_string=None, secondary_connection_string=None, primary_key=None, secondary_key=None, key_name=None): - self.primary_connection_string = primary_connection_string - self.secondary_connection_string = secondary_connection_string - self.primary_key = primary_key - self.secondary_key = secondary_key - self.key_name = key_name + def __init__(self, **kwargs): + super(ResourceListKeys, self).__init__(**kwargs) + self.primary_connection_string = kwargs.get('primary_connection_string', None) + self.secondary_connection_string = kwargs.get('secondary_connection_string', None) + self.primary_key = kwargs.get('primary_key', None) + self.secondary_key = kwargs.get('secondary_key', None) + self.key_name = kwargs.get('key_name', None) diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/resource_list_keys_py3.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/resource_list_keys_py3.py new file mode 100644 index 000000000000..dbdace0ac567 --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/resource_list_keys_py3.py @@ -0,0 +1,46 @@ +# 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 ResourceListKeys(Model): + """Namespace/NotificationHub Connection String. + + :param primary_connection_string: PrimaryConnectionString of the + AuthorizationRule. + :type primary_connection_string: str + :param secondary_connection_string: SecondaryConnectionString of the + created AuthorizationRule + :type secondary_connection_string: str + :param primary_key: PrimaryKey of the created AuthorizationRule. + :type primary_key: str + :param secondary_key: SecondaryKey of the created AuthorizationRule + :type secondary_key: str + :param key_name: KeyName of the created AuthorizationRule + :type key_name: str + """ + + _attribute_map = { + 'primary_connection_string': {'key': 'primaryConnectionString', 'type': 'str'}, + 'secondary_connection_string': {'key': 'secondaryConnectionString', 'type': 'str'}, + 'primary_key': {'key': 'primaryKey', 'type': 'str'}, + 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, + 'key_name': {'key': 'keyName', 'type': 'str'}, + } + + def __init__(self, *, primary_connection_string: str=None, secondary_connection_string: str=None, primary_key: str=None, secondary_key: str=None, key_name: str=None, **kwargs) -> None: + super(ResourceListKeys, self).__init__(**kwargs) + self.primary_connection_string = primary_connection_string + self.secondary_connection_string = secondary_connection_string + self.primary_key = primary_key + self.secondary_key = secondary_key + self.key_name = key_name diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/resource_py3.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/resource_py3.py new file mode 100644 index 000000000000..7d5987763ec1 --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/resource_py3.py @@ -0,0 +1,57 @@ +# 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): + """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 location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The sku of the created namespace + :type sku: ~azure.mgmt.notificationhubs.models.Sku + """ + + _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}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, *, location: str=None, tags=None, sku=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags + self.sku = sku diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_create_or_update_parameters.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_create_or_update_parameters.py index e78d2d18e760..8c3afbcb2483 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_create_or_update_parameters.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_create_or_update_parameters.py @@ -9,50 +9,28 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from msrest.serialization import Model -class SharedAccessAuthorizationRuleCreateOrUpdateParameters(Resource): +class SharedAccessAuthorizationRuleCreateOrUpdateParameters(Model): """Parameters supplied to the CreateOrUpdate Namespace AuthorizationRules. - 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 - :param sku: The sku of the created namespace - :type sku: :class:`Sku ` - :param properties: Properties of the Namespace AuthorizationRules. - :type properties: :class:`SharedAccessAuthorizationRuleProperties - ` + All required parameters must be populated in order to send to Azure. + + :param properties: Required. Properties of the Namespace + AuthorizationRules. + :type properties: + ~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleProperties """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, 'properties': {'required': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, 'properties': {'key': 'properties', 'type': 'SharedAccessAuthorizationRuleProperties'}, } - def __init__(self, location, properties, tags=None, sku=None): - super(SharedAccessAuthorizationRuleCreateOrUpdateParameters, self).__init__(location=location, tags=tags, sku=sku) - self.properties = properties + def __init__(self, **kwargs): + super(SharedAccessAuthorizationRuleCreateOrUpdateParameters, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_create_or_update_parameters_py3.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_create_or_update_parameters_py3.py new file mode 100644 index 000000000000..0d11ff3e2506 --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_create_or_update_parameters_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SharedAccessAuthorizationRuleCreateOrUpdateParameters(Model): + """Parameters supplied to the CreateOrUpdate Namespace AuthorizationRules. + + All required parameters must be populated in order to send to Azure. + + :param properties: Required. Properties of the Namespace + AuthorizationRules. + :type properties: + ~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleProperties + """ + + _validation = { + 'properties': {'required': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'SharedAccessAuthorizationRuleProperties'}, + } + + def __init__(self, *, properties, **kwargs) -> None: + super(SharedAccessAuthorizationRuleCreateOrUpdateParameters, self).__init__(**kwargs) + self.properties = properties diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_list_result.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_list_result.py new file mode 100644 index 000000000000..ccefda05d86a --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_list_result.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SharedAccessAuthorizationRuleListResult(Model): + """The response of the List Namespace operation. + + :param value: Result of the List AuthorizationRules operation. + :type value: + list[~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleResource] + :param next_link: Link to the next set of results. Not empty if Value + contains incomplete list of AuthorizationRules + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SharedAccessAuthorizationRuleResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SharedAccessAuthorizationRuleListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_list_result_py3.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_list_result_py3.py new file mode 100644 index 000000000000..986431f0b8c1 --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_list_result_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SharedAccessAuthorizationRuleListResult(Model): + """The response of the List Namespace operation. + + :param value: Result of the List AuthorizationRules operation. + :type value: + list[~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleResource] + :param next_link: Link to the next set of results. Not empty if Value + contains incomplete list of AuthorizationRules + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SharedAccessAuthorizationRuleResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, value=None, next_link: str=None, **kwargs) -> None: + super(SharedAccessAuthorizationRuleListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_properties.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_properties.py index bdde83a7c416..336a9b615e2e 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_properties.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_properties.py @@ -15,14 +15,63 @@ class SharedAccessAuthorizationRuleProperties(Model): """SharedAccessAuthorizationRule properties. + Variables are only populated by the server, and will be ignored when + sending a request. + :param rights: The rights associated with the rule. - :type rights: list of str or :class:`AccessRights - ` + :type rights: list[str or + ~azure.mgmt.notificationhubs.models.AccessRights] + :ivar primary_key: A base64-encoded 256-bit primary key for signing and + validating the SAS token. + :vartype primary_key: str + :ivar secondary_key: A base64-encoded 256-bit primary key for signing and + validating the SAS token. + :vartype secondary_key: str + :ivar key_name: A string that describes the authorization rule. + :vartype key_name: str + :ivar claim_type: A string that describes the claim type + :vartype claim_type: str + :ivar claim_value: A string that describes the claim value + :vartype claim_value: str + :ivar modified_time: The last modified time for this rule + :vartype modified_time: str + :ivar created_time: The created time for this rule + :vartype created_time: str + :ivar revision: The revision number for the rule + :vartype revision: int """ + _validation = { + 'primary_key': {'readonly': True}, + 'secondary_key': {'readonly': True}, + 'key_name': {'readonly': True}, + 'claim_type': {'readonly': True}, + 'claim_value': {'readonly': True}, + 'modified_time': {'readonly': True}, + 'created_time': {'readonly': True}, + 'revision': {'readonly': True}, + } + _attribute_map = { 'rights': {'key': 'rights', 'type': '[AccessRights]'}, + 'primary_key': {'key': 'primaryKey', 'type': 'str'}, + 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, + 'key_name': {'key': 'keyName', 'type': 'str'}, + 'claim_type': {'key': 'claimType', 'type': 'str'}, + 'claim_value': {'key': 'claimValue', 'type': 'str'}, + 'modified_time': {'key': 'modifiedTime', 'type': 'str'}, + 'created_time': {'key': 'createdTime', 'type': 'str'}, + 'revision': {'key': 'revision', 'type': 'int'}, } - def __init__(self, rights=None): - self.rights = rights + def __init__(self, **kwargs): + super(SharedAccessAuthorizationRuleProperties, self).__init__(**kwargs) + self.rights = kwargs.get('rights', None) + self.primary_key = None + self.secondary_key = None + self.key_name = None + self.claim_type = None + self.claim_value = None + self.modified_time = None + self.created_time = None + self.revision = None diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_properties_py3.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_properties_py3.py new file mode 100644 index 000000000000..9b220d462436 --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_properties_py3.py @@ -0,0 +1,77 @@ +# 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 SharedAccessAuthorizationRuleProperties(Model): + """SharedAccessAuthorizationRule properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param rights: The rights associated with the rule. + :type rights: list[str or + ~azure.mgmt.notificationhubs.models.AccessRights] + :ivar primary_key: A base64-encoded 256-bit primary key for signing and + validating the SAS token. + :vartype primary_key: str + :ivar secondary_key: A base64-encoded 256-bit primary key for signing and + validating the SAS token. + :vartype secondary_key: str + :ivar key_name: A string that describes the authorization rule. + :vartype key_name: str + :ivar claim_type: A string that describes the claim type + :vartype claim_type: str + :ivar claim_value: A string that describes the claim value + :vartype claim_value: str + :ivar modified_time: The last modified time for this rule + :vartype modified_time: str + :ivar created_time: The created time for this rule + :vartype created_time: str + :ivar revision: The revision number for the rule + :vartype revision: int + """ + + _validation = { + 'primary_key': {'readonly': True}, + 'secondary_key': {'readonly': True}, + 'key_name': {'readonly': True}, + 'claim_type': {'readonly': True}, + 'claim_value': {'readonly': True}, + 'modified_time': {'readonly': True}, + 'created_time': {'readonly': True}, + 'revision': {'readonly': True}, + } + + _attribute_map = { + 'rights': {'key': 'rights', 'type': '[AccessRights]'}, + 'primary_key': {'key': 'primaryKey', 'type': 'str'}, + 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, + 'key_name': {'key': 'keyName', 'type': 'str'}, + 'claim_type': {'key': 'claimType', 'type': 'str'}, + 'claim_value': {'key': 'claimValue', 'type': 'str'}, + 'modified_time': {'key': 'modifiedTime', 'type': 'str'}, + 'created_time': {'key': 'createdTime', 'type': 'str'}, + 'revision': {'key': 'revision', 'type': 'int'}, + } + + def __init__(self, *, rights=None, **kwargs) -> None: + super(SharedAccessAuthorizationRuleProperties, self).__init__(**kwargs) + self.rights = rights + self.primary_key = None + self.secondary_key = None + self.key_name = None + self.claim_type = None + self.claim_value = None + self.modified_time = None + self.created_time = None + self.revision = None diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_resource.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_resource.py index ae02f11ffdd7..b7dbba779637 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_resource.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_resource.py @@ -27,19 +27,44 @@ class SharedAccessAuthorizationRuleResource(Resource): :param location: Resource location :type location: str :param tags: Resource tags - :type tags: dict + :type tags: dict[str, str] :param sku: The sku of the created namespace - :type sku: :class:`Sku ` + :type sku: ~azure.mgmt.notificationhubs.models.Sku :param rights: The rights associated with the rule. - :type rights: list of str or :class:`AccessRights - ` + :type rights: list[str or + ~azure.mgmt.notificationhubs.models.AccessRights] + :ivar primary_key: A base64-encoded 256-bit primary key for signing and + validating the SAS token. + :vartype primary_key: str + :ivar secondary_key: A base64-encoded 256-bit primary key for signing and + validating the SAS token. + :vartype secondary_key: str + :ivar key_name: A string that describes the authorization rule. + :vartype key_name: str + :ivar claim_type: A string that describes the claim type + :vartype claim_type: str + :ivar claim_value: A string that describes the claim value + :vartype claim_value: str + :ivar modified_time: The last modified time for this rule + :vartype modified_time: str + :ivar created_time: The created time for this rule + :vartype created_time: str + :ivar revision: The revision number for the rule + :vartype revision: int """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'location': {'required': True}, + 'primary_key': {'readonly': True}, + 'secondary_key': {'readonly': True}, + 'key_name': {'readonly': True}, + 'claim_type': {'readonly': True}, + 'claim_value': {'readonly': True}, + 'modified_time': {'readonly': True}, + 'created_time': {'readonly': True}, + 'revision': {'readonly': True}, } _attribute_map = { @@ -50,8 +75,24 @@ class SharedAccessAuthorizationRuleResource(Resource): 'tags': {'key': 'tags', 'type': '{str}'}, 'sku': {'key': 'sku', 'type': 'Sku'}, 'rights': {'key': 'properties.rights', 'type': '[AccessRights]'}, + 'primary_key': {'key': 'properties.primaryKey', 'type': 'str'}, + 'secondary_key': {'key': 'properties.secondaryKey', 'type': 'str'}, + 'key_name': {'key': 'properties.keyName', 'type': 'str'}, + 'claim_type': {'key': 'properties.claimType', 'type': 'str'}, + 'claim_value': {'key': 'properties.claimValue', 'type': 'str'}, + 'modified_time': {'key': 'properties.modifiedTime', 'type': 'str'}, + 'created_time': {'key': 'properties.createdTime', 'type': 'str'}, + 'revision': {'key': 'properties.revision', 'type': 'int'}, } - def __init__(self, location, tags=None, sku=None, rights=None): - super(SharedAccessAuthorizationRuleResource, self).__init__(location=location, tags=tags, sku=sku) - self.rights = rights + def __init__(self, **kwargs): + super(SharedAccessAuthorizationRuleResource, self).__init__(**kwargs) + self.rights = kwargs.get('rights', None) + self.primary_key = None + self.secondary_key = None + self.key_name = None + self.claim_type = None + self.claim_value = None + self.modified_time = None + self.created_time = None + self.revision = None diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_resource_paged.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_resource_paged.py index fe48ca7f9450..76ef1c177995 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_resource_paged.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_resource_paged.py @@ -14,7 +14,7 @@ class SharedAccessAuthorizationRuleResourcePaged(Paged): """ - A paging container for iterating over a list of SharedAccessAuthorizationRuleResource object + A paging container for iterating over a list of :class:`SharedAccessAuthorizationRuleResource ` object """ _attribute_map = { diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_resource_py3.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_resource_py3.py new file mode 100644 index 000000000000..13fd38bed3f6 --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/shared_access_authorization_rule_resource_py3.py @@ -0,0 +1,98 @@ +# 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 SharedAccessAuthorizationRuleResource(Resource): + """Description of a Namespace AuthorizationRules. + + 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 sku: The sku of the created namespace + :type sku: ~azure.mgmt.notificationhubs.models.Sku + :param rights: The rights associated with the rule. + :type rights: list[str or + ~azure.mgmt.notificationhubs.models.AccessRights] + :ivar primary_key: A base64-encoded 256-bit primary key for signing and + validating the SAS token. + :vartype primary_key: str + :ivar secondary_key: A base64-encoded 256-bit primary key for signing and + validating the SAS token. + :vartype secondary_key: str + :ivar key_name: A string that describes the authorization rule. + :vartype key_name: str + :ivar claim_type: A string that describes the claim type + :vartype claim_type: str + :ivar claim_value: A string that describes the claim value + :vartype claim_value: str + :ivar modified_time: The last modified time for this rule + :vartype modified_time: str + :ivar created_time: The created time for this rule + :vartype created_time: str + :ivar revision: The revision number for the rule + :vartype revision: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'primary_key': {'readonly': True}, + 'secondary_key': {'readonly': True}, + 'key_name': {'readonly': True}, + 'claim_type': {'readonly': True}, + 'claim_value': {'readonly': True}, + 'modified_time': {'readonly': True}, + 'created_time': {'readonly': True}, + 'revision': {'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}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'rights': {'key': 'properties.rights', 'type': '[AccessRights]'}, + 'primary_key': {'key': 'properties.primaryKey', 'type': 'str'}, + 'secondary_key': {'key': 'properties.secondaryKey', 'type': 'str'}, + 'key_name': {'key': 'properties.keyName', 'type': 'str'}, + 'claim_type': {'key': 'properties.claimType', 'type': 'str'}, + 'claim_value': {'key': 'properties.claimValue', 'type': 'str'}, + 'modified_time': {'key': 'properties.modifiedTime', 'type': 'str'}, + 'created_time': {'key': 'properties.createdTime', 'type': 'str'}, + 'revision': {'key': 'properties.revision', 'type': 'int'}, + } + + def __init__(self, *, location: str=None, tags=None, sku=None, rights=None, **kwargs) -> None: + super(SharedAccessAuthorizationRuleResource, self).__init__(location=location, tags=tags, sku=sku, **kwargs) + self.rights = rights + self.primary_key = None + self.secondary_key = None + self.key_name = None + self.claim_type = None + self.claim_value = None + self.modified_time = None + self.created_time = None + self.revision = None diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/sku.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/sku.py index d3bb894af55f..028ddb22359b 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/sku.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/sku.py @@ -15,10 +15,11 @@ class Sku(Model): """The Sku description for a namespace. - :param name: Name of the notification hub sku. Possible values include: - 'Free', 'Basic', 'Standard' - :type name: str or :class:`SkuName - ` + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the notification hub sku. Possible values + include: 'Free', 'Basic', 'Standard' + :type name: str or ~azure.mgmt.notificationhubs.models.SkuName :param tier: The tier of particular sku :type tier: str :param size: The Sku size @@ -41,9 +42,10 @@ class Sku(Model): 'capacity': {'key': 'capacity', 'type': 'int'}, } - def __init__(self, name, tier=None, size=None, family=None, capacity=None): - self.name = name - self.tier = tier - self.size = size - self.family = family - self.capacity = capacity + def __init__(self, **kwargs): + super(Sku, 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) diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/sku_py3.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/sku_py3.py new file mode 100644 index 000000000000..39a4d9f98808 --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/sku_py3.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Sku(Model): + """The Sku description for a namespace. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the notification hub sku. Possible values + include: 'Free', 'Basic', 'Standard' + :type name: str or ~azure.mgmt.notificationhubs.models.SkuName + :param tier: The tier of particular sku + :type tier: str + :param size: The Sku size + :type size: str + :param family: The Sku Family + :type family: str + :param capacity: The capacity of the resource + :type capacity: int + """ + + _validation = { + 'name': {'required': True}, + } + + _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': 'int'}, + } + + def __init__(self, *, name, tier: str=None, size: str=None, family: str=None, capacity: int=None, **kwargs) -> None: + super(Sku, self).__init__(**kwargs) + self.name = name + self.tier = tier + self.size = size + self.family = family + self.capacity = capacity diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/sub_resource.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/sub_resource.py index e77acb8015b2..11e092cc6ff5 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/sub_resource.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/sub_resource.py @@ -23,5 +23,6 @@ class SubResource(Model): 'id': {'key': 'id', 'type': 'str'}, } - def __init__(self, id=None): - self.id = id + def __init__(self, **kwargs): + super(SubResource, self).__init__(**kwargs) + self.id = kwargs.get('id', None) diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/sub_resource_py3.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/sub_resource_py3.py new file mode 100644 index 000000000000..29e5afee38f9 --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/sub_resource_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SubResource(Model): + """SubResource. + + :param id: Resource Id + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(SubResource, self).__init__(**kwargs) + self.id = id diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/wns_credential.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/wns_credential.py index c1efcc25b81d..4dc2f88e62f9 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/wns_credential.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/wns_credential.py @@ -29,7 +29,8 @@ class WnsCredential(Model): 'windows_live_endpoint': {'key': 'properties.windowsLiveEndpoint', 'type': 'str'}, } - def __init__(self, package_sid=None, secret_key=None, windows_live_endpoint=None): - self.package_sid = package_sid - self.secret_key = secret_key - self.windows_live_endpoint = windows_live_endpoint + def __init__(self, **kwargs): + super(WnsCredential, self).__init__(**kwargs) + self.package_sid = kwargs.get('package_sid', None) + self.secret_key = kwargs.get('secret_key', None) + self.windows_live_endpoint = kwargs.get('windows_live_endpoint', None) diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/wns_credential_py3.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/wns_credential_py3.py new file mode 100644 index 000000000000..104b788a1f68 --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/wns_credential_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class WnsCredential(Model): + """Description of a NotificationHub WnsCredential. + + :param package_sid: The package ID for this credential. + :type package_sid: str + :param secret_key: The secret key. + :type secret_key: str + :param windows_live_endpoint: The Windows Live endpoint. + :type windows_live_endpoint: str + """ + + _attribute_map = { + 'package_sid': {'key': 'properties.packageSid', 'type': 'str'}, + 'secret_key': {'key': 'properties.secretKey', 'type': 'str'}, + 'windows_live_endpoint': {'key': 'properties.windowsLiveEndpoint', 'type': 'str'}, + } + + def __init__(self, *, package_sid: str=None, secret_key: str=None, windows_live_endpoint: str=None, **kwargs) -> None: + super(WnsCredential, self).__init__(**kwargs) + self.package_sid = package_sid + self.secret_key = secret_key + self.windows_live_endpoint = windows_live_endpoint diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/notification_hubs_management_client.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/notification_hubs_management_client.py index 4b2d63604aa0..8ffd380593cc 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/notification_hubs_management_client.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/notification_hubs_management_client.py @@ -9,14 +9,13 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import ServiceClient +from msrest.service_client import SDKClient from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION +from .operations.operations import Operations from .operations.namespaces_operations import NamespacesOperations -from .operations.name_operations import NameOperations from .operations.notification_hubs_operations import NotificationHubsOperations -from .operations.hubs_operations import HubsOperations from . import models @@ -42,34 +41,30 @@ def __init__( raise ValueError("Parameter 'credentials' must not be None.") if subscription_id is None: raise ValueError("Parameter 'subscription_id' must not be None.") - if not isinstance(subscription_id, str): - raise TypeError("Parameter 'subscription_id' must be str.") if not base_url: base_url = 'https://management.azure.com' super(NotificationHubsManagementClientConfiguration, self).__init__(base_url) - self.add_user_agent('notificationhubsmanagementclient/{}'.format(VERSION)) + self.add_user_agent('azure-mgmt-notificationhubs/{}'.format(VERSION)) self.add_user_agent('Azure-SDK-For-Python') self.credentials = credentials self.subscription_id = subscription_id -class NotificationHubsManagementClient(object): +class NotificationHubsManagementClient(SDKClient): """Azure NotificationHub client :ivar config: Configuration for client. :vartype config: NotificationHubsManagementClientConfiguration + :ivar operations: Operations operations + :vartype operations: azure.mgmt.notificationhubs.operations.Operations :ivar namespaces: Namespaces operations :vartype namespaces: azure.mgmt.notificationhubs.operations.NamespacesOperations - :ivar name: Name operations - :vartype name: azure.mgmt.notificationhubs.operations.NameOperations :ivar notification_hubs: NotificationHubs operations :vartype notification_hubs: azure.mgmt.notificationhubs.operations.NotificationHubsOperations - :ivar hubs: Hubs operations - :vartype hubs: azure.mgmt.notificationhubs.operations.HubsOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -85,18 +80,16 @@ def __init__( self, credentials, subscription_id, base_url=None): self.config = NotificationHubsManagementClientConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) + super(NotificationHubsManagementClient, 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 = '2017-04-01' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) - self.namespaces = NamespacesOperations( + self.operations = Operations( self._client, self.config, self._serialize, self._deserialize) - self.name = NameOperations( + self.namespaces = NamespacesOperations( self._client, self.config, self._serialize, self._deserialize) self.notification_hubs = NotificationHubsOperations( self._client, self.config, self._serialize, self._deserialize) - self.hubs = HubsOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/__init__.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/__init__.py index 16ffcc7b2d4a..a81c5ff50e13 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/__init__.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/__init__.py @@ -9,14 +9,12 @@ # regenerated. # -------------------------------------------------------------------------- +from .operations import Operations from .namespaces_operations import NamespacesOperations -from .name_operations import NameOperations from .notification_hubs_operations import NotificationHubsOperations -from .hubs_operations import HubsOperations __all__ = [ + 'Operations', 'NamespacesOperations', - 'NameOperations', 'NotificationHubsOperations', - 'HubsOperations', ] diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/namespaces_operations.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/namespaces_operations.py index 501e5ec14e28..066abe6ebc22 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/namespaces_operations.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/namespaces_operations.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -from msrestazure.azure_operation import AzureOperationPoller -import uuid +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -23,10 +24,12 @@ class NamespacesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2017-04-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -43,21 +46,20 @@ def check_availability( on the service namespace name. :param parameters: The namespace name. - :type parameters: :class:`CheckAvailabilityParameters - ` + :type parameters: + ~azure.mgmt.notificationhubs.models.CheckAvailabilityParameters :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`. - :rtype: :class:`CheckAvailabilityResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: CheckAvailabilityResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.notificationhubs.models.CheckAvailabilityResult or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.NotificationHubs/checkNamespaceAvailability' + url = self.check_availability.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -83,7 +85,7 @@ def check_availability( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -100,6 +102,7 @@ def check_availability( return client_raw_response return deserialized + check_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.NotificationHubs/checkNamespaceAvailability'} def create_or_update( self, resource_group_name, namespace_name, parameters, custom_headers=None, raw=False, **operation_config): @@ -111,21 +114,20 @@ def create_or_update( :param namespace_name: The namespace name. :type namespace_name: str :param parameters: Parameters supplied to create a Namespace Resource. - :type parameters: :class:`NamespaceCreateOrUpdateParameters - ` + :type parameters: + ~azure.mgmt.notificationhubs.models.NamespaceCreateOrUpdateParameters :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`. - :rtype: :class:`NamespaceResource - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: NamespaceResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.notificationhubs.models.NamespaceResource or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), @@ -153,25 +155,26 @@ def create_or_update( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) - if response.status_code not in [201, 200]: + 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 == 201: - deserialized = self._deserialize('NamespaceResource', response) if response.status_code == 200: deserialized = self._deserialize('NamespaceResource', response) + if response.status_code == 201: + deserialized = self._deserialize('NamespaceResource', 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.NotificationHubs/namespaces/{namespaceName}'} def patch( self, resource_group_name, namespace_name, tags=None, sku=None, custom_headers=None, raw=False, **operation_config): @@ -182,24 +185,23 @@ def patch( :param namespace_name: The namespace name. :type namespace_name: str :param tags: Resource tags - :type tags: dict + :type tags: dict[str, str] :param sku: The sku of the created namespace - :type sku: :class:`Sku ` + :type sku: ~azure.mgmt.notificationhubs.models.Sku :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`. - :rtype: :class:`NamespaceResource - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: NamespaceResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.notificationhubs.models.NamespaceResource or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ parameters = models.NamespacePatchParameters(tags=tags, sku=sku) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}' + url = self.patch.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), @@ -227,7 +229,7 @@ def patch( # Construct and send request request = self._client.patch(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -244,28 +246,13 @@ def patch( return client_raw_response return deserialized + patch.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}'} - def delete( - self, resource_group_name, namespace_name, custom_headers=None, raw=False, **operation_config): - """Deletes an existing namespace. This operation also removes all - associated notificationHubs under the namespace. - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param namespace_name: The namespace name. - :type namespace_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 - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ + def _delete_initial( + self, resource_group_name, namespace_name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}' + url = self.delete.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), @@ -288,40 +275,59 @@ def delete( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - def long_running_send(): - - request = self._client.delete(url, query_parameters) - return self._client.send(request, header_parameters, **operation_config) + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) - def get_long_running_status(status_link, headers=None): + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response - def get_long_running_output(response): + def delete( + self, resource_group_name, namespace_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes an existing namespace. This operation also removes all + associated notificationHubs under the namespace. - if response.status_code not in [204, 200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param namespace_name: The namespace name. + :type namespace_name: str + :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 None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + namespace_name=namespace_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + def get_long_running_output(response): if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, 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) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}'} def get( self, resource_group_name, namespace_name, custom_headers=None, raw=False, **operation_config): @@ -336,14 +342,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`NamespaceResource - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: NamespaceResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.notificationhubs.models.NamespaceResource or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}' + url = self.get.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), @@ -367,7 +372,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -384,9 +389,10 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}'} def create_or_update_authorization_rule( - self, resource_group_name, namespace_name, authorization_rule_name, parameters, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, namespace_name, authorization_rule_name, properties, custom_headers=None, raw=False, **operation_config): """Creates an authorization rule for a namespace. :param resource_group_name: The name of the resource group. @@ -395,23 +401,25 @@ def create_or_update_authorization_rule( :type namespace_name: str :param authorization_rule_name: Aauthorization Rule Name. :type authorization_rule_name: str - :param parameters: The shared access authorization rule. - :type parameters: - :class:`SharedAccessAuthorizationRuleCreateOrUpdateParameters - ` + :param properties: Properties of the Namespace AuthorizationRules. + :type properties: + ~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleProperties :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`. - :rtype: :class:`SharedAccessAuthorizationRuleResource - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: SharedAccessAuthorizationRuleResource or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleResource + or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ + parameters = models.SharedAccessAuthorizationRuleCreateOrUpdateParameters(properties=properties) + # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}' + url = self.create_or_update_authorization_rule.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), @@ -440,7 +448,7 @@ def create_or_update_authorization_rule( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -457,6 +465,7 @@ def create_or_update_authorization_rule( return client_raw_response return deserialized + create_or_update_authorization_rule.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}'} def delete_authorization_rule( self, resource_group_name, namespace_name, authorization_rule_name, custom_headers=None, raw=False, **operation_config): @@ -473,13 +482,12 @@ def delete_authorization_rule( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}' + url = self.delete_authorization_rule.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), @@ -504,9 +512,9 @@ def delete_authorization_rule( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) - if response.status_code not in [204, 200]: + if response.status_code not in [200, 204]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -514,6 +522,7 @@ def delete_authorization_rule( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete_authorization_rule.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}'} def get_authorization_rule( self, resource_group_name, namespace_name, authorization_rule_name, custom_headers=None, raw=False, **operation_config): @@ -530,14 +539,15 @@ def get_authorization_rule( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`SharedAccessAuthorizationRuleResource - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: SharedAccessAuthorizationRuleResource or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleResource + or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}' + url = self.get_authorization_rule.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), @@ -562,7 +572,7 @@ def get_authorization_rule( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -579,6 +589,7 @@ def get_authorization_rule( return client_raw_response return deserialized + get_authorization_rule.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}'} def list( self, resource_group_name, custom_headers=None, raw=False, **operation_config): @@ -593,15 +604,16 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`NamespaceResourcePaged - ` + :return: An iterator like instance of NamespaceResource + :rtype: + ~azure.mgmt.notificationhubs.models.NamespaceResourcePaged[~azure.mgmt.notificationhubs.models.NamespaceResource] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces' + url = self.list.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -629,7 +641,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -647,6 +659,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces'} def list_all( self, custom_headers=None, raw=False, **operation_config): @@ -658,15 +671,16 @@ def list_all( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`NamespaceResourcePaged - ` + :return: An iterator like instance of NamespaceResource + :rtype: + ~azure.mgmt.notificationhubs.models.NamespaceResourcePaged[~azure.mgmt.notificationhubs.models.NamespaceResource] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.NotificationHubs/namespaces' + url = self.list_all.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -693,7 +707,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -711,6 +725,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.NotificationHubs/namespaces'} def list_authorization_rules( self, resource_group_name, namespace_name, custom_headers=None, raw=False, **operation_config): @@ -725,15 +740,17 @@ def list_authorization_rules( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`SharedAccessAuthorizationRuleResourcePaged - ` + :return: An iterator like instance of + SharedAccessAuthorizationRuleResource + :rtype: + ~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleResourcePaged[~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleResource] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/AuthorizationRules' + url = self.list_authorization_rules.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), @@ -762,7 +779,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -780,6 +797,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_authorization_rules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/AuthorizationRules'} def list_keys( self, resource_group_name, namespace_name, authorization_rule_name, custom_headers=None, raw=False, **operation_config): @@ -797,14 +815,15 @@ def list_keys( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`ResourceListKeys - ` - :rtype: :class:`ClientRawResponse` + :return: SharedAccessAuthorizationRuleListResult or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleListResult + or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/listKeys' + url = self.list_keys.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), @@ -829,7 +848,7 @@ def list_keys( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -839,13 +858,14 @@ def list_keys( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ResourceListKeys', response) + deserialized = self._deserialize('SharedAccessAuthorizationRuleListResult', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized + list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/listKeys'} def regenerate_keys( self, resource_group_name, namespace_name, authorization_rule_name, policy_key=None, custom_headers=None, raw=False, **operation_config): @@ -868,16 +888,15 @@ def regenerate_keys( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`ResourceListKeys - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: ResourceListKeys or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.notificationhubs.models.ResourceListKeys or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ parameters = models.PolicykeyResource(policy_key=policy_key) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/regenerateKeys' + url = self.regenerate_keys.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), @@ -906,7 +925,7 @@ def regenerate_keys( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -923,3 +942,4 @@ def regenerate_keys( return client_raw_response return deserialized + regenerate_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/regenerateKeys'} diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/notification_hubs_operations.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/notification_hubs_operations.py index f9a3e086e722..d81cee2faf2e 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/notification_hubs_operations.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/notification_hubs_operations.py @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -import uuid from .. import models @@ -22,10 +22,12 @@ class NotificationHubsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2017-04-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -35,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config - def check_availability( + def check_notification_hub_availability( self, resource_group_name, namespace_name, parameters, custom_headers=None, raw=False, **operation_config): """Checks the availability of the given notificationHub in a namespace. @@ -44,21 +46,20 @@ def check_availability( :param namespace_name: The namespace name. :type namespace_name: str :param parameters: The notificationHub name. - :type parameters: :class:`CheckAvailabilityParameters - ` + :type parameters: + ~azure.mgmt.notificationhubs.models.CheckAvailabilityParameters :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`. - :rtype: :class:`CheckAvailabilityResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: CheckAvailabilityResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.notificationhubs.models.CheckAvailabilityResult or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/checkNotificationHubAvailability' + url = self.check_notification_hub_availability.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), @@ -86,7 +87,7 @@ def check_availability( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -103,6 +104,7 @@ def check_availability( return client_raw_response return deserialized + check_notification_hub_availability.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/checkNotificationHubAvailability'} def create_or_update( self, resource_group_name, namespace_name, notification_hub_name, parameters, custom_headers=None, raw=False, **operation_config): @@ -116,21 +118,20 @@ def create_or_update( :type notification_hub_name: str :param parameters: Parameters supplied to the create/update a NotificationHub Resource. - :type parameters: :class:`NotificationHubCreateOrUpdateParameters - ` + :type parameters: + ~azure.mgmt.notificationhubs.models.NotificationHubCreateOrUpdateParameters :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`. - :rtype: :class:`NotificationHubResource - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: NotificationHubResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.notificationhubs.models.NotificationHubResource or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), @@ -159,7 +160,7 @@ def create_or_update( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -178,6 +179,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}'} def delete( self, resource_group_name, namespace_name, notification_hub_name, custom_headers=None, raw=False, **operation_config): @@ -194,13 +196,12 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}' + url = self.delete.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), @@ -225,7 +226,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -235,6 +236,7 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}'} def get( self, resource_group_name, namespace_name, notification_hub_name, custom_headers=None, raw=False, **operation_config): @@ -251,14 +253,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`NotificationHubResource - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: NotificationHubResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.notificationhubs.models.NotificationHubResource or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}' + url = self.get.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), @@ -283,7 +284,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -300,9 +301,10 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}'} def create_or_update_authorization_rule( - self, resource_group_name, namespace_name, notification_hub_name, authorization_rule_name, parameters, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, namespace_name, notification_hub_name, authorization_rule_name, properties, custom_headers=None, raw=False, **operation_config): """Creates/Updates an authorization rule for a NotificationHub. :param resource_group_name: The name of the resource group. @@ -313,23 +315,25 @@ def create_or_update_authorization_rule( :type notification_hub_name: str :param authorization_rule_name: Authorization Rule Name. :type authorization_rule_name: str - :param parameters: The shared access authorization rule. - :type parameters: - :class:`SharedAccessAuthorizationRuleCreateOrUpdateParameters - ` + :param properties: Properties of the Namespace AuthorizationRules. + :type properties: + ~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleProperties :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`. - :rtype: :class:`SharedAccessAuthorizationRuleResource - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: SharedAccessAuthorizationRuleResource or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleResource + or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ + parameters = models.SharedAccessAuthorizationRuleCreateOrUpdateParameters(properties=properties) + # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}/AuthorizationRules/{authorizationRuleName}' + url = self.create_or_update_authorization_rule.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), @@ -359,7 +363,7 @@ def create_or_update_authorization_rule( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -376,6 +380,7 @@ def create_or_update_authorization_rule( return client_raw_response return deserialized + create_or_update_authorization_rule.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}/AuthorizationRules/{authorizationRuleName}'} def delete_authorization_rule( self, resource_group_name, namespace_name, notification_hub_name, authorization_rule_name, custom_headers=None, raw=False, **operation_config): @@ -394,13 +399,12 @@ def delete_authorization_rule( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}/AuthorizationRules/{authorizationRuleName}' + url = self.delete_authorization_rule.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), @@ -426,9 +430,9 @@ def delete_authorization_rule( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) - if response.status_code not in [204, 200]: + if response.status_code not in [200, 204]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -436,6 +440,7 @@ def delete_authorization_rule( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete_authorization_rule.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}/AuthorizationRules/{authorizationRuleName}'} def get_authorization_rule( self, resource_group_name, namespace_name, notification_hub_name, authorization_rule_name, custom_headers=None, raw=False, **operation_config): @@ -454,14 +459,15 @@ def get_authorization_rule( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`SharedAccessAuthorizationRuleResource - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: SharedAccessAuthorizationRuleResource or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleResource + or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}/AuthorizationRules/{authorizationRuleName}' + url = self.get_authorization_rule.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), @@ -487,7 +493,7 @@ def get_authorization_rule( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -504,6 +510,7 @@ def get_authorization_rule( return client_raw_response return deserialized + get_authorization_rule.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}/AuthorizationRules/{authorizationRuleName}'} def list( self, resource_group_name, namespace_name, custom_headers=None, raw=False, **operation_config): @@ -518,15 +525,16 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`NotificationHubResourcePaged - ` + :return: An iterator like instance of NotificationHubResource + :rtype: + ~azure.mgmt.notificationhubs.models.NotificationHubResourcePaged[~azure.mgmt.notificationhubs.models.NotificationHubResource] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs' + url = self.list.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), @@ -555,7 +563,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -573,6 +581,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs'} def list_authorization_rules( self, resource_group_name, namespace_name, notification_hub_name, custom_headers=None, raw=False, **operation_config): @@ -589,15 +598,17 @@ def list_authorization_rules( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`SharedAccessAuthorizationRuleResourcePaged - ` + :return: An iterator like instance of + SharedAccessAuthorizationRuleResource + :rtype: + ~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleResourcePaged[~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleResource] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}/AuthorizationRules' + url = self.list_authorization_rules.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), @@ -627,7 +638,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -645,6 +656,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_authorization_rules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}/AuthorizationRules'} def list_keys( self, resource_group_name, namespace_name, notification_hub_name, authorization_rule_name, custom_headers=None, raw=False, **operation_config): @@ -665,14 +677,13 @@ def list_keys( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`ResourceListKeys - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: ResourceListKeys or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.notificationhubs.models.ResourceListKeys or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}/AuthorizationRules/{authorizationRuleName}/listKeys' + url = self.list_keys.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), @@ -698,7 +709,7 @@ def list_keys( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -715,6 +726,7 @@ def list_keys( return client_raw_response return deserialized + list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}/AuthorizationRules/{authorizationRuleName}/listKeys'} def regenerate_keys( self, resource_group_name, namespace_name, notification_hub_name, authorization_rule_name, policy_key=None, custom_headers=None, raw=False, **operation_config): @@ -739,16 +751,15 @@ def regenerate_keys( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`ResourceListKeys - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: ResourceListKeys or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.notificationhubs.models.ResourceListKeys or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ parameters = models.PolicykeyResource(policy_key=policy_key) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}/AuthorizationRules/{authorizationRuleName}/regenerateKeys' + url = self.regenerate_keys.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), @@ -778,7 +789,7 @@ def regenerate_keys( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -795,6 +806,7 @@ def regenerate_keys( return client_raw_response return deserialized + regenerate_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}/AuthorizationRules/{authorizationRuleName}/regenerateKeys'} def get_pns_credentials( self, resource_group_name, namespace_name, notification_hub_name, custom_headers=None, raw=False, **operation_config): @@ -811,14 +823,13 @@ def get_pns_credentials( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`PnsCredentialsResource - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: PnsCredentialsResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.notificationhubs.models.PnsCredentialsResource or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}/pnsCredentials' + url = self.get_pns_credentials.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), @@ -843,7 +854,7 @@ def get_pns_credentials( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -860,3 +871,4 @@ def get_pns_credentials( return client_raw_response return deserialized + get_pns_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}/pnsCredentials'} diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/operations.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/operations.py new file mode 100644 index 000000000000..4b966f29589b --- /dev/null +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/operations.py @@ -0,0 +1,97 @@ +# 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 .. import models + + +class Operations(object): + """Operations 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: "2017-04-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-04-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all of the available NotificationHubs REST API operations. + + :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 Operation + :rtype: + ~azure.mgmt.notificationhubs.models.OperationPaged[~azure.mgmt.notificationhubs.models.Operation] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # 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]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/providers/Microsoft.NotificationHubs/operations'} diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/version.py b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/version.py index a39916c162ce..53c4c7ea05e8 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/version.py +++ b/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0" +VERSION = "2.0.0" diff --git a/azure-mgmt-notificationhubs/build.json b/azure-mgmt-notificationhubs/build.json deleted file mode 100644 index aad8296a71d7..000000000000 --- a/azure-mgmt-notificationhubs/build.json +++ /dev/null @@ -1 +0,0 @@ -{"autorest": "1.1.0", "date": "2017-06-27T20:50:59Z", "version": ""} \ No newline at end of file diff --git a/azure-mgmt-notificationhubs/sdk_packaging.toml b/azure-mgmt-notificationhubs/sdk_packaging.toml new file mode 100644 index 000000000000..d950f2463230 --- /dev/null +++ b/azure-mgmt-notificationhubs/sdk_packaging.toml @@ -0,0 +1,5 @@ +[packaging] +package_name = "azure-mgmt-notificationhubs" +package_pprint_name = "Notification Hubs Management" +package_doc_id = "notification-hubs" +is_stable = true diff --git a/azure-mgmt-notificationhubs/setup.py b/azure-mgmt-notificationhubs/setup.py index 3e687d30fc05..ddd7cd1693b1 100644 --- a/azure-mgmt-notificationhubs/setup.py +++ b/azure-mgmt-notificationhubs/setup.py @@ -61,25 +61,24 @@ long_description=readme + '\n\n' + history, license='MIT License', author='Microsoft Corporation', - author_email='ptvshelp@microsoft.com', + author_email='azpysdkhelp@microsoft.com', url='https://github.com/Azure/azure-sdk-for-python', classifiers=[ - 'Development Status :: 4 - Beta', + 'Development Status :: 5 - Production/Stable', 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'License :: OSI Approved :: MIT License', ], zip_safe=False, - packages=find_packages(), + packages=find_packages(exclude=["tests"]), install_requires=[ - 'msrestazure~=0.4.8', - 'azure-common~=1.1.6', + 'msrestazure>=0.4.27,<2.0.0', + 'azure-common~=1.1', ], cmdclass=cmdclass ) diff --git a/azure-mgmt-powerbiembedded/HISTORY.rst b/azure-mgmt-powerbiembedded/HISTORY.rst index 4d9941a0e602..b4cecd587d02 100644 --- a/azure-mgmt-powerbiembedded/HISTORY.rst +++ b/azure-mgmt-powerbiembedded/HISTORY.rst @@ -3,6 +3,42 @@ Release History =============== +2.0.0 (2018-05-25) +++++++++++++++++++ + +**Features** + +- Client class can be used as a context manager to keep the underlying HTTP session open for performance + +**General Breaking changes** + +This version uses a next-generation code generator that *might* introduce breaking changes. + +- Model signatures now use only keyword-argument syntax. All positional arguments must be re-written as keyword-arguments. + To keep auto-completion in most cases, models are now generated for Python 2 and Python 3. Python 3 uses the "*" syntax for keyword-only arguments. +- Enum types now use the "str" mixin (class AzureEnum(str, Enum)) to improve the behavior when unrecognized enum values are encountered. + While this is not a breaking change, the distinctions are important, and are documented here: + https://docs.python.org/3/library/enum.html#others + At a glance: + + - "is" should not be used at all. + - "format" will return the string value, where "%s" string formatting will return `NameOfEnum.stringvalue`. Format syntax should be prefered. + +- New Long Running Operation: + + - Return type changes from `msrestazure.azure_operation.AzureOperationPoller` to `msrest.polling.LROPoller`. External API is the same. + - Return type is now **always** a `msrest.polling.LROPoller`, regardless of the optional parameters used. + - The behavior has changed when using `raw=True`. Instead of returning the initial call result as `ClientRawResponse`, + without polling, now this returns an LROPoller. After polling, the final resource will be returned as a `ClientRawResponse`. + - New `polling` parameter. The default behavior is `Polling=True` which will poll using ARM algorithm. When `Polling=False`, + the response of the initial call will be returned without polling. + - `polling` parameter accepts instances of subclasses of `msrest.polling.PollingMethod`. + - `add_done_callback` will no longer raise if called after polling is finished, but will instead execute the callback right away. + +**Bugfixes** + +- Compatibility of the sdist with wheel 0.31.0 + 1.0.0 (2017-06-23) ++++++++++++++++++ diff --git a/azure-mgmt-powerbiembedded/README.rst b/azure-mgmt-powerbiembedded/README.rst index 88987f630c1f..f75a904d0183 100644 --- a/azure-mgmt-powerbiembedded/README.rst +++ b/azure-mgmt-powerbiembedded/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Power BI Embedded Management Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. +This package has been tested with Python 2.7, 3.4, 3.5 and 3.6. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. @@ -37,8 +37,8 @@ Usage ===== For code examples, see `Power BI Embedded Management -`__ -on readthedocs.org. +`__ +on docs.microsoft.com. Provide Feedback diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/__init__.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/__init__.py index abe2fe2f45e1..61403f88b18a 100644 --- a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/__init__.py +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/__init__.py @@ -9,21 +9,38 @@ # regenerated. # -------------------------------------------------------------------------- -from .error_detail import ErrorDetail -from .error import Error, ErrorException -from .azure_sku import AzureSku -from .workspace_collection import WorkspaceCollection -from .workspace import Workspace -from .display import Display -from .operation import Operation -from .operation_list import OperationList -from .workspace_collection_access_keys import WorkspaceCollectionAccessKeys -from .workspace_collection_access_key import WorkspaceCollectionAccessKey -from .create_workspace_collection_request import CreateWorkspaceCollectionRequest -from .update_workspace_collection_request import UpdateWorkspaceCollectionRequest -from .check_name_request import CheckNameRequest -from .check_name_response import CheckNameResponse -from .migrate_workspace_collection_request import MigrateWorkspaceCollectionRequest +try: + from .error_detail_py3 import ErrorDetail + from .error_py3 import Error, ErrorException + from .azure_sku_py3 import AzureSku + from .workspace_collection_py3 import WorkspaceCollection + from .workspace_py3 import Workspace + from .display_py3 import Display + from .operation_py3 import Operation + from .operation_list_py3 import OperationList + from .workspace_collection_access_keys_py3 import WorkspaceCollectionAccessKeys + from .workspace_collection_access_key_py3 import WorkspaceCollectionAccessKey + from .create_workspace_collection_request_py3 import CreateWorkspaceCollectionRequest + from .update_workspace_collection_request_py3 import UpdateWorkspaceCollectionRequest + from .check_name_request_py3 import CheckNameRequest + from .check_name_response_py3 import CheckNameResponse + from .migrate_workspace_collection_request_py3 import MigrateWorkspaceCollectionRequest +except (SyntaxError, ImportError): + from .error_detail import ErrorDetail + from .error import Error, ErrorException + from .azure_sku import AzureSku + from .workspace_collection import WorkspaceCollection + from .workspace import Workspace + from .display import Display + from .operation import Operation + from .operation_list import OperationList + from .workspace_collection_access_keys import WorkspaceCollectionAccessKeys + from .workspace_collection_access_key import WorkspaceCollectionAccessKey + from .create_workspace_collection_request import CreateWorkspaceCollectionRequest + from .update_workspace_collection_request import UpdateWorkspaceCollectionRequest + from .check_name_request import CheckNameRequest + from .check_name_response import CheckNameResponse + from .migrate_workspace_collection_request import MigrateWorkspaceCollectionRequest from .workspace_collection_paged import WorkspaceCollectionPaged from .workspace_paged import WorkspacePaged from .power_bi_embedded_management_client_enums import ( diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/azure_sku.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/azure_sku.py index 3f9b4a3b9849..e0f5265a33d0 100644 --- a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/azure_sku.py +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/azure_sku.py @@ -18,9 +18,11 @@ class AzureSku(Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar name: SKU name. Default value: "S1" . + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. SKU name. Default value: "S1" . :vartype name: str - :ivar tier: SKU tier. Default value: "Standard" . + :ivar tier: Required. SKU tier. Default value: "Standard" . :vartype tier: str """ diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/azure_sku_py3.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/azure_sku_py3.py new file mode 100644 index 000000000000..e0f5265a33d0 --- /dev/null +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/azure_sku_py3.py @@ -0,0 +1,41 @@ +# 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 AzureSku(Model): + """AzureSku. + + 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 name: Required. SKU name. Default value: "S1" . + :vartype name: str + :ivar tier: Required. SKU tier. Default value: "Standard" . + :vartype tier: str + """ + + _validation = { + 'name': {'required': True, 'constant': True}, + 'tier': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + name = "S1" + + tier = "Standard" diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/check_name_request.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/check_name_request.py index c88dbb1ff922..8ab54415eaa0 100644 --- a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/check_name_request.py +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/check_name_request.py @@ -27,6 +27,7 @@ class CheckNameRequest(Model): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, name=None, type="Microsoft.PowerBI/workspaceCollections"): - self.name = name - self.type = type + def __init__(self, **kwargs): + super(CheckNameRequest, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', "Microsoft.PowerBI/workspaceCollections") diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/check_name_request_py3.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/check_name_request_py3.py new file mode 100644 index 000000000000..c9548564eef0 --- /dev/null +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/check_name_request_py3.py @@ -0,0 +1,33 @@ +# 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 CheckNameRequest(Model): + """CheckNameRequest. + + :param name: Workspace collection name + :type name: str + :param type: Resource type. Default value: + "Microsoft.PowerBI/workspaceCollections" . + :type type: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, type: str="Microsoft.PowerBI/workspaceCollections", **kwargs) -> None: + super(CheckNameRequest, self).__init__(**kwargs) + self.name = name + self.type = type diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/check_name_response.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/check_name_response.py index 9e11f5074f87..b55a632168ec 100644 --- a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/check_name_response.py +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/check_name_response.py @@ -20,8 +20,7 @@ class CheckNameResponse(Model): :type name_available: bool :param reason: Reason why the workspace collection name cannot be used. Possible values include: 'Unavailable', 'Invalid' - :type reason: str or :class:`CheckNameReason - ` + :type reason: str or ~azure.mgmt.powerbiembedded.models.CheckNameReason :param message: Message indicating an unavailable name due to a conflict, or a description of the naming rules that are violated. :type message: str @@ -33,7 +32,8 @@ class CheckNameResponse(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self, name_available=None, reason=None, message=None): - self.name_available = name_available - self.reason = reason - self.message = message + def __init__(self, **kwargs): + super(CheckNameResponse, self).__init__(**kwargs) + self.name_available = kwargs.get('name_available', None) + self.reason = kwargs.get('reason', None) + self.message = kwargs.get('message', None) diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/check_name_response_py3.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/check_name_response_py3.py new file mode 100644 index 000000000000..2f8f6f305b54 --- /dev/null +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/check_name_response_py3.py @@ -0,0 +1,39 @@ +# 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 CheckNameResponse(Model): + """CheckNameResponse. + + :param name_available: Specifies a Boolean value that indicates whether + the specified Power BI Workspace Collection name is available to use. + :type name_available: bool + :param reason: Reason why the workspace collection name cannot be used. + Possible values include: 'Unavailable', 'Invalid' + :type reason: str or ~azure.mgmt.powerbiembedded.models.CheckNameReason + :param message: Message indicating an unavailable name due to a conflict, + or a description of the naming rules that are violated. + :type message: str + """ + + _attribute_map = { + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, name_available: bool=None, reason=None, message: str=None, **kwargs) -> None: + super(CheckNameResponse, self).__init__(**kwargs) + self.name_available = name_available + self.reason = reason + self.message = message diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/create_workspace_collection_request.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/create_workspace_collection_request.py index 8bd3b301d798..b00b51426f78 100644 --- a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/create_workspace_collection_request.py +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/create_workspace_collection_request.py @@ -22,10 +22,9 @@ class CreateWorkspaceCollectionRequest(Model): :param location: Azure location :type location: str :param tags: - :type tags: dict + :type tags: dict[str, str] :ivar sku: - :vartype sku: :class:`AzureSku - ` + :vartype sku: ~azure.mgmt.powerbiembedded.models.AzureSku """ _validation = { @@ -40,6 +39,7 @@ class CreateWorkspaceCollectionRequest(Model): sku = AzureSku() - def __init__(self, location=None, tags=None): - self.location = location - self.tags = tags + def __init__(self, **kwargs): + super(CreateWorkspaceCollectionRequest, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/create_workspace_collection_request_py3.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/create_workspace_collection_request_py3.py new file mode 100644 index 000000000000..27df1d2da704 --- /dev/null +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/create_workspace_collection_request_py3.py @@ -0,0 +1,45 @@ +# 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 .azure_sku import AzureSku +from msrest.serialization import Model + + +class CreateWorkspaceCollectionRequest(Model): + """CreateWorkspaceCollectionRequest. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param location: Azure location + :type location: str + :param tags: + :type tags: dict[str, str] + :ivar sku: + :vartype sku: ~azure.mgmt.powerbiembedded.models.AzureSku + """ + + _validation = { + 'sku': {'constant': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'AzureSku'}, + } + + sku = AzureSku() + + def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: + super(CreateWorkspaceCollectionRequest, self).__init__(**kwargs) + self.location = location + self.tags = tags diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/display.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/display.py index f6e417e0eb35..44a6602c7325 100644 --- a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/display.py +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/display.py @@ -48,9 +48,10 @@ class Display(Model): 'origin': {'key': 'origin', 'type': 'str'}, } - def __init__(self, provider=None, resource=None, operation=None, description=None, origin=None): - self.provider = provider - self.resource = resource - self.operation = operation - self.description = description - self.origin = origin + def __init__(self, **kwargs): + super(Display, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) + self.origin = kwargs.get('origin', None) diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/display_py3.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/display_py3.py new file mode 100644 index 000000000000..092aa1908db2 --- /dev/null +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/display_py3.py @@ -0,0 +1,57 @@ +# 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 Display(Model): + """Display. + + :param provider: The localized friendly form of the resource provider + name. This form is also expected to include the publisher/company + responsible. Use Title Casing. Begin with “Microsoft” for 1st party + services. + :type provider: str + :param resource: The localized friendly form of the resource type related + to this action/operation. This form should match the public documentation + for the resource provider. Use Title Casing. For examples, refer to the + “name” section. + :type resource: str + :param operation: The localized friendly name for the operation as shown + to the user. This name should be concise (to fit in drop downs), but clear + (self-documenting). Use Title Casing and include the entity/resource to + which it applies. + :type operation: str + :param description: The localized friendly description for the operation + as shown to the user. This description should be thorough, yet concise. It + will be used in tool-tips and detailed views. + :type description: str + :param origin: The intended executor of the operation; governs the display + of the operation in the RBAC UX and the audit logs UX. Default value is + 'user,system' + :type origin: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'origin': {'key': 'origin', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, origin: str=None, **kwargs) -> None: + super(Display, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + self.origin = origin diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/error.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/error.py index 3bb88089e9bb..3aa05f8f9f48 100644 --- a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/error.py +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/error.py @@ -23,8 +23,7 @@ class Error(Model): :param target: :type target: str :param details: - :type details: list of :class:`ErrorDetail - ` + :type details: list[~azure.mgmt.powerbiembedded.models.ErrorDetail] """ _attribute_map = { @@ -34,11 +33,12 @@ class Error(Model): 'details': {'key': 'details', 'type': '[ErrorDetail]'}, } - def __init__(self, code=None, message=None, target=None, details=None): - self.code = code - self.message = message - self.target = target - self.details = details + def __init__(self, **kwargs): + super(Error, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.target = kwargs.get('target', None) + self.details = kwargs.get('details', None) class ErrorException(HttpOperationError): diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/error_detail.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/error_detail.py index 7f1bf288f1e4..d36c8bd1da8b 100644 --- a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/error_detail.py +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/error_detail.py @@ -29,7 +29,8 @@ class ErrorDetail(Model): 'target': {'key': 'target', 'type': 'str'}, } - def __init__(self, code=None, message=None, target=None): - self.code = code - self.message = message - self.target = target + def __init__(self, **kwargs): + super(ErrorDetail, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.target = kwargs.get('target', None) diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/error_detail_py3.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/error_detail_py3.py new file mode 100644 index 000000000000..5093fd1b8341 --- /dev/null +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/error_detail_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ErrorDetail(Model): + """ErrorDetail. + + :param code: + :type code: str + :param message: + :type message: str + :param target: + :type target: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, message: str=None, target: str=None, **kwargs) -> None: + super(ErrorDetail, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/error_py3.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/error_py3.py new file mode 100644 index 000000000000..553ca60690f7 --- /dev/null +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/error_py3.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class Error(Model): + """Error. + + :param code: + :type code: str + :param message: + :type message: str + :param target: + :type target: str + :param details: + :type details: list[~azure.mgmt.powerbiembedded.models.ErrorDetail] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorDetail]'}, + } + + def __init__(self, *, code: str=None, message: str=None, target: str=None, details=None, **kwargs) -> None: + super(Error, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target + self.details = details + + +class ErrorException(HttpOperationError): + """Server responsed with exception of type: 'Error'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorException, self).__init__(deserialize, response, 'Error', *args) diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/migrate_workspace_collection_request.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/migrate_workspace_collection_request.py index 1a296b1a2e62..d5fa09ca0c81 100644 --- a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/migrate_workspace_collection_request.py +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/migrate_workspace_collection_request.py @@ -19,7 +19,7 @@ class MigrateWorkspaceCollectionRequest(Model): workspace collections will be migrated to. :type target_resource_group: str :param resources: - :type resources: list of str + :type resources: list[str] """ _attribute_map = { @@ -27,6 +27,7 @@ class MigrateWorkspaceCollectionRequest(Model): 'resources': {'key': 'resources', 'type': '[str]'}, } - def __init__(self, target_resource_group=None, resources=None): - self.target_resource_group = target_resource_group - self.resources = resources + def __init__(self, **kwargs): + super(MigrateWorkspaceCollectionRequest, self).__init__(**kwargs) + self.target_resource_group = kwargs.get('target_resource_group', None) + self.resources = kwargs.get('resources', None) diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/migrate_workspace_collection_request_py3.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/migrate_workspace_collection_request_py3.py new file mode 100644 index 000000000000..40067c355857 --- /dev/null +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/migrate_workspace_collection_request_py3.py @@ -0,0 +1,33 @@ +# 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 MigrateWorkspaceCollectionRequest(Model): + """MigrateWorkspaceCollectionRequest. + + :param target_resource_group: Name of the resource group the Power BI + workspace collections will be migrated to. + :type target_resource_group: str + :param resources: + :type resources: list[str] + """ + + _attribute_map = { + 'target_resource_group': {'key': 'targetResourceGroup', 'type': 'str'}, + 'resources': {'key': 'resources', 'type': '[str]'}, + } + + def __init__(self, *, target_resource_group: str=None, resources=None, **kwargs) -> None: + super(MigrateWorkspaceCollectionRequest, self).__init__(**kwargs) + self.target_resource_group = target_resource_group + self.resources = resources diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/operation.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/operation.py index 1d54e2223903..a30f5f7c0822 100644 --- a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/operation.py +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/operation.py @@ -20,8 +20,7 @@ class Operation(Model): event service. :type name: str :param display: - :type display: :class:`Display - ` + :type display: ~azure.mgmt.powerbiembedded.models.Display """ _attribute_map = { @@ -29,6 +28,7 @@ class Operation(Model): 'display': {'key': 'display', 'type': 'Display'}, } - def __init__(self, name=None, display=None): - self.name = name - self.display = display + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/operation_list.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/operation_list.py index ef547c20f74f..0d87571b3285 100644 --- a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/operation_list.py +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/operation_list.py @@ -16,13 +16,13 @@ class OperationList(Model): """OperationList. :param value: - :type value: list of :class:`Operation - ` + :type value: list[~azure.mgmt.powerbiembedded.models.Operation] """ _attribute_map = { 'value': {'key': 'value', 'type': '[Operation]'}, } - def __init__(self, value=None): - self.value = value + def __init__(self, **kwargs): + super(OperationList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/operation_list_py3.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/operation_list_py3.py new file mode 100644 index 000000000000..489f837b7bb1 --- /dev/null +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/operation_list_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationList(Model): + """OperationList. + + :param value: + :type value: list[~azure.mgmt.powerbiembedded.models.Operation] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Operation]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(OperationList, self).__init__(**kwargs) + self.value = value diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/operation_py3.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/operation_py3.py new file mode 100644 index 000000000000..530191798420 --- /dev/null +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/operation_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Operation(Model): + """Operation. + + :param name: The name of the operation being performed on this particular + object. This name should match the action name that appears in RBAC / the + event service. + :type name: str + :param display: + :type display: ~azure.mgmt.powerbiembedded.models.Display + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'Display'}, + } + + def __init__(self, *, name: str=None, display=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = name + self.display = display diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/power_bi_embedded_management_client_enums.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/power_bi_embedded_management_client_enums.py index c3c3c06f3864..58b7abcc207c 100644 --- a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/power_bi_embedded_management_client_enums.py +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/power_bi_embedded_management_client_enums.py @@ -12,13 +12,13 @@ from enum import Enum -class AccessKeyName(Enum): +class AccessKeyName(str, Enum): key1 = "key1" key2 = "key2" -class CheckNameReason(Enum): +class CheckNameReason(str, Enum): unavailable = "Unavailable" invalid = "Invalid" diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/update_workspace_collection_request.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/update_workspace_collection_request.py index d740fe74ff07..8c758bcecd24 100644 --- a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/update_workspace_collection_request.py +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/update_workspace_collection_request.py @@ -20,10 +20,9 @@ class UpdateWorkspaceCollectionRequest(Model): sending a request. :param tags: - :type tags: dict + :type tags: dict[str, str] :ivar sku: - :vartype sku: :class:`AzureSku - ` + :vartype sku: ~azure.mgmt.powerbiembedded.models.AzureSku """ _validation = { @@ -37,5 +36,6 @@ class UpdateWorkspaceCollectionRequest(Model): sku = AzureSku() - def __init__(self, tags=None): - self.tags = tags + def __init__(self, **kwargs): + super(UpdateWorkspaceCollectionRequest, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/update_workspace_collection_request_py3.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/update_workspace_collection_request_py3.py new file mode 100644 index 000000000000..646df196d304 --- /dev/null +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/update_workspace_collection_request_py3.py @@ -0,0 +1,41 @@ +# 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 .azure_sku import AzureSku +from msrest.serialization import Model + + +class UpdateWorkspaceCollectionRequest(Model): + """UpdateWorkspaceCollectionRequest. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param tags: + :type tags: dict[str, str] + :ivar sku: + :vartype sku: ~azure.mgmt.powerbiembedded.models.AzureSku + """ + + _validation = { + 'sku': {'constant': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'AzureSku'}, + } + + sku = AzureSku() + + def __init__(self, *, tags=None, **kwargs) -> None: + super(UpdateWorkspaceCollectionRequest, self).__init__(**kwargs) + self.tags = tags diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace.py index 05a8974182e3..e4c90b670ac7 100644 --- a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace.py +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace.py @@ -32,8 +32,9 @@ class Workspace(Model): 'properties': {'key': 'properties', 'type': 'object'}, } - def __init__(self, id=None, name=None, type=None, properties=None): - self.id = id - self.name = name - self.type = type - self.properties = properties + def __init__(self, **kwargs): + super(Workspace, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_collection.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_collection.py index b39c66ea29cf..701a1b72f985 100644 --- a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_collection.py +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_collection.py @@ -28,10 +28,9 @@ class WorkspaceCollection(Model): :param location: Azure location :type location: str :param tags: - :type tags: dict + :type tags: dict[str, str] :ivar sku: - :vartype sku: :class:`AzureSku - ` + :vartype sku: ~azure.mgmt.powerbiembedded.models.AzureSku :param properties: Properties :type properties: object """ @@ -52,10 +51,11 @@ class WorkspaceCollection(Model): sku = AzureSku() - def __init__(self, id=None, name=None, type=None, location=None, tags=None, properties=None): - self.id = id - self.name = name - self.type = type - self.location = location - self.tags = tags - self.properties = properties + def __init__(self, **kwargs): + super(WorkspaceCollection, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_collection_access_key.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_collection_access_key.py index 36f9ae368fb0..96c3e56c5d92 100644 --- a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_collection_access_key.py +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_collection_access_key.py @@ -16,13 +16,13 @@ class WorkspaceCollectionAccessKey(Model): """WorkspaceCollectionAccessKey. :param key_name: Key name. Possible values include: 'key1', 'key2' - :type key_name: str or :class:`AccessKeyName - ` + :type key_name: str or ~azure.mgmt.powerbiembedded.models.AccessKeyName """ _attribute_map = { 'key_name': {'key': 'keyName', 'type': 'AccessKeyName'}, } - def __init__(self, key_name=None): - self.key_name = key_name + def __init__(self, **kwargs): + super(WorkspaceCollectionAccessKey, self).__init__(**kwargs) + self.key_name = kwargs.get('key_name', None) diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_collection_access_key_py3.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_collection_access_key_py3.py new file mode 100644 index 000000000000..a0a43243b2e2 --- /dev/null +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_collection_access_key_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class WorkspaceCollectionAccessKey(Model): + """WorkspaceCollectionAccessKey. + + :param key_name: Key name. Possible values include: 'key1', 'key2' + :type key_name: str or ~azure.mgmt.powerbiembedded.models.AccessKeyName + """ + + _attribute_map = { + 'key_name': {'key': 'keyName', 'type': 'AccessKeyName'}, + } + + def __init__(self, *, key_name=None, **kwargs) -> None: + super(WorkspaceCollectionAccessKey, self).__init__(**kwargs) + self.key_name = key_name diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_collection_access_keys.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_collection_access_keys.py index 0001dcbe26ad..bfca2c68d6c1 100644 --- a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_collection_access_keys.py +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_collection_access_keys.py @@ -26,6 +26,7 @@ class WorkspaceCollectionAccessKeys(Model): 'key2': {'key': 'key2', 'type': 'str'}, } - def __init__(self, key1=None, key2=None): - self.key1 = key1 - self.key2 = key2 + def __init__(self, **kwargs): + super(WorkspaceCollectionAccessKeys, self).__init__(**kwargs) + self.key1 = kwargs.get('key1', None) + self.key2 = kwargs.get('key2', None) diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_collection_access_keys_py3.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_collection_access_keys_py3.py new file mode 100644 index 000000000000..74e13a098b89 --- /dev/null +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_collection_access_keys_py3.py @@ -0,0 +1,32 @@ +# 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 WorkspaceCollectionAccessKeys(Model): + """WorkspaceCollectionAccessKeys. + + :param key1: Access key 1 + :type key1: str + :param key2: Access key 2 + :type key2: str + """ + + _attribute_map = { + 'key1': {'key': 'key1', 'type': 'str'}, + 'key2': {'key': 'key2', 'type': 'str'}, + } + + def __init__(self, *, key1: str=None, key2: str=None, **kwargs) -> None: + super(WorkspaceCollectionAccessKeys, self).__init__(**kwargs) + self.key1 = key1 + self.key2 = key2 diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_collection_paged.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_collection_paged.py index c3086b9892bd..46660de33edf 100644 --- a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_collection_paged.py +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_collection_paged.py @@ -14,7 +14,7 @@ class WorkspaceCollectionPaged(Paged): """ - A paging container for iterating over a list of WorkspaceCollection object + A paging container for iterating over a list of :class:`WorkspaceCollection ` object """ _attribute_map = { diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_collection_py3.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_collection_py3.py new file mode 100644 index 000000000000..8310ce99f495 --- /dev/null +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_collection_py3.py @@ -0,0 +1,61 @@ +# 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 .azure_sku import AzureSku +from msrest.serialization import Model + + +class WorkspaceCollection(Model): + """WorkspaceCollection. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param id: Resource id + :type id: str + :param name: Workspace collection name + :type name: str + :param type: Resource type + :type type: str + :param location: Azure location + :type location: str + :param tags: + :type tags: dict[str, str] + :ivar sku: + :vartype sku: ~azure.mgmt.powerbiembedded.models.AzureSku + :param properties: Properties + :type properties: object + """ + + _validation = { + 'sku': {'constant': 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}'}, + 'sku': {'key': 'sku', 'type': 'AzureSku'}, + 'properties': {'key': 'properties', 'type': 'object'}, + } + + sku = AzureSku() + + def __init__(self, *, id: str=None, name: str=None, type: str=None, location: str=None, tags=None, properties=None, **kwargs) -> None: + super(WorkspaceCollection, self).__init__(**kwargs) + self.id = id + self.name = name + self.type = type + self.location = location + self.tags = tags + self.properties = properties diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_paged.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_paged.py index 67c335af8026..8d630ab6bac7 100644 --- a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_paged.py +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_paged.py @@ -14,7 +14,7 @@ class WorkspacePaged(Paged): """ - A paging container for iterating over a list of Workspace object + A paging container for iterating over a list of :class:`Workspace ` object """ _attribute_map = { diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_py3.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_py3.py new file mode 100644 index 000000000000..43b52413c967 --- /dev/null +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/workspace_py3.py @@ -0,0 +1,40 @@ +# 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 Workspace(Model): + """Workspace. + + :param id: Workspace id + :type id: str + :param name: Workspace name + :type name: str + :param type: Resource type + :type type: str + :param properties: Property bag + :type properties: object + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, + } + + def __init__(self, *, id: str=None, name: str=None, type: str=None, properties=None, **kwargs) -> None: + super(Workspace, self).__init__(**kwargs) + self.id = id + self.name = name + self.type = type + self.properties = properties diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/operations/workspace_collections_operations.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/operations/workspace_collections_operations.py index 7ff51096e931..94f7399cf90b 100644 --- a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/operations/workspace_collections_operations.py +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/operations/workspace_collections_operations.py @@ -9,9 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_operation import AzureOperationPoller import uuid +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -22,10 +23,12 @@ class WorkspaceCollectionsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-01-29". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -49,15 +52,14 @@ def get_by_name( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`WorkspaceCollection - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: WorkspaceCollection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.powerbiembedded.models.WorkspaceCollection or + ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/workspaceCollections/{workspaceCollectionName}' + url = self.get_by_name.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -81,7 +83,7 @@ def get_by_name( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorException(self._deserialize, response) @@ -96,6 +98,7 @@ def get_by_name( return client_raw_response return deserialized + get_by_name.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/workspaceCollections/{workspaceCollectionName}'} def create( self, resource_group_name, workspace_collection_name, location=None, tags=None, custom_headers=None, raw=False, **operation_config): @@ -112,23 +115,22 @@ def create( :param location: Azure location :type location: str :param tags: - :type tags: dict + :type tags: dict[str, 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`. - :rtype: :class:`WorkspaceCollection - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: WorkspaceCollection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.powerbiembedded.models.WorkspaceCollection or + ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorException` """ body = models.CreateWorkspaceCollectionRequest(location=location, tags=tags) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/workspaceCollections/{workspaceCollectionName}' + url = self.create.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -156,7 +158,7 @@ def create( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorException(self._deserialize, response) @@ -171,6 +173,7 @@ def create( return client_raw_response return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/workspaceCollections/{workspaceCollectionName}'} def update( self, resource_group_name, workspace_collection_name, tags=None, custom_headers=None, raw=False, **operation_config): @@ -183,23 +186,22 @@ def update( Collection name :type workspace_collection_name: str :param tags: - :type tags: dict + :type tags: dict[str, 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`. - :rtype: :class:`WorkspaceCollection - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: WorkspaceCollection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.powerbiembedded.models.WorkspaceCollection or + ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorException` """ body = models.UpdateWorkspaceCollectionRequest(tags=tags) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/workspaceCollections/{workspaceCollectionName}' + url = self.update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -227,7 +229,7 @@ def update( # Construct and send request request = self._client.patch(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorException(self._deserialize, response) @@ -242,29 +244,13 @@ def update( return client_raw_response return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/workspaceCollections/{workspaceCollectionName}'} - def delete( - self, resource_group_name, workspace_collection_name, custom_headers=None, raw=False, **operation_config): - """Delete a Power BI Workspace Collection. - :param resource_group_name: Azure resource group - :type resource_group_name: str - :param workspace_collection_name: Power BI Embedded Workspace - Collection name - :type workspace_collection_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 - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: - :class:`ErrorException` - """ + def _delete_initial( + self, resource_group_name, workspace_collection_name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/workspaceCollections/{workspaceCollectionName}' + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -287,38 +273,58 @@ def delete( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - def long_running_send(): - - request = self._client.delete(url, query_parameters) - return self._client.send(request, header_parameters, **operation_config) + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) - def get_long_running_status(status_link, headers=None): + if response.status_code not in [202]: + raise models.ErrorException(self._deserialize, response) - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response - def get_long_running_output(response): + def delete( + self, resource_group_name, workspace_collection_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Delete a Power BI Workspace Collection. - if response.status_code not in [202]: - raise models.ErrorException(self._deserialize, response) + :param resource_group_name: Azure resource group + :type resource_group_name: str + :param workspace_collection_name: Power BI Embedded Workspace + Collection name + :type workspace_collection_name: str + :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 None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`ErrorException` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + workspace_collection_name=workspace_collection_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + def get_long_running_output(response): if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, 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) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/workspaceCollections/{workspaceCollectionName}'} def check_name_availability( self, location, name=None, type="Microsoft.PowerBI/workspaceCollections", custom_headers=None, raw=False, **operation_config): @@ -336,17 +342,16 @@ def check_name_availability( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`CheckNameResponse - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: CheckNameResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.powerbiembedded.models.CheckNameResponse or + ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorException` """ body = models.CheckNameRequest(name=name, type=type) # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.PowerBI/locations/{location}/checkNameAvailability' + url = self.check_name_availability.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'location': self._serialize.url("location", location, 'str') @@ -373,7 +378,7 @@ def check_name_availability( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorException(self._deserialize, response) @@ -388,6 +393,7 @@ def check_name_availability( return client_raw_response return deserialized + check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.PowerBI/locations/{location}/checkNameAvailability'} def list_by_resource_group( self, resource_group_name, custom_headers=None, raw=False, **operation_config): @@ -401,8 +407,9 @@ def list_by_resource_group( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`WorkspaceCollectionPaged - ` + :return: An iterator like instance of WorkspaceCollection + :rtype: + ~azure.mgmt.powerbiembedded.models.WorkspaceCollectionPaged[~azure.mgmt.powerbiembedded.models.WorkspaceCollection] :raises: :class:`ErrorException` """ @@ -410,7 +417,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/workspaceCollections' + url = self.list_by_resource_group.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') @@ -438,7 +445,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorException(self._deserialize, response) @@ -454,6 +461,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/workspaceCollections'} def list_by_subscription( self, custom_headers=None, raw=False, **operation_config): @@ -465,8 +473,9 @@ def list_by_subscription( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`WorkspaceCollectionPaged - ` + :return: An iterator like instance of WorkspaceCollection + :rtype: + ~azure.mgmt.powerbiembedded.models.WorkspaceCollectionPaged[~azure.mgmt.powerbiembedded.models.WorkspaceCollection] :raises: :class:`ErrorException` """ @@ -474,7 +483,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.PowerBI/workspaceCollections' + url = self.list_by_subscription.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -501,7 +510,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorException(self._deserialize, response) @@ -517,6 +526,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.PowerBI/workspaceCollections'} def get_access_keys( self, resource_group_name, workspace_collection_name, custom_headers=None, raw=False, **operation_config): @@ -533,15 +543,16 @@ def get_access_keys( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`WorkspaceCollectionAccessKeys - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: WorkspaceCollectionAccessKeys or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.powerbiembedded.models.WorkspaceCollectionAccessKeys or + ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/workspaceCollections/{workspaceCollectionName}/listKeys' + url = self.get_access_keys.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -565,7 +576,7 @@ def get_access_keys( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorException(self._deserialize, response) @@ -580,6 +591,7 @@ def get_access_keys( return client_raw_response return deserialized + get_access_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/workspaceCollections/{workspaceCollectionName}/listKeys'} def regenerate_key( self, resource_group_name, workspace_collection_name, key_name=None, custom_headers=None, raw=False, **operation_config): @@ -592,24 +604,25 @@ def regenerate_key( Collection name :type workspace_collection_name: str :param key_name: Key name. Possible values include: 'key1', 'key2' - :type key_name: str or :class:`AccessKeyName - ` + :type key_name: str or + ~azure.mgmt.powerbiembedded.models.AccessKeyName :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`. - :rtype: :class:`WorkspaceCollectionAccessKeys - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: WorkspaceCollectionAccessKeys or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.powerbiembedded.models.WorkspaceCollectionAccessKeys or + ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorException` """ body = models.WorkspaceCollectionAccessKey(key_name=key_name) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/workspaceCollections/{workspaceCollectionName}/regenerateKey' + url = self.regenerate_key.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -637,7 +650,7 @@ def regenerate_key( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorException(self._deserialize, response) @@ -652,6 +665,7 @@ def regenerate_key( return client_raw_response return deserialized + regenerate_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/workspaceCollections/{workspaceCollectionName}/regenerateKey'} def migrate( self, resource_group_name, target_resource_group=None, resources=None, custom_headers=None, raw=False, **operation_config): @@ -664,22 +678,21 @@ def migrate( workspace collections will be migrated to. :type target_resource_group: str :param resources: - :type resources: list of str + :type resources: list[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`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorException` """ body = models.MigrateWorkspaceCollectionRequest(target_resource_group=target_resource_group, resources=resources) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources' + url = self.migrate.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') @@ -706,7 +719,7 @@ def migrate( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorException(self._deserialize, response) @@ -714,3 +727,4 @@ def migrate( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + migrate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources'} diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/operations/workspaces_operations.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/operations/workspaces_operations.py index 50ef9772113c..cecd26b763fc 100644 --- a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/operations/workspaces_operations.py +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/operations/workspaces_operations.py @@ -9,8 +9,8 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.pipeline import ClientRawResponse import uuid +from msrest.pipeline import ClientRawResponse from .. import models @@ -21,10 +21,12 @@ class WorkspacesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-01-29". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -49,8 +51,9 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`WorkspacePaged - ` + :return: An iterator like instance of Workspace + :rtype: + ~azure.mgmt.powerbiembedded.models.WorkspacePaged[~azure.mgmt.powerbiembedded.models.Workspace] :raises: :class:`ErrorException` """ @@ -58,7 +61,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/workspaceCollections/{workspaceCollectionName}/workspaces' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -87,7 +90,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorException(self._deserialize, response) @@ -103,3 +106,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/workspaceCollections/{workspaceCollectionName}/workspaces'} diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/power_bi_embedded_management_client.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/power_bi_embedded_management_client.py index d1a45c049db9..0b1674ca9a54 100644 --- a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/power_bi_embedded_management_client.py +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/power_bi_embedded_management_client.py @@ -9,12 +9,13 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import ServiceClient +from msrest.service_client import SDKClient from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION from msrest.pipeline import ClientRawResponse -from msrestazure.azure_operation import AzureOperationPoller +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling import uuid from .operations.workspace_collections_operations import WorkspaceCollectionsOperations from .operations.workspaces_operations import WorkspacesOperations @@ -43,21 +44,19 @@ def __init__( raise ValueError("Parameter 'credentials' must not be None.") if subscription_id is None: raise ValueError("Parameter 'subscription_id' must not be None.") - if not isinstance(subscription_id, str): - raise TypeError("Parameter 'subscription_id' must be str.") if not base_url: base_url = 'https://management.azure.com' super(PowerBIEmbeddedManagementClientConfiguration, self).__init__(base_url) - self.add_user_agent('powerbiembeddedmanagementclient/{}'.format(VERSION)) + self.add_user_agent('azure-mgmt-powerbiembedded/{}'.format(VERSION)) self.add_user_agent('Azure-SDK-For-Python') self.credentials = credentials self.subscription_id = subscription_id -class PowerBIEmbeddedManagementClient(object): +class PowerBIEmbeddedManagementClient(SDKClient): """Client to manage your Power BI Embedded workspace collections and retrieve workspaces. :ivar config: Configuration for client. @@ -82,7 +81,7 @@ def __init__( self, credentials, subscription_id, base_url=None): self.config = PowerBIEmbeddedManagementClientConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) + super(PowerBIEmbeddedManagementClient, 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 = '2016-01-29' @@ -104,15 +103,14 @@ def get_available_operations( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`OperationList - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: OperationList or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.powerbiembedded.models.OperationList or + ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorException` """ # Construct URL - url = '/providers/Microsoft.PowerBI/operations' + url = self.get_available_operations.metadata['url'] # Construct parameters query_parameters = {} @@ -130,7 +128,7 @@ def get_available_operations( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorException(self._deserialize, response) @@ -145,3 +143,4 @@ def get_available_operations( return client_raw_response return deserialized + get_available_operations.metadata = {'url': '/providers/Microsoft.PowerBI/operations'} diff --git a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/version.py b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/version.py index a39916c162ce..53c4c7ea05e8 100644 --- a/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/version.py +++ b/azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0" +VERSION = "2.0.0" diff --git a/azure-mgmt-powerbiembedded/build.json b/azure-mgmt-powerbiembedded/build.json deleted file mode 100644 index 204b507d3c37..000000000000 --- a/azure-mgmt-powerbiembedded/build.json +++ /dev/null @@ -1 +0,0 @@ -{"autorest": "1.1.0", "date": "2017-06-23T17:52:38Z", "version": ""} \ No newline at end of file diff --git a/azure-mgmt-powerbiembedded/sdk_packaging.toml b/azure-mgmt-powerbiembedded/sdk_packaging.toml new file mode 100644 index 000000000000..173e964bc7c6 --- /dev/null +++ b/azure-mgmt-powerbiembedded/sdk_packaging.toml @@ -0,0 +1,5 @@ +[packaging] +package_name = "azure-mgmt-powerbiembedded" +package_pprint_name = "Power BI Embedded Management" +package_doc_id = "power-bi" +is_stable = true diff --git a/azure-mgmt-powerbiembedded/setup.py b/azure-mgmt-powerbiembedded/setup.py index 52631e008464..90d75208fd7e 100644 --- a/azure-mgmt-powerbiembedded/setup.py +++ b/azure-mgmt-powerbiembedded/setup.py @@ -61,25 +61,24 @@ long_description=readme + '\n\n' + history, license='MIT License', author='Microsoft Corporation', - author_email='ptvshelp@microsoft.com', + author_email='azpysdkhelp@microsoft.com', url='https://github.com/Azure/azure-sdk-for-python', classifiers=[ - 'Development Status :: 4 - Beta', + 'Development Status :: 5 - Production/Stable', 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'License :: OSI Approved :: MIT License', ], zip_safe=False, - packages=find_packages(), + packages=find_packages(exclude=["tests"]), install_requires=[ - 'msrestazure~=0.4.8', - 'azure-common~=1.1.6', + 'msrestazure>=0.4.27,<2.0.0', + 'azure-common~=1.1', ], cmdclass=cmdclass ) diff --git a/azure-mgmt-recoveryservices/HISTORY.rst b/azure-mgmt-recoveryservices/HISTORY.rst index d0bf5debb2ca..2ac6e8d96beb 100644 --- a/azure-mgmt-recoveryservices/HISTORY.rst +++ b/azure-mgmt-recoveryservices/HISTORY.rst @@ -3,6 +3,48 @@ Release History =============== +0.3.0 (2018-05-25) +++++++++++++++++++ + +**Breaking Changes** + +- Removed operation group BackupVaultConfigsOperations (moved to azure-mgmt-recoveryservicesbackup) +- Removed operation group BackupStorageConfigsOperations (moved to azure-mgmt-recoveryservicesbackup) + +**Features** + +- Client class can be used as a context manager to keep the underlying HTTP session open for performance + +**General Breaking changes** + +This version uses a next-generation code generator that *might* introduce breaking changes. + +- Model signatures now use only keyword-argument syntax. All positional arguments must be re-written as keyword-arguments. + To keep auto-completion in most cases, models are now generated for Python 2 and Python 3. Python 3 uses the "*" syntax for keyword-only arguments. +- Enum types now use the "str" mixin (class AzureEnum(str, Enum)) to improve the behavior when unrecognized enum values are encountered. + While this is not a breaking change, the distinctions are important, and are documented here: + https://docs.python.org/3/library/enum.html#others + At a glance: + + - "is" should not be used at all. + - "format" will return the string value, where "%s" string formatting will return `NameOfEnum.stringvalue`. Format syntax should be prefered. + +- New Long Running Operation: + + - Return type changes from `msrestazure.azure_operation.AzureOperationPoller` to `msrest.polling.LROPoller`. External API is the same. + - Return type is now **always** a `msrest.polling.LROPoller`, regardless of the optional parameters used. + - The behavior has changed when using `raw=True`. Instead of returning the initial call result as `ClientRawResponse`, + without polling, now this returns an LROPoller. After polling, the final resource will be returned as a `ClientRawResponse`. + - New `polling` parameter. The default behavior is `Polling=True` which will poll using ARM algorithm. When `Polling=False`, + the response of the initial call will be returned without polling. + - `polling` parameter accepts instances of subclasses of `msrest.polling.PollingMethod`. + - `add_done_callback` will no longer raise if called after polling is finished, but will instead execute the callback right away. + +**Bugfixes** + +- Compatibility of the sdist with wheel 0.31.0 + + 0.2.0 (2017-10-16) ++++++++++++++++++ diff --git a/azure-mgmt-recoveryservices/README.rst b/azure-mgmt-recoveryservices/README.rst index d502fe911251..469de038ba8d 100644 --- a/azure-mgmt-recoveryservices/README.rst +++ b/azure-mgmt-recoveryservices/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Recovery Services Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. +This package has been tested with Python 2.7, 3.4, 3.5 and 3.6. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. @@ -37,8 +37,8 @@ Usage ===== For code examples, see `Recovery Services -`__ -on readthedocs.org. +`__ +on docs.microsoft.com. Provide Feedback diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/__init__.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/__init__.py index cc8accc616db..1e5718e6c81b 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/__init__.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/__init__.py @@ -9,57 +9,71 @@ # regenerated. # -------------------------------------------------------------------------- -from .backup_storage_config import BackupStorageConfig -from .backup_vault_config import BackupVaultConfig -from .vault_extended_info_resource import VaultExtendedInfoResource -from .sku import Sku -from .upgrade_details import UpgradeDetails -from .vault_properties import VaultProperties -from .vault import Vault -from .tracked_resource import TrackedResource -from .resource import Resource -from .raw_certificate_data import RawCertificateData -from .certificate_request import CertificateRequest -from .resource_certificate_and_aad_details import ResourceCertificateAndAadDetails -from .resource_certificate_and_acs_details import ResourceCertificateAndAcsDetails -from .resource_certificate_details import ResourceCertificateDetails -from .vault_certificate_response import VaultCertificateResponse -from .jobs_summary import JobsSummary -from .monitoring_summary import MonitoringSummary -from .replication_usage import ReplicationUsage -from .client_discovery_display import ClientDiscoveryDisplay -from .client_discovery_for_log_specification import ClientDiscoveryForLogSpecification -from .client_discovery_for_service_specification import ClientDiscoveryForServiceSpecification -from .client_discovery_for_properties import ClientDiscoveryForProperties -from .client_discovery_value_for_single_api import ClientDiscoveryValueForSingleApi -from .name_info import NameInfo -from .vault_usage import VaultUsage +try: + from .raw_certificate_data_py3 import RawCertificateData + from .certificate_request_py3 import CertificateRequest + from .resource_certificate_and_aad_details_py3 import ResourceCertificateAndAadDetails + from .resource_certificate_and_acs_details_py3 import ResourceCertificateAndAcsDetails + from .resource_certificate_details_py3 import ResourceCertificateDetails + from .vault_certificate_response_py3 import VaultCertificateResponse + from .jobs_summary_py3 import JobsSummary + from .monitoring_summary_py3 import MonitoringSummary + from .replication_usage_py3 import ReplicationUsage + from .client_discovery_display_py3 import ClientDiscoveryDisplay + from .client_discovery_for_log_specification_py3 import ClientDiscoveryForLogSpecification + from .client_discovery_for_service_specification_py3 import ClientDiscoveryForServiceSpecification + from .client_discovery_for_properties_py3 import ClientDiscoveryForProperties + from .client_discovery_value_for_single_api_py3 import ClientDiscoveryValueForSingleApi + from .resource_py3 import Resource + from .sku_py3 import Sku + from .tracked_resource_py3 import TrackedResource + from .patch_tracked_resource_py3 import PatchTrackedResource + from .upgrade_details_py3 import UpgradeDetails + from .vault_properties_py3 import VaultProperties + from .vault_py3 import Vault + from .patch_vault_py3 import PatchVault + from .vault_extended_info_resource_py3 import VaultExtendedInfoResource + from .name_info_py3 import NameInfo + from .vault_usage_py3 import VaultUsage +except (SyntaxError, ImportError): + from .raw_certificate_data import RawCertificateData + from .certificate_request import CertificateRequest + from .resource_certificate_and_aad_details import ResourceCertificateAndAadDetails + from .resource_certificate_and_acs_details import ResourceCertificateAndAcsDetails + from .resource_certificate_details import ResourceCertificateDetails + from .vault_certificate_response import VaultCertificateResponse + from .jobs_summary import JobsSummary + from .monitoring_summary import MonitoringSummary + from .replication_usage import ReplicationUsage + from .client_discovery_display import ClientDiscoveryDisplay + from .client_discovery_for_log_specification import ClientDiscoveryForLogSpecification + from .client_discovery_for_service_specification import ClientDiscoveryForServiceSpecification + from .client_discovery_for_properties import ClientDiscoveryForProperties + from .client_discovery_value_for_single_api import ClientDiscoveryValueForSingleApi + from .resource import Resource + from .sku import Sku + from .tracked_resource import TrackedResource + from .patch_tracked_resource import PatchTrackedResource + from .upgrade_details import UpgradeDetails + from .vault_properties import VaultProperties + from .vault import Vault + from .patch_vault import PatchVault + from .vault_extended_info_resource import VaultExtendedInfoResource + from .name_info import NameInfo + from .vault_usage import VaultUsage from .replication_usage_paged import ReplicationUsagePaged from .vault_paged import VaultPaged from .client_discovery_value_for_single_api_paged import ClientDiscoveryValueForSingleApiPaged from .vault_usage_paged import VaultUsagePaged from .recovery_services_client_enums import ( - StorageModelType, - StorageType, - StorageTypeState, - EnhancedSecurityState, + AuthType, SkuName, VaultUpgradeState, TriggerType, - AuthType, UsagesUnit, ) __all__ = [ - 'BackupStorageConfig', - 'BackupVaultConfig', - 'VaultExtendedInfoResource', - 'Sku', - 'UpgradeDetails', - 'VaultProperties', - 'Vault', - 'TrackedResource', - 'Resource', 'RawCertificateData', 'CertificateRequest', 'ResourceCertificateAndAadDetails', @@ -74,19 +88,24 @@ 'ClientDiscoveryForServiceSpecification', 'ClientDiscoveryForProperties', 'ClientDiscoveryValueForSingleApi', + 'Resource', + 'Sku', + 'TrackedResource', + 'PatchTrackedResource', + 'UpgradeDetails', + 'VaultProperties', + 'Vault', + 'PatchVault', + 'VaultExtendedInfoResource', 'NameInfo', 'VaultUsage', 'ReplicationUsagePaged', 'VaultPaged', 'ClientDiscoveryValueForSingleApiPaged', 'VaultUsagePaged', - 'StorageModelType', - 'StorageType', - 'StorageTypeState', - 'EnhancedSecurityState', + 'AuthType', 'SkuName', 'VaultUpgradeState', 'TriggerType', - 'AuthType', 'UsagesUnit', ] diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/backup_storage_config.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/backup_storage_config.py deleted file mode 100644 index 6441e323c755..000000000000 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/backup_storage_config.py +++ /dev/null @@ -1,65 +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 BackupStorageConfig(Resource): - """The backup storage config. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id represents the complete path to the resource. - :vartype id: str - :ivar name: Resource name associated with the resource. - :vartype name: str - :ivar type: Resource type represents the complete path of the form - Namespace/ResourceType/ResourceType/... - :vartype type: str - :param e_tag: Optional ETag. - :type e_tag: str - :param storage_model_type: Storage model type. Possible values include: - 'Invalid', 'GeoRedundant', 'LocallyRedundant' - :type storage_model_type: str or :class:`StorageModelType - ` - :param storage_type: Storage type. Possible values include: 'Invalid', - 'GeoRedundant', 'LocallyRedundant' - :type storage_type: str or :class:`StorageType - ` - :param storage_type_state: Locked or Unlocked. Once a machine is - registered against a resource, the storageTypeState is always Locked. - Possible values include: 'Invalid', 'Locked', 'Unlocked' - :type storage_type_state: str or :class:`StorageTypeState - ` - """ - - _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'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - 'storage_model_type': {'key': 'properties.storageModelType', 'type': 'str'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'storage_type_state': {'key': 'properties.storageTypeState', 'type': 'str'}, - } - - def __init__(self, e_tag=None, storage_model_type=None, storage_type=None, storage_type_state=None): - super(BackupStorageConfig, self).__init__(e_tag=e_tag) - self.storage_model_type = storage_model_type - self.storage_type = storage_type - self.storage_type_state = storage_type_state diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/backup_vault_config.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/backup_vault_config.py deleted file mode 100644 index 15ec39f617e6..000000000000 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/backup_vault_config.py +++ /dev/null @@ -1,65 +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 BackupVaultConfig(Resource): - """Backup vault config details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id represents the complete path to the resource. - :vartype id: str - :ivar name: Resource name associated with the resource. - :vartype name: str - :ivar type: Resource type represents the complete path of the form - Namespace/ResourceType/ResourceType/... - :vartype type: str - :param e_tag: Optional ETag. - :type e_tag: str - :param storage_type: Storage type. Possible values include: 'Invalid', - 'GeoRedundant', 'LocallyRedundant' - :type storage_type: str or :class:`StorageType - ` - :param storage_type_state: Locked or Unlocked. Once a machine is - registered against a resource, the storageTypeState is always Locked. - Possible values include: 'Invalid', 'Locked', 'Unlocked' - :type storage_type_state: str or :class:`StorageTypeState - ` - :param enhanced_security_state: Enabled or Disabled. Possible values - include: 'Invalid', 'Enabled', 'Disabled' - :type enhanced_security_state: str or :class:`EnhancedSecurityState - ` - """ - - _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'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'storage_type_state': {'key': 'properties.storageTypeState', 'type': 'str'}, - 'enhanced_security_state': {'key': 'properties.enhancedSecurityState', 'type': 'str'}, - } - - def __init__(self, e_tag=None, storage_type=None, storage_type_state=None, enhanced_security_state=None): - super(BackupVaultConfig, self).__init__(e_tag=e_tag) - self.storage_type = storage_type - self.storage_type_state = storage_type_state - self.enhanced_security_state = enhanced_security_state diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/certificate_request.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/certificate_request.py index aef4ef2c38ac..ff049a56dd47 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/certificate_request.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/certificate_request.py @@ -16,13 +16,13 @@ class CertificateRequest(Model): """Details of the certificate to be uploaded to the vault. :param properties: - :type properties: :class:`RawCertificateData - ` + :type properties: ~azure.mgmt.recoveryservices.models.RawCertificateData """ _attribute_map = { 'properties': {'key': 'properties', 'type': 'RawCertificateData'}, } - def __init__(self, properties=None): - self.properties = properties + def __init__(self, **kwargs): + super(CertificateRequest, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/certificate_request_py3.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/certificate_request_py3.py new file mode 100644 index 000000000000..0d7d4498e01e --- /dev/null +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/certificate_request_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CertificateRequest(Model): + """Details of the certificate to be uploaded to the vault. + + :param properties: + :type properties: ~azure.mgmt.recoveryservices.models.RawCertificateData + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'RawCertificateData'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(CertificateRequest, self).__init__(**kwargs) + self.properties = properties diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_display.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_display.py index dbc271de1f39..d9557c7b3122 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_display.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_display.py @@ -17,23 +17,25 @@ class ClientDiscoveryDisplay(Model): :param provider: Name of the provider for display purposes :type provider: str - :param resource: Name of the resource type for display purposes + :param resource: ResourceType for which this Operation can be performed. :type resource: str - :param operation: Name of the operation for display purposes + :param operation: Operations Name itself. :type operation: str - :param description: Description of the operation for display purposes + :param description: Description of the operation having details of what + operation is about. :type description: str """ _attribute_map = { - 'provider': {'key': 'Provider', 'type': 'str'}, - 'resource': {'key': 'Resource', 'type': 'str'}, - 'operation': {'key': 'Operation', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, } - def __init__(self, provider=None, resource=None, operation=None, description=None): - self.provider = provider - self.resource = resource - self.operation = operation - self.description = description + def __init__(self, **kwargs): + super(ClientDiscoveryDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_display_py3.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_display_py3.py new file mode 100644 index 000000000000..61ce520a52bd --- /dev/null +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_display_py3.py @@ -0,0 +1,41 @@ +# 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 ClientDiscoveryDisplay(Model): + """Localized display information of an operation. + + :param provider: Name of the provider for display purposes + :type provider: str + :param resource: ResourceType for which this Operation can be performed. + :type resource: str + :param operation: Operations Name itself. + :type operation: str + :param description: Description of the operation having details of what + operation is about. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + super(ClientDiscoveryDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_for_log_specification.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_for_log_specification.py index 63275818193c..1bc515721f88 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_for_log_specification.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_for_log_specification.py @@ -29,7 +29,8 @@ class ClientDiscoveryForLogSpecification(Model): 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, } - def __init__(self, name=None, display_name=None, blob_duration=None): - self.name = name - self.display_name = display_name - self.blob_duration = blob_duration + def __init__(self, **kwargs): + super(ClientDiscoveryForLogSpecification, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + self.blob_duration = kwargs.get('blob_duration', None) diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_for_log_specification_py3.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_for_log_specification_py3.py new file mode 100644 index 000000000000..f1f246c1a207 --- /dev/null +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_for_log_specification_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClientDiscoveryForLogSpecification(Model): + """Class to represent shoebox log specification in json client discovery. + + :param name: Name of the log. + :type name: str + :param display_name: Localized display name + :type display_name: str + :param blob_duration: Blobs created in customer storage account per hour + :type blob_duration: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, display_name: str=None, blob_duration: str=None, **kwargs) -> None: + super(ClientDiscoveryForLogSpecification, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.blob_duration = blob_duration diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_for_properties.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_for_properties.py index e692182a882e..cd716c5f3e1f 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_for_properties.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_for_properties.py @@ -17,13 +17,13 @@ class ClientDiscoveryForProperties(Model): :param service_specification: Operation properties. :type service_specification: - :class:`ClientDiscoveryForServiceSpecification - ` + ~azure.mgmt.recoveryservices.models.ClientDiscoveryForServiceSpecification """ _attribute_map = { 'service_specification': {'key': 'serviceSpecification', 'type': 'ClientDiscoveryForServiceSpecification'}, } - def __init__(self, service_specification=None): - self.service_specification = service_specification + def __init__(self, **kwargs): + super(ClientDiscoveryForProperties, self).__init__(**kwargs) + self.service_specification = kwargs.get('service_specification', None) diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_for_properties_py3.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_for_properties_py3.py new file mode 100644 index 000000000000..e0ba1d3ab791 --- /dev/null +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_for_properties_py3.py @@ -0,0 +1,29 @@ +# 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 ClientDiscoveryForProperties(Model): + """Class to represent shoebox properties in json client discovery. + + :param service_specification: Operation properties. + :type service_specification: + ~azure.mgmt.recoveryservices.models.ClientDiscoveryForServiceSpecification + """ + + _attribute_map = { + 'service_specification': {'key': 'serviceSpecification', 'type': 'ClientDiscoveryForServiceSpecification'}, + } + + def __init__(self, *, service_specification=None, **kwargs) -> None: + super(ClientDiscoveryForProperties, self).__init__(**kwargs) + self.service_specification = service_specification diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_for_service_specification.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_for_service_specification.py index 93e71a534bc4..3fc38e4618c8 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_for_service_specification.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_for_service_specification.py @@ -16,14 +16,14 @@ class ClientDiscoveryForServiceSpecification(Model): """Class to represent shoebox service specification in json client discovery. :param log_specifications: List of log specifications of this operation. - :type log_specifications: list of - :class:`ClientDiscoveryForLogSpecification - ` + :type log_specifications: + list[~azure.mgmt.recoveryservices.models.ClientDiscoveryForLogSpecification] """ _attribute_map = { 'log_specifications': {'key': 'logSpecifications', 'type': '[ClientDiscoveryForLogSpecification]'}, } - def __init__(self, log_specifications=None): - self.log_specifications = log_specifications + def __init__(self, **kwargs): + super(ClientDiscoveryForServiceSpecification, self).__init__(**kwargs) + self.log_specifications = kwargs.get('log_specifications', None) diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_for_service_specification_py3.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_for_service_specification_py3.py new file mode 100644 index 000000000000..c53d86c7072a --- /dev/null +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_for_service_specification_py3.py @@ -0,0 +1,29 @@ +# 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 ClientDiscoveryForServiceSpecification(Model): + """Class to represent shoebox service specification in json client discovery. + + :param log_specifications: List of log specifications of this operation. + :type log_specifications: + list[~azure.mgmt.recoveryservices.models.ClientDiscoveryForLogSpecification] + """ + + _attribute_map = { + 'log_specifications': {'key': 'logSpecifications', 'type': '[ClientDiscoveryForLogSpecification]'}, + } + + def __init__(self, *, log_specifications=None, **kwargs) -> None: + super(ClientDiscoveryForServiceSpecification, self).__init__(**kwargs) + self.log_specifications = log_specifications diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_value_for_single_api.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_value_for_single_api.py index 2b5d28a46042..4d751b8e281e 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_value_for_single_api.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_value_for_single_api.py @@ -15,29 +15,29 @@ class ClientDiscoveryValueForSingleApi(Model): """Available operation details. - :param name: Name of the operation + :param name: Name of the Operation. :type name: str :param display: Contains the localized display information for this particular operation - :type display: :class:`ClientDiscoveryDisplay - ` + :type display: ~azure.mgmt.recoveryservices.models.ClientDiscoveryDisplay :param origin: The intended executor of the operation;governs the display of the operation in the RBAC UX and the audit logs UX :type origin: str - :param properties: Properties - :type properties: :class:`ClientDiscoveryForProperties - ` + :param properties: ShoeBox properties for the given operation. + :type properties: + ~azure.mgmt.recoveryservices.models.ClientDiscoveryForProperties """ _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'display': {'key': 'Display', 'type': 'ClientDiscoveryDisplay'}, - 'origin': {'key': 'Origin', 'type': 'str'}, - 'properties': {'key': 'Properties', 'type': 'ClientDiscoveryForProperties'}, + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'ClientDiscoveryDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ClientDiscoveryForProperties'}, } - def __init__(self, name=None, display=None, origin=None, properties=None): - self.name = name - self.display = display - self.origin = origin - self.properties = properties + def __init__(self, **kwargs): + super(ClientDiscoveryValueForSingleApi, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + self.origin = kwargs.get('origin', None) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_value_for_single_api_paged.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_value_for_single_api_paged.py index a2f16e385d27..e319d306f170 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_value_for_single_api_paged.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_value_for_single_api_paged.py @@ -18,8 +18,8 @@ class ClientDiscoveryValueForSingleApiPaged(Paged): """ _attribute_map = { - 'next_link': {'key': 'NextLink', 'type': 'str'}, - 'current_page': {'key': 'Value', 'type': '[ClientDiscoveryValueForSingleApi]'} + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ClientDiscoveryValueForSingleApi]'} } def __init__(self, *args, **kwargs): diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_value_for_single_api_py3.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_value_for_single_api_py3.py new file mode 100644 index 000000000000..6dd23d38991b --- /dev/null +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/client_discovery_value_for_single_api_py3.py @@ -0,0 +1,43 @@ +# 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 ClientDiscoveryValueForSingleApi(Model): + """Available operation details. + + :param name: Name of the Operation. + :type name: str + :param display: Contains the localized display information for this + particular operation + :type display: ~azure.mgmt.recoveryservices.models.ClientDiscoveryDisplay + :param origin: The intended executor of the operation;governs the display + of the operation in the RBAC UX and the audit logs UX + :type origin: str + :param properties: ShoeBox properties for the given operation. + :type properties: + ~azure.mgmt.recoveryservices.models.ClientDiscoveryForProperties + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'ClientDiscoveryDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ClientDiscoveryForProperties'}, + } + + def __init__(self, *, name: str=None, display=None, origin: str=None, properties=None, **kwargs) -> None: + super(ClientDiscoveryValueForSingleApi, self).__init__(**kwargs) + self.name = name + self.display = display + self.origin = origin + self.properties = properties diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/jobs_summary.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/jobs_summary.py index 1da651109dc2..ef94f069fb13 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/jobs_summary.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/jobs_summary.py @@ -29,7 +29,8 @@ class JobsSummary(Model): 'in_progress_jobs': {'key': 'inProgressJobs', 'type': 'int'}, } - def __init__(self, failed_jobs=None, suspended_jobs=None, in_progress_jobs=None): - self.failed_jobs = failed_jobs - self.suspended_jobs = suspended_jobs - self.in_progress_jobs = in_progress_jobs + def __init__(self, **kwargs): + super(JobsSummary, self).__init__(**kwargs) + self.failed_jobs = kwargs.get('failed_jobs', None) + self.suspended_jobs = kwargs.get('suspended_jobs', None) + self.in_progress_jobs = kwargs.get('in_progress_jobs', None) diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/jobs_summary_py3.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/jobs_summary_py3.py new file mode 100644 index 000000000000..cc48f3d12e84 --- /dev/null +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/jobs_summary_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class JobsSummary(Model): + """Summary of the replication job data for this vault. + + :param failed_jobs: Count of failed jobs. + :type failed_jobs: int + :param suspended_jobs: Count of suspended jobs. + :type suspended_jobs: int + :param in_progress_jobs: Count of in-progress jobs. + :type in_progress_jobs: int + """ + + _attribute_map = { + 'failed_jobs': {'key': 'failedJobs', 'type': 'int'}, + 'suspended_jobs': {'key': 'suspendedJobs', 'type': 'int'}, + 'in_progress_jobs': {'key': 'inProgressJobs', 'type': 'int'}, + } + + def __init__(self, *, failed_jobs: int=None, suspended_jobs: int=None, in_progress_jobs: int=None, **kwargs) -> None: + super(JobsSummary, self).__init__(**kwargs) + self.failed_jobs = failed_jobs + self.suspended_jobs = suspended_jobs + self.in_progress_jobs = in_progress_jobs diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/monitoring_summary.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/monitoring_summary.py index 11cbe8999979..9e00d698a5d2 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/monitoring_summary.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/monitoring_summary.py @@ -42,10 +42,11 @@ class MonitoringSummary(Model): 'unsupported_provider_count': {'key': 'unsupportedProviderCount', 'type': 'int'}, } - def __init__(self, un_healthy_vm_count=None, un_healthy_provider_count=None, events_count=None, deprecated_provider_count=None, supported_provider_count=None, unsupported_provider_count=None): - self.un_healthy_vm_count = un_healthy_vm_count - self.un_healthy_provider_count = un_healthy_provider_count - self.events_count = events_count - self.deprecated_provider_count = deprecated_provider_count - self.supported_provider_count = supported_provider_count - self.unsupported_provider_count = unsupported_provider_count + def __init__(self, **kwargs): + super(MonitoringSummary, self).__init__(**kwargs) + self.un_healthy_vm_count = kwargs.get('un_healthy_vm_count', None) + self.un_healthy_provider_count = kwargs.get('un_healthy_provider_count', None) + self.events_count = kwargs.get('events_count', None) + self.deprecated_provider_count = kwargs.get('deprecated_provider_count', None) + self.supported_provider_count = kwargs.get('supported_provider_count', None) + self.unsupported_provider_count = kwargs.get('unsupported_provider_count', None) diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/monitoring_summary_py3.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/monitoring_summary_py3.py new file mode 100644 index 000000000000..7b8ae0aacb01 --- /dev/null +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/monitoring_summary_py3.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MonitoringSummary(Model): + """Summary of the replication monitoring data for this vault. + + :param un_healthy_vm_count: Count of unhealthy VMs. + :type un_healthy_vm_count: int + :param un_healthy_provider_count: Count of unhealthy replication + providers. + :type un_healthy_provider_count: int + :param events_count: Count of all critical warnings. + :type events_count: int + :param deprecated_provider_count: Count of all deprecated recovery service + providers. + :type deprecated_provider_count: int + :param supported_provider_count: Count of all the supported recovery + service providers. + :type supported_provider_count: int + :param unsupported_provider_count: Count of all the unsupported recovery + service providers. + :type unsupported_provider_count: int + """ + + _attribute_map = { + 'un_healthy_vm_count': {'key': 'unHealthyVmCount', 'type': 'int'}, + 'un_healthy_provider_count': {'key': 'unHealthyProviderCount', 'type': 'int'}, + 'events_count': {'key': 'eventsCount', 'type': 'int'}, + 'deprecated_provider_count': {'key': 'deprecatedProviderCount', 'type': 'int'}, + 'supported_provider_count': {'key': 'supportedProviderCount', 'type': 'int'}, + 'unsupported_provider_count': {'key': 'unsupportedProviderCount', 'type': 'int'}, + } + + def __init__(self, *, un_healthy_vm_count: int=None, un_healthy_provider_count: int=None, events_count: int=None, deprecated_provider_count: int=None, supported_provider_count: int=None, unsupported_provider_count: int=None, **kwargs) -> None: + super(MonitoringSummary, self).__init__(**kwargs) + self.un_healthy_vm_count = un_healthy_vm_count + self.un_healthy_provider_count = un_healthy_provider_count + self.events_count = events_count + self.deprecated_provider_count = deprecated_provider_count + self.supported_provider_count = supported_provider_count + self.unsupported_provider_count = unsupported_provider_count diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/name_info.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/name_info.py index 647b137a7f5d..fe124296d77a 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/name_info.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/name_info.py @@ -26,6 +26,7 @@ class NameInfo(Model): 'localized_value': {'key': 'localizedValue', 'type': 'str'}, } - def __init__(self, value=None, localized_value=None): - self.value = value - self.localized_value = localized_value + def __init__(self, **kwargs): + super(NameInfo, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.localized_value = kwargs.get('localized_value', None) diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/name_info_py3.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/name_info_py3.py new file mode 100644 index 000000000000..92ebeac4e05f --- /dev/null +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/name_info_py3.py @@ -0,0 +1,32 @@ +# 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 NameInfo(Model): + """The name of usage. + + :param value: Value of usage. + :type value: str + :param localized_value: Localized value of usage. + :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(NameInfo, self).__init__(**kwargs) + self.value = value + self.localized_value = localized_value diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/patch_tracked_resource.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/patch_tracked_resource.py new file mode 100644 index 000000000000..889a5e236720 --- /dev/null +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/patch_tracked_resource.py @@ -0,0 +1,54 @@ +# 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 PatchTrackedResource(Resource): + """Tracked resource with location. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param e_tag: Optional ETag. + :type e_tag: 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'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(PatchTrackedResource, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/patch_tracked_resource_py3.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/patch_tracked_resource_py3.py new file mode 100644 index 000000000000..f79d055cde3a --- /dev/null +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/patch_tracked_resource_py3.py @@ -0,0 +1,54 @@ +# 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 PatchTrackedResource(Resource): + """Tracked resource with location. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param e_tag: Optional ETag. + :type e_tag: 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'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, e_tag: str=None, location: str=None, tags=None, **kwargs) -> None: + super(PatchTrackedResource, self).__init__(e_tag=e_tag, **kwargs) + self.location = location + self.tags = tags diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/patch_vault.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/patch_vault.py new file mode 100644 index 000000000000..be99238e2e7e --- /dev/null +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/patch_vault.py @@ -0,0 +1,60 @@ +# 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 .patch_tracked_resource import PatchTrackedResource + + +class PatchVault(PatchTrackedResource): + """Patch Resource information, as returned by the resource provider. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param e_tag: Optional ETag. + :type e_tag: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param properties: + :type properties: ~azure.mgmt.recoveryservices.models.VaultProperties + :param sku: + :type sku: ~azure.mgmt.recoveryservices.models.Sku + """ + + _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'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'VaultProperties'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, **kwargs): + super(PatchVault, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.sku = kwargs.get('sku', None) diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/patch_vault_py3.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/patch_vault_py3.py new file mode 100644 index 000000000000..2bb665fed593 --- /dev/null +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/patch_vault_py3.py @@ -0,0 +1,60 @@ +# 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 .patch_tracked_resource_py3 import PatchTrackedResource + + +class PatchVault(PatchTrackedResource): + """Patch Resource information, as returned by the resource provider. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param e_tag: Optional ETag. + :type e_tag: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param properties: + :type properties: ~azure.mgmt.recoveryservices.models.VaultProperties + :param sku: + :type sku: ~azure.mgmt.recoveryservices.models.Sku + """ + + _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'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'VaultProperties'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, *, e_tag: str=None, location: str=None, tags=None, properties=None, sku=None, **kwargs) -> None: + super(PatchVault, self).__init__(e_tag=e_tag, location=location, tags=tags, **kwargs) + self.properties = properties + self.sku = sku diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/raw_certificate_data.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/raw_certificate_data.py index a6d0d8054836..fa5bd2cf14a6 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/raw_certificate_data.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/raw_certificate_data.py @@ -18,8 +18,7 @@ class RawCertificateData(Model): :param auth_type: Specifies the authentication type. Possible values include: 'Invalid', 'ACS', 'AAD', 'AccessControlService', 'AzureActiveDirectory' - :type auth_type: str or :class:`AuthType - ` + :type auth_type: str or ~azure.mgmt.recoveryservices.models.AuthType :param certificate: The base64 encoded certificate raw data string :type certificate: bytearray """ @@ -29,6 +28,7 @@ class RawCertificateData(Model): 'certificate': {'key': 'certificate', 'type': 'bytearray'}, } - def __init__(self, auth_type=None, certificate=None): - self.auth_type = auth_type - self.certificate = certificate + def __init__(self, **kwargs): + super(RawCertificateData, self).__init__(**kwargs) + self.auth_type = kwargs.get('auth_type', None) + self.certificate = kwargs.get('certificate', None) diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/raw_certificate_data_py3.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/raw_certificate_data_py3.py new file mode 100644 index 000000000000..49f735653918 --- /dev/null +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/raw_certificate_data_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RawCertificateData(Model): + """Raw certificate data. + + :param auth_type: Specifies the authentication type. Possible values + include: 'Invalid', 'ACS', 'AAD', 'AccessControlService', + 'AzureActiveDirectory' + :type auth_type: str or ~azure.mgmt.recoveryservices.models.AuthType + :param certificate: The base64 encoded certificate raw data string + :type certificate: bytearray + """ + + _attribute_map = { + 'auth_type': {'key': 'authType', 'type': 'str'}, + 'certificate': {'key': 'certificate', 'type': 'bytearray'}, + } + + def __init__(self, *, auth_type=None, certificate: bytearray=None, **kwargs) -> None: + super(RawCertificateData, self).__init__(**kwargs) + self.auth_type = auth_type + self.certificate = certificate diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/recovery_services_client_enums.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/recovery_services_client_enums.py index 0c2efdf5aba2..fa46795f2fbd 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/recovery_services_client_enums.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/recovery_services_client_enums.py @@ -12,41 +12,22 @@ from enum import Enum -class StorageModelType(Enum): +class AuthType(str, Enum): invalid = "Invalid" - geo_redundant = "GeoRedundant" - locally_redundant = "LocallyRedundant" - - -class StorageType(Enum): - - invalid = "Invalid" - geo_redundant = "GeoRedundant" - locally_redundant = "LocallyRedundant" - - -class StorageTypeState(Enum): - - invalid = "Invalid" - locked = "Locked" - unlocked = "Unlocked" - - -class EnhancedSecurityState(Enum): - - invalid = "Invalid" - enabled = "Enabled" - disabled = "Disabled" + acs = "ACS" + aad = "AAD" + access_control_service = "AccessControlService" + azure_active_directory = "AzureActiveDirectory" -class SkuName(Enum): +class SkuName(str, Enum): standard = "Standard" rs0 = "RS0" -class VaultUpgradeState(Enum): +class VaultUpgradeState(str, Enum): unknown = "Unknown" in_progress = "InProgress" @@ -54,22 +35,13 @@ class VaultUpgradeState(Enum): failed = "Failed" -class TriggerType(Enum): +class TriggerType(str, Enum): user_triggered = "UserTriggered" forced_upgrade = "ForcedUpgrade" -class AuthType(Enum): - - invalid = "Invalid" - acs = "ACS" - aad = "AAD" - access_control_service = "AccessControlService" - azure_active_directory = "AzureActiveDirectory" - - -class UsagesUnit(Enum): +class UsagesUnit(str, Enum): count = "Count" bytes = "Bytes" diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/replication_usage.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/replication_usage.py index cb2177bfe99c..1bbc9f04e5f3 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/replication_usage.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/replication_usage.py @@ -17,11 +17,10 @@ class ReplicationUsage(Model): :param monitoring_summary: Summary of the replication monitoring data for this vault. - :type monitoring_summary: :class:`MonitoringSummary - ` + :type monitoring_summary: + ~azure.mgmt.recoveryservices.models.MonitoringSummary :param jobs_summary: Summary of the replication jobs data for this vault. - :type jobs_summary: :class:`JobsSummary - ` + :type jobs_summary: ~azure.mgmt.recoveryservices.models.JobsSummary :param protected_item_count: Number of replication protected items for this vault. :type protected_item_count: int @@ -45,10 +44,11 @@ class ReplicationUsage(Model): 'recovery_services_provider_auth_type': {'key': 'recoveryServicesProviderAuthType', 'type': 'int'}, } - def __init__(self, monitoring_summary=None, jobs_summary=None, protected_item_count=None, recovery_plan_count=None, registered_servers_count=None, recovery_services_provider_auth_type=None): - self.monitoring_summary = monitoring_summary - self.jobs_summary = jobs_summary - self.protected_item_count = protected_item_count - self.recovery_plan_count = recovery_plan_count - self.registered_servers_count = registered_servers_count - self.recovery_services_provider_auth_type = recovery_services_provider_auth_type + def __init__(self, **kwargs): + super(ReplicationUsage, self).__init__(**kwargs) + self.monitoring_summary = kwargs.get('monitoring_summary', None) + self.jobs_summary = kwargs.get('jobs_summary', None) + self.protected_item_count = kwargs.get('protected_item_count', None) + self.recovery_plan_count = kwargs.get('recovery_plan_count', None) + self.registered_servers_count = kwargs.get('registered_servers_count', None) + self.recovery_services_provider_auth_type = kwargs.get('recovery_services_provider_auth_type', None) diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/replication_usage_py3.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/replication_usage_py3.py new file mode 100644 index 000000000000..39603411f575 --- /dev/null +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/replication_usage_py3.py @@ -0,0 +1,54 @@ +# 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 ReplicationUsage(Model): + """Replication usages of a vault. + + :param monitoring_summary: Summary of the replication monitoring data for + this vault. + :type monitoring_summary: + ~azure.mgmt.recoveryservices.models.MonitoringSummary + :param jobs_summary: Summary of the replication jobs data for this vault. + :type jobs_summary: ~azure.mgmt.recoveryservices.models.JobsSummary + :param protected_item_count: Number of replication protected items for + this vault. + :type protected_item_count: int + :param recovery_plan_count: Number of replication recovery plans for this + vault. + :type recovery_plan_count: int + :param registered_servers_count: Number of servers registered to this + vault. + :type registered_servers_count: int + :param recovery_services_provider_auth_type: The authentication type of + recovery service providers in the vault. + :type recovery_services_provider_auth_type: int + """ + + _attribute_map = { + 'monitoring_summary': {'key': 'monitoringSummary', 'type': 'MonitoringSummary'}, + 'jobs_summary': {'key': 'jobsSummary', 'type': 'JobsSummary'}, + 'protected_item_count': {'key': 'protectedItemCount', 'type': 'int'}, + 'recovery_plan_count': {'key': 'recoveryPlanCount', 'type': 'int'}, + 'registered_servers_count': {'key': 'registeredServersCount', 'type': 'int'}, + 'recovery_services_provider_auth_type': {'key': 'recoveryServicesProviderAuthType', 'type': 'int'}, + } + + def __init__(self, *, monitoring_summary=None, jobs_summary=None, protected_item_count: int=None, recovery_plan_count: int=None, registered_servers_count: int=None, recovery_services_provider_auth_type: int=None, **kwargs) -> None: + super(ReplicationUsage, self).__init__(**kwargs) + self.monitoring_summary = monitoring_summary + self.jobs_summary = jobs_summary + self.protected_item_count = protected_item_count + self.recovery_plan_count = recovery_plan_count + self.registered_servers_count = registered_servers_count + self.recovery_services_provider_auth_type = recovery_services_provider_auth_type diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/resource.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/resource.py index 37709eedb37f..07459742118d 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/resource.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/resource.py @@ -42,8 +42,9 @@ class Resource(Model): 'e_tag': {'key': 'eTag', 'type': 'str'}, } - def __init__(self, e_tag=None): + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) self.id = None self.name = None self.type = None - self.e_tag = e_tag + self.e_tag = kwargs.get('e_tag', None) diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/resource_certificate_and_aad_details.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/resource_certificate_and_aad_details.py index e1abca08bba1..521c0b2ab160 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/resource_certificate_and_aad_details.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/resource_certificate_and_aad_details.py @@ -15,6 +15,8 @@ class ResourceCertificateAndAadDetails(ResourceCertificateDetails): """Certificate details representing the Vault credentials for AAD. + All required parameters must be populated in order to send to Azure. + :param certificate: The base64 encoded certificate raw data string. :type certificate: bytearray :param friendly_name: Certificate friendlyname. @@ -31,18 +33,20 @@ class ResourceCertificateAndAadDetails(ResourceCertificateDetails): :type valid_from: datetime :param valid_to: Certificate Validity End Date time. :type valid_to: datetime - :param auth_type: Polymorphic Discriminator + :param auth_type: Required. Constant filled by server. :type auth_type: str - :param aad_authority: AAD tenant authority. + :param aad_authority: Required. AAD tenant authority. :type aad_authority: str - :param aad_tenant_id: AAD tenant Id. + :param aad_tenant_id: Required. AAD tenant Id. :type aad_tenant_id: str - :param service_principal_client_id: AAD service principal clientId. + :param service_principal_client_id: Required. AAD service principal + clientId. :type service_principal_client_id: str - :param service_principal_object_id: AAD service principal ObjectId. + :param service_principal_object_id: Required. AAD service principal + ObjectId. :type service_principal_object_id: str - :param azure_management_endpoint_audience: Azure Management Endpoint - Audience. + :param azure_management_endpoint_audience: Required. Azure Management + Endpoint Audience. :type azure_management_endpoint_audience: str """ @@ -72,11 +76,11 @@ class ResourceCertificateAndAadDetails(ResourceCertificateDetails): 'azure_management_endpoint_audience': {'key': 'azureManagementEndpointAudience', 'type': 'str'}, } - def __init__(self, aad_authority, aad_tenant_id, service_principal_client_id, service_principal_object_id, azure_management_endpoint_audience, certificate=None, friendly_name=None, issuer=None, resource_id=None, subject=None, thumbprint=None, valid_from=None, valid_to=None): - super(ResourceCertificateAndAadDetails, self).__init__(certificate=certificate, friendly_name=friendly_name, issuer=issuer, resource_id=resource_id, subject=subject, thumbprint=thumbprint, valid_from=valid_from, valid_to=valid_to) - self.aad_authority = aad_authority - self.aad_tenant_id = aad_tenant_id - self.service_principal_client_id = service_principal_client_id - self.service_principal_object_id = service_principal_object_id - self.azure_management_endpoint_audience = azure_management_endpoint_audience + def __init__(self, **kwargs): + super(ResourceCertificateAndAadDetails, self).__init__(**kwargs) + self.aad_authority = kwargs.get('aad_authority', None) + self.aad_tenant_id = kwargs.get('aad_tenant_id', None) + self.service_principal_client_id = kwargs.get('service_principal_client_id', None) + self.service_principal_object_id = kwargs.get('service_principal_object_id', None) + self.azure_management_endpoint_audience = kwargs.get('azure_management_endpoint_audience', None) self.auth_type = 'AzureActiveDirectory' diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/resource_certificate_and_aad_details_py3.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/resource_certificate_and_aad_details_py3.py new file mode 100644 index 000000000000..591a1d0ba44e --- /dev/null +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/resource_certificate_and_aad_details_py3.py @@ -0,0 +1,86 @@ +# 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_certificate_details_py3 import ResourceCertificateDetails + + +class ResourceCertificateAndAadDetails(ResourceCertificateDetails): + """Certificate details representing the Vault credentials for AAD. + + All required parameters must be populated in order to send to Azure. + + :param certificate: The base64 encoded certificate raw data string. + :type certificate: bytearray + :param friendly_name: Certificate friendlyname. + :type friendly_name: str + :param issuer: Certificate issuer. + :type issuer: str + :param resource_id: Resource ID of the vault. + :type resource_id: long + :param subject: Certificate Subject Name. + :type subject: str + :param thumbprint: Certificate thumbprint. + :type thumbprint: str + :param valid_from: Certificate Validity start Date time. + :type valid_from: datetime + :param valid_to: Certificate Validity End Date time. + :type valid_to: datetime + :param auth_type: Required. Constant filled by server. + :type auth_type: str + :param aad_authority: Required. AAD tenant authority. + :type aad_authority: str + :param aad_tenant_id: Required. AAD tenant Id. + :type aad_tenant_id: str + :param service_principal_client_id: Required. AAD service principal + clientId. + :type service_principal_client_id: str + :param service_principal_object_id: Required. AAD service principal + ObjectId. + :type service_principal_object_id: str + :param azure_management_endpoint_audience: Required. Azure Management + Endpoint Audience. + :type azure_management_endpoint_audience: str + """ + + _validation = { + 'auth_type': {'required': True}, + 'aad_authority': {'required': True}, + 'aad_tenant_id': {'required': True}, + 'service_principal_client_id': {'required': True}, + 'service_principal_object_id': {'required': True}, + 'azure_management_endpoint_audience': {'required': True}, + } + + _attribute_map = { + 'certificate': {'key': 'certificate', 'type': 'bytearray'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'issuer': {'key': 'issuer', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'long'}, + 'subject': {'key': 'subject', 'type': 'str'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'valid_from': {'key': 'validFrom', 'type': 'iso-8601'}, + 'valid_to': {'key': 'validTo', 'type': 'iso-8601'}, + 'auth_type': {'key': 'authType', 'type': 'str'}, + 'aad_authority': {'key': 'aadAuthority', 'type': 'str'}, + 'aad_tenant_id': {'key': 'aadTenantId', 'type': 'str'}, + 'service_principal_client_id': {'key': 'servicePrincipalClientId', 'type': 'str'}, + 'service_principal_object_id': {'key': 'servicePrincipalObjectId', 'type': 'str'}, + 'azure_management_endpoint_audience': {'key': 'azureManagementEndpointAudience', 'type': 'str'}, + } + + def __init__(self, *, aad_authority: str, aad_tenant_id: str, service_principal_client_id: str, service_principal_object_id: str, azure_management_endpoint_audience: str, certificate: bytearray=None, friendly_name: str=None, issuer: str=None, resource_id: int=None, subject: str=None, thumbprint: str=None, valid_from=None, valid_to=None, **kwargs) -> None: + super(ResourceCertificateAndAadDetails, self).__init__(certificate=certificate, friendly_name=friendly_name, issuer=issuer, resource_id=resource_id, subject=subject, thumbprint=thumbprint, valid_from=valid_from, valid_to=valid_to, **kwargs) + self.aad_authority = aad_authority + self.aad_tenant_id = aad_tenant_id + self.service_principal_client_id = service_principal_client_id + self.service_principal_object_id = service_principal_object_id + self.azure_management_endpoint_audience = azure_management_endpoint_audience + self.auth_type = 'AzureActiveDirectory' diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/resource_certificate_and_acs_details.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/resource_certificate_and_acs_details.py index c897d20a1920..69f3f03a1c6d 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/resource_certificate_and_acs_details.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/resource_certificate_and_acs_details.py @@ -15,6 +15,8 @@ class ResourceCertificateAndAcsDetails(ResourceCertificateDetails): """Certificate details representing the Vault credentials for ACS. + All required parameters must be populated in order to send to Azure. + :param certificate: The base64 encoded certificate raw data string. :type certificate: bytearray :param friendly_name: Certificate friendlyname. @@ -31,13 +33,14 @@ class ResourceCertificateAndAcsDetails(ResourceCertificateDetails): :type valid_from: datetime :param valid_to: Certificate Validity End Date time. :type valid_to: datetime - :param auth_type: Polymorphic Discriminator + :param auth_type: Required. Constant filled by server. :type auth_type: str - :param global_acs_namespace: ACS namespace name - tenant for our service. + :param global_acs_namespace: Required. ACS namespace name - tenant for our + service. :type global_acs_namespace: str - :param global_acs_host_name: Acs mgmt host name to connect to. + :param global_acs_host_name: Required. Acs mgmt host name to connect to. :type global_acs_host_name: str - :param global_acs_rp_realm: Global ACS namespace RP realm. + :param global_acs_rp_realm: Required. Global ACS namespace RP realm. :type global_acs_rp_realm: str """ @@ -63,9 +66,9 @@ class ResourceCertificateAndAcsDetails(ResourceCertificateDetails): 'global_acs_rp_realm': {'key': 'globalAcsRPRealm', 'type': 'str'}, } - def __init__(self, global_acs_namespace, global_acs_host_name, global_acs_rp_realm, certificate=None, friendly_name=None, issuer=None, resource_id=None, subject=None, thumbprint=None, valid_from=None, valid_to=None): - super(ResourceCertificateAndAcsDetails, self).__init__(certificate=certificate, friendly_name=friendly_name, issuer=issuer, resource_id=resource_id, subject=subject, thumbprint=thumbprint, valid_from=valid_from, valid_to=valid_to) - self.global_acs_namespace = global_acs_namespace - self.global_acs_host_name = global_acs_host_name - self.global_acs_rp_realm = global_acs_rp_realm + def __init__(self, **kwargs): + super(ResourceCertificateAndAcsDetails, self).__init__(**kwargs) + self.global_acs_namespace = kwargs.get('global_acs_namespace', None) + self.global_acs_host_name = kwargs.get('global_acs_host_name', None) + self.global_acs_rp_realm = kwargs.get('global_acs_rp_realm', None) self.auth_type = 'AccessControlService' diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/resource_certificate_and_acs_details_py3.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/resource_certificate_and_acs_details_py3.py new file mode 100644 index 000000000000..d53475e6f844 --- /dev/null +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/resource_certificate_and_acs_details_py3.py @@ -0,0 +1,74 @@ +# 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_certificate_details_py3 import ResourceCertificateDetails + + +class ResourceCertificateAndAcsDetails(ResourceCertificateDetails): + """Certificate details representing the Vault credentials for ACS. + + All required parameters must be populated in order to send to Azure. + + :param certificate: The base64 encoded certificate raw data string. + :type certificate: bytearray + :param friendly_name: Certificate friendlyname. + :type friendly_name: str + :param issuer: Certificate issuer. + :type issuer: str + :param resource_id: Resource ID of the vault. + :type resource_id: long + :param subject: Certificate Subject Name. + :type subject: str + :param thumbprint: Certificate thumbprint. + :type thumbprint: str + :param valid_from: Certificate Validity start Date time. + :type valid_from: datetime + :param valid_to: Certificate Validity End Date time. + :type valid_to: datetime + :param auth_type: Required. Constant filled by server. + :type auth_type: str + :param global_acs_namespace: Required. ACS namespace name - tenant for our + service. + :type global_acs_namespace: str + :param global_acs_host_name: Required. Acs mgmt host name to connect to. + :type global_acs_host_name: str + :param global_acs_rp_realm: Required. Global ACS namespace RP realm. + :type global_acs_rp_realm: str + """ + + _validation = { + 'auth_type': {'required': True}, + 'global_acs_namespace': {'required': True}, + 'global_acs_host_name': {'required': True}, + 'global_acs_rp_realm': {'required': True}, + } + + _attribute_map = { + 'certificate': {'key': 'certificate', 'type': 'bytearray'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'issuer': {'key': 'issuer', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'long'}, + 'subject': {'key': 'subject', 'type': 'str'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'valid_from': {'key': 'validFrom', 'type': 'iso-8601'}, + 'valid_to': {'key': 'validTo', 'type': 'iso-8601'}, + 'auth_type': {'key': 'authType', 'type': 'str'}, + 'global_acs_namespace': {'key': 'globalAcsNamespace', 'type': 'str'}, + 'global_acs_host_name': {'key': 'globalAcsHostName', 'type': 'str'}, + 'global_acs_rp_realm': {'key': 'globalAcsRPRealm', 'type': 'str'}, + } + + def __init__(self, *, global_acs_namespace: str, global_acs_host_name: str, global_acs_rp_realm: str, certificate: bytearray=None, friendly_name: str=None, issuer: str=None, resource_id: int=None, subject: str=None, thumbprint: str=None, valid_from=None, valid_to=None, **kwargs) -> None: + super(ResourceCertificateAndAcsDetails, self).__init__(certificate=certificate, friendly_name=friendly_name, issuer=issuer, resource_id=resource_id, subject=subject, thumbprint=thumbprint, valid_from=valid_from, valid_to=valid_to, **kwargs) + self.global_acs_namespace = global_acs_namespace + self.global_acs_host_name = global_acs_host_name + self.global_acs_rp_realm = global_acs_rp_realm + self.auth_type = 'AccessControlService' diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/resource_certificate_details.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/resource_certificate_details.py index eabc2caca85d..8beadb8f04df 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/resource_certificate_details.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/resource_certificate_details.py @@ -15,6 +15,12 @@ class ResourceCertificateDetails(Model): """Certificate details representing the Vault credentials. + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ResourceCertificateAndAadDetails, + ResourceCertificateAndAcsDetails + + All required parameters must be populated in order to send to Azure. + :param certificate: The base64 encoded certificate raw data string. :type certificate: bytearray :param friendly_name: Certificate friendlyname. @@ -31,7 +37,7 @@ class ResourceCertificateDetails(Model): :type valid_from: datetime :param valid_to: Certificate Validity End Date time. :type valid_to: datetime - :param auth_type: Polymorphic Discriminator + :param auth_type: Required. Constant filled by server. :type auth_type: str """ @@ -55,13 +61,14 @@ class ResourceCertificateDetails(Model): 'auth_type': {'AzureActiveDirectory': 'ResourceCertificateAndAadDetails', 'AccessControlService': 'ResourceCertificateAndAcsDetails'} } - def __init__(self, certificate=None, friendly_name=None, issuer=None, resource_id=None, subject=None, thumbprint=None, valid_from=None, valid_to=None): - self.certificate = certificate - self.friendly_name = friendly_name - self.issuer = issuer - self.resource_id = resource_id - self.subject = subject - self.thumbprint = thumbprint - self.valid_from = valid_from - self.valid_to = valid_to + def __init__(self, **kwargs): + super(ResourceCertificateDetails, self).__init__(**kwargs) + self.certificate = kwargs.get('certificate', None) + self.friendly_name = kwargs.get('friendly_name', None) + self.issuer = kwargs.get('issuer', None) + self.resource_id = kwargs.get('resource_id', None) + self.subject = kwargs.get('subject', None) + self.thumbprint = kwargs.get('thumbprint', None) + self.valid_from = kwargs.get('valid_from', None) + self.valid_to = kwargs.get('valid_to', None) self.auth_type = None diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/resource_certificate_details_py3.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/resource_certificate_details_py3.py new file mode 100644 index 000000000000..50799884c1ab --- /dev/null +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/resource_certificate_details_py3.py @@ -0,0 +1,74 @@ +# 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 ResourceCertificateDetails(Model): + """Certificate details representing the Vault credentials. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ResourceCertificateAndAadDetails, + ResourceCertificateAndAcsDetails + + All required parameters must be populated in order to send to Azure. + + :param certificate: The base64 encoded certificate raw data string. + :type certificate: bytearray + :param friendly_name: Certificate friendlyname. + :type friendly_name: str + :param issuer: Certificate issuer. + :type issuer: str + :param resource_id: Resource ID of the vault. + :type resource_id: long + :param subject: Certificate Subject Name. + :type subject: str + :param thumbprint: Certificate thumbprint. + :type thumbprint: str + :param valid_from: Certificate Validity start Date time. + :type valid_from: datetime + :param valid_to: Certificate Validity End Date time. + :type valid_to: datetime + :param auth_type: Required. Constant filled by server. + :type auth_type: str + """ + + _validation = { + 'auth_type': {'required': True}, + } + + _attribute_map = { + 'certificate': {'key': 'certificate', 'type': 'bytearray'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'issuer': {'key': 'issuer', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'long'}, + 'subject': {'key': 'subject', 'type': 'str'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'valid_from': {'key': 'validFrom', 'type': 'iso-8601'}, + 'valid_to': {'key': 'validTo', 'type': 'iso-8601'}, + 'auth_type': {'key': 'authType', 'type': 'str'}, + } + + _subtype_map = { + 'auth_type': {'AzureActiveDirectory': 'ResourceCertificateAndAadDetails', 'AccessControlService': 'ResourceCertificateAndAcsDetails'} + } + + def __init__(self, *, certificate: bytearray=None, friendly_name: str=None, issuer: str=None, resource_id: int=None, subject: str=None, thumbprint: str=None, valid_from=None, valid_to=None, **kwargs) -> None: + super(ResourceCertificateDetails, self).__init__(**kwargs) + self.certificate = certificate + self.friendly_name = friendly_name + self.issuer = issuer + self.resource_id = resource_id + self.subject = subject + self.thumbprint = thumbprint + self.valid_from = valid_from + self.valid_to = valid_to + self.auth_type = None diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/resource_py3.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/resource_py3.py new file mode 100644 index 000000000000..afe3f20f672e --- /dev/null +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/resource_py3.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 msrest.serialization import Model + + +class Resource(Model): + """ARM Resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param e_tag: Optional ETag. + :type e_tag: 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'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + } + + def __init__(self, *, e_tag: str=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.e_tag = e_tag diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/sku.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/sku.py index 1993dada8b54..c66c48e9268a 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/sku.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/sku.py @@ -15,9 +15,11 @@ class Sku(Model): """Identifies the unique system identifier for each Azure resource. - :param name: The Sku name. Possible values include: 'Standard', 'RS0' - :type name: str or :class:`SkuName - ` + All required parameters must be populated in order to send to Azure. + + :param name: Required. The Sku name. Possible values include: 'Standard', + 'RS0' + :type name: str or ~azure.mgmt.recoveryservices.models.SkuName """ _validation = { @@ -28,5 +30,6 @@ class Sku(Model): 'name': {'key': 'name', 'type': 'str'}, } - def __init__(self, name): - self.name = name + def __init__(self, **kwargs): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/sku_py3.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/sku_py3.py new file mode 100644 index 000000000000..137625e684d8 --- /dev/null +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/sku_py3.py @@ -0,0 +1,35 @@ +# 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): + """Identifies the unique system identifier for each Azure resource. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The Sku name. Possible values include: 'Standard', + 'RS0' + :type name: str or ~azure.mgmt.recoveryservices.models.SkuName + """ + + _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/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/tracked_resource.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/tracked_resource.py index c85442105615..75acf9f90d89 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/tracked_resource.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/tracked_resource.py @@ -18,6 +18,8 @@ class TrackedResource(Resource): 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 represents the complete path to the resource. :vartype id: str :ivar name: Resource name associated with the resource. @@ -27,10 +29,10 @@ class TrackedResource(Resource): :vartype type: str :param e_tag: Optional ETag. :type e_tag: str - :param location: Resource location. + :param location: Required. Resource location. :type location: str :param tags: Resource tags. - :type tags: dict + :type tags: dict[str, str] """ _validation = { @@ -49,7 +51,7 @@ class TrackedResource(Resource): 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, location, e_tag=None, tags=None): - super(TrackedResource, self).__init__(e_tag=e_tag) - self.location = location - self.tags = tags + def __init__(self, **kwargs): + super(TrackedResource, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/tracked_resource_py3.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/tracked_resource_py3.py new file mode 100644 index 000000000000..a1abe9f7f846 --- /dev/null +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/tracked_resource_py3.py @@ -0,0 +1,57 @@ +# 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 TrackedResource(Resource): + """Tracked resource with location. + + 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 represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param e_tag: Optional ETag. + :type e_tag: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str, e_tag: str=None, tags=None, **kwargs) -> None: + super(TrackedResource, self).__init__(e_tag=e_tag, **kwargs) + self.location = location + self.tags = tags diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/upgrade_details.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/upgrade_details.py index c1e585a31222..d1b79809e3e4 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/upgrade_details.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/upgrade_details.py @@ -29,15 +29,15 @@ class UpgradeDetails(Model): :vartype end_time_utc: datetime :ivar status: Status of the vault upgrade operation. Possible values include: 'Unknown', 'InProgress', 'Upgraded', 'Failed' - :vartype status: str or :class:`VaultUpgradeState - ` + :vartype status: str or + ~azure.mgmt.recoveryservices.models.VaultUpgradeState :ivar message: Message to the user containing information about the upgrade operation. :vartype message: str :ivar trigger_type: The way the vault upgradation was triggered. Possible values include: 'UserTriggered', 'ForcedUpgrade' - :vartype trigger_type: str or :class:`TriggerType - ` + :vartype trigger_type: str or + ~azure.mgmt.recoveryservices.models.TriggerType :ivar upgraded_resource_id: Resource ID of the upgraded vault. :vartype upgraded_resource_id: str :ivar previous_resource_id: Resource ID of the vault before the upgrade. @@ -68,7 +68,8 @@ class UpgradeDetails(Model): 'previous_resource_id': {'key': 'previousResourceId', 'type': 'str'}, } - def __init__(self): + def __init__(self, **kwargs): + super(UpgradeDetails, self).__init__(**kwargs) self.operation_id = None self.start_time_utc = None self.last_updated_time_utc = None diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/upgrade_details_py3.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/upgrade_details_py3.py new file mode 100644 index 000000000000..fcfc8f1d6cf9 --- /dev/null +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/upgrade_details_py3.py @@ -0,0 +1,81 @@ +# 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 UpgradeDetails(Model): + """Details for upgrading vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar operation_id: ID of the vault upgrade operation. + :vartype operation_id: str + :ivar start_time_utc: UTC time at which the upgrade operation has started. + :vartype start_time_utc: datetime + :ivar last_updated_time_utc: UTC time at which the upgrade operation + status was last updated. + :vartype last_updated_time_utc: datetime + :ivar end_time_utc: UTC time at which the upgrade operation has ended. + :vartype end_time_utc: datetime + :ivar status: Status of the vault upgrade operation. Possible values + include: 'Unknown', 'InProgress', 'Upgraded', 'Failed' + :vartype status: str or + ~azure.mgmt.recoveryservices.models.VaultUpgradeState + :ivar message: Message to the user containing information about the + upgrade operation. + :vartype message: str + :ivar trigger_type: The way the vault upgradation was triggered. Possible + values include: 'UserTriggered', 'ForcedUpgrade' + :vartype trigger_type: str or + ~azure.mgmt.recoveryservices.models.TriggerType + :ivar upgraded_resource_id: Resource ID of the upgraded vault. + :vartype upgraded_resource_id: str + :ivar previous_resource_id: Resource ID of the vault before the upgrade. + :vartype previous_resource_id: str + """ + + _validation = { + 'operation_id': {'readonly': True}, + 'start_time_utc': {'readonly': True}, + 'last_updated_time_utc': {'readonly': True}, + 'end_time_utc': {'readonly': True}, + 'status': {'readonly': True}, + 'message': {'readonly': True}, + 'trigger_type': {'readonly': True}, + 'upgraded_resource_id': {'readonly': True}, + 'previous_resource_id': {'readonly': True}, + } + + _attribute_map = { + 'operation_id': {'key': 'operationId', 'type': 'str'}, + 'start_time_utc': {'key': 'startTimeUtc', 'type': 'iso-8601'}, + 'last_updated_time_utc': {'key': 'lastUpdatedTimeUtc', 'type': 'iso-8601'}, + 'end_time_utc': {'key': 'endTimeUtc', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'trigger_type': {'key': 'triggerType', 'type': 'str'}, + 'upgraded_resource_id': {'key': 'upgradedResourceId', 'type': 'str'}, + 'previous_resource_id': {'key': 'previousResourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(UpgradeDetails, self).__init__(**kwargs) + self.operation_id = None + self.start_time_utc = None + self.last_updated_time_utc = None + self.end_time_utc = None + self.status = None + self.message = None + self.trigger_type = None + self.upgraded_resource_id = None + self.previous_resource_id = None diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault.py index a4927d87d282..1002b1e31e23 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault.py @@ -18,6 +18,8 @@ class Vault(TrackedResource): 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 represents the complete path to the resource. :vartype id: str :ivar name: Resource name associated with the resource. @@ -27,15 +29,14 @@ class Vault(TrackedResource): :vartype type: str :param e_tag: Optional ETag. :type e_tag: str - :param location: Resource location. + :param location: Required. Resource location. :type location: str :param tags: Resource tags. - :type tags: dict + :type tags: dict[str, str] :param properties: - :type properties: :class:`VaultProperties - ` + :type properties: ~azure.mgmt.recoveryservices.models.VaultProperties :param sku: - :type sku: :class:`Sku ` + :type sku: ~azure.mgmt.recoveryservices.models.Sku """ _validation = { @@ -56,7 +57,7 @@ class Vault(TrackedResource): 'sku': {'key': 'sku', 'type': 'Sku'}, } - def __init__(self, location, e_tag=None, tags=None, properties=None, sku=None): - super(Vault, self).__init__(e_tag=e_tag, location=location, tags=tags) - self.properties = properties - self.sku = sku + def __init__(self, **kwargs): + super(Vault, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.sku = kwargs.get('sku', None) diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_certificate_response.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_certificate_response.py index 0713797ad60e..180329c22c63 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_certificate_response.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_certificate_response.py @@ -16,17 +16,27 @@ class VaultCertificateResponse(Model): """Certificate corresponding to a vault that can be used by clients to register themselves with the vault. - :param name: - :type name: str - :param type: - :type type: str - :param id: - :type id: str + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str :param properties: - :type properties: :class:`ResourceCertificateDetails - ` + :type properties: + ~azure.mgmt.recoveryservices.models.ResourceCertificateDetails """ + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'id': {'readonly': True}, + } + _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, @@ -34,8 +44,9 @@ class VaultCertificateResponse(Model): 'properties': {'key': 'properties', 'type': 'ResourceCertificateDetails'}, } - def __init__(self, name=None, type=None, id=None, properties=None): - self.name = name - self.type = type - self.id = id - self.properties = properties + def __init__(self, **kwargs): + super(VaultCertificateResponse, self).__init__(**kwargs) + self.name = None + self.type = None + self.id = None + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_certificate_response_py3.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_certificate_response_py3.py new file mode 100644 index 000000000000..b4975175043a --- /dev/null +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_certificate_response_py3.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class VaultCertificateResponse(Model): + """Certificate corresponding to a vault that can be used by clients to + register themselves with the vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :param properties: + :type properties: + ~azure.mgmt.recoveryservices.models.ResourceCertificateDetails + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'id': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ResourceCertificateDetails'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(VaultCertificateResponse, self).__init__(**kwargs) + self.name = None + self.type = None + self.id = None + self.properties = properties diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_extended_info_resource.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_extended_info_resource.py index bbdb1439ff40..b98b55d3b1bf 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_extended_info_resource.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_extended_info_resource.py @@ -33,7 +33,7 @@ class VaultExtendedInfoResource(Resource): :type encryption_key: str :param encryption_key_thumbprint: Encryption key thumbprint. :type encryption_key_thumbprint: str - :param algorithm: Algorithm. + :param algorithm: Algorithm for Vault ExtendedInfo :type algorithm: str """ @@ -54,9 +54,9 @@ class VaultExtendedInfoResource(Resource): 'algorithm': {'key': 'properties.algorithm', 'type': 'str'}, } - def __init__(self, e_tag=None, integrity_key=None, encryption_key=None, encryption_key_thumbprint=None, algorithm=None): - super(VaultExtendedInfoResource, self).__init__(e_tag=e_tag) - self.integrity_key = integrity_key - self.encryption_key = encryption_key - self.encryption_key_thumbprint = encryption_key_thumbprint - self.algorithm = algorithm + def __init__(self, **kwargs): + super(VaultExtendedInfoResource, self).__init__(**kwargs) + self.integrity_key = kwargs.get('integrity_key', None) + self.encryption_key = kwargs.get('encryption_key', None) + self.encryption_key_thumbprint = kwargs.get('encryption_key_thumbprint', None) + self.algorithm = kwargs.get('algorithm', None) diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_extended_info_resource_py3.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_extended_info_resource_py3.py new file mode 100644 index 000000000000..a353d23e4143 --- /dev/null +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_extended_info_resource_py3.py @@ -0,0 +1,62 @@ +# 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 VaultExtendedInfoResource(Resource): + """Vault extended information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param e_tag: Optional ETag. + :type e_tag: str + :param integrity_key: Integrity key. + :type integrity_key: str + :param encryption_key: Encryption key. + :type encryption_key: str + :param encryption_key_thumbprint: Encryption key thumbprint. + :type encryption_key_thumbprint: str + :param algorithm: Algorithm for Vault ExtendedInfo + :type algorithm: 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'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'integrity_key': {'key': 'properties.integrityKey', 'type': 'str'}, + 'encryption_key': {'key': 'properties.encryptionKey', 'type': 'str'}, + 'encryption_key_thumbprint': {'key': 'properties.encryptionKeyThumbprint', 'type': 'str'}, + 'algorithm': {'key': 'properties.algorithm', 'type': 'str'}, + } + + def __init__(self, *, e_tag: str=None, integrity_key: str=None, encryption_key: str=None, encryption_key_thumbprint: str=None, algorithm: str=None, **kwargs) -> None: + super(VaultExtendedInfoResource, self).__init__(e_tag=e_tag, **kwargs) + self.integrity_key = integrity_key + self.encryption_key = encryption_key + self.encryption_key_thumbprint = encryption_key_thumbprint + self.algorithm = algorithm diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_properties.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_properties.py index 24b67883e855..34e1c0b96d00 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_properties.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_properties.py @@ -21,8 +21,7 @@ class VaultProperties(Model): :ivar provisioning_state: Provisioning State. :vartype provisioning_state: str :param upgrade_details: - :type upgrade_details: :class:`UpgradeDetails - ` + :type upgrade_details: ~azure.mgmt.recoveryservices.models.UpgradeDetails """ _validation = { @@ -34,6 +33,7 @@ class VaultProperties(Model): 'upgrade_details': {'key': 'upgradeDetails', 'type': 'UpgradeDetails'}, } - def __init__(self, upgrade_details=None): + def __init__(self, **kwargs): + super(VaultProperties, self).__init__(**kwargs) self.provisioning_state = None - self.upgrade_details = upgrade_details + self.upgrade_details = kwargs.get('upgrade_details', None) diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_properties_py3.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_properties_py3.py new file mode 100644 index 000000000000..dceb576548ff --- /dev/null +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_properties_py3.py @@ -0,0 +1,39 @@ +# 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 VaultProperties(Model): + """Properties of the vault. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provisioning_state: Provisioning State. + :vartype provisioning_state: str + :param upgrade_details: + :type upgrade_details: ~azure.mgmt.recoveryservices.models.UpgradeDetails + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'upgrade_details': {'key': 'upgradeDetails', 'type': 'UpgradeDetails'}, + } + + def __init__(self, *, upgrade_details=None, **kwargs) -> None: + super(VaultProperties, self).__init__(**kwargs) + self.provisioning_state = None + self.upgrade_details = upgrade_details diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_py3.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_py3.py new file mode 100644 index 000000000000..415b9f03f205 --- /dev/null +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_py3.py @@ -0,0 +1,63 @@ +# 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 .tracked_resource_py3 import TrackedResource + + +class Vault(TrackedResource): + """Resource information, as returned by the resource provider. + + 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 represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param e_tag: Optional ETag. + :type e_tag: str + :param location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param properties: + :type properties: ~azure.mgmt.recoveryservices.models.VaultProperties + :param sku: + :type sku: ~azure.mgmt.recoveryservices.models.Sku + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'VaultProperties'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, *, location: str, e_tag: str=None, tags=None, properties=None, sku=None, **kwargs) -> None: + super(Vault, self).__init__(e_tag=e_tag, location=location, tags=tags, **kwargs) + self.properties = properties + self.sku = sku diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_usage.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_usage.py index 81fe77b5ee08..14d753967ba6 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_usage.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_usage.py @@ -17,8 +17,7 @@ class VaultUsage(Model): :param unit: Unit of the usage. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond' - :type unit: str or :class:`UsagesUnit - ` + :type unit: str or ~azure.mgmt.recoveryservices.models.UsagesUnit :param quota_period: Quota period of usage. :type quota_period: str :param next_reset_time: Next reset time of usage. @@ -28,8 +27,7 @@ class VaultUsage(Model): :param limit: Limit of usage. :type limit: long :param name: Name of usage. - :type name: :class:`NameInfo - ` + :type name: ~azure.mgmt.recoveryservices.models.NameInfo """ _attribute_map = { @@ -41,10 +39,11 @@ class VaultUsage(Model): 'name': {'key': 'name', 'type': 'NameInfo'}, } - def __init__(self, unit=None, quota_period=None, next_reset_time=None, current_value=None, limit=None, name=None): - self.unit = unit - self.quota_period = quota_period - self.next_reset_time = next_reset_time - self.current_value = current_value - self.limit = limit - self.name = name + def __init__(self, **kwargs): + super(VaultUsage, self).__init__(**kwargs) + self.unit = kwargs.get('unit', None) + self.quota_period = kwargs.get('quota_period', None) + self.next_reset_time = kwargs.get('next_reset_time', None) + self.current_value = kwargs.get('current_value', None) + self.limit = kwargs.get('limit', None) + self.name = kwargs.get('name', None) diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_usage_py3.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_usage_py3.py new file mode 100644 index 000000000000..41e3799eb533 --- /dev/null +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/models/vault_usage_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class VaultUsage(Model): + """Usages of a vault. + + :param unit: Unit of the usage. Possible values include: 'Count', 'Bytes', + 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond' + :type unit: str or ~azure.mgmt.recoveryservices.models.UsagesUnit + :param quota_period: Quota period of usage. + :type quota_period: str + :param next_reset_time: Next reset time of usage. + :type next_reset_time: datetime + :param current_value: Current value of usage. + :type current_value: long + :param limit: Limit of usage. + :type limit: long + :param name: Name of usage. + :type name: ~azure.mgmt.recoveryservices.models.NameInfo + """ + + _attribute_map = { + 'unit': {'key': 'unit', 'type': 'str'}, + 'quota_period': {'key': 'quotaPeriod', 'type': 'str'}, + 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, + 'current_value': {'key': 'currentValue', 'type': 'long'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'NameInfo'}, + } + + def __init__(self, *, unit=None, quota_period: str=None, next_reset_time=None, current_value: int=None, limit: int=None, name=None, **kwargs) -> None: + super(VaultUsage, self).__init__(**kwargs) + self.unit = unit + self.quota_period = quota_period + self.next_reset_time = next_reset_time + self.current_value = current_value + self.limit = limit + self.name = name diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/__init__.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/__init__.py index 0b4746f8b030..fd4496cfacb0 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/__init__.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/__init__.py @@ -9,8 +9,6 @@ # regenerated. # -------------------------------------------------------------------------- -from .backup_vault_configs_operations import BackupVaultConfigsOperations -from .backup_storage_configs_operations import BackupStorageConfigsOperations from .vault_certificates_operations import VaultCertificatesOperations from .registered_identities_operations import RegisteredIdentitiesOperations from .replication_usages_operations import ReplicationUsagesOperations @@ -20,8 +18,6 @@ from .usages_operations import UsagesOperations __all__ = [ - 'BackupVaultConfigsOperations', - 'BackupStorageConfigsOperations', 'VaultCertificatesOperations', 'RegisteredIdentitiesOperations', 'ReplicationUsagesOperations', diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/operations.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/operations.py index 12561d6cac60..45dfbe46af48 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/operations.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/operations.py @@ -22,10 +22,12 @@ class Operations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-06-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -44,18 +46,16 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of - :class:`ClientDiscoveryValueForSingleApi - ` - :rtype: :class:`ClientDiscoveryValueForSingleApiPaged - ` + :return: An iterator like instance of ClientDiscoveryValueForSingleApi + :rtype: + ~azure.mgmt.recoveryservices.models.ClientDiscoveryValueForSingleApiPaged[~azure.mgmt.recoveryservices.models.ClientDiscoveryValueForSingleApi] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/providers/Microsoft.RecoveryServices/operations' + url = self.list.metadata['url'] # Construct parameters query_parameters = {} @@ -78,7 +78,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -96,3 +96,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/providers/Microsoft.RecoveryServices/operations'} diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/registered_identities_operations.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/registered_identities_operations.py index f56192f22724..cf9f9829ef5e 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/registered_identities_operations.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/registered_identities_operations.py @@ -22,10 +22,12 @@ class RegisteredIdentitiesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-06-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -51,15 +53,12 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/registeredIdentities/{identityName}' + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -84,7 +83,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [204]: exp = CloudError(response) @@ -94,3 +93,4 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/registeredIdentities/{identityName}'} diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/replication_usages_operations.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/replication_usages_operations.py index d6280fc5d9b6..fbadd6408dce 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/replication_usages_operations.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/replication_usages_operations.py @@ -22,10 +22,12 @@ class ReplicationUsagesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-06-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -49,17 +51,16 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`ReplicationUsage - ` - :rtype: :class:`ReplicationUsagePaged - ` + :return: An iterator like instance of ReplicationUsage + :rtype: + ~azure.mgmt.recoveryservices.models.ReplicationUsagePaged[~azure.mgmt.recoveryservices.models.ReplicationUsage] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/replicationUsages' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -88,7 +89,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -106,3 +107,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/replicationUsages'} diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/usages_operations.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/usages_operations.py index cb79b85f1dc6..9ab6c5de79de 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/usages_operations.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/usages_operations.py @@ -22,10 +22,12 @@ class UsagesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-06-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -49,17 +51,16 @@ def list_by_vaults( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`VaultUsage - ` - :rtype: :class:`VaultUsagePaged - ` + :return: An iterator like instance of VaultUsage + :rtype: + ~azure.mgmt.recoveryservices.models.VaultUsagePaged[~azure.mgmt.recoveryservices.models.VaultUsage] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/usages' + url = self.list_by_vaults.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -88,7 +89,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -106,3 +107,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_vaults.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/usages'} diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/vault_certificates_operations.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/vault_certificates_operations.py index 5dcf1ee51066..8523ff8ecac2 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/vault_certificates_operations.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/vault_certificates_operations.py @@ -22,10 +22,12 @@ class VaultCertificatesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-06-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -37,7 +39,7 @@ def __init__(self, client, config, serializer, deserializer): def create( self, resource_group_name, vault_name, certificate_name, properties=None, custom_headers=None, raw=False, **operation_config): - """Upload a certificate for a resource. + """Uploads a certificate for a resource. :param resource_group_name: The name of the resource group where the recovery services vault is present. @@ -47,26 +49,22 @@ def create( :param certificate_name: Certificate friendly name. :type certificate_name: str :param properties: - :type properties: :class:`RawCertificateData - ` + :type properties: + ~azure.mgmt.recoveryservices.models.RawCertificateData :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: :class:`VaultCertificateResponse - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`VaultCertificateResponse - ` or - :class:`ClientRawResponse` + :return: VaultCertificateResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.recoveryservices.models.VaultCertificateResponse + or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ certificate_request = models.CertificateRequest(properties=properties) # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/certificates/{certificateName}' + url = self.create.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -95,7 +93,7 @@ def create( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -112,3 +110,4 @@ def create( return client_raw_response return deserialized + create.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/certificates/{certificateName}'} diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/vault_extended_info_operations.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/vault_extended_info_operations.py index 5eae0c482270..c672aacb65e2 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/vault_extended_info_operations.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/vault_extended_info_operations.py @@ -22,10 +22,12 @@ class VaultExtendedInfoOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-06-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -49,17 +51,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`VaultExtendedInfoResource - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`VaultExtendedInfoResource - ` or - :class:`ClientRawResponse` + :return: VaultExtendedInfoResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.recoveryservices.models.VaultExtendedInfoResource + or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/extendedInformation/vaultExtendedInfo' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -83,7 +81,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -100,6 +98,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/extendedInformation/vaultExtendedInfo'} def create_or_update( self, resource_group_name, vault_name, resource_resource_extended_info_details, custom_headers=None, raw=False, **operation_config): @@ -110,27 +109,22 @@ def create_or_update( :type resource_group_name: str :param vault_name: The name of the recovery services vault. :type vault_name: str - :param resource_resource_extended_info_details: - resourceResourceExtendedInfoDetails + :param resource_resource_extended_info_details: Details of + ResourceExtendedInfo :type resource_resource_extended_info_details: - :class:`VaultExtendedInfoResource - ` + ~azure.mgmt.recoveryservices.models.VaultExtendedInfoResource :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: :class:`VaultExtendedInfoResource - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`VaultExtendedInfoResource - ` or - :class:`ClientRawResponse` + :return: VaultExtendedInfoResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.recoveryservices.models.VaultExtendedInfoResource + or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/extendedInformation/vaultExtendedInfo' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -158,7 +152,7 @@ def create_or_update( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -175,6 +169,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/extendedInformation/vaultExtendedInfo'} def update( self, resource_group_name, vault_name, resource_resource_extended_info_details, custom_headers=None, raw=False, **operation_config): @@ -185,27 +180,22 @@ def update( :type resource_group_name: str :param vault_name: The name of the recovery services vault. :type vault_name: str - :param resource_resource_extended_info_details: - resourceResourceExtendedInfoDetails + :param resource_resource_extended_info_details: Details of + ResourceExtendedInfo :type resource_resource_extended_info_details: - :class:`VaultExtendedInfoResource - ` + ~azure.mgmt.recoveryservices.models.VaultExtendedInfoResource :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: :class:`VaultExtendedInfoResource - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`VaultExtendedInfoResource - ` or - :class:`ClientRawResponse` + :return: VaultExtendedInfoResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.recoveryservices.models.VaultExtendedInfoResource + or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/extendedInformation/vaultExtendedInfo' + url = self.update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -233,7 +223,7 @@ def update( # Construct and send request request = self._client.patch(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -250,3 +240,4 @@ def update( return client_raw_response return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/extendedInformation/vaultExtendedInfo'} diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/vaults_operations.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/vaults_operations.py index aadf8bb30d28..b844fa2f8374 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/vaults_operations.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/vaults_operations.py @@ -22,10 +22,12 @@ class VaultsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-06-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -44,17 +46,16 @@ def list_by_subscription_id( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`Vault - ` - :rtype: :class:`VaultPaged - ` + :return: An iterator like instance of Vault + :rtype: + ~azure.mgmt.recoveryservices.models.VaultPaged[~azure.mgmt.recoveryservices.models.Vault] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/vaults' + url = self.list_by_subscription_id.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -81,7 +82,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -99,6 +100,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_subscription_id.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/vaults'} def list_by_resource_group( self, resource_group_name, custom_headers=None, raw=False, **operation_config): @@ -112,17 +114,16 @@ def list_by_resource_group( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`Vault - ` - :rtype: :class:`VaultPaged - ` + :return: An iterator like instance of Vault + :rtype: + ~azure.mgmt.recoveryservices.models.VaultPaged[~azure.mgmt.recoveryservices.models.Vault] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults' + url = self.list_by_resource_group.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') @@ -150,7 +151,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -168,6 +169,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults'} def get( self, resource_group_name, vault_name, custom_headers=None, raw=False, **operation_config): @@ -183,15 +185,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`Vault ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`Vault ` or - :class:`ClientRawResponse` + :return: Vault or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.recoveryservices.models.Vault or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -215,7 +215,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -232,6 +232,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}'} def create_or_update( self, resource_group_name, vault_name, vault, custom_headers=None, raw=False, **operation_config): @@ -243,21 +244,19 @@ def create_or_update( :param vault_name: The name of the recovery services vault. :type vault_name: str :param vault: Recovery Services Vault to be created. - :type vault: :class:`Vault ` + :type vault: ~azure.mgmt.recoveryservices.models.Vault :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: :class:`Vault ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`Vault ` or - :class:`ClientRawResponse` + :return: Vault or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.recoveryservices.models.Vault or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -285,7 +284,7 @@ def create_or_update( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -304,6 +303,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}'} def delete( self, resource_group_name, vault_name, custom_headers=None, raw=False, **operation_config): @@ -319,15 +319,12 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}' + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -351,7 +348,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -361,6 +358,7 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}'} def update( self, resource_group_name, vault_name, vault, custom_headers=None, raw=False, **operation_config): @@ -372,21 +370,19 @@ def update( :param vault_name: The name of the recovery services vault. :type vault_name: str :param vault: Recovery Services Vault to be created. - :type vault: :class:`Vault ` + :type vault: ~azure.mgmt.recoveryservices.models.PatchVault :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: :class:`Vault ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`Vault ` or - :class:`ClientRawResponse` + :return: Vault or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.recoveryservices.models.Vault or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}' + url = self.update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -409,12 +405,12 @@ def update( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(vault, 'Vault') + body_content = self._serialize.body(vault, 'PatchVault') # Construct and send request request = self._client.patch(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -433,3 +429,4 @@ def update( return client_raw_response return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}'} diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/recovery_services_client.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/recovery_services_client.py index a86ba67d5fe9..b7119a3cea07 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/recovery_services_client.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/recovery_services_client.py @@ -9,12 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import ServiceClient +from msrest.service_client import SDKClient from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION -from .operations.backup_vault_configs_operations import BackupVaultConfigsOperations -from .operations.backup_storage_configs_operations import BackupStorageConfigsOperations from .operations.vault_certificates_operations import VaultCertificatesOperations from .operations.registered_identities_operations import RegisteredIdentitiesOperations from .operations.replication_usages_operations import ReplicationUsagesOperations @@ -45,30 +43,24 @@ def __init__( raise ValueError("Parameter 'credentials' must not be None.") if subscription_id is None: raise ValueError("Parameter 'subscription_id' must not be None.") - if not isinstance(subscription_id, str): - raise TypeError("Parameter 'subscription_id' must be str.") if not base_url: base_url = 'https://management.azure.com' super(RecoveryServicesClientConfiguration, self).__init__(base_url) - self.add_user_agent('recoveryservicesclient/{}'.format(VERSION)) + self.add_user_agent('azure-mgmt-recoveryservices/{}'.format(VERSION)) self.add_user_agent('Azure-SDK-For-Python') self.credentials = credentials self.subscription_id = subscription_id -class RecoveryServicesClient(object): +class RecoveryServicesClient(SDKClient): """Recovery Services Client :ivar config: Configuration for client. :vartype config: RecoveryServicesClientConfiguration - :ivar backup_vault_configs: BackupVaultConfigs operations - :vartype backup_vault_configs: azure.mgmt.recoveryservices.operations.BackupVaultConfigsOperations - :ivar backup_storage_configs: BackupStorageConfigs operations - :vartype backup_storage_configs: azure.mgmt.recoveryservices.operations.BackupStorageConfigsOperations :ivar vault_certificates: VaultCertificates operations :vartype vault_certificates: azure.mgmt.recoveryservices.operations.VaultCertificatesOperations :ivar registered_identities: RegisteredIdentities operations @@ -96,16 +88,13 @@ def __init__( self, credentials, subscription_id, base_url=None): self.config = RecoveryServicesClientConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) + super(RecoveryServicesClient, 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 = '2016-06-01' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) - self.backup_vault_configs = BackupVaultConfigsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.backup_storage_configs = BackupStorageConfigsOperations( - self._client, self.config, self._serialize, self._deserialize) self.vault_certificates = VaultCertificatesOperations( self._client, self.config, self._serialize, self._deserialize) self.registered_identities = RegisteredIdentitiesOperations( diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/version.py b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/version.py index 9bd1dfac7ecb..3e682bbd5fb1 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/version.py +++ b/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.2.0" +VERSION = "0.3.0" diff --git a/azure-mgmt-recoveryservices/sdk_packaging.toml b/azure-mgmt-recoveryservices/sdk_packaging.toml new file mode 100644 index 000000000000..5efb29092888 --- /dev/null +++ b/azure-mgmt-recoveryservices/sdk_packaging.toml @@ -0,0 +1,5 @@ +[packaging] +package_name = "azure-mgmt-recoveryservices" +package_pprint_name = "Recovery Services" +package_doc_id = "recoveryservices" +is_stable = false diff --git a/azure-mgmt-recoveryservices/setup.py b/azure-mgmt-recoveryservices/setup.py index cff4e02e6235..3b8c97efed35 100644 --- a/azure-mgmt-recoveryservices/setup.py +++ b/azure-mgmt-recoveryservices/setup.py @@ -61,7 +61,7 @@ long_description=readme + '\n\n' + history, license='MIT License', author='Microsoft Corporation', - author_email='ptvshelp@microsoft.com', + author_email='azpysdkhelp@microsoft.com', url='https://github.com/Azure/azure-sdk-for-python', classifiers=[ 'Development Status :: 4 - Beta', @@ -69,16 +69,15 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'License :: OSI Approved :: MIT License', ], zip_safe=False, - packages=find_packages(), + packages=find_packages(exclude=["tests"]), install_requires=[ - 'msrestazure~=0.4.11', + 'msrestazure>=0.4.27,<2.0.0', 'azure-common~=1.1', ], cmdclass=cmdclass diff --git a/azure-mgmt-recoveryservices/tests/test_mgmt_recoveryservices.py b/azure-mgmt-recoveryservices/tests/test_mgmt_recoveryservices.py index 19dd1966e5e0..abea04ad8500 100644 --- a/azure-mgmt-recoveryservices/tests/test_mgmt_recoveryservices.py +++ b/azure-mgmt-recoveryservices/tests/test_mgmt_recoveryservices.py @@ -10,10 +10,6 @@ import azure.mgmt.recoveryservices import azure.mgmt.resource.resources.models import azure.common.exceptions -from azure.mgmt.recoveryservices.models import (StorageModelType, Vault, Sku, SkuName, VaultProperties, - VaultExtendedInfoResource, VaultUsage, EnhancedSecurityState, - StorageModelType - ) from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer from recoveryservices_testcase import MgmtRecoveryServicesTestDefinition, MgmtRecoveryServicesTestHelper diff --git a/azure-mgmt-recoveryservicesbackup/HISTORY.rst b/azure-mgmt-recoveryservicesbackup/HISTORY.rst index 9249efb523af..744ae431eef3 100644 --- a/azure-mgmt-recoveryservicesbackup/HISTORY.rst +++ b/azure-mgmt-recoveryservicesbackup/HISTORY.rst @@ -3,6 +3,42 @@ Release History =============== +0.2.0 (2018-05-25) +++++++++++++++++++ + +**Features** + +- Client class can be used as a context manager to keep the underlying HTTP session open for performance + +**General Breaking changes** + +This version uses a next-generation code generator that *might* introduce breaking changes. + +- Model signatures now use only keyword-argument syntax. All positional arguments must be re-written as keyword-arguments. + To keep auto-completion in most cases, models are now generated for Python 2 and Python 3. Python 3 uses the "*" syntax for keyword-only arguments. +- Enum types now use the "str" mixin (class AzureEnum(str, Enum)) to improve the behavior when unrecognized enum values are encountered. + While this is not a breaking change, the distinctions are important, and are documented here: + https://docs.python.org/3/library/enum.html#others + At a glance: + + - "is" should not be used at all. + - "format" will return the string value, where "%s" string formatting will return `NameOfEnum.stringvalue`. Format syntax should be prefered. + +- New Long Running Operation: + + - Return type changes from `msrestazure.azure_operation.AzureOperationPoller` to `msrest.polling.LROPoller`. External API is the same. + - Return type is now **always** a `msrest.polling.LROPoller`, regardless of the optional parameters used. + - The behavior has changed when using `raw=True`. Instead of returning the initial call result as `ClientRawResponse`, + without polling, now this returns an LROPoller. After polling, the final resource will be returned as a `ClientRawResponse`. + - New `polling` parameter. The default behavior is `Polling=True` which will poll using ARM algorithm. When `Polling=False`, + the response of the initial call will be returned without polling. + - `polling` parameter accepts instances of subclasses of `msrest.polling.PollingMethod`. + - `add_done_callback` will no longer raise if called after polling is finished, but will instead execute the callback right away. + +**Bugfixes** + +- Compatibility of the sdist with wheel 0.31.0 + 0.1.1 (2017-08-09) ++++++++++++++++++ diff --git a/azure-mgmt-recoveryservicesbackup/README.rst b/azure-mgmt-recoveryservicesbackup/README.rst index 99b573cc83a7..940d0af77f11 100644 --- a/azure-mgmt-recoveryservicesbackup/README.rst +++ b/azure-mgmt-recoveryservicesbackup/README.rst @@ -1,12 +1,12 @@ Microsoft Azure SDK for Python ============================== -This is the Microsoft Azure Recovery Services Backup Client Library. +This is the Microsoft Azure Recovery Services Backup Management Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. +This package has been tested with Python 2.7, 3.4, 3.5 and 3.6. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. @@ -36,9 +36,9 @@ If you see azure==0.11.0 (or any version below 1.0), uninstall it first: Usage ===== -For code examples, see `Recovery Services Backup -`__ -on readthedocs.org. +For code examples, see `Recovery Services Backup Management +`__ +on docs.microsoft.com. Provide Feedback diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/__init__.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/__init__.py index 2557e1a753ad..75c1ed3ffccc 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/__init__.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/__init__.py @@ -9,212 +9,603 @@ # regenerated. # -------------------------------------------------------------------------- -from .azure_iaa_svm_error_info import AzureIaaSVMErrorInfo -from .azure_iaa_svm_job_task_details import AzureIaaSVMJobTaskDetails -from .azure_iaa_svm_job_extended_info import AzureIaaSVMJobExtendedInfo -from .azure_iaa_svm_job import AzureIaaSVMJob -from .dpm_error_info import DpmErrorInfo -from .dpm_job_task_details import DpmJobTaskDetails -from .dpm_job_extended_info import DpmJobExtendedInfo -from .dpm_job import DpmJob -from .job import Job -from .job_query_object import JobQueryObject -from .job_resource import JobResource -from .mab_error_info import MabErrorInfo -from .mab_job_task_details import MabJobTaskDetails -from .mab_job_extended_info import MabJobExtendedInfo -from .mab_job import MabJob -from .resource import Resource -from .resource_list import ResourceList -from .dpm_container_extended_info import DPMContainerExtendedInfo -from .azure_backup_server_container import AzureBackupServerContainer -from .azure_backup_server_engine import AzureBackupServerEngine -from .azure_iaa_sclassic_compute_vm_container import AzureIaaSClassicComputeVMContainer -from .azure_iaa_sclassic_compute_vm_protectable_item import AzureIaaSClassicComputeVMProtectableItem -from .azure_iaa_sclassic_compute_vm_protected_item import AzureIaaSClassicComputeVMProtectedItem -from .azure_iaa_scompute_vm_container import AzureIaaSComputeVMContainer -from .azure_iaa_scompute_vm_protectable_item import AzureIaaSComputeVMProtectableItem -from .azure_iaa_scompute_vm_protected_item import AzureIaaSComputeVMProtectedItem -from .azure_iaa_svm_health_details import AzureIaaSVMHealthDetails -from .azure_iaa_svm_protected_item_extended_info import AzureIaaSVMProtectedItemExtendedInfo -from .azure_iaa_svm_protected_item import AzureIaaSVMProtectedItem -from .schedule_policy import SchedulePolicy -from .retention_policy import RetentionPolicy -from .azure_iaa_svm_protection_policy import AzureIaaSVMProtectionPolicy -from .azure_sql_container import AzureSqlContainer -from .azure_sql_protected_item_extended_info import AzureSqlProtectedItemExtendedInfo -from .azure_sql_protected_item import AzureSqlProtectedItem -from .azure_sql_protection_policy import AzureSqlProtectionPolicy -from .backup_engine_extended_info import BackupEngineExtendedInfo -from .backup_engine_base import BackupEngineBase -from .backup_engine_base_resource import BackupEngineBaseResource -from .name_info import NameInfo -from .backup_management_usage import BackupManagementUsage -from .backup_request import BackupRequest -from .backup_request_resource import BackupRequestResource -from .backup_resource_config import BackupResourceConfig -from .backup_resource_config_resource import BackupResourceConfigResource -from .backup_resource_vault_config import BackupResourceVaultConfig -from .backup_resource_vault_config_resource import BackupResourceVaultConfigResource -from .bek_details import BEKDetails -from .bms_backup_engine_query_object import BMSBackupEngineQueryObject -from .bms_backup_engines_query_object import BMSBackupEnginesQueryObject -from .bms_backup_summaries_query_object import BMSBackupSummariesQueryObject -from .bms_container_query_object import BMSContainerQueryObject -from .bmspo_query_object import BMSPOQueryObject -from .bmsrp_query_object import BMSRPQueryObject -from .client_script_for_connect import ClientScriptForConnect -from .day import Day -from .daily_retention_format import DailyRetentionFormat -from .retention_duration import RetentionDuration -from .daily_retention_schedule import DailyRetentionSchedule -from .dpm_backup_engine import DpmBackupEngine -from .dpm_container import DpmContainer -from .dpm_protected_item_extended_info import DPMProtectedItemExtendedInfo -from .dpm_protected_item import DPMProtectedItem -from .encryption_details import EncryptionDetails -from .export_jobs_operation_result_info import ExportJobsOperationResultInfo -from .generic_recovery_point import GenericRecoveryPoint -from .get_protected_item_query_object import GetProtectedItemQueryObject -from .iaas_vm_backup_request import IaasVMBackupRequest -from .iaa_svm_container import IaaSVMContainer -from .iaas_vmilr_registration_request import IaasVMILRRegistrationRequest -from .iaa_svm_protectable_item import IaaSVMProtectableItem -from .kek_details import KEKDetails -from .key_and_secret_details import KeyAndSecretDetails -from .recovery_point_tier_information import RecoveryPointTierInformation -from .iaas_vm_recovery_point import IaasVMRecoveryPoint -from .iaas_vm_restore_request import IaasVMRestoreRequest -from .ilr_request import ILRRequest -from .ilr_request_resource import ILRRequestResource -from .instant_item_recovery_target import InstantItemRecoveryTarget -from .weekly_retention_schedule import WeeklyRetentionSchedule -from .weekly_retention_format import WeeklyRetentionFormat -from .monthly_retention_schedule import MonthlyRetentionSchedule -from .yearly_retention_schedule import YearlyRetentionSchedule -from .long_term_retention_policy import LongTermRetentionPolicy -from .long_term_schedule_policy import LongTermSchedulePolicy -from .mab_container_extended_info import MabContainerExtendedInfo -from .mab_container import MabContainer -from .mab_file_folder_protected_item_extended_info import MabFileFolderProtectedItemExtendedInfo -from .mab_file_folder_protected_item import MabFileFolderProtectedItem -from .mab_protection_policy import MabProtectionPolicy -from .operation_result_info import OperationResultInfo -from .operation_result_info_base import OperationResultInfoBase -from .operation_result_info_base_resource import OperationResultInfoBaseResource -from .operation_status_error import OperationStatusError -from .operation_status_extended_info import OperationStatusExtendedInfo -from .operation_status import OperationStatus -from .operation_status_job_extended_info import OperationStatusJobExtendedInfo -from .operation_status_jobs_extended_info import OperationStatusJobsExtendedInfo -from .operation_status_provision_ilr_extended_info import OperationStatusProvisionILRExtendedInfo -from .operation_worker_response import OperationWorkerResponse -from .protected_item import ProtectedItem -from .protected_item_query_object import ProtectedItemQueryObject -from .protected_item_resource import ProtectedItemResource -from .protection_container import ProtectionContainer -from .protection_container_resource import ProtectionContainerResource -from .protection_policy import ProtectionPolicy -from .protection_policy_query_object import ProtectionPolicyQueryObject -from .protection_policy_resource import ProtectionPolicyResource -from .recovery_point import RecoveryPoint -from .recovery_point_resource import RecoveryPointResource -from .restore_request import RestoreRequest -from .restore_request_resource import RestoreRequestResource -from .simple_retention_policy import SimpleRetentionPolicy -from .simple_schedule_policy import SimpleSchedulePolicy -from .token_information import TokenInformation -from .workload_protectable_item import WorkloadProtectableItem -from .workload_protectable_item_resource import WorkloadProtectableItemResource -from .client_discovery_display import ClientDiscoveryDisplay -from .client_discovery_for_log_specification import ClientDiscoveryForLogSpecification -from .client_discovery_for_service_specification import ClientDiscoveryForServiceSpecification -from .client_discovery_for_properties import ClientDiscoveryForProperties -from .client_discovery_value_for_single_api import ClientDiscoveryValueForSingleApi +try: + from .azure_fileshare_protected_item_extended_info_py3 import AzureFileshareProtectedItemExtendedInfo + from .azure_fileshare_protected_item_py3 import AzureFileshareProtectedItem + from .schedule_policy_py3 import SchedulePolicy + from .retention_policy_py3 import RetentionPolicy + from .azure_file_share_protection_policy_py3 import AzureFileShareProtectionPolicy + from .azure_iaa_sclassic_compute_vm_protected_item_py3 import AzureIaaSClassicComputeVMProtectedItem + from .azure_iaa_scompute_vm_protected_item_py3 import AzureIaaSComputeVMProtectedItem + from .azure_iaa_svm_error_info_py3 import AzureIaaSVMErrorInfo + from .azure_iaa_svm_health_details_py3 import AzureIaaSVMHealthDetails + from .azure_iaa_svm_job_task_details_py3 import AzureIaaSVMJobTaskDetails + from .azure_iaa_svm_job_extended_info_py3 import AzureIaaSVMJobExtendedInfo + from .azure_iaa_svm_job_py3 import AzureIaaSVMJob + from .azure_iaa_svm_protected_item_extended_info_py3 import AzureIaaSVMProtectedItemExtendedInfo + from .azure_iaa_svm_protected_item_py3 import AzureIaaSVMProtectedItem + from .azure_iaa_svm_protection_policy_py3 import AzureIaaSVMProtectionPolicy + from .azure_resource_protection_intent_py3 import AzureResourceProtectionIntent + from .azure_sql_protected_item_extended_info_py3 import AzureSqlProtectedItemExtendedInfo + from .azure_sql_protected_item_py3 import AzureSqlProtectedItem + from .azure_sql_protection_policy_py3 import AzureSqlProtectionPolicy + from .azure_storage_error_info_py3 import AzureStorageErrorInfo + from .azure_storage_job_task_details_py3 import AzureStorageJobTaskDetails + from .azure_storage_job_extended_info_py3 import AzureStorageJobExtendedInfo + from .azure_storage_job_py3 import AzureStorageJob + from .azure_vm_resource_feature_support_request_py3 import AzureVMResourceFeatureSupportRequest + from .azure_vm_resource_feature_support_response_py3 import AzureVMResourceFeatureSupportResponse + from .azure_vm_workload_protected_item_extended_info_py3 import AzureVmWorkloadProtectedItemExtendedInfo + from .settings_py3 import Settings + from .sub_protection_policy_py3 import SubProtectionPolicy + from .azure_vm_workload_protection_policy_py3 import AzureVmWorkloadProtectionPolicy + from .error_detail_py3 import ErrorDetail + from .azure_vm_workload_sql_database_protected_item_py3 import AzureVmWorkloadSQLDatabaseProtectedItem + from .azure_workload_error_info_py3 import AzureWorkloadErrorInfo + from .azure_workload_job_task_details_py3 import AzureWorkloadJobTaskDetails + from .azure_workload_job_extended_info_py3 import AzureWorkloadJobExtendedInfo + from .azure_workload_job_py3 import AzureWorkloadJob + from .name_info_py3 import NameInfo + from .backup_management_usage_py3 import BackupManagementUsage + from .backup_status_request_py3 import BackupStatusRequest + from .backup_status_response_py3 import BackupStatusResponse + from .bms_backup_summaries_query_object_py3 import BMSBackupSummariesQueryObject + from .day_py3 import Day + from .daily_retention_format_py3 import DailyRetentionFormat + from .retention_duration_py3 import RetentionDuration + from .daily_retention_schedule_py3 import DailyRetentionSchedule + from .dpm_error_info_py3 import DpmErrorInfo + from .dpm_job_task_details_py3 import DpmJobTaskDetails + from .dpm_job_extended_info_py3 import DpmJobExtendedInfo + from .dpm_job_py3 import DpmJob + from .dpm_protected_item_extended_info_py3 import DPMProtectedItemExtendedInfo + from .dpm_protected_item_py3 import DPMProtectedItem + from .export_jobs_operation_result_info_py3 import ExportJobsOperationResultInfo + from .feature_support_request_py3 import FeatureSupportRequest + from .generic_protected_item_py3 import GenericProtectedItem + from .generic_protection_policy_py3 import GenericProtectionPolicy + from .job_py3 import Job + from .job_query_object_py3 import JobQueryObject + from .job_resource_py3 import JobResource + from .log_schedule_policy_py3 import LogSchedulePolicy + from .weekly_retention_schedule_py3 import WeeklyRetentionSchedule + from .weekly_retention_format_py3 import WeeklyRetentionFormat + from .monthly_retention_schedule_py3 import MonthlyRetentionSchedule + from .yearly_retention_schedule_py3 import YearlyRetentionSchedule + from .long_term_retention_policy_py3 import LongTermRetentionPolicy + from .long_term_schedule_policy_py3 import LongTermSchedulePolicy + from .mab_error_info_py3 import MabErrorInfo + from .mab_file_folder_protected_item_extended_info_py3 import MabFileFolderProtectedItemExtendedInfo + from .mab_file_folder_protected_item_py3 import MabFileFolderProtectedItem + from .mab_job_task_details_py3 import MabJobTaskDetails + from .mab_job_extended_info_py3 import MabJobExtendedInfo + from .mab_job_py3 import MabJob + from .mab_protection_policy_py3 import MabProtectionPolicy + from .operation_result_info_py3 import OperationResultInfo + from .operation_result_info_base_py3 import OperationResultInfoBase + from .operation_result_info_base_resource_py3 import OperationResultInfoBaseResource + from .operation_worker_response_py3 import OperationWorkerResponse + from .pre_validate_enable_backup_request_py3 import PreValidateEnableBackupRequest + from .pre_validate_enable_backup_response_py3 import PreValidateEnableBackupResponse + from .protected_item_py3 import ProtectedItem + from .protected_item_query_object_py3 import ProtectedItemQueryObject + from .protected_item_resource_py3 import ProtectedItemResource + from .protection_intent_py3 import ProtectionIntent + from .protection_intent_resource_py3 import ProtectionIntentResource + from .protection_policy_py3 import ProtectionPolicy + from .protection_policy_query_object_py3 import ProtectionPolicyQueryObject + from .protection_policy_resource_py3 import ProtectionPolicyResource + from .resource_py3 import Resource + from .resource_list_py3 import ResourceList + from .simple_retention_policy_py3 import SimpleRetentionPolicy + from .simple_schedule_policy_py3 import SimpleSchedulePolicy + from .dpm_container_extended_info_py3 import DPMContainerExtendedInfo + from .azure_backup_server_container_py3 import AzureBackupServerContainer + from .azure_backup_server_engine_py3 import AzureBackupServerEngine + from .azure_file_share_backup_request_py3 import AzureFileShareBackupRequest + from .azure_file_share_protectable_item_py3 import AzureFileShareProtectableItem + from .azure_file_share_recovery_point_py3 import AzureFileShareRecoveryPoint + from .restore_file_specs_py3 import RestoreFileSpecs + from .target_afs_restore_info_py3 import TargetAFSRestoreInfo + from .azure_file_share_restore_request_py3 import AzureFileShareRestoreRequest + from .azure_iaa_sclassic_compute_vm_container_py3 import AzureIaaSClassicComputeVMContainer + from .azure_iaa_sclassic_compute_vm_protectable_item_py3 import AzureIaaSClassicComputeVMProtectableItem + from .azure_iaa_scompute_vm_container_py3 import AzureIaaSComputeVMContainer + from .azure_iaa_scompute_vm_protectable_item_py3 import AzureIaaSComputeVMProtectableItem + from .azure_sqlag_workload_container_protection_container_py3 import AzureSQLAGWorkloadContainerProtectionContainer + from .azure_sql_container_py3 import AzureSqlContainer + from .azure_storage_container_py3 import AzureStorageContainer + from .azure_storage_protectable_container_py3 import AzureStorageProtectableContainer + from .azure_vm_app_container_protectable_container_py3 import AzureVMAppContainerProtectableContainer + from .azure_vm_app_container_protection_container_py3 import AzureVMAppContainerProtectionContainer + from .azure_vm_workload_item_py3 import AzureVmWorkloadItem + from .pre_backup_validation_py3 import PreBackupValidation + from .azure_vm_workload_protectable_item_py3 import AzureVmWorkloadProtectableItem + from .azure_vm_workload_sql_availability_group_protectable_item_py3 import AzureVmWorkloadSQLAvailabilityGroupProtectableItem + from .azure_vm_workload_sql_database_protectable_item_py3 import AzureVmWorkloadSQLDatabaseProtectableItem + from .azure_vm_workload_sql_database_workload_item_py3 import AzureVmWorkloadSQLDatabaseWorkloadItem + from .azure_vm_workload_sql_instance_protectable_item_py3 import AzureVmWorkloadSQLInstanceProtectableItem + from .sql_data_directory_py3 import SQLDataDirectory + from .azure_vm_workload_sql_instance_workload_item_py3 import AzureVmWorkloadSQLInstanceWorkloadItem + from .azure_workload_backup_request_py3 import AzureWorkloadBackupRequest + from .inquiry_validation_py3 import InquiryValidation + from .workload_inquiry_details_py3 import WorkloadInquiryDetails + from .inquiry_info_py3 import InquiryInfo + from .distributed_nodes_info_py3 import DistributedNodesInfo + from .azure_workload_container_extended_info_py3 import AzureWorkloadContainerExtendedInfo + from .azure_workload_container_py3 import AzureWorkloadContainer + from .azure_workload_recovery_point_py3 import AzureWorkloadRecoveryPoint + from .azure_workload_restore_request_py3 import AzureWorkloadRestoreRequest + from .point_in_time_range_py3 import PointInTimeRange + from .azure_workload_sql_point_in_time_recovery_point_py3 import AzureWorkloadSQLPointInTimeRecoveryPoint + from .azure_workload_sql_point_in_time_restore_request_py3 import AzureWorkloadSQLPointInTimeRestoreRequest + from .azure_workload_sql_recovery_point_extended_info_py3 import AzureWorkloadSQLRecoveryPointExtendedInfo + from .azure_workload_sql_recovery_point_py3 import AzureWorkloadSQLRecoveryPoint + from .target_restore_info_py3 import TargetRestoreInfo + from .sql_data_directory_mapping_py3 import SQLDataDirectoryMapping + from .azure_workload_sql_restore_request_py3 import AzureWorkloadSQLRestoreRequest + from .backup_engine_extended_info_py3 import BackupEngineExtendedInfo + from .backup_engine_base_py3 import BackupEngineBase + from .backup_engine_base_resource_py3 import BackupEngineBaseResource + from .backup_request_py3 import BackupRequest + from .backup_request_resource_py3 import BackupRequestResource + from .backup_resource_config_py3 import BackupResourceConfig + from .backup_resource_config_resource_py3 import BackupResourceConfigResource + from .backup_resource_vault_config_py3 import BackupResourceVaultConfig + from .backup_resource_vault_config_resource_py3 import BackupResourceVaultConfigResource + from .bek_details_py3 import BEKDetails + from .bms_backup_engine_query_object_py3 import BMSBackupEngineQueryObject + from .bms_backup_engines_query_object_py3 import BMSBackupEnginesQueryObject + from .bms_container_query_object_py3 import BMSContainerQueryObject + from .bmspo_query_object_py3 import BMSPOQueryObject + from .bms_refresh_containers_query_object_py3 import BMSRefreshContainersQueryObject + from .bmsrp_query_object_py3 import BMSRPQueryObject + from .bms_workload_item_query_object_py3 import BMSWorkloadItemQueryObject + from .client_script_for_connect_py3 import ClientScriptForConnect + from .container_identity_info_py3 import ContainerIdentityInfo + from .dpm_backup_engine_py3 import DpmBackupEngine + from .dpm_container_py3 import DpmContainer + from .encryption_details_py3 import EncryptionDetails + from .generic_container_extended_info_py3 import GenericContainerExtendedInfo + from .generic_container_py3 import GenericContainer + from .generic_recovery_point_py3 import GenericRecoveryPoint + from .get_protected_item_query_object_py3 import GetProtectedItemQueryObject + from .iaas_vm_backup_request_py3 import IaasVMBackupRequest + from .iaa_svm_container_py3 import IaaSVMContainer + from .iaas_vmilr_registration_request_py3 import IaasVMILRRegistrationRequest + from .iaa_svm_protectable_item_py3 import IaaSVMProtectableItem + from .kek_details_py3 import KEKDetails + from .key_and_secret_details_py3 import KeyAndSecretDetails + from .recovery_point_tier_information_py3 import RecoveryPointTierInformation + from .iaas_vm_recovery_point_py3 import IaasVMRecoveryPoint + from .iaas_vm_restore_request_py3 import IaasVMRestoreRequest + from .ilr_request_py3 import ILRRequest + from .ilr_request_resource_py3 import ILRRequestResource + from .instant_item_recovery_target_py3 import InstantItemRecoveryTarget + from .mab_container_extended_info_py3 import MabContainerExtendedInfo + from .mab_container_health_details_py3 import MABContainerHealthDetails + from .mab_container_py3 import MabContainer + from .operation_status_error_py3 import OperationStatusError + from .operation_status_extended_info_py3 import OperationStatusExtendedInfo + from .operation_status_py3 import OperationStatus + from .operation_status_job_extended_info_py3 import OperationStatusJobExtendedInfo + from .operation_status_jobs_extended_info_py3 import OperationStatusJobsExtendedInfo + from .operation_status_provision_ilr_extended_info_py3 import OperationStatusProvisionILRExtendedInfo + from .protectable_container_py3 import ProtectableContainer + from .protectable_container_resource_py3 import ProtectableContainerResource + from .protection_container_py3 import ProtectionContainer + from .protection_container_resource_py3 import ProtectionContainerResource + from .recovery_point_py3 import RecoveryPoint + from .recovery_point_resource_py3 import RecoveryPointResource + from .restore_request_py3 import RestoreRequest + from .restore_request_resource_py3 import RestoreRequestResource + from .token_information_py3 import TokenInformation + from .workload_item_py3 import WorkloadItem + from .workload_item_resource_py3 import WorkloadItemResource + from .workload_protectable_item_py3 import WorkloadProtectableItem + from .workload_protectable_item_resource_py3 import WorkloadProtectableItemResource + from .client_discovery_display_py3 import ClientDiscoveryDisplay + from .client_discovery_for_log_specification_py3 import ClientDiscoveryForLogSpecification + from .client_discovery_for_service_specification_py3 import ClientDiscoveryForServiceSpecification + from .client_discovery_for_properties_py3 import ClientDiscoveryForProperties + from .client_discovery_value_for_single_api_py3 import ClientDiscoveryValueForSingleApi +except (SyntaxError, ImportError): + from .azure_fileshare_protected_item_extended_info import AzureFileshareProtectedItemExtendedInfo + from .azure_fileshare_protected_item import AzureFileshareProtectedItem + from .schedule_policy import SchedulePolicy + from .retention_policy import RetentionPolicy + from .azure_file_share_protection_policy import AzureFileShareProtectionPolicy + from .azure_iaa_sclassic_compute_vm_protected_item import AzureIaaSClassicComputeVMProtectedItem + from .azure_iaa_scompute_vm_protected_item import AzureIaaSComputeVMProtectedItem + from .azure_iaa_svm_error_info import AzureIaaSVMErrorInfo + from .azure_iaa_svm_health_details import AzureIaaSVMHealthDetails + from .azure_iaa_svm_job_task_details import AzureIaaSVMJobTaskDetails + from .azure_iaa_svm_job_extended_info import AzureIaaSVMJobExtendedInfo + from .azure_iaa_svm_job import AzureIaaSVMJob + from .azure_iaa_svm_protected_item_extended_info import AzureIaaSVMProtectedItemExtendedInfo + from .azure_iaa_svm_protected_item import AzureIaaSVMProtectedItem + from .azure_iaa_svm_protection_policy import AzureIaaSVMProtectionPolicy + from .azure_resource_protection_intent import AzureResourceProtectionIntent + from .azure_sql_protected_item_extended_info import AzureSqlProtectedItemExtendedInfo + from .azure_sql_protected_item import AzureSqlProtectedItem + from .azure_sql_protection_policy import AzureSqlProtectionPolicy + from .azure_storage_error_info import AzureStorageErrorInfo + from .azure_storage_job_task_details import AzureStorageJobTaskDetails + from .azure_storage_job_extended_info import AzureStorageJobExtendedInfo + from .azure_storage_job import AzureStorageJob + from .azure_vm_resource_feature_support_request import AzureVMResourceFeatureSupportRequest + from .azure_vm_resource_feature_support_response import AzureVMResourceFeatureSupportResponse + from .azure_vm_workload_protected_item_extended_info import AzureVmWorkloadProtectedItemExtendedInfo + from .settings import Settings + from .sub_protection_policy import SubProtectionPolicy + from .azure_vm_workload_protection_policy import AzureVmWorkloadProtectionPolicy + from .error_detail import ErrorDetail + from .azure_vm_workload_sql_database_protected_item import AzureVmWorkloadSQLDatabaseProtectedItem + from .azure_workload_error_info import AzureWorkloadErrorInfo + from .azure_workload_job_task_details import AzureWorkloadJobTaskDetails + from .azure_workload_job_extended_info import AzureWorkloadJobExtendedInfo + from .azure_workload_job import AzureWorkloadJob + from .name_info import NameInfo + from .backup_management_usage import BackupManagementUsage + from .backup_status_request import BackupStatusRequest + from .backup_status_response import BackupStatusResponse + from .bms_backup_summaries_query_object import BMSBackupSummariesQueryObject + from .day import Day + from .daily_retention_format import DailyRetentionFormat + from .retention_duration import RetentionDuration + from .daily_retention_schedule import DailyRetentionSchedule + from .dpm_error_info import DpmErrorInfo + from .dpm_job_task_details import DpmJobTaskDetails + from .dpm_job_extended_info import DpmJobExtendedInfo + from .dpm_job import DpmJob + from .dpm_protected_item_extended_info import DPMProtectedItemExtendedInfo + from .dpm_protected_item import DPMProtectedItem + from .export_jobs_operation_result_info import ExportJobsOperationResultInfo + from .feature_support_request import FeatureSupportRequest + from .generic_protected_item import GenericProtectedItem + from .generic_protection_policy import GenericProtectionPolicy + from .job import Job + from .job_query_object import JobQueryObject + from .job_resource import JobResource + from .log_schedule_policy import LogSchedulePolicy + from .weekly_retention_schedule import WeeklyRetentionSchedule + from .weekly_retention_format import WeeklyRetentionFormat + from .monthly_retention_schedule import MonthlyRetentionSchedule + from .yearly_retention_schedule import YearlyRetentionSchedule + from .long_term_retention_policy import LongTermRetentionPolicy + from .long_term_schedule_policy import LongTermSchedulePolicy + from .mab_error_info import MabErrorInfo + from .mab_file_folder_protected_item_extended_info import MabFileFolderProtectedItemExtendedInfo + from .mab_file_folder_protected_item import MabFileFolderProtectedItem + from .mab_job_task_details import MabJobTaskDetails + from .mab_job_extended_info import MabJobExtendedInfo + from .mab_job import MabJob + from .mab_protection_policy import MabProtectionPolicy + from .operation_result_info import OperationResultInfo + from .operation_result_info_base import OperationResultInfoBase + from .operation_result_info_base_resource import OperationResultInfoBaseResource + from .operation_worker_response import OperationWorkerResponse + from .pre_validate_enable_backup_request import PreValidateEnableBackupRequest + from .pre_validate_enable_backup_response import PreValidateEnableBackupResponse + from .protected_item import ProtectedItem + from .protected_item_query_object import ProtectedItemQueryObject + from .protected_item_resource import ProtectedItemResource + from .protection_intent import ProtectionIntent + from .protection_intent_resource import ProtectionIntentResource + from .protection_policy import ProtectionPolicy + from .protection_policy_query_object import ProtectionPolicyQueryObject + from .protection_policy_resource import ProtectionPolicyResource + from .resource import Resource + from .resource_list import ResourceList + from .simple_retention_policy import SimpleRetentionPolicy + from .simple_schedule_policy import SimpleSchedulePolicy + from .dpm_container_extended_info import DPMContainerExtendedInfo + from .azure_backup_server_container import AzureBackupServerContainer + from .azure_backup_server_engine import AzureBackupServerEngine + from .azure_file_share_backup_request import AzureFileShareBackupRequest + from .azure_file_share_protectable_item import AzureFileShareProtectableItem + from .azure_file_share_recovery_point import AzureFileShareRecoveryPoint + from .restore_file_specs import RestoreFileSpecs + from .target_afs_restore_info import TargetAFSRestoreInfo + from .azure_file_share_restore_request import AzureFileShareRestoreRequest + from .azure_iaa_sclassic_compute_vm_container import AzureIaaSClassicComputeVMContainer + from .azure_iaa_sclassic_compute_vm_protectable_item import AzureIaaSClassicComputeVMProtectableItem + from .azure_iaa_scompute_vm_container import AzureIaaSComputeVMContainer + from .azure_iaa_scompute_vm_protectable_item import AzureIaaSComputeVMProtectableItem + from .azure_sqlag_workload_container_protection_container import AzureSQLAGWorkloadContainerProtectionContainer + from .azure_sql_container import AzureSqlContainer + from .azure_storage_container import AzureStorageContainer + from .azure_storage_protectable_container import AzureStorageProtectableContainer + from .azure_vm_app_container_protectable_container import AzureVMAppContainerProtectableContainer + from .azure_vm_app_container_protection_container import AzureVMAppContainerProtectionContainer + from .azure_vm_workload_item import AzureVmWorkloadItem + from .pre_backup_validation import PreBackupValidation + from .azure_vm_workload_protectable_item import AzureVmWorkloadProtectableItem + from .azure_vm_workload_sql_availability_group_protectable_item import AzureVmWorkloadSQLAvailabilityGroupProtectableItem + from .azure_vm_workload_sql_database_protectable_item import AzureVmWorkloadSQLDatabaseProtectableItem + from .azure_vm_workload_sql_database_workload_item import AzureVmWorkloadSQLDatabaseWorkloadItem + from .azure_vm_workload_sql_instance_protectable_item import AzureVmWorkloadSQLInstanceProtectableItem + from .sql_data_directory import SQLDataDirectory + from .azure_vm_workload_sql_instance_workload_item import AzureVmWorkloadSQLInstanceWorkloadItem + from .azure_workload_backup_request import AzureWorkloadBackupRequest + from .inquiry_validation import InquiryValidation + from .workload_inquiry_details import WorkloadInquiryDetails + from .inquiry_info import InquiryInfo + from .distributed_nodes_info import DistributedNodesInfo + from .azure_workload_container_extended_info import AzureWorkloadContainerExtendedInfo + from .azure_workload_container import AzureWorkloadContainer + from .azure_workload_recovery_point import AzureWorkloadRecoveryPoint + from .azure_workload_restore_request import AzureWorkloadRestoreRequest + from .point_in_time_range import PointInTimeRange + from .azure_workload_sql_point_in_time_recovery_point import AzureWorkloadSQLPointInTimeRecoveryPoint + from .azure_workload_sql_point_in_time_restore_request import AzureWorkloadSQLPointInTimeRestoreRequest + from .azure_workload_sql_recovery_point_extended_info import AzureWorkloadSQLRecoveryPointExtendedInfo + from .azure_workload_sql_recovery_point import AzureWorkloadSQLRecoveryPoint + from .target_restore_info import TargetRestoreInfo + from .sql_data_directory_mapping import SQLDataDirectoryMapping + from .azure_workload_sql_restore_request import AzureWorkloadSQLRestoreRequest + from .backup_engine_extended_info import BackupEngineExtendedInfo + from .backup_engine_base import BackupEngineBase + from .backup_engine_base_resource import BackupEngineBaseResource + from .backup_request import BackupRequest + from .backup_request_resource import BackupRequestResource + from .backup_resource_config import BackupResourceConfig + from .backup_resource_config_resource import BackupResourceConfigResource + from .backup_resource_vault_config import BackupResourceVaultConfig + from .backup_resource_vault_config_resource import BackupResourceVaultConfigResource + from .bek_details import BEKDetails + from .bms_backup_engine_query_object import BMSBackupEngineQueryObject + from .bms_backup_engines_query_object import BMSBackupEnginesQueryObject + from .bms_container_query_object import BMSContainerQueryObject + from .bmspo_query_object import BMSPOQueryObject + from .bms_refresh_containers_query_object import BMSRefreshContainersQueryObject + from .bmsrp_query_object import BMSRPQueryObject + from .bms_workload_item_query_object import BMSWorkloadItemQueryObject + from .client_script_for_connect import ClientScriptForConnect + from .container_identity_info import ContainerIdentityInfo + from .dpm_backup_engine import DpmBackupEngine + from .dpm_container import DpmContainer + from .encryption_details import EncryptionDetails + from .generic_container_extended_info import GenericContainerExtendedInfo + from .generic_container import GenericContainer + from .generic_recovery_point import GenericRecoveryPoint + from .get_protected_item_query_object import GetProtectedItemQueryObject + from .iaas_vm_backup_request import IaasVMBackupRequest + from .iaa_svm_container import IaaSVMContainer + from .iaas_vmilr_registration_request import IaasVMILRRegistrationRequest + from .iaa_svm_protectable_item import IaaSVMProtectableItem + from .kek_details import KEKDetails + from .key_and_secret_details import KeyAndSecretDetails + from .recovery_point_tier_information import RecoveryPointTierInformation + from .iaas_vm_recovery_point import IaasVMRecoveryPoint + from .iaas_vm_restore_request import IaasVMRestoreRequest + from .ilr_request import ILRRequest + from .ilr_request_resource import ILRRequestResource + from .instant_item_recovery_target import InstantItemRecoveryTarget + from .mab_container_extended_info import MabContainerExtendedInfo + from .mab_container_health_details import MABContainerHealthDetails + from .mab_container import MabContainer + from .operation_status_error import OperationStatusError + from .operation_status_extended_info import OperationStatusExtendedInfo + from .operation_status import OperationStatus + from .operation_status_job_extended_info import OperationStatusJobExtendedInfo + from .operation_status_jobs_extended_info import OperationStatusJobsExtendedInfo + from .operation_status_provision_ilr_extended_info import OperationStatusProvisionILRExtendedInfo + from .protectable_container import ProtectableContainer + from .protectable_container_resource import ProtectableContainerResource + from .protection_container import ProtectionContainer + from .protection_container_resource import ProtectionContainerResource + from .recovery_point import RecoveryPoint + from .recovery_point_resource import RecoveryPointResource + from .restore_request import RestoreRequest + from .restore_request_resource import RestoreRequestResource + from .token_information import TokenInformation + from .workload_item import WorkloadItem + from .workload_item_resource import WorkloadItemResource + from .workload_protectable_item import WorkloadProtectableItem + from .workload_protectable_item_resource import WorkloadProtectableItemResource + from .client_discovery_display import ClientDiscoveryDisplay + from .client_discovery_for_log_specification import ClientDiscoveryForLogSpecification + from .client_discovery_for_service_specification import ClientDiscoveryForServiceSpecification + from .client_discovery_for_properties import ClientDiscoveryForProperties + from .client_discovery_value_for_single_api import ClientDiscoveryValueForSingleApi from .job_resource_paged import JobResourcePaged +from .protection_policy_resource_paged import ProtectionPolicyResourcePaged +from .protected_item_resource_paged import ProtectedItemResourcePaged +from .backup_management_usage_paged import BackupManagementUsagePaged from .backup_engine_base_resource_paged import BackupEngineBaseResourcePaged +from .protectable_container_resource_paged import ProtectableContainerResourcePaged +from .workload_item_resource_paged import WorkloadItemResourcePaged from .recovery_point_resource_paged import RecoveryPointResourcePaged -from .protection_policy_resource_paged import ProtectionPolicyResourcePaged from .workload_protectable_item_resource_paged import WorkloadProtectableItemResourcePaged -from .protected_item_resource_paged import ProtectedItemResourcePaged from .protection_container_resource_paged import ProtectionContainerResourcePaged -from .backup_management_usage_paged import BackupManagementUsagePaged from .client_discovery_value_for_single_api_paged import ClientDiscoveryValueForSingleApiPaged from .recovery_services_backup_client_enums import ( + ProtectionState, + HealthStatus, JobSupportedAction, + ProtectedItemState, + SupportStatus, + LastBackupStatus, + ProtectedItemHealthStatus, + UsagesUnit, + DataSourceType, + ProtectionStatus, + FabricName, + Type, + RetentionDurationType, BackupManagementType, JobStatus, JobOperationType, + DayOfWeek, + RetentionScheduleFormat, + WeekOfMonth, + MonthOfYear, MabServerType, WorkloadType, - ProtectionState, - HealthStatus, - ProtectedItemState, - UsagesUnit, + HttpStatusCode, + ValidationStatus, + HealthState, + ScheduleRunType, + AzureFileShareType, + RecoveryType, + CopyOptions, + RestoreRequestType, + InquiryStatus, + SQLDataDirectoryType, + BackupType, + RestorePointType, + OverwriteOptions, StorageType, StorageTypeState, EnhancedSecurityState, - Type, ContainerType, - RetentionDurationType, + RestorePointQueryType, + WorkloadItemType, RecoveryPointTierType, RecoveryPointTierStatus, - RecoveryType, - DayOfWeek, - RetentionScheduleFormat, - WeekOfMonth, - MonthOfYear, BackupItemType, OperationStatusValues, - HttpStatusCode, - DataSourceType, - HealthState, - ScheduleRunType, - ProtectionStatus, ) __all__ = [ + 'AzureFileshareProtectedItemExtendedInfo', + 'AzureFileshareProtectedItem', + 'SchedulePolicy', + 'RetentionPolicy', + 'AzureFileShareProtectionPolicy', + 'AzureIaaSClassicComputeVMProtectedItem', + 'AzureIaaSComputeVMProtectedItem', 'AzureIaaSVMErrorInfo', + 'AzureIaaSVMHealthDetails', 'AzureIaaSVMJobTaskDetails', 'AzureIaaSVMJobExtendedInfo', 'AzureIaaSVMJob', + 'AzureIaaSVMProtectedItemExtendedInfo', + 'AzureIaaSVMProtectedItem', + 'AzureIaaSVMProtectionPolicy', + 'AzureResourceProtectionIntent', + 'AzureSqlProtectedItemExtendedInfo', + 'AzureSqlProtectedItem', + 'AzureSqlProtectionPolicy', + 'AzureStorageErrorInfo', + 'AzureStorageJobTaskDetails', + 'AzureStorageJobExtendedInfo', + 'AzureStorageJob', + 'AzureVMResourceFeatureSupportRequest', + 'AzureVMResourceFeatureSupportResponse', + 'AzureVmWorkloadProtectedItemExtendedInfo', + 'Settings', + 'SubProtectionPolicy', + 'AzureVmWorkloadProtectionPolicy', + 'ErrorDetail', + 'AzureVmWorkloadSQLDatabaseProtectedItem', + 'AzureWorkloadErrorInfo', + 'AzureWorkloadJobTaskDetails', + 'AzureWorkloadJobExtendedInfo', + 'AzureWorkloadJob', + 'NameInfo', + 'BackupManagementUsage', + 'BackupStatusRequest', + 'BackupStatusResponse', + 'BMSBackupSummariesQueryObject', + 'Day', + 'DailyRetentionFormat', + 'RetentionDuration', + 'DailyRetentionSchedule', 'DpmErrorInfo', 'DpmJobTaskDetails', 'DpmJobExtendedInfo', 'DpmJob', + 'DPMProtectedItemExtendedInfo', + 'DPMProtectedItem', + 'ExportJobsOperationResultInfo', + 'FeatureSupportRequest', + 'GenericProtectedItem', + 'GenericProtectionPolicy', 'Job', 'JobQueryObject', 'JobResource', + 'LogSchedulePolicy', + 'WeeklyRetentionSchedule', + 'WeeklyRetentionFormat', + 'MonthlyRetentionSchedule', + 'YearlyRetentionSchedule', + 'LongTermRetentionPolicy', + 'LongTermSchedulePolicy', 'MabErrorInfo', + 'MabFileFolderProtectedItemExtendedInfo', + 'MabFileFolderProtectedItem', 'MabJobTaskDetails', 'MabJobExtendedInfo', 'MabJob', + 'MabProtectionPolicy', + 'OperationResultInfo', + 'OperationResultInfoBase', + 'OperationResultInfoBaseResource', + 'OperationWorkerResponse', + 'PreValidateEnableBackupRequest', + 'PreValidateEnableBackupResponse', + 'ProtectedItem', + 'ProtectedItemQueryObject', + 'ProtectedItemResource', + 'ProtectionIntent', + 'ProtectionIntentResource', + 'ProtectionPolicy', + 'ProtectionPolicyQueryObject', + 'ProtectionPolicyResource', 'Resource', 'ResourceList', + 'SimpleRetentionPolicy', + 'SimpleSchedulePolicy', 'DPMContainerExtendedInfo', 'AzureBackupServerContainer', 'AzureBackupServerEngine', + 'AzureFileShareBackupRequest', + 'AzureFileShareProtectableItem', + 'AzureFileShareRecoveryPoint', + 'RestoreFileSpecs', + 'TargetAFSRestoreInfo', + 'AzureFileShareRestoreRequest', 'AzureIaaSClassicComputeVMContainer', 'AzureIaaSClassicComputeVMProtectableItem', - 'AzureIaaSClassicComputeVMProtectedItem', 'AzureIaaSComputeVMContainer', 'AzureIaaSComputeVMProtectableItem', - 'AzureIaaSComputeVMProtectedItem', - 'AzureIaaSVMHealthDetails', - 'AzureIaaSVMProtectedItemExtendedInfo', - 'AzureIaaSVMProtectedItem', - 'SchedulePolicy', - 'RetentionPolicy', - 'AzureIaaSVMProtectionPolicy', + 'AzureSQLAGWorkloadContainerProtectionContainer', 'AzureSqlContainer', - 'AzureSqlProtectedItemExtendedInfo', - 'AzureSqlProtectedItem', - 'AzureSqlProtectionPolicy', + 'AzureStorageContainer', + 'AzureStorageProtectableContainer', + 'AzureVMAppContainerProtectableContainer', + 'AzureVMAppContainerProtectionContainer', + 'AzureVmWorkloadItem', + 'PreBackupValidation', + 'AzureVmWorkloadProtectableItem', + 'AzureVmWorkloadSQLAvailabilityGroupProtectableItem', + 'AzureVmWorkloadSQLDatabaseProtectableItem', + 'AzureVmWorkloadSQLDatabaseWorkloadItem', + 'AzureVmWorkloadSQLInstanceProtectableItem', + 'SQLDataDirectory', + 'AzureVmWorkloadSQLInstanceWorkloadItem', + 'AzureWorkloadBackupRequest', + 'InquiryValidation', + 'WorkloadInquiryDetails', + 'InquiryInfo', + 'DistributedNodesInfo', + 'AzureWorkloadContainerExtendedInfo', + 'AzureWorkloadContainer', + 'AzureWorkloadRecoveryPoint', + 'AzureWorkloadRestoreRequest', + 'PointInTimeRange', + 'AzureWorkloadSQLPointInTimeRecoveryPoint', + 'AzureWorkloadSQLPointInTimeRestoreRequest', + 'AzureWorkloadSQLRecoveryPointExtendedInfo', + 'AzureWorkloadSQLRecoveryPoint', + 'TargetRestoreInfo', + 'SQLDataDirectoryMapping', + 'AzureWorkloadSQLRestoreRequest', 'BackupEngineExtendedInfo', 'BackupEngineBase', 'BackupEngineBaseResource', - 'NameInfo', - 'BackupManagementUsage', 'BackupRequest', 'BackupRequestResource', 'BackupResourceConfig', @@ -224,21 +615,18 @@ 'BEKDetails', 'BMSBackupEngineQueryObject', 'BMSBackupEnginesQueryObject', - 'BMSBackupSummariesQueryObject', 'BMSContainerQueryObject', 'BMSPOQueryObject', + 'BMSRefreshContainersQueryObject', 'BMSRPQueryObject', + 'BMSWorkloadItemQueryObject', 'ClientScriptForConnect', - 'Day', - 'DailyRetentionFormat', - 'RetentionDuration', - 'DailyRetentionSchedule', + 'ContainerIdentityInfo', 'DpmBackupEngine', 'DpmContainer', - 'DPMProtectedItemExtendedInfo', - 'DPMProtectedItem', 'EncryptionDetails', - 'ExportJobsOperationResultInfo', + 'GenericContainerExtendedInfo', + 'GenericContainer', 'GenericRecoveryPoint', 'GetProtectedItemQueryObject', 'IaasVMBackupRequest', @@ -253,42 +641,26 @@ 'ILRRequest', 'ILRRequestResource', 'InstantItemRecoveryTarget', - 'WeeklyRetentionSchedule', - 'WeeklyRetentionFormat', - 'MonthlyRetentionSchedule', - 'YearlyRetentionSchedule', - 'LongTermRetentionPolicy', - 'LongTermSchedulePolicy', 'MabContainerExtendedInfo', + 'MABContainerHealthDetails', 'MabContainer', - 'MabFileFolderProtectedItemExtendedInfo', - 'MabFileFolderProtectedItem', - 'MabProtectionPolicy', - 'OperationResultInfo', - 'OperationResultInfoBase', - 'OperationResultInfoBaseResource', 'OperationStatusError', 'OperationStatusExtendedInfo', 'OperationStatus', 'OperationStatusJobExtendedInfo', 'OperationStatusJobsExtendedInfo', 'OperationStatusProvisionILRExtendedInfo', - 'OperationWorkerResponse', - 'ProtectedItem', - 'ProtectedItemQueryObject', - 'ProtectedItemResource', + 'ProtectableContainer', + 'ProtectableContainerResource', 'ProtectionContainer', 'ProtectionContainerResource', - 'ProtectionPolicy', - 'ProtectionPolicyQueryObject', - 'ProtectionPolicyResource', 'RecoveryPoint', 'RecoveryPointResource', 'RestoreRequest', 'RestoreRequestResource', - 'SimpleRetentionPolicy', - 'SimpleSchedulePolicy', 'TokenInformation', + 'WorkloadItem', + 'WorkloadItemResource', 'WorkloadProtectableItem', 'WorkloadProtectableItemResource', 'ClientDiscoveryDisplay', @@ -297,42 +669,59 @@ 'ClientDiscoveryForProperties', 'ClientDiscoveryValueForSingleApi', 'JobResourcePaged', + 'ProtectionPolicyResourcePaged', + 'ProtectedItemResourcePaged', + 'BackupManagementUsagePaged', 'BackupEngineBaseResourcePaged', + 'ProtectableContainerResourcePaged', + 'WorkloadItemResourcePaged', 'RecoveryPointResourcePaged', - 'ProtectionPolicyResourcePaged', 'WorkloadProtectableItemResourcePaged', - 'ProtectedItemResourcePaged', 'ProtectionContainerResourcePaged', - 'BackupManagementUsagePaged', 'ClientDiscoveryValueForSingleApiPaged', + 'ProtectionState', + 'HealthStatus', 'JobSupportedAction', + 'ProtectedItemState', + 'SupportStatus', + 'LastBackupStatus', + 'ProtectedItemHealthStatus', + 'UsagesUnit', + 'DataSourceType', + 'ProtectionStatus', + 'FabricName', + 'Type', + 'RetentionDurationType', 'BackupManagementType', 'JobStatus', 'JobOperationType', + 'DayOfWeek', + 'RetentionScheduleFormat', + 'WeekOfMonth', + 'MonthOfYear', 'MabServerType', 'WorkloadType', - 'ProtectionState', - 'HealthStatus', - 'ProtectedItemState', - 'UsagesUnit', + 'HttpStatusCode', + 'ValidationStatus', + 'HealthState', + 'ScheduleRunType', + 'AzureFileShareType', + 'RecoveryType', + 'CopyOptions', + 'RestoreRequestType', + 'InquiryStatus', + 'SQLDataDirectoryType', + 'BackupType', + 'RestorePointType', + 'OverwriteOptions', 'StorageType', 'StorageTypeState', 'EnhancedSecurityState', - 'Type', 'ContainerType', - 'RetentionDurationType', + 'RestorePointQueryType', + 'WorkloadItemType', 'RecoveryPointTierType', 'RecoveryPointTierStatus', - 'RecoveryType', - 'DayOfWeek', - 'RetentionScheduleFormat', - 'WeekOfMonth', - 'MonthOfYear', 'BackupItemType', 'OperationStatusValues', - 'HttpStatusCode', - 'DataSourceType', - 'HealthState', - 'ScheduleRunType', - 'ProtectionStatus', ] diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_backup_server_container.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_backup_server_container.py index 29dfcd397c49..2ef97a0659fb 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_backup_server_container.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_backup_server_container.py @@ -15,33 +15,23 @@ class AzureBackupServerContainer(ProtectionContainer): """AzureBackupServer (DPMVenus) workload-specific protection 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. :param friendly_name: Friendly name of the container. :type friendly_name: str :param backup_management_type: Type of backup managemenent for the container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', - 'DPM', 'AzureBackupServer', 'AzureSql' - :type backup_management_type: str or :class:`BackupManagementType - ` + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType :param registration_status: Status of registration of the container with the Recovery Services Vault. :type registration_status: str :param health_status: Status of health of the container. :type health_status: str - :ivar container_type: Type of the container. The value of this property - for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. Classic - Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows - machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is - AzureSqlContainer. Possible values include: 'Invalid', 'Unknown', - 'IaasVMContainer', 'IaasVMServiceContainer', 'DPMContainer', - 'AzureBackupServerContainer', 'MABContainer', 'Cluster', - 'AzureSqlContainer', 'Windows', 'VCenter' - :vartype container_type: str or :class:`ContainerType - ` - :param protectable_object_type: Polymorphic Discriminator - :type protectable_object_type: str + :param container_type: Required. Constant filled by server. + :type container_type: str :param can_re_register: Specifies whether the container is re-registrable. :type can_re_register: bool :param container_id: ID of container. @@ -51,19 +41,18 @@ class AzureBackupServerContainer(ProtectionContainer): :param dpm_agent_version: Backup engine Agent version :type dpm_agent_version: str :param dpm_servers: List of BackupEngines protecting the container - :type dpm_servers: list of str + :type dpm_servers: list[str] :param upgrade_available: To check if upgrade available :type upgrade_available: bool :param protection_status: Protection status of the container. :type protection_status: str :param extended_info: Extended Info of the container. - :type extended_info: :class:`DPMContainerExtendedInfo - ` + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.DPMContainerExtendedInfo """ _validation = { - 'container_type': {'readonly': True}, - 'protectable_object_type': {'required': True}, + 'container_type': {'required': True}, } _attribute_map = { @@ -72,25 +61,24 @@ class AzureBackupServerContainer(ProtectionContainer): 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, 'health_status': {'key': 'healthStatus', 'type': 'str'}, 'container_type': {'key': 'containerType', 'type': 'str'}, - 'protectable_object_type': {'key': 'protectableObjectType', 'type': 'str'}, 'can_re_register': {'key': 'canReRegister', 'type': 'bool'}, 'container_id': {'key': 'containerId', 'type': 'str'}, 'protected_item_count': {'key': 'protectedItemCount', 'type': 'long'}, 'dpm_agent_version': {'key': 'dpmAgentVersion', 'type': 'str'}, - 'dpm_servers': {'key': 'DPMServers', 'type': '[str]'}, - 'upgrade_available': {'key': 'UpgradeAvailable', 'type': 'bool'}, + 'dpm_servers': {'key': 'dpmServers', 'type': '[str]'}, + 'upgrade_available': {'key': 'upgradeAvailable', 'type': 'bool'}, 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, 'extended_info': {'key': 'extendedInfo', 'type': 'DPMContainerExtendedInfo'}, } - def __init__(self, friendly_name=None, backup_management_type=None, registration_status=None, health_status=None, can_re_register=None, container_id=None, protected_item_count=None, dpm_agent_version=None, dpm_servers=None, upgrade_available=None, protection_status=None, extended_info=None): - super(AzureBackupServerContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status) - self.can_re_register = can_re_register - self.container_id = container_id - self.protected_item_count = protected_item_count - self.dpm_agent_version = dpm_agent_version - self.dpm_servers = dpm_servers - self.upgrade_available = upgrade_available - self.protection_status = protection_status - self.extended_info = extended_info - self.protectable_object_type = 'AzureBackupServerContainer' + def __init__(self, **kwargs): + super(AzureBackupServerContainer, self).__init__(**kwargs) + self.can_re_register = kwargs.get('can_re_register', None) + self.container_id = kwargs.get('container_id', None) + self.protected_item_count = kwargs.get('protected_item_count', None) + self.dpm_agent_version = kwargs.get('dpm_agent_version', None) + self.dpm_servers = kwargs.get('dpm_servers', None) + self.upgrade_available = kwargs.get('upgrade_available', None) + self.protection_status = kwargs.get('protection_status', None) + self.extended_info = kwargs.get('extended_info', None) + self.container_type = 'AzureBackupServerContainer' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_backup_server_container_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_backup_server_container_py3.py new file mode 100644 index 000000000000..32f080a4a6cc --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_backup_server_container_py3.py @@ -0,0 +1,84 @@ +# 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 .protection_container_py3 import ProtectionContainer + + +class AzureBackupServerContainer(ProtectionContainer): + """AzureBackupServer (DPMVenus) workload-specific protection container. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name of the container. + :type friendly_name: str + :param backup_management_type: Type of backup managemenent for the + container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param registration_status: Status of registration of the container with + the Recovery Services Vault. + :type registration_status: str + :param health_status: Status of health of the container. + :type health_status: str + :param container_type: Required. Constant filled by server. + :type container_type: str + :param can_re_register: Specifies whether the container is re-registrable. + :type can_re_register: bool + :param container_id: ID of container. + :type container_id: str + :param protected_item_count: Number of protected items in the BackupEngine + :type protected_item_count: long + :param dpm_agent_version: Backup engine Agent version + :type dpm_agent_version: str + :param dpm_servers: List of BackupEngines protecting the container + :type dpm_servers: list[str] + :param upgrade_available: To check if upgrade available + :type upgrade_available: bool + :param protection_status: Protection status of the container. + :type protection_status: str + :param extended_info: Extended Info of the container. + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.DPMContainerExtendedInfo + """ + + _validation = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_type': {'key': 'containerType', 'type': 'str'}, + 'can_re_register': {'key': 'canReRegister', 'type': 'bool'}, + 'container_id': {'key': 'containerId', 'type': 'str'}, + 'protected_item_count': {'key': 'protectedItemCount', 'type': 'long'}, + 'dpm_agent_version': {'key': 'dpmAgentVersion', 'type': 'str'}, + 'dpm_servers': {'key': 'dpmServers', 'type': '[str]'}, + 'upgrade_available': {'key': 'upgradeAvailable', 'type': 'bool'}, + 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'DPMContainerExtendedInfo'}, + } + + def __init__(self, *, friendly_name: str=None, backup_management_type=None, registration_status: str=None, health_status: str=None, can_re_register: bool=None, container_id: str=None, protected_item_count: int=None, dpm_agent_version: str=None, dpm_servers=None, upgrade_available: bool=None, protection_status: str=None, extended_info=None, **kwargs) -> None: + super(AzureBackupServerContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status, **kwargs) + self.can_re_register = can_re_register + self.container_id = container_id + self.protected_item_count = protected_item_count + self.dpm_agent_version = dpm_agent_version + self.dpm_servers = dpm_servers + self.upgrade_available = upgrade_available + self.protection_status = protection_status + self.extended_info = extended_info + self.container_type = 'AzureBackupServerContainer' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_backup_server_engine.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_backup_server_engine.py index 31e58543fa4c..4a5f2783d116 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_backup_server_engine.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_backup_server_engine.py @@ -15,13 +15,16 @@ class AzureBackupServerEngine(BackupEngineBase): """Backup engine type when Azure Backup Server is used to manage the backups. + All required parameters must be populated in order to send to Azure. + :param friendly_name: Friendly name of the backup engine. :type friendly_name: str :param backup_management_type: Type of backup management for the backup engine. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', - 'AzureBackupServer', 'AzureSql' - :type backup_management_type: str or :class:`BackupManagementType - ` + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType :param registration_status: Registration status of the backup engine with the Recovery Services Vault. :type registration_status: str @@ -46,9 +49,9 @@ class AzureBackupServerEngine(BackupEngineBase): available :type is_dpm_upgrade_available: bool :param extended_info: Extended info of the backupengine - :type extended_info: :class:`BackupEngineExtendedInfo - ` - :param backup_engine_type: Polymorphic Discriminator + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.BackupEngineExtendedInfo + :param backup_engine_type: Required. Constant filled by server. :type backup_engine_type: str """ @@ -56,6 +59,22 @@ class AzureBackupServerEngine(BackupEngineBase): 'backup_engine_type': {'required': True}, } - def __init__(self, friendly_name=None, backup_management_type=None, registration_status=None, backup_engine_state=None, health_status=None, can_re_register=None, backup_engine_id=None, dpm_version=None, azure_backup_agent_version=None, is_azure_backup_agent_upgrade_available=None, is_dpm_upgrade_available=None, extended_info=None): - super(AzureBackupServerEngine, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, backup_engine_state=backup_engine_state, health_status=health_status, can_re_register=can_re_register, backup_engine_id=backup_engine_id, dpm_version=dpm_version, azure_backup_agent_version=azure_backup_agent_version, is_azure_backup_agent_upgrade_available=is_azure_backup_agent_upgrade_available, is_dpm_upgrade_available=is_dpm_upgrade_available, extended_info=extended_info) + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'backup_engine_state': {'key': 'backupEngineState', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'can_re_register': {'key': 'canReRegister', 'type': 'bool'}, + 'backup_engine_id': {'key': 'backupEngineId', 'type': 'str'}, + 'dpm_version': {'key': 'dpmVersion', 'type': 'str'}, + 'azure_backup_agent_version': {'key': 'azureBackupAgentVersion', 'type': 'str'}, + 'is_azure_backup_agent_upgrade_available': {'key': 'isAzureBackupAgentUpgradeAvailable', 'type': 'bool'}, + 'is_dpm_upgrade_available': {'key': 'isDpmUpgradeAvailable', 'type': 'bool'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'BackupEngineExtendedInfo'}, + 'backup_engine_type': {'key': 'backupEngineType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureBackupServerEngine, self).__init__(**kwargs) self.backup_engine_type = 'AzureBackupServerEngine' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_backup_server_engine_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_backup_server_engine_py3.py new file mode 100644 index 000000000000..1aaba9929db0 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_backup_server_engine_py3.py @@ -0,0 +1,80 @@ +# 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 .backup_engine_base_py3 import BackupEngineBase + + +class AzureBackupServerEngine(BackupEngineBase): + """Backup engine type when Azure Backup Server is used to manage the backups. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name of the backup engine. + :type friendly_name: str + :param backup_management_type: Type of backup management for the backup + engine. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param registration_status: Registration status of the backup engine with + the Recovery Services Vault. + :type registration_status: str + :param backup_engine_state: Status of the backup engine with the Recovery + Services Vault. = {Active/Deleting/DeleteFailed} + :type backup_engine_state: str + :param health_status: Backup status of the backup engine. + :type health_status: str + :param can_re_register: Flag indicating if the backup engine be + registered, once already registered. + :type can_re_register: bool + :param backup_engine_id: ID of the backup engine. + :type backup_engine_id: str + :param dpm_version: Backup engine version + :type dpm_version: str + :param azure_backup_agent_version: Backup agent version + :type azure_backup_agent_version: str + :param is_azure_backup_agent_upgrade_available: To check if backup agent + upgrade available + :type is_azure_backup_agent_upgrade_available: bool + :param is_dpm_upgrade_available: To check if backup engine upgrade + available + :type is_dpm_upgrade_available: bool + :param extended_info: Extended info of the backupengine + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.BackupEngineExtendedInfo + :param backup_engine_type: Required. Constant filled by server. + :type backup_engine_type: str + """ + + _validation = { + 'backup_engine_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'backup_engine_state': {'key': 'backupEngineState', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'can_re_register': {'key': 'canReRegister', 'type': 'bool'}, + 'backup_engine_id': {'key': 'backupEngineId', 'type': 'str'}, + 'dpm_version': {'key': 'dpmVersion', 'type': 'str'}, + 'azure_backup_agent_version': {'key': 'azureBackupAgentVersion', 'type': 'str'}, + 'is_azure_backup_agent_upgrade_available': {'key': 'isAzureBackupAgentUpgradeAvailable', 'type': 'bool'}, + 'is_dpm_upgrade_available': {'key': 'isDpmUpgradeAvailable', 'type': 'bool'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'BackupEngineExtendedInfo'}, + 'backup_engine_type': {'key': 'backupEngineType', 'type': 'str'}, + } + + def __init__(self, *, friendly_name: str=None, backup_management_type=None, registration_status: str=None, backup_engine_state: str=None, health_status: str=None, can_re_register: bool=None, backup_engine_id: str=None, dpm_version: str=None, azure_backup_agent_version: str=None, is_azure_backup_agent_upgrade_available: bool=None, is_dpm_upgrade_available: bool=None, extended_info=None, **kwargs) -> None: + super(AzureBackupServerEngine, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, backup_engine_state=backup_engine_state, health_status=health_status, can_re_register=can_re_register, backup_engine_id=backup_engine_id, dpm_version=dpm_version, azure_backup_agent_version=azure_backup_agent_version, is_azure_backup_agent_upgrade_available=is_azure_backup_agent_upgrade_available, is_dpm_upgrade_available=is_dpm_upgrade_available, extended_info=extended_info, **kwargs) + self.backup_engine_type = 'AzureBackupServerEngine' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_backup_request.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_backup_request.py new file mode 100644 index 000000000000..59314ba015ee --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_backup_request.py @@ -0,0 +1,39 @@ +# 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 .backup_request import BackupRequest + + +class AzureFileShareBackupRequest(BackupRequest): + """AzureFileShare workload-specific backup request. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param recovery_point_expiry_time_in_utc: Backup copy will expire after + the time specified (UTC). + :type recovery_point_expiry_time_in_utc: datetime + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_point_expiry_time_in_utc': {'key': 'recoveryPointExpiryTimeInUTC', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(AzureFileShareBackupRequest, self).__init__(**kwargs) + self.recovery_point_expiry_time_in_utc = kwargs.get('recovery_point_expiry_time_in_utc', None) + self.object_type = 'AzureFileShareBackupRequest' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_backup_request_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_backup_request_py3.py new file mode 100644 index 000000000000..0c5b79db093a --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_backup_request_py3.py @@ -0,0 +1,39 @@ +# 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 .backup_request_py3 import BackupRequest + + +class AzureFileShareBackupRequest(BackupRequest): + """AzureFileShare workload-specific backup request. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param recovery_point_expiry_time_in_utc: Backup copy will expire after + the time specified (UTC). + :type recovery_point_expiry_time_in_utc: datetime + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_point_expiry_time_in_utc': {'key': 'recoveryPointExpiryTimeInUTC', 'type': 'iso-8601'}, + } + + def __init__(self, *, recovery_point_expiry_time_in_utc=None, **kwargs) -> None: + super(AzureFileShareBackupRequest, self).__init__(**kwargs) + self.recovery_point_expiry_time_in_utc = recovery_point_expiry_time_in_utc + self.object_type = 'AzureFileShareBackupRequest' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_protectable_item.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_protectable_item.py new file mode 100644 index 000000000000..c52e8b17ed03 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_protectable_item.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 .workload_protectable_item import WorkloadProtectableItem + + +class AzureFileShareProtectableItem(WorkloadProtectableItem): + """Protectable item for Azure Fileshare workloads. + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent to backup an + item. + :type backup_management_type: str + :param workload_type: Type of workload for the backup management + :type workload_type: str + :param friendly_name: Friendly name of the backup item. + :type friendly_name: str + :param protection_state: State of the back up item. Possible values + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param protectable_item_type: Required. Constant filled by server. + :type protectable_item_type: str + :param parent_container_fabric_id: Full Fabric ID of container to which + this protectable item belongs. For example, ARM ID. + :type parent_container_fabric_id: str + :param parent_container_friendly_name: Friendly name of container to which + this protectable item belongs. + :type parent_container_friendly_name: str + :param azure_file_share_type: File Share type XSync or XSMB. Possible + values include: 'Invalid', 'XSMB', 'XSync' + :type azure_file_share_type: str or + ~azure.mgmt.recoveryservicesbackup.models.AzureFileShareType + """ + + _validation = { + 'protectable_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, + 'parent_container_fabric_id': {'key': 'parentContainerFabricId', 'type': 'str'}, + 'parent_container_friendly_name': {'key': 'parentContainerFriendlyName', 'type': 'str'}, + 'azure_file_share_type': {'key': 'azureFileShareType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureFileShareProtectableItem, self).__init__(**kwargs) + self.parent_container_fabric_id = kwargs.get('parent_container_fabric_id', None) + self.parent_container_friendly_name = kwargs.get('parent_container_friendly_name', None) + self.azure_file_share_type = kwargs.get('azure_file_share_type', None) + self.protectable_item_type = 'AzureFileShare' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_protectable_item_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_protectable_item_py3.py new file mode 100644 index 000000000000..93fd85757510 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_protectable_item_py3.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 .workload_protectable_item_py3 import WorkloadProtectableItem + + +class AzureFileShareProtectableItem(WorkloadProtectableItem): + """Protectable item for Azure Fileshare workloads. + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent to backup an + item. + :type backup_management_type: str + :param workload_type: Type of workload for the backup management + :type workload_type: str + :param friendly_name: Friendly name of the backup item. + :type friendly_name: str + :param protection_state: State of the back up item. Possible values + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param protectable_item_type: Required. Constant filled by server. + :type protectable_item_type: str + :param parent_container_fabric_id: Full Fabric ID of container to which + this protectable item belongs. For example, ARM ID. + :type parent_container_fabric_id: str + :param parent_container_friendly_name: Friendly name of container to which + this protectable item belongs. + :type parent_container_friendly_name: str + :param azure_file_share_type: File Share type XSync or XSMB. Possible + values include: 'Invalid', 'XSMB', 'XSync' + :type azure_file_share_type: str or + ~azure.mgmt.recoveryservicesbackup.models.AzureFileShareType + """ + + _validation = { + 'protectable_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, + 'parent_container_fabric_id': {'key': 'parentContainerFabricId', 'type': 'str'}, + 'parent_container_friendly_name': {'key': 'parentContainerFriendlyName', 'type': 'str'}, + 'azure_file_share_type': {'key': 'azureFileShareType', 'type': 'str'}, + } + + def __init__(self, *, backup_management_type: str=None, workload_type: str=None, friendly_name: str=None, protection_state=None, parent_container_fabric_id: str=None, parent_container_friendly_name: str=None, azure_file_share_type=None, **kwargs) -> None: + super(AzureFileShareProtectableItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, friendly_name=friendly_name, protection_state=protection_state, **kwargs) + self.parent_container_fabric_id = parent_container_fabric_id + self.parent_container_friendly_name = parent_container_friendly_name + self.azure_file_share_type = azure_file_share_type + self.protectable_item_type = 'AzureFileShare' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_protection_policy.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_protection_policy.py new file mode 100644 index 000000000000..d22ebaef61da --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_protection_policy.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .protection_policy import ProtectionPolicy + + +class AzureFileShareProtectionPolicy(ProtectionPolicy): + """AzureStorage backup policy. + + All required parameters must be populated in order to send to Azure. + + :param protected_items_count: Number of items associated with this policy. + :type protected_items_count: int + :param backup_management_type: Required. Constant filled by server. + :type backup_management_type: str + :param work_load_type: Type of workload for the backup management + :type work_load_type: str + :param schedule_policy: Backup schedule specified as part of backup + policy. + :type schedule_policy: + ~azure.mgmt.recoveryservicesbackup.models.SchedulePolicy + :param retention_policy: Retention policy with the details on backup copy + retention ranges. + :type retention_policy: + ~azure.mgmt.recoveryservicesbackup.models.RetentionPolicy + :param time_zone: TimeZone optional input as string. For example: TimeZone + = "Pacific Standard Time". + :type time_zone: str + """ + + _validation = { + 'backup_management_type': {'required': True}, + } + + _attribute_map = { + 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'work_load_type': {'key': 'workLoadType', 'type': 'str'}, + 'schedule_policy': {'key': 'schedulePolicy', 'type': 'SchedulePolicy'}, + 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureFileShareProtectionPolicy, self).__init__(**kwargs) + self.work_load_type = kwargs.get('work_load_type', None) + self.schedule_policy = kwargs.get('schedule_policy', None) + self.retention_policy = kwargs.get('retention_policy', None) + self.time_zone = kwargs.get('time_zone', None) + self.backup_management_type = 'AzureStorage' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_protection_policy_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_protection_policy_py3.py new file mode 100644 index 000000000000..b54214ed91d0 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_protection_policy_py3.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .protection_policy_py3 import ProtectionPolicy + + +class AzureFileShareProtectionPolicy(ProtectionPolicy): + """AzureStorage backup policy. + + All required parameters must be populated in order to send to Azure. + + :param protected_items_count: Number of items associated with this policy. + :type protected_items_count: int + :param backup_management_type: Required. Constant filled by server. + :type backup_management_type: str + :param work_load_type: Type of workload for the backup management + :type work_load_type: str + :param schedule_policy: Backup schedule specified as part of backup + policy. + :type schedule_policy: + ~azure.mgmt.recoveryservicesbackup.models.SchedulePolicy + :param retention_policy: Retention policy with the details on backup copy + retention ranges. + :type retention_policy: + ~azure.mgmt.recoveryservicesbackup.models.RetentionPolicy + :param time_zone: TimeZone optional input as string. For example: TimeZone + = "Pacific Standard Time". + :type time_zone: str + """ + + _validation = { + 'backup_management_type': {'required': True}, + } + + _attribute_map = { + 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'work_load_type': {'key': 'workLoadType', 'type': 'str'}, + 'schedule_policy': {'key': 'schedulePolicy', 'type': 'SchedulePolicy'}, + 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + } + + def __init__(self, *, protected_items_count: int=None, work_load_type: str=None, schedule_policy=None, retention_policy=None, time_zone: str=None, **kwargs) -> None: + super(AzureFileShareProtectionPolicy, self).__init__(protected_items_count=protected_items_count, **kwargs) + self.work_load_type = work_load_type + self.schedule_policy = schedule_policy + self.retention_policy = retention_policy + self.time_zone = time_zone + self.backup_management_type = 'AzureStorage' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_recovery_point.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_recovery_point.py new file mode 100644 index 000000000000..8e5145dd4c8a --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_recovery_point.py @@ -0,0 +1,48 @@ +# 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 .recovery_point import RecoveryPoint + + +class AzureFileShareRecoveryPoint(RecoveryPoint): + """Azure File Share workload specific backup copy. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param recovery_point_type: Type of the backup copy. Specifies whether it + is a crash consistent backup or app consistent. + :type recovery_point_type: str + :param recovery_point_time: Time at which this backup copy was created. + :type recovery_point_time: datetime + :param file_share_snapshot_uri: Contains Url to the snapshot of fileshare, + if applicable + :type file_share_snapshot_uri: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_point_type': {'key': 'recoveryPointType', 'type': 'str'}, + 'recovery_point_time': {'key': 'recoveryPointTime', 'type': 'iso-8601'}, + 'file_share_snapshot_uri': {'key': 'fileShareSnapshotUri', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureFileShareRecoveryPoint, self).__init__(**kwargs) + self.recovery_point_type = kwargs.get('recovery_point_type', None) + self.recovery_point_time = kwargs.get('recovery_point_time', None) + self.file_share_snapshot_uri = kwargs.get('file_share_snapshot_uri', None) + self.object_type = 'AzureFileShareRecoveryPoint' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_recovery_point_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_recovery_point_py3.py new file mode 100644 index 000000000000..128bf5e798e4 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_recovery_point_py3.py @@ -0,0 +1,48 @@ +# 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 .recovery_point_py3 import RecoveryPoint + + +class AzureFileShareRecoveryPoint(RecoveryPoint): + """Azure File Share workload specific backup copy. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param recovery_point_type: Type of the backup copy. Specifies whether it + is a crash consistent backup or app consistent. + :type recovery_point_type: str + :param recovery_point_time: Time at which this backup copy was created. + :type recovery_point_time: datetime + :param file_share_snapshot_uri: Contains Url to the snapshot of fileshare, + if applicable + :type file_share_snapshot_uri: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_point_type': {'key': 'recoveryPointType', 'type': 'str'}, + 'recovery_point_time': {'key': 'recoveryPointTime', 'type': 'iso-8601'}, + 'file_share_snapshot_uri': {'key': 'fileShareSnapshotUri', 'type': 'str'}, + } + + def __init__(self, *, recovery_point_type: str=None, recovery_point_time=None, file_share_snapshot_uri: str=None, **kwargs) -> None: + super(AzureFileShareRecoveryPoint, self).__init__(**kwargs) + self.recovery_point_type = recovery_point_type + self.recovery_point_time = recovery_point_time + self.file_share_snapshot_uri = file_share_snapshot_uri + self.object_type = 'AzureFileShareRecoveryPoint' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_restore_request.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_restore_request.py new file mode 100644 index 000000000000..a3cd00181ee8 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_restore_request.py @@ -0,0 +1,68 @@ +# 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 .restore_request import RestoreRequest + + +class AzureFileShareRestoreRequest(RestoreRequest): + """AzureFileShare Restore Request. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param recovery_type: Type of this recovery. Possible values include: + 'Invalid', 'OriginalLocation', 'AlternateLocation', 'RestoreDisks' + :type recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :param source_resource_id: Source storage account ARM Id + :type source_resource_id: str + :param copy_options: Options to resolve copy conflicts. Possible values + include: 'Invalid', 'CreateCopy', 'Skip', 'Overwrite', 'FailOnConflict' + :type copy_options: str or + ~azure.mgmt.recoveryservicesbackup.models.CopyOptions + :param restore_request_type: Restore Type (FullShareRestore or + ItemLevelRestore). Possible values include: 'Invalid', 'FullShareRestore', + 'ItemLevelRestore' + :type restore_request_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RestoreRequestType + :param restore_file_specs: List of Source Files/Folders(which need to + recover) and TargetFolderPath details + :type restore_file_specs: + list[~azure.mgmt.recoveryservicesbackup.models.RestoreFileSpecs] + :param target_details: Target File Share Details + :type target_details: + ~azure.mgmt.recoveryservicesbackup.models.TargetAFSRestoreInfo + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'copy_options': {'key': 'copyOptions', 'type': 'str'}, + 'restore_request_type': {'key': 'restoreRequestType', 'type': 'str'}, + 'restore_file_specs': {'key': 'restoreFileSpecs', 'type': '[RestoreFileSpecs]'}, + 'target_details': {'key': 'targetDetails', 'type': 'TargetAFSRestoreInfo'}, + } + + def __init__(self, **kwargs): + super(AzureFileShareRestoreRequest, self).__init__(**kwargs) + self.recovery_type = kwargs.get('recovery_type', None) + self.source_resource_id = kwargs.get('source_resource_id', None) + self.copy_options = kwargs.get('copy_options', None) + self.restore_request_type = kwargs.get('restore_request_type', None) + self.restore_file_specs = kwargs.get('restore_file_specs', None) + self.target_details = kwargs.get('target_details', None) + self.object_type = 'AzureFileShareRestoreRequest' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_restore_request_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_restore_request_py3.py new file mode 100644 index 000000000000..8dd0eb1d1bd5 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_restore_request_py3.py @@ -0,0 +1,68 @@ +# 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 .restore_request_py3 import RestoreRequest + + +class AzureFileShareRestoreRequest(RestoreRequest): + """AzureFileShare Restore Request. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param recovery_type: Type of this recovery. Possible values include: + 'Invalid', 'OriginalLocation', 'AlternateLocation', 'RestoreDisks' + :type recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :param source_resource_id: Source storage account ARM Id + :type source_resource_id: str + :param copy_options: Options to resolve copy conflicts. Possible values + include: 'Invalid', 'CreateCopy', 'Skip', 'Overwrite', 'FailOnConflict' + :type copy_options: str or + ~azure.mgmt.recoveryservicesbackup.models.CopyOptions + :param restore_request_type: Restore Type (FullShareRestore or + ItemLevelRestore). Possible values include: 'Invalid', 'FullShareRestore', + 'ItemLevelRestore' + :type restore_request_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RestoreRequestType + :param restore_file_specs: List of Source Files/Folders(which need to + recover) and TargetFolderPath details + :type restore_file_specs: + list[~azure.mgmt.recoveryservicesbackup.models.RestoreFileSpecs] + :param target_details: Target File Share Details + :type target_details: + ~azure.mgmt.recoveryservicesbackup.models.TargetAFSRestoreInfo + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'copy_options': {'key': 'copyOptions', 'type': 'str'}, + 'restore_request_type': {'key': 'restoreRequestType', 'type': 'str'}, + 'restore_file_specs': {'key': 'restoreFileSpecs', 'type': '[RestoreFileSpecs]'}, + 'target_details': {'key': 'targetDetails', 'type': 'TargetAFSRestoreInfo'}, + } + + def __init__(self, *, recovery_type=None, source_resource_id: str=None, copy_options=None, restore_request_type=None, restore_file_specs=None, target_details=None, **kwargs) -> None: + super(AzureFileShareRestoreRequest, self).__init__(**kwargs) + self.recovery_type = recovery_type + self.source_resource_id = source_resource_id + self.copy_options = copy_options + self.restore_request_type = restore_request_type + self.restore_file_specs = restore_file_specs + self.target_details = target_details + self.object_type = 'AzureFileShareRestoreRequest' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_fileshare_protected_item.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_fileshare_protected_item.py new file mode 100644 index 000000000000..ab9014c78997 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_fileshare_protected_item.py @@ -0,0 +1,103 @@ +# 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 .protected_item import ProtectedItem + + +class AzureFileshareProtectedItem(ProtectedItem): + """Azure File Share workload-specific backup item. + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent for the backed + up item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param workload_type: Type of workload this item represents. Possible + values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', + 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + 'GenericDataSource', 'SQLDataBase', 'AzureFileShare' + :type workload_type: str or + ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :param container_name: Unique name of container + :type container_name: str + :param source_resource_id: ARM ID of the resource to be backed up. + :type source_resource_id: str + :param policy_id: ID of the backup policy with which this item is backed + up. + :type policy_id: str + :param last_recovery_point: Timestamp when the last (latest) backup copy + was created for this backup item. + :type last_recovery_point: datetime + :param backup_set_name: Name of the backup set the backup item belongs to + :type backup_set_name: str + :param protected_item_type: Required. Constant filled by server. + :type protected_item_type: str + :param friendly_name: Friendly name of the fileshare represented by this + backup item. + :type friendly_name: str + :param protection_status: Backup status of this backup item. + :type protection_status: str + :param protection_state: Backup state of this backup item. Possible values + include: 'Invalid', 'IRPending', 'Protected', 'ProtectionError', + 'ProtectionStopped', 'ProtectionPaused' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionState + :param health_status: backups running status for this backup item. + Possible values include: 'Passed', 'ActionRequired', 'ActionSuggested', + 'Invalid' + :type health_status: str or + ~azure.mgmt.recoveryservicesbackup.models.HealthStatus + :param last_backup_status: Last backup operation status. Possible values: + Healthy, Unhealthy. + :type last_backup_status: str + :param last_backup_time: Timestamp of the last backup operation on this + backup item. + :type last_backup_time: datetime + :param extended_info: Additional information with this backup item. + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureFileshareProtectedItemExtendedInfo + """ + + _validation = { + 'protected_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'policy_id': {'key': 'policyId', 'type': 'str'}, + 'last_recovery_point': {'key': 'lastRecoveryPoint', 'type': 'iso-8601'}, + 'backup_set_name': {'key': 'backupSetName', 'type': 'str'}, + 'protected_item_type': {'key': 'protectedItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, + 'last_backup_time': {'key': 'lastBackupTime', 'type': 'iso-8601'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureFileshareProtectedItemExtendedInfo'}, + } + + def __init__(self, **kwargs): + super(AzureFileshareProtectedItem, self).__init__(**kwargs) + self.friendly_name = kwargs.get('friendly_name', None) + self.protection_status = kwargs.get('protection_status', None) + self.protection_state = kwargs.get('protection_state', None) + self.health_status = kwargs.get('health_status', None) + self.last_backup_status = kwargs.get('last_backup_status', None) + self.last_backup_time = kwargs.get('last_backup_time', None) + self.extended_info = kwargs.get('extended_info', None) + self.protected_item_type = 'AzureFileShareProtectedItem' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_fileshare_protected_item_extended_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_fileshare_protected_item_extended_info.py new file mode 100644 index 000000000000..92790d59f9dd --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_fileshare_protected_item_extended_info.py @@ -0,0 +1,39 @@ +# 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 AzureFileshareProtectedItemExtendedInfo(Model): + """Additional information about Azure File Share backup item. + + :param oldest_recovery_point: The oldest backup copy available for this + item in the service. + :type oldest_recovery_point: datetime + :param recovery_point_count: Number of available backup copies associated + with this backup item. + :type recovery_point_count: int + :param policy_state: Indicates consistency of policy object and policy + applied to this backup item. + :type policy_state: str + """ + + _attribute_map = { + 'oldest_recovery_point': {'key': 'oldestRecoveryPoint', 'type': 'iso-8601'}, + 'recovery_point_count': {'key': 'recoveryPointCount', 'type': 'int'}, + 'policy_state': {'key': 'policyState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureFileshareProtectedItemExtendedInfo, self).__init__(**kwargs) + self.oldest_recovery_point = kwargs.get('oldest_recovery_point', None) + self.recovery_point_count = kwargs.get('recovery_point_count', None) + self.policy_state = kwargs.get('policy_state', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_fileshare_protected_item_extended_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_fileshare_protected_item_extended_info_py3.py new file mode 100644 index 000000000000..5927f81a2c3a --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_fileshare_protected_item_extended_info_py3.py @@ -0,0 +1,39 @@ +# 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 AzureFileshareProtectedItemExtendedInfo(Model): + """Additional information about Azure File Share backup item. + + :param oldest_recovery_point: The oldest backup copy available for this + item in the service. + :type oldest_recovery_point: datetime + :param recovery_point_count: Number of available backup copies associated + with this backup item. + :type recovery_point_count: int + :param policy_state: Indicates consistency of policy object and policy + applied to this backup item. + :type policy_state: str + """ + + _attribute_map = { + 'oldest_recovery_point': {'key': 'oldestRecoveryPoint', 'type': 'iso-8601'}, + 'recovery_point_count': {'key': 'recoveryPointCount', 'type': 'int'}, + 'policy_state': {'key': 'policyState', 'type': 'str'}, + } + + def __init__(self, *, oldest_recovery_point=None, recovery_point_count: int=None, policy_state: str=None, **kwargs) -> None: + super(AzureFileshareProtectedItemExtendedInfo, self).__init__(**kwargs) + self.oldest_recovery_point = oldest_recovery_point + self.recovery_point_count = recovery_point_count + self.policy_state = policy_state diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_fileshare_protected_item_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_fileshare_protected_item_py3.py new file mode 100644 index 000000000000..65f0a7367f0d --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_fileshare_protected_item_py3.py @@ -0,0 +1,103 @@ +# 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 .protected_item_py3 import ProtectedItem + + +class AzureFileshareProtectedItem(ProtectedItem): + """Azure File Share workload-specific backup item. + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent for the backed + up item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param workload_type: Type of workload this item represents. Possible + values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', + 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + 'GenericDataSource', 'SQLDataBase', 'AzureFileShare' + :type workload_type: str or + ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :param container_name: Unique name of container + :type container_name: str + :param source_resource_id: ARM ID of the resource to be backed up. + :type source_resource_id: str + :param policy_id: ID of the backup policy with which this item is backed + up. + :type policy_id: str + :param last_recovery_point: Timestamp when the last (latest) backup copy + was created for this backup item. + :type last_recovery_point: datetime + :param backup_set_name: Name of the backup set the backup item belongs to + :type backup_set_name: str + :param protected_item_type: Required. Constant filled by server. + :type protected_item_type: str + :param friendly_name: Friendly name of the fileshare represented by this + backup item. + :type friendly_name: str + :param protection_status: Backup status of this backup item. + :type protection_status: str + :param protection_state: Backup state of this backup item. Possible values + include: 'Invalid', 'IRPending', 'Protected', 'ProtectionError', + 'ProtectionStopped', 'ProtectionPaused' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionState + :param health_status: backups running status for this backup item. + Possible values include: 'Passed', 'ActionRequired', 'ActionSuggested', + 'Invalid' + :type health_status: str or + ~azure.mgmt.recoveryservicesbackup.models.HealthStatus + :param last_backup_status: Last backup operation status. Possible values: + Healthy, Unhealthy. + :type last_backup_status: str + :param last_backup_time: Timestamp of the last backup operation on this + backup item. + :type last_backup_time: datetime + :param extended_info: Additional information with this backup item. + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureFileshareProtectedItemExtendedInfo + """ + + _validation = { + 'protected_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'policy_id': {'key': 'policyId', 'type': 'str'}, + 'last_recovery_point': {'key': 'lastRecoveryPoint', 'type': 'iso-8601'}, + 'backup_set_name': {'key': 'backupSetName', 'type': 'str'}, + 'protected_item_type': {'key': 'protectedItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, + 'last_backup_time': {'key': 'lastBackupTime', 'type': 'iso-8601'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureFileshareProtectedItemExtendedInfo'}, + } + + def __init__(self, *, backup_management_type=None, workload_type=None, container_name: str=None, source_resource_id: str=None, policy_id: str=None, last_recovery_point=None, backup_set_name: str=None, friendly_name: str=None, protection_status: str=None, protection_state=None, health_status=None, last_backup_status: str=None, last_backup_time=None, extended_info=None, **kwargs) -> None: + super(AzureFileshareProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, **kwargs) + self.friendly_name = friendly_name + self.protection_status = protection_status + self.protection_state = protection_state + self.health_status = health_status + self.last_backup_status = last_backup_status + self.last_backup_time = last_backup_time + self.extended_info = extended_info + self.protected_item_type = 'AzureFileShareProtectedItem' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_sclassic_compute_vm_container.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_sclassic_compute_vm_container.py index 77705478d7e5..05f597febbf6 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_sclassic_compute_vm_container.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_sclassic_compute_vm_container.py @@ -16,33 +16,23 @@ class AzureIaaSClassicComputeVMContainer(IaaSVMContainer): """IaaS VM workload-specific backup item representing a classic virtual machine. - Variables are only populated by the server, and will be ignored when - sending a request. + All required parameters must be populated in order to send to Azure. :param friendly_name: Friendly name of the container. :type friendly_name: str :param backup_management_type: Type of backup managemenent for the container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', - 'DPM', 'AzureBackupServer', 'AzureSql' - :type backup_management_type: str or :class:`BackupManagementType - ` + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType :param registration_status: Status of registration of the container with the Recovery Services Vault. :type registration_status: str :param health_status: Status of health of the container. :type health_status: str - :ivar container_type: Type of the container. The value of this property - for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. Classic - Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows - machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is - AzureSqlContainer. Possible values include: 'Invalid', 'Unknown', - 'IaasVMContainer', 'IaasVMServiceContainer', 'DPMContainer', - 'AzureBackupServerContainer', 'MABContainer', 'Cluster', - 'AzureSqlContainer', 'Windows', 'VCenter' - :vartype container_type: str or :class:`ContainerType - ` - :param protectable_object_type: Polymorphic Discriminator - :type protectable_object_type: str + :param container_type: Required. Constant filled by server. + :type container_type: str :param virtual_machine_id: Fully qualified ARM url of the virtual machine represented by this Azure IaaS VM container. :type virtual_machine_id: str @@ -54,10 +44,20 @@ class AzureIaaSClassicComputeVMContainer(IaaSVMContainer): """ _validation = { - 'container_type': {'readonly': True}, - 'protectable_object_type': {'required': True}, + 'container_type': {'required': True}, } - def __init__(self, friendly_name=None, backup_management_type=None, registration_status=None, health_status=None, virtual_machine_id=None, virtual_machine_version=None, resource_group=None): - super(AzureIaaSClassicComputeVMContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status, virtual_machine_id=virtual_machine_id, virtual_machine_version=virtual_machine_version, resource_group=resource_group) - self.protectable_object_type = 'Microsoft.ClassicCompute/virtualMachines' + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_type': {'key': 'containerType', 'type': 'str'}, + 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, + 'virtual_machine_version': {'key': 'virtualMachineVersion', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureIaaSClassicComputeVMContainer, self).__init__(**kwargs) + self.container_type = 'Microsoft.ClassicCompute/virtualMachines' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_sclassic_compute_vm_container_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_sclassic_compute_vm_container_py3.py new file mode 100644 index 000000000000..5ee565b1e5de --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_sclassic_compute_vm_container_py3.py @@ -0,0 +1,63 @@ +# 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 .iaa_svm_container_py3 import IaaSVMContainer + + +class AzureIaaSClassicComputeVMContainer(IaaSVMContainer): + """IaaS VM workload-specific backup item representing a classic virtual + machine. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name of the container. + :type friendly_name: str + :param backup_management_type: Type of backup managemenent for the + container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param registration_status: Status of registration of the container with + the Recovery Services Vault. + :type registration_status: str + :param health_status: Status of health of the container. + :type health_status: str + :param container_type: Required. Constant filled by server. + :type container_type: str + :param virtual_machine_id: Fully qualified ARM url of the virtual machine + represented by this Azure IaaS VM container. + :type virtual_machine_id: str + :param virtual_machine_version: Specifies whether the container represents + a Classic or an Azure Resource Manager VM. + :type virtual_machine_version: str + :param resource_group: Resource group name of Recovery Services Vault. + :type resource_group: str + """ + + _validation = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_type': {'key': 'containerType', 'type': 'str'}, + 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, + 'virtual_machine_version': {'key': 'virtualMachineVersion', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + } + + def __init__(self, *, friendly_name: str=None, backup_management_type=None, registration_status: str=None, health_status: str=None, virtual_machine_id: str=None, virtual_machine_version: str=None, resource_group: str=None, **kwargs) -> None: + super(AzureIaaSClassicComputeVMContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status, virtual_machine_id=virtual_machine_id, virtual_machine_version=virtual_machine_version, resource_group=resource_group, **kwargs) + self.container_type = 'Microsoft.ClassicCompute/virtualMachines' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_sclassic_compute_vm_protectable_item.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_sclassic_compute_vm_protectable_item.py index dd63ba3122c4..33f16c95968f 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_sclassic_compute_vm_protectable_item.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_sclassic_compute_vm_protectable_item.py @@ -15,16 +15,21 @@ class AzureIaaSClassicComputeVMProtectableItem(IaaSVMProtectableItem): """IaaS VM workload-specific backup item representing the Classic Compute VM. + All required parameters must be populated in order to send to Azure. + :param backup_management_type: Type of backup managemenent to backup an item. :type backup_management_type: str + :param workload_type: Type of workload for the backup management + :type workload_type: str :param friendly_name: Friendly name of the backup item. :type friendly_name: str :param protection_state: State of the back up item. Possible values - include: 'Invalid', 'NotProtected', 'Protecting', 'Protected' - :type protection_state: str or :class:`ProtectionStatus - ` - :param protectable_item_type: Polymorphic Discriminator + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param protectable_item_type: Required. Constant filled by server. :type protectable_item_type: str :param virtual_machine_id: Fully qualified ARM ID of the virtual machine. :type virtual_machine_id: str @@ -34,6 +39,15 @@ class AzureIaaSClassicComputeVMProtectableItem(IaaSVMProtectableItem): 'protectable_item_type': {'required': True}, } - def __init__(self, backup_management_type=None, friendly_name=None, protection_state=None, virtual_machine_id=None): - super(AzureIaaSClassicComputeVMProtectableItem, self).__init__(backup_management_type=backup_management_type, friendly_name=friendly_name, protection_state=protection_state, virtual_machine_id=virtual_machine_id) + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, + 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureIaaSClassicComputeVMProtectableItem, self).__init__(**kwargs) self.protectable_item_type = 'Microsoft.ClassicCompute/virtualMachines' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_sclassic_compute_vm_protectable_item_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_sclassic_compute_vm_protectable_item_py3.py new file mode 100644 index 000000000000..d721c5caa23a --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_sclassic_compute_vm_protectable_item_py3.py @@ -0,0 +1,53 @@ +# 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 .iaa_svm_protectable_item_py3 import IaaSVMProtectableItem + + +class AzureIaaSClassicComputeVMProtectableItem(IaaSVMProtectableItem): + """IaaS VM workload-specific backup item representing the Classic Compute VM. + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent to backup an + item. + :type backup_management_type: str + :param workload_type: Type of workload for the backup management + :type workload_type: str + :param friendly_name: Friendly name of the backup item. + :type friendly_name: str + :param protection_state: State of the back up item. Possible values + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param protectable_item_type: Required. Constant filled by server. + :type protectable_item_type: str + :param virtual_machine_id: Fully qualified ARM ID of the virtual machine. + :type virtual_machine_id: str + """ + + _validation = { + 'protectable_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, + 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, + } + + def __init__(self, *, backup_management_type: str=None, workload_type: str=None, friendly_name: str=None, protection_state=None, virtual_machine_id: str=None, **kwargs) -> None: + super(AzureIaaSClassicComputeVMProtectableItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, friendly_name=friendly_name, protection_state=protection_state, virtual_machine_id=virtual_machine_id, **kwargs) + self.protectable_item_type = 'Microsoft.ClassicCompute/virtualMachines' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_sclassic_compute_vm_protected_item.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_sclassic_compute_vm_protected_item.py index 92c85911dab2..27d5496642dd 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_sclassic_compute_vm_protected_item.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_sclassic_compute_vm_protected_item.py @@ -15,17 +15,20 @@ class AzureIaaSClassicComputeVMProtectedItem(AzureIaaSVMProtectedItem): """IaaS VM workload-specific backup item representing the Classic Compute VM. + All required parameters must be populated in order to send to Azure. + :param backup_management_type: Type of backup managemenent for the backed up item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', - 'AzureBackupServer', 'AzureSql' - :type backup_management_type: str or :class:`BackupManagementType - ` + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType :param workload_type: Type of workload this item represents. Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', - 'GenericDataSource' - :type workload_type: str or :class:`DataSourceType - ` + 'GenericDataSource', 'SQLDataBase', 'AzureFileShare' + :type workload_type: str or + ~azure.mgmt.recoveryservicesbackup.models.DataSourceType :param container_name: Unique name of container :type container_name: str :param source_resource_id: ARM ID of the resource to be backed up. @@ -36,7 +39,9 @@ class AzureIaaSClassicComputeVMProtectedItem(AzureIaaSVMProtectedItem): :param last_recovery_point: Timestamp when the last (latest) backup copy was created for this backup item. :type last_recovery_point: datetime - :param protected_item_type: Polymorphic Discriminator + :param backup_set_name: Name of the backup set the backup item belongs to + :type backup_set_name: str + :param protected_item_type: Required. Constant filled by server. :type protected_item_type: str :param friendly_name: Friendly name of the VM represented by this backup item. @@ -49,17 +54,16 @@ class AzureIaaSClassicComputeVMProtectedItem(AzureIaaSVMProtectedItem): :param protection_state: Backup state of this backup item. Possible values include: 'Invalid', 'IRPending', 'Protected', 'ProtectionError', 'ProtectionStopped', 'ProtectionPaused' - :type protection_state: str or :class:`ProtectionState - ` + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionState :param health_status: Health status of protected item. Possible values include: 'Passed', 'ActionRequired', 'ActionSuggested', 'Invalid' - :type health_status: str or :class:`HealthStatus - ` + :type health_status: str or + ~azure.mgmt.recoveryservicesbackup.models.HealthStatus :param health_details: Health details on this backup item. - :type health_details: list of :class:`AzureIaaSVMHealthDetails - ` - :param last_backup_status: Last backup operation status. Possible values: - Healthy, Unhealthy. + :type health_details: + list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMHealthDetails] + :param last_backup_status: Last backup operation status. :type last_backup_status: str :param last_backup_time: Timestamp of the last backup operation on this backup item. @@ -67,14 +71,35 @@ class AzureIaaSClassicComputeVMProtectedItem(AzureIaaSVMProtectedItem): :param protected_item_data_id: Data ID of the protected item. :type protected_item_data_id: str :param extended_info: Additional information for this backup item. - :type extended_info: :class:`AzureIaaSVMProtectedItemExtendedInfo - ` + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMProtectedItemExtendedInfo """ _validation = { 'protected_item_type': {'required': True}, } - def __init__(self, backup_management_type=None, workload_type=None, container_name=None, source_resource_id=None, policy_id=None, last_recovery_point=None, friendly_name=None, virtual_machine_id=None, protection_status=None, protection_state=None, health_status=None, health_details=None, last_backup_status=None, last_backup_time=None, protected_item_data_id=None, extended_info=None): - super(AzureIaaSClassicComputeVMProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, friendly_name=friendly_name, virtual_machine_id=virtual_machine_id, protection_status=protection_status, protection_state=protection_state, health_status=health_status, health_details=health_details, last_backup_status=last_backup_status, last_backup_time=last_backup_time, protected_item_data_id=protected_item_data_id, extended_info=extended_info) + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'policy_id': {'key': 'policyId', 'type': 'str'}, + 'last_recovery_point': {'key': 'lastRecoveryPoint', 'type': 'iso-8601'}, + 'backup_set_name': {'key': 'backupSetName', 'type': 'str'}, + 'protected_item_type': {'key': 'protectedItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, + 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'health_details': {'key': 'healthDetails', 'type': '[AzureIaaSVMHealthDetails]'}, + 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, + 'last_backup_time': {'key': 'lastBackupTime', 'type': 'iso-8601'}, + 'protected_item_data_id': {'key': 'protectedItemDataId', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureIaaSVMProtectedItemExtendedInfo'}, + } + + def __init__(self, **kwargs): + super(AzureIaaSClassicComputeVMProtectedItem, self).__init__(**kwargs) self.protected_item_type = 'Microsoft.ClassicCompute/virtualMachines' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_sclassic_compute_vm_protected_item_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_sclassic_compute_vm_protected_item_py3.py new file mode 100644 index 000000000000..532127d50cf0 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_sclassic_compute_vm_protected_item_py3.py @@ -0,0 +1,105 @@ +# 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 .azure_iaa_svm_protected_item_py3 import AzureIaaSVMProtectedItem + + +class AzureIaaSClassicComputeVMProtectedItem(AzureIaaSVMProtectedItem): + """IaaS VM workload-specific backup item representing the Classic Compute VM. + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent for the backed + up item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param workload_type: Type of workload this item represents. Possible + values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', + 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + 'GenericDataSource', 'SQLDataBase', 'AzureFileShare' + :type workload_type: str or + ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :param container_name: Unique name of container + :type container_name: str + :param source_resource_id: ARM ID of the resource to be backed up. + :type source_resource_id: str + :param policy_id: ID of the backup policy with which this item is backed + up. + :type policy_id: str + :param last_recovery_point: Timestamp when the last (latest) backup copy + was created for this backup item. + :type last_recovery_point: datetime + :param backup_set_name: Name of the backup set the backup item belongs to + :type backup_set_name: str + :param protected_item_type: Required. Constant filled by server. + :type protected_item_type: str + :param friendly_name: Friendly name of the VM represented by this backup + item. + :type friendly_name: str + :param virtual_machine_id: Fully qualified ARM ID of the virtual machine + represented by this item. + :type virtual_machine_id: str + :param protection_status: Backup status of this backup item. + :type protection_status: str + :param protection_state: Backup state of this backup item. Possible values + include: 'Invalid', 'IRPending', 'Protected', 'ProtectionError', + 'ProtectionStopped', 'ProtectionPaused' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionState + :param health_status: Health status of protected item. Possible values + include: 'Passed', 'ActionRequired', 'ActionSuggested', 'Invalid' + :type health_status: str or + ~azure.mgmt.recoveryservicesbackup.models.HealthStatus + :param health_details: Health details on this backup item. + :type health_details: + list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMHealthDetails] + :param last_backup_status: Last backup operation status. + :type last_backup_status: str + :param last_backup_time: Timestamp of the last backup operation on this + backup item. + :type last_backup_time: datetime + :param protected_item_data_id: Data ID of the protected item. + :type protected_item_data_id: str + :param extended_info: Additional information for this backup item. + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMProtectedItemExtendedInfo + """ + + _validation = { + 'protected_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'policy_id': {'key': 'policyId', 'type': 'str'}, + 'last_recovery_point': {'key': 'lastRecoveryPoint', 'type': 'iso-8601'}, + 'backup_set_name': {'key': 'backupSetName', 'type': 'str'}, + 'protected_item_type': {'key': 'protectedItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, + 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'health_details': {'key': 'healthDetails', 'type': '[AzureIaaSVMHealthDetails]'}, + 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, + 'last_backup_time': {'key': 'lastBackupTime', 'type': 'iso-8601'}, + 'protected_item_data_id': {'key': 'protectedItemDataId', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureIaaSVMProtectedItemExtendedInfo'}, + } + + def __init__(self, *, backup_management_type=None, workload_type=None, container_name: str=None, source_resource_id: str=None, policy_id: str=None, last_recovery_point=None, backup_set_name: str=None, friendly_name: str=None, virtual_machine_id: str=None, protection_status: str=None, protection_state=None, health_status=None, health_details=None, last_backup_status: str=None, last_backup_time=None, protected_item_data_id: str=None, extended_info=None, **kwargs) -> None: + super(AzureIaaSClassicComputeVMProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, friendly_name=friendly_name, virtual_machine_id=virtual_machine_id, protection_status=protection_status, protection_state=protection_state, health_status=health_status, health_details=health_details, last_backup_status=last_backup_status, last_backup_time=last_backup_time, protected_item_data_id=protected_item_data_id, extended_info=extended_info, **kwargs) + self.protected_item_type = 'Microsoft.ClassicCompute/virtualMachines' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_scompute_vm_container.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_scompute_vm_container.py index b03d4111e6ac..787b118d3871 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_scompute_vm_container.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_scompute_vm_container.py @@ -16,33 +16,23 @@ class AzureIaaSComputeVMContainer(IaaSVMContainer): """IaaS VM workload-specific backup item representing an Azure Resource Manager virtual machine. - Variables are only populated by the server, and will be ignored when - sending a request. + All required parameters must be populated in order to send to Azure. :param friendly_name: Friendly name of the container. :type friendly_name: str :param backup_management_type: Type of backup managemenent for the container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', - 'DPM', 'AzureBackupServer', 'AzureSql' - :type backup_management_type: str or :class:`BackupManagementType - ` + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType :param registration_status: Status of registration of the container with the Recovery Services Vault. :type registration_status: str :param health_status: Status of health of the container. :type health_status: str - :ivar container_type: Type of the container. The value of this property - for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. Classic - Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows - machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is - AzureSqlContainer. Possible values include: 'Invalid', 'Unknown', - 'IaasVMContainer', 'IaasVMServiceContainer', 'DPMContainer', - 'AzureBackupServerContainer', 'MABContainer', 'Cluster', - 'AzureSqlContainer', 'Windows', 'VCenter' - :vartype container_type: str or :class:`ContainerType - ` - :param protectable_object_type: Polymorphic Discriminator - :type protectable_object_type: str + :param container_type: Required. Constant filled by server. + :type container_type: str :param virtual_machine_id: Fully qualified ARM url of the virtual machine represented by this Azure IaaS VM container. :type virtual_machine_id: str @@ -54,10 +44,20 @@ class AzureIaaSComputeVMContainer(IaaSVMContainer): """ _validation = { - 'container_type': {'readonly': True}, - 'protectable_object_type': {'required': True}, + 'container_type': {'required': True}, } - def __init__(self, friendly_name=None, backup_management_type=None, registration_status=None, health_status=None, virtual_machine_id=None, virtual_machine_version=None, resource_group=None): - super(AzureIaaSComputeVMContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status, virtual_machine_id=virtual_machine_id, virtual_machine_version=virtual_machine_version, resource_group=resource_group) - self.protectable_object_type = 'Microsoft.Compute/virtualMachines' + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_type': {'key': 'containerType', 'type': 'str'}, + 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, + 'virtual_machine_version': {'key': 'virtualMachineVersion', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureIaaSComputeVMContainer, self).__init__(**kwargs) + self.container_type = 'Microsoft.Compute/virtualMachines' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_scompute_vm_container_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_scompute_vm_container_py3.py new file mode 100644 index 000000000000..e264ca935f98 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_scompute_vm_container_py3.py @@ -0,0 +1,63 @@ +# 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 .iaa_svm_container_py3 import IaaSVMContainer + + +class AzureIaaSComputeVMContainer(IaaSVMContainer): + """IaaS VM workload-specific backup item representing an Azure Resource + Manager virtual machine. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name of the container. + :type friendly_name: str + :param backup_management_type: Type of backup managemenent for the + container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param registration_status: Status of registration of the container with + the Recovery Services Vault. + :type registration_status: str + :param health_status: Status of health of the container. + :type health_status: str + :param container_type: Required. Constant filled by server. + :type container_type: str + :param virtual_machine_id: Fully qualified ARM url of the virtual machine + represented by this Azure IaaS VM container. + :type virtual_machine_id: str + :param virtual_machine_version: Specifies whether the container represents + a Classic or an Azure Resource Manager VM. + :type virtual_machine_version: str + :param resource_group: Resource group name of Recovery Services Vault. + :type resource_group: str + """ + + _validation = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_type': {'key': 'containerType', 'type': 'str'}, + 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, + 'virtual_machine_version': {'key': 'virtualMachineVersion', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + } + + def __init__(self, *, friendly_name: str=None, backup_management_type=None, registration_status: str=None, health_status: str=None, virtual_machine_id: str=None, virtual_machine_version: str=None, resource_group: str=None, **kwargs) -> None: + super(AzureIaaSComputeVMContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status, virtual_machine_id=virtual_machine_id, virtual_machine_version=virtual_machine_version, resource_group=resource_group, **kwargs) + self.container_type = 'Microsoft.Compute/virtualMachines' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_scompute_vm_protectable_item.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_scompute_vm_protectable_item.py index 64270c478923..2acfbea97109 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_scompute_vm_protectable_item.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_scompute_vm_protectable_item.py @@ -16,16 +16,21 @@ class AzureIaaSComputeVMProtectableItem(IaaSVMProtectableItem): """IaaS VM workload-specific backup item representing the Azure Resource Manager VM. + All required parameters must be populated in order to send to Azure. + :param backup_management_type: Type of backup managemenent to backup an item. :type backup_management_type: str + :param workload_type: Type of workload for the backup management + :type workload_type: str :param friendly_name: Friendly name of the backup item. :type friendly_name: str :param protection_state: State of the back up item. Possible values - include: 'Invalid', 'NotProtected', 'Protecting', 'Protected' - :type protection_state: str or :class:`ProtectionStatus - ` - :param protectable_item_type: Polymorphic Discriminator + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param protectable_item_type: Required. Constant filled by server. :type protectable_item_type: str :param virtual_machine_id: Fully qualified ARM ID of the virtual machine. :type virtual_machine_id: str @@ -35,6 +40,15 @@ class AzureIaaSComputeVMProtectableItem(IaaSVMProtectableItem): 'protectable_item_type': {'required': True}, } - def __init__(self, backup_management_type=None, friendly_name=None, protection_state=None, virtual_machine_id=None): - super(AzureIaaSComputeVMProtectableItem, self).__init__(backup_management_type=backup_management_type, friendly_name=friendly_name, protection_state=protection_state, virtual_machine_id=virtual_machine_id) + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, + 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureIaaSComputeVMProtectableItem, self).__init__(**kwargs) self.protectable_item_type = 'Microsoft.Compute/virtualMachines' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_scompute_vm_protectable_item_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_scompute_vm_protectable_item_py3.py new file mode 100644 index 000000000000..e041e75aa232 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_scompute_vm_protectable_item_py3.py @@ -0,0 +1,54 @@ +# 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 .iaa_svm_protectable_item_py3 import IaaSVMProtectableItem + + +class AzureIaaSComputeVMProtectableItem(IaaSVMProtectableItem): + """IaaS VM workload-specific backup item representing the Azure Resource + Manager VM. + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent to backup an + item. + :type backup_management_type: str + :param workload_type: Type of workload for the backup management + :type workload_type: str + :param friendly_name: Friendly name of the backup item. + :type friendly_name: str + :param protection_state: State of the back up item. Possible values + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param protectable_item_type: Required. Constant filled by server. + :type protectable_item_type: str + :param virtual_machine_id: Fully qualified ARM ID of the virtual machine. + :type virtual_machine_id: str + """ + + _validation = { + 'protectable_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, + 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, + } + + def __init__(self, *, backup_management_type: str=None, workload_type: str=None, friendly_name: str=None, protection_state=None, virtual_machine_id: str=None, **kwargs) -> None: + super(AzureIaaSComputeVMProtectableItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, friendly_name=friendly_name, protection_state=protection_state, virtual_machine_id=virtual_machine_id, **kwargs) + self.protectable_item_type = 'Microsoft.Compute/virtualMachines' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_scompute_vm_protected_item.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_scompute_vm_protected_item.py index dc66d5f5320d..f4276eca3742 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_scompute_vm_protected_item.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_scompute_vm_protected_item.py @@ -16,17 +16,20 @@ class AzureIaaSComputeVMProtectedItem(AzureIaaSVMProtectedItem): """IaaS VM workload-specific backup item representing the Azure Resource Manager VM. + All required parameters must be populated in order to send to Azure. + :param backup_management_type: Type of backup managemenent for the backed up item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', - 'AzureBackupServer', 'AzureSql' - :type backup_management_type: str or :class:`BackupManagementType - ` + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType :param workload_type: Type of workload this item represents. Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', - 'GenericDataSource' - :type workload_type: str or :class:`DataSourceType - ` + 'GenericDataSource', 'SQLDataBase', 'AzureFileShare' + :type workload_type: str or + ~azure.mgmt.recoveryservicesbackup.models.DataSourceType :param container_name: Unique name of container :type container_name: str :param source_resource_id: ARM ID of the resource to be backed up. @@ -37,7 +40,9 @@ class AzureIaaSComputeVMProtectedItem(AzureIaaSVMProtectedItem): :param last_recovery_point: Timestamp when the last (latest) backup copy was created for this backup item. :type last_recovery_point: datetime - :param protected_item_type: Polymorphic Discriminator + :param backup_set_name: Name of the backup set the backup item belongs to + :type backup_set_name: str + :param protected_item_type: Required. Constant filled by server. :type protected_item_type: str :param friendly_name: Friendly name of the VM represented by this backup item. @@ -50,17 +55,16 @@ class AzureIaaSComputeVMProtectedItem(AzureIaaSVMProtectedItem): :param protection_state: Backup state of this backup item. Possible values include: 'Invalid', 'IRPending', 'Protected', 'ProtectionError', 'ProtectionStopped', 'ProtectionPaused' - :type protection_state: str or :class:`ProtectionState - ` + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionState :param health_status: Health status of protected item. Possible values include: 'Passed', 'ActionRequired', 'ActionSuggested', 'Invalid' - :type health_status: str or :class:`HealthStatus - ` + :type health_status: str or + ~azure.mgmt.recoveryservicesbackup.models.HealthStatus :param health_details: Health details on this backup item. - :type health_details: list of :class:`AzureIaaSVMHealthDetails - ` - :param last_backup_status: Last backup operation status. Possible values: - Healthy, Unhealthy. + :type health_details: + list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMHealthDetails] + :param last_backup_status: Last backup operation status. :type last_backup_status: str :param last_backup_time: Timestamp of the last backup operation on this backup item. @@ -68,14 +72,35 @@ class AzureIaaSComputeVMProtectedItem(AzureIaaSVMProtectedItem): :param protected_item_data_id: Data ID of the protected item. :type protected_item_data_id: str :param extended_info: Additional information for this backup item. - :type extended_info: :class:`AzureIaaSVMProtectedItemExtendedInfo - ` + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMProtectedItemExtendedInfo """ _validation = { 'protected_item_type': {'required': True}, } - def __init__(self, backup_management_type=None, workload_type=None, container_name=None, source_resource_id=None, policy_id=None, last_recovery_point=None, friendly_name=None, virtual_machine_id=None, protection_status=None, protection_state=None, health_status=None, health_details=None, last_backup_status=None, last_backup_time=None, protected_item_data_id=None, extended_info=None): - super(AzureIaaSComputeVMProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, friendly_name=friendly_name, virtual_machine_id=virtual_machine_id, protection_status=protection_status, protection_state=protection_state, health_status=health_status, health_details=health_details, last_backup_status=last_backup_status, last_backup_time=last_backup_time, protected_item_data_id=protected_item_data_id, extended_info=extended_info) + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'policy_id': {'key': 'policyId', 'type': 'str'}, + 'last_recovery_point': {'key': 'lastRecoveryPoint', 'type': 'iso-8601'}, + 'backup_set_name': {'key': 'backupSetName', 'type': 'str'}, + 'protected_item_type': {'key': 'protectedItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, + 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'health_details': {'key': 'healthDetails', 'type': '[AzureIaaSVMHealthDetails]'}, + 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, + 'last_backup_time': {'key': 'lastBackupTime', 'type': 'iso-8601'}, + 'protected_item_data_id': {'key': 'protectedItemDataId', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureIaaSVMProtectedItemExtendedInfo'}, + } + + def __init__(self, **kwargs): + super(AzureIaaSComputeVMProtectedItem, self).__init__(**kwargs) self.protected_item_type = 'Microsoft.Compute/virtualMachines' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_scompute_vm_protected_item_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_scompute_vm_protected_item_py3.py new file mode 100644 index 000000000000..b41dc1cf10d0 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_scompute_vm_protected_item_py3.py @@ -0,0 +1,106 @@ +# 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 .azure_iaa_svm_protected_item_py3 import AzureIaaSVMProtectedItem + + +class AzureIaaSComputeVMProtectedItem(AzureIaaSVMProtectedItem): + """IaaS VM workload-specific backup item representing the Azure Resource + Manager VM. + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent for the backed + up item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param workload_type: Type of workload this item represents. Possible + values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', + 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + 'GenericDataSource', 'SQLDataBase', 'AzureFileShare' + :type workload_type: str or + ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :param container_name: Unique name of container + :type container_name: str + :param source_resource_id: ARM ID of the resource to be backed up. + :type source_resource_id: str + :param policy_id: ID of the backup policy with which this item is backed + up. + :type policy_id: str + :param last_recovery_point: Timestamp when the last (latest) backup copy + was created for this backup item. + :type last_recovery_point: datetime + :param backup_set_name: Name of the backup set the backup item belongs to + :type backup_set_name: str + :param protected_item_type: Required. Constant filled by server. + :type protected_item_type: str + :param friendly_name: Friendly name of the VM represented by this backup + item. + :type friendly_name: str + :param virtual_machine_id: Fully qualified ARM ID of the virtual machine + represented by this item. + :type virtual_machine_id: str + :param protection_status: Backup status of this backup item. + :type protection_status: str + :param protection_state: Backup state of this backup item. Possible values + include: 'Invalid', 'IRPending', 'Protected', 'ProtectionError', + 'ProtectionStopped', 'ProtectionPaused' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionState + :param health_status: Health status of protected item. Possible values + include: 'Passed', 'ActionRequired', 'ActionSuggested', 'Invalid' + :type health_status: str or + ~azure.mgmt.recoveryservicesbackup.models.HealthStatus + :param health_details: Health details on this backup item. + :type health_details: + list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMHealthDetails] + :param last_backup_status: Last backup operation status. + :type last_backup_status: str + :param last_backup_time: Timestamp of the last backup operation on this + backup item. + :type last_backup_time: datetime + :param protected_item_data_id: Data ID of the protected item. + :type protected_item_data_id: str + :param extended_info: Additional information for this backup item. + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMProtectedItemExtendedInfo + """ + + _validation = { + 'protected_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'policy_id': {'key': 'policyId', 'type': 'str'}, + 'last_recovery_point': {'key': 'lastRecoveryPoint', 'type': 'iso-8601'}, + 'backup_set_name': {'key': 'backupSetName', 'type': 'str'}, + 'protected_item_type': {'key': 'protectedItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, + 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'health_details': {'key': 'healthDetails', 'type': '[AzureIaaSVMHealthDetails]'}, + 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, + 'last_backup_time': {'key': 'lastBackupTime', 'type': 'iso-8601'}, + 'protected_item_data_id': {'key': 'protectedItemDataId', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureIaaSVMProtectedItemExtendedInfo'}, + } + + def __init__(self, *, backup_management_type=None, workload_type=None, container_name: str=None, source_resource_id: str=None, policy_id: str=None, last_recovery_point=None, backup_set_name: str=None, friendly_name: str=None, virtual_machine_id: str=None, protection_status: str=None, protection_state=None, health_status=None, health_details=None, last_backup_status: str=None, last_backup_time=None, protected_item_data_id: str=None, extended_info=None, **kwargs) -> None: + super(AzureIaaSComputeVMProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, friendly_name=friendly_name, virtual_machine_id=virtual_machine_id, protection_status=protection_status, protection_state=protection_state, health_status=health_status, health_details=health_details, last_backup_status=last_backup_status, last_backup_time=last_backup_time, protected_item_data_id=protected_item_data_id, extended_info=extended_info, **kwargs) + self.protected_item_type = 'Microsoft.Compute/virtualMachines' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_error_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_error_info.py index a1589bba6c2d..a52b009c69de 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_error_info.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_error_info.py @@ -24,7 +24,7 @@ class AzureIaaSVMErrorInfo(Model): :type error_string: str :param recommendations: List of localized recommendations for above error code. - :type recommendations: list of str + :type recommendations: list[str] """ _attribute_map = { @@ -34,8 +34,9 @@ class AzureIaaSVMErrorInfo(Model): 'recommendations': {'key': 'recommendations', 'type': '[str]'}, } - def __init__(self, error_code=None, error_title=None, error_string=None, recommendations=None): - self.error_code = error_code - self.error_title = error_title - self.error_string = error_string - self.recommendations = recommendations + def __init__(self, **kwargs): + super(AzureIaaSVMErrorInfo, self).__init__(**kwargs) + self.error_code = kwargs.get('error_code', None) + self.error_title = kwargs.get('error_title', None) + self.error_string = kwargs.get('error_string', None) + self.recommendations = kwargs.get('recommendations', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_error_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_error_info_py3.py new file mode 100644 index 000000000000..ff1743e4fb20 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_error_info_py3.py @@ -0,0 +1,42 @@ +# 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 AzureIaaSVMErrorInfo(Model): + """Azure IaaS VM workload-specific error information. + + :param error_code: Error code. + :type error_code: int + :param error_title: Title: Typically, the entity that the error pertains + to. + :type error_title: str + :param error_string: Localized error string. + :type error_string: str + :param recommendations: List of localized recommendations for above error + code. + :type recommendations: list[str] + """ + + _attribute_map = { + 'error_code': {'key': 'errorCode', 'type': 'int'}, + 'error_title': {'key': 'errorTitle', 'type': 'str'}, + 'error_string': {'key': 'errorString', 'type': 'str'}, + 'recommendations': {'key': 'recommendations', 'type': '[str]'}, + } + + def __init__(self, *, error_code: int=None, error_title: str=None, error_string: str=None, recommendations=None, **kwargs) -> None: + super(AzureIaaSVMErrorInfo, self).__init__(**kwargs) + self.error_code = error_code + self.error_title = error_title + self.error_string = error_string + self.recommendations = recommendations diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_health_details.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_health_details.py index d8c2c8f7ee8c..c84e0911db5f 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_health_details.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_health_details.py @@ -22,7 +22,7 @@ class AzureIaaSVMHealthDetails(Model): :param message: Health Message :type message: str :param recommendations: Health Recommended Actions - :type recommendations: list of str + :type recommendations: list[str] """ _attribute_map = { @@ -32,8 +32,9 @@ class AzureIaaSVMHealthDetails(Model): 'recommendations': {'key': 'recommendations', 'type': '[str]'}, } - def __init__(self, code=None, title=None, message=None, recommendations=None): - self.code = code - self.title = title - self.message = message - self.recommendations = recommendations + def __init__(self, **kwargs): + super(AzureIaaSVMHealthDetails, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.title = kwargs.get('title', None) + self.message = kwargs.get('message', None) + self.recommendations = kwargs.get('recommendations', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_health_details_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_health_details_py3.py new file mode 100644 index 000000000000..720bfc0840fc --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_health_details_py3.py @@ -0,0 +1,40 @@ +# 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 AzureIaaSVMHealthDetails(Model): + """Azure IaaS VM workload-specific Health Details. + + :param code: Health Code + :type code: int + :param title: Health Title + :type title: str + :param message: Health Message + :type message: str + :param recommendations: Health Recommended Actions + :type recommendations: list[str] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'int'}, + 'title': {'key': 'title', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'recommendations': {'key': 'recommendations', 'type': '[str]'}, + } + + def __init__(self, *, code: int=None, title: str=None, message: str=None, recommendations=None, **kwargs) -> None: + super(AzureIaaSVMHealthDetails, self).__init__(**kwargs) + self.code = code + self.title = title + self.message = message + self.recommendations = recommendations diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_job.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_job.py index f64195e8b724..fd5e1b68bb29 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_job.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_job.py @@ -15,14 +15,17 @@ class AzureIaaSVMJob(Job): """Azure IaaS VM workload-specifc job object. + All required parameters must be populated in order to send to Azure. + :param entity_friendly_name: Friendly name of the entity on which the current job is executing. :type entity_friendly_name: str :param backup_management_type: Backup management type to execute the current job. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', - 'DPM', 'AzureBackupServer', 'AzureSql' - :type backup_management_type: str or :class:`BackupManagementType - ` + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType :param operation: The operation name. :type operation: str :param status: Job status. @@ -33,23 +36,23 @@ class AzureIaaSVMJob(Job): :type end_time: datetime :param activity_id: ActivityId of job. :type activity_id: str - :param job_type: Polymorphic Discriminator + :param job_type: Required. Constant filled by server. :type job_type: str :param duration: Time elapsed during the execution of this job. :type duration: timedelta :param actions_info: Gets or sets the state/actions applicable on this job like cancel/retry. - :type actions_info: list of str or :class:`JobSupportedAction - ` + :type actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] :param error_details: Error details on execution of this job. - :type error_details: list of :class:`AzureIaaSVMErrorInfo - ` + :type error_details: + list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMErrorInfo] :param virtual_machine_version: Specifies whether the backup item is a Classic or an Azure Resource Manager VM. :type virtual_machine_version: str :param extended_info: Additional information for this job. - :type extended_info: :class:`AzureIaaSVMJobExtendedInfo - ` + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMJobExtendedInfo """ _validation = { @@ -72,11 +75,11 @@ class AzureIaaSVMJob(Job): 'extended_info': {'key': 'extendedInfo', 'type': 'AzureIaaSVMJobExtendedInfo'}, } - def __init__(self, entity_friendly_name=None, backup_management_type=None, operation=None, status=None, start_time=None, end_time=None, activity_id=None, duration=None, actions_info=None, error_details=None, virtual_machine_version=None, extended_info=None): - super(AzureIaaSVMJob, self).__init__(entity_friendly_name=entity_friendly_name, backup_management_type=backup_management_type, operation=operation, status=status, start_time=start_time, end_time=end_time, activity_id=activity_id) - self.duration = duration - self.actions_info = actions_info - self.error_details = error_details - self.virtual_machine_version = virtual_machine_version - self.extended_info = extended_info + def __init__(self, **kwargs): + super(AzureIaaSVMJob, self).__init__(**kwargs) + self.duration = kwargs.get('duration', None) + self.actions_info = kwargs.get('actions_info', None) + self.error_details = kwargs.get('error_details', None) + self.virtual_machine_version = kwargs.get('virtual_machine_version', None) + self.extended_info = kwargs.get('extended_info', None) self.job_type = 'AzureIaaSVMJob' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_job_extended_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_job_extended_info.py index 782e90c60c57..2d33a8378ae4 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_job_extended_info.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_job_extended_info.py @@ -16,10 +16,10 @@ class AzureIaaSVMJobExtendedInfo(Model): """Azure IaaS VM workload-specific additional information for job. :param tasks_list: List of tasks associated with this job. - :type tasks_list: list of :class:`AzureIaaSVMJobTaskDetails - ` + :type tasks_list: + list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMJobTaskDetails] :param property_bag: Job properties. - :type property_bag: dict + :type property_bag: dict[str, str] :param progress_percentage: Indicates progress of the job. Null if it has not started or completed. :type progress_percentage: float @@ -35,8 +35,9 @@ class AzureIaaSVMJobExtendedInfo(Model): 'dynamic_error_message': {'key': 'dynamicErrorMessage', 'type': 'str'}, } - def __init__(self, tasks_list=None, property_bag=None, progress_percentage=None, dynamic_error_message=None): - self.tasks_list = tasks_list - self.property_bag = property_bag - self.progress_percentage = progress_percentage - self.dynamic_error_message = dynamic_error_message + def __init__(self, **kwargs): + super(AzureIaaSVMJobExtendedInfo, self).__init__(**kwargs) + self.tasks_list = kwargs.get('tasks_list', None) + self.property_bag = kwargs.get('property_bag', None) + self.progress_percentage = kwargs.get('progress_percentage', None) + self.dynamic_error_message = kwargs.get('dynamic_error_message', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_job_extended_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_job_extended_info_py3.py new file mode 100644 index 000000000000..83137dc16eb8 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_job_extended_info_py3.py @@ -0,0 +1,43 @@ +# 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 AzureIaaSVMJobExtendedInfo(Model): + """Azure IaaS VM workload-specific additional information for job. + + :param tasks_list: List of tasks associated with this job. + :type tasks_list: + list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMJobTaskDetails] + :param property_bag: Job properties. + :type property_bag: dict[str, str] + :param progress_percentage: Indicates progress of the job. Null if it has + not started or completed. + :type progress_percentage: float + :param dynamic_error_message: Non localized error message on job + execution. + :type dynamic_error_message: str + """ + + _attribute_map = { + 'tasks_list': {'key': 'tasksList', 'type': '[AzureIaaSVMJobTaskDetails]'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'progress_percentage': {'key': 'progressPercentage', 'type': 'float'}, + 'dynamic_error_message': {'key': 'dynamicErrorMessage', 'type': 'str'}, + } + + def __init__(self, *, tasks_list=None, property_bag=None, progress_percentage: float=None, dynamic_error_message: str=None, **kwargs) -> None: + super(AzureIaaSVMJobExtendedInfo, self).__init__(**kwargs) + self.tasks_list = tasks_list + self.property_bag = property_bag + self.progress_percentage = progress_percentage + self.dynamic_error_message = dynamic_error_message diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_job_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_job_py3.py new file mode 100644 index 000000000000..625c41dd8a3d --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_job_py3.py @@ -0,0 +1,85 @@ +# 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 .job_py3 import Job + + +class AzureIaaSVMJob(Job): + """Azure IaaS VM workload-specifc job object. + + All required parameters must be populated in order to send to Azure. + + :param entity_friendly_name: Friendly name of the entity on which the + current job is executing. + :type entity_friendly_name: str + :param backup_management_type: Backup management type to execute the + current job. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param operation: The operation name. + :type operation: str + :param status: Job status. + :type status: str + :param start_time: The start time. + :type start_time: datetime + :param end_time: The end time. + :type end_time: datetime + :param activity_id: ActivityId of job. + :type activity_id: str + :param job_type: Required. Constant filled by server. + :type job_type: str + :param duration: Time elapsed during the execution of this job. + :type duration: timedelta + :param actions_info: Gets or sets the state/actions applicable on this job + like cancel/retry. + :type actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] + :param error_details: Error details on execution of this job. + :type error_details: + list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMErrorInfo] + :param virtual_machine_version: Specifies whether the backup item is a + Classic or an Azure Resource Manager VM. + :type virtual_machine_version: str + :param extended_info: Additional information for this job. + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMJobExtendedInfo + """ + + _validation = { + 'job_type': {'required': True}, + } + + _attribute_map = { + 'entity_friendly_name': {'key': 'entityFriendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'activity_id': {'key': 'activityId', 'type': 'str'}, + 'job_type': {'key': 'jobType', 'type': 'str'}, + 'duration': {'key': 'duration', 'type': 'duration'}, + 'actions_info': {'key': 'actionsInfo', 'type': '[JobSupportedAction]'}, + 'error_details': {'key': 'errorDetails', 'type': '[AzureIaaSVMErrorInfo]'}, + 'virtual_machine_version': {'key': 'virtualMachineVersion', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureIaaSVMJobExtendedInfo'}, + } + + def __init__(self, *, entity_friendly_name: str=None, backup_management_type=None, operation: str=None, status: str=None, start_time=None, end_time=None, activity_id: str=None, duration=None, actions_info=None, error_details=None, virtual_machine_version: str=None, extended_info=None, **kwargs) -> None: + super(AzureIaaSVMJob, self).__init__(entity_friendly_name=entity_friendly_name, backup_management_type=backup_management_type, operation=operation, status=status, start_time=start_time, end_time=end_time, activity_id=activity_id, **kwargs) + self.duration = duration + self.actions_info = actions_info + self.error_details = error_details + self.virtual_machine_version = virtual_machine_version + self.extended_info = extended_info + self.job_type = 'AzureIaaSVMJob' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_job_task_details.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_job_task_details.py index e708f8f3ac59..c653cfdfa076 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_job_task_details.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_job_task_details.py @@ -41,11 +41,12 @@ class AzureIaaSVMJobTaskDetails(Model): 'progress_percentage': {'key': 'progressPercentage', 'type': 'float'}, } - def __init__(self, task_id=None, start_time=None, end_time=None, instance_id=None, duration=None, status=None, progress_percentage=None): - self.task_id = task_id - self.start_time = start_time - self.end_time = end_time - self.instance_id = instance_id - self.duration = duration - self.status = status - self.progress_percentage = progress_percentage + def __init__(self, **kwargs): + super(AzureIaaSVMJobTaskDetails, self).__init__(**kwargs) + self.task_id = kwargs.get('task_id', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.instance_id = kwargs.get('instance_id', None) + self.duration = kwargs.get('duration', None) + self.status = kwargs.get('status', None) + self.progress_percentage = kwargs.get('progress_percentage', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_job_task_details_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_job_task_details_py3.py new file mode 100644 index 000000000000..c44d39bd3292 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_job_task_details_py3.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AzureIaaSVMJobTaskDetails(Model): + """Azure IaaS VM workload-specific job task details. + + :param task_id: The task display name. + :type task_id: str + :param start_time: The start time. + :type start_time: datetime + :param end_time: The end time. + :type end_time: datetime + :param instance_id: The instanceId. + :type instance_id: str + :param duration: Time elapsed for task. + :type duration: timedelta + :param status: The status. + :type status: str + :param progress_percentage: Progress of the task. + :type progress_percentage: float + """ + + _attribute_map = { + 'task_id': {'key': 'taskId', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'instance_id': {'key': 'instanceId', 'type': 'str'}, + 'duration': {'key': 'duration', 'type': 'duration'}, + 'status': {'key': 'status', 'type': 'str'}, + 'progress_percentage': {'key': 'progressPercentage', 'type': 'float'}, + } + + def __init__(self, *, task_id: str=None, start_time=None, end_time=None, instance_id: str=None, duration=None, status: str=None, progress_percentage: float=None, **kwargs) -> None: + super(AzureIaaSVMJobTaskDetails, self).__init__(**kwargs) + self.task_id = task_id + self.start_time = start_time + self.end_time = end_time + self.instance_id = instance_id + self.duration = duration + self.status = status + self.progress_percentage = progress_percentage diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_protected_item.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_protected_item.py index abd3bc08da48..558b67d25422 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_protected_item.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_protected_item.py @@ -15,17 +15,24 @@ class AzureIaaSVMProtectedItem(ProtectedItem): """IaaS VM workload-specific backup item. + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureIaaSClassicComputeVMProtectedItem, + AzureIaaSComputeVMProtectedItem + + All required parameters must be populated in order to send to Azure. + :param backup_management_type: Type of backup managemenent for the backed up item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', - 'AzureBackupServer', 'AzureSql' - :type backup_management_type: str or :class:`BackupManagementType - ` + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType :param workload_type: Type of workload this item represents. Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', - 'GenericDataSource' - :type workload_type: str or :class:`DataSourceType - ` + 'GenericDataSource', 'SQLDataBase', 'AzureFileShare' + :type workload_type: str or + ~azure.mgmt.recoveryservicesbackup.models.DataSourceType :param container_name: Unique name of container :type container_name: str :param source_resource_id: ARM ID of the resource to be backed up. @@ -36,7 +43,9 @@ class AzureIaaSVMProtectedItem(ProtectedItem): :param last_recovery_point: Timestamp when the last (latest) backup copy was created for this backup item. :type last_recovery_point: datetime - :param protected_item_type: Polymorphic Discriminator + :param backup_set_name: Name of the backup set the backup item belongs to + :type backup_set_name: str + :param protected_item_type: Required. Constant filled by server. :type protected_item_type: str :param friendly_name: Friendly name of the VM represented by this backup item. @@ -49,17 +58,16 @@ class AzureIaaSVMProtectedItem(ProtectedItem): :param protection_state: Backup state of this backup item. Possible values include: 'Invalid', 'IRPending', 'Protected', 'ProtectionError', 'ProtectionStopped', 'ProtectionPaused' - :type protection_state: str or :class:`ProtectionState - ` + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionState :param health_status: Health status of protected item. Possible values include: 'Passed', 'ActionRequired', 'ActionSuggested', 'Invalid' - :type health_status: str or :class:`HealthStatus - ` + :type health_status: str or + ~azure.mgmt.recoveryservicesbackup.models.HealthStatus :param health_details: Health details on this backup item. - :type health_details: list of :class:`AzureIaaSVMHealthDetails - ` - :param last_backup_status: Last backup operation status. Possible values: - Healthy, Unhealthy. + :type health_details: + list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMHealthDetails] + :param last_backup_status: Last backup operation status. :type last_backup_status: str :param last_backup_time: Timestamp of the last backup operation on this backup item. @@ -67,8 +75,8 @@ class AzureIaaSVMProtectedItem(ProtectedItem): :param protected_item_data_id: Data ID of the protected item. :type protected_item_data_id: str :param extended_info: Additional information for this backup item. - :type extended_info: :class:`AzureIaaSVMProtectedItemExtendedInfo - ` + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMProtectedItemExtendedInfo """ _validation = { @@ -82,6 +90,7 @@ class AzureIaaSVMProtectedItem(ProtectedItem): 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, 'policy_id': {'key': 'policyId', 'type': 'str'}, 'last_recovery_point': {'key': 'lastRecoveryPoint', 'type': 'iso-8601'}, + 'backup_set_name': {'key': 'backupSetName', 'type': 'str'}, 'protected_item_type': {'key': 'protectedItemType', 'type': 'str'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, @@ -99,16 +108,16 @@ class AzureIaaSVMProtectedItem(ProtectedItem): 'protected_item_type': {'Microsoft.ClassicCompute/virtualMachines': 'AzureIaaSClassicComputeVMProtectedItem', 'Microsoft.Compute/virtualMachines': 'AzureIaaSComputeVMProtectedItem'} } - def __init__(self, backup_management_type=None, workload_type=None, container_name=None, source_resource_id=None, policy_id=None, last_recovery_point=None, friendly_name=None, virtual_machine_id=None, protection_status=None, protection_state=None, health_status=None, health_details=None, last_backup_status=None, last_backup_time=None, protected_item_data_id=None, extended_info=None): - super(AzureIaaSVMProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point) - self.friendly_name = friendly_name - self.virtual_machine_id = virtual_machine_id - self.protection_status = protection_status - self.protection_state = protection_state - self.health_status = health_status - self.health_details = health_details - self.last_backup_status = last_backup_status - self.last_backup_time = last_backup_time - self.protected_item_data_id = protected_item_data_id - self.extended_info = extended_info + def __init__(self, **kwargs): + super(AzureIaaSVMProtectedItem, self).__init__(**kwargs) + self.friendly_name = kwargs.get('friendly_name', None) + self.virtual_machine_id = kwargs.get('virtual_machine_id', None) + self.protection_status = kwargs.get('protection_status', None) + self.protection_state = kwargs.get('protection_state', None) + self.health_status = kwargs.get('health_status', None) + self.health_details = kwargs.get('health_details', None) + self.last_backup_status = kwargs.get('last_backup_status', None) + self.last_backup_time = kwargs.get('last_backup_time', None) + self.protected_item_data_id = kwargs.get('protected_item_data_id', None) + self.extended_info = kwargs.get('extended_info', None) self.protected_item_type = 'AzureIaaSVMProtectedItem' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_protected_item_extended_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_protected_item_extended_info.py index d67bd03e0180..6be200ce3cbb 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_protected_item_extended_info.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_protected_item_extended_info.py @@ -32,7 +32,8 @@ class AzureIaaSVMProtectedItemExtendedInfo(Model): 'policy_inconsistent': {'key': 'policyInconsistent', 'type': 'bool'}, } - def __init__(self, oldest_recovery_point=None, recovery_point_count=None, policy_inconsistent=None): - self.oldest_recovery_point = oldest_recovery_point - self.recovery_point_count = recovery_point_count - self.policy_inconsistent = policy_inconsistent + def __init__(self, **kwargs): + super(AzureIaaSVMProtectedItemExtendedInfo, self).__init__(**kwargs) + self.oldest_recovery_point = kwargs.get('oldest_recovery_point', None) + self.recovery_point_count = kwargs.get('recovery_point_count', None) + self.policy_inconsistent = kwargs.get('policy_inconsistent', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_protected_item_extended_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_protected_item_extended_info_py3.py new file mode 100644 index 000000000000..278c17d0f10b --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_protected_item_extended_info_py3.py @@ -0,0 +1,39 @@ +# 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 AzureIaaSVMProtectedItemExtendedInfo(Model): + """Additional information on Azure IaaS VM specific backup item. + + :param oldest_recovery_point: The oldest backup copy available for this + backup item. + :type oldest_recovery_point: datetime + :param recovery_point_count: Number of backup copies available for this + backup item. + :type recovery_point_count: int + :param policy_inconsistent: Specifies if backup policy associated with the + backup item is inconsistent. + :type policy_inconsistent: bool + """ + + _attribute_map = { + 'oldest_recovery_point': {'key': 'oldestRecoveryPoint', 'type': 'iso-8601'}, + 'recovery_point_count': {'key': 'recoveryPointCount', 'type': 'int'}, + 'policy_inconsistent': {'key': 'policyInconsistent', 'type': 'bool'}, + } + + def __init__(self, *, oldest_recovery_point=None, recovery_point_count: int=None, policy_inconsistent: bool=None, **kwargs) -> None: + super(AzureIaaSVMProtectedItemExtendedInfo, self).__init__(**kwargs) + self.oldest_recovery_point = oldest_recovery_point + self.recovery_point_count = recovery_point_count + self.policy_inconsistent = policy_inconsistent diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_protected_item_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_protected_item_py3.py new file mode 100644 index 000000000000..cc134305f5ef --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_protected_item_py3.py @@ -0,0 +1,123 @@ +# 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 .protected_item_py3 import ProtectedItem + + +class AzureIaaSVMProtectedItem(ProtectedItem): + """IaaS VM workload-specific backup item. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureIaaSClassicComputeVMProtectedItem, + AzureIaaSComputeVMProtectedItem + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent for the backed + up item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param workload_type: Type of workload this item represents. Possible + values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', + 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + 'GenericDataSource', 'SQLDataBase', 'AzureFileShare' + :type workload_type: str or + ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :param container_name: Unique name of container + :type container_name: str + :param source_resource_id: ARM ID of the resource to be backed up. + :type source_resource_id: str + :param policy_id: ID of the backup policy with which this item is backed + up. + :type policy_id: str + :param last_recovery_point: Timestamp when the last (latest) backup copy + was created for this backup item. + :type last_recovery_point: datetime + :param backup_set_name: Name of the backup set the backup item belongs to + :type backup_set_name: str + :param protected_item_type: Required. Constant filled by server. + :type protected_item_type: str + :param friendly_name: Friendly name of the VM represented by this backup + item. + :type friendly_name: str + :param virtual_machine_id: Fully qualified ARM ID of the virtual machine + represented by this item. + :type virtual_machine_id: str + :param protection_status: Backup status of this backup item. + :type protection_status: str + :param protection_state: Backup state of this backup item. Possible values + include: 'Invalid', 'IRPending', 'Protected', 'ProtectionError', + 'ProtectionStopped', 'ProtectionPaused' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionState + :param health_status: Health status of protected item. Possible values + include: 'Passed', 'ActionRequired', 'ActionSuggested', 'Invalid' + :type health_status: str or + ~azure.mgmt.recoveryservicesbackup.models.HealthStatus + :param health_details: Health details on this backup item. + :type health_details: + list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMHealthDetails] + :param last_backup_status: Last backup operation status. + :type last_backup_status: str + :param last_backup_time: Timestamp of the last backup operation on this + backup item. + :type last_backup_time: datetime + :param protected_item_data_id: Data ID of the protected item. + :type protected_item_data_id: str + :param extended_info: Additional information for this backup item. + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMProtectedItemExtendedInfo + """ + + _validation = { + 'protected_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'policy_id': {'key': 'policyId', 'type': 'str'}, + 'last_recovery_point': {'key': 'lastRecoveryPoint', 'type': 'iso-8601'}, + 'backup_set_name': {'key': 'backupSetName', 'type': 'str'}, + 'protected_item_type': {'key': 'protectedItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, + 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'health_details': {'key': 'healthDetails', 'type': '[AzureIaaSVMHealthDetails]'}, + 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, + 'last_backup_time': {'key': 'lastBackupTime', 'type': 'iso-8601'}, + 'protected_item_data_id': {'key': 'protectedItemDataId', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureIaaSVMProtectedItemExtendedInfo'}, + } + + _subtype_map = { + 'protected_item_type': {'Microsoft.ClassicCompute/virtualMachines': 'AzureIaaSClassicComputeVMProtectedItem', 'Microsoft.Compute/virtualMachines': 'AzureIaaSComputeVMProtectedItem'} + } + + def __init__(self, *, backup_management_type=None, workload_type=None, container_name: str=None, source_resource_id: str=None, policy_id: str=None, last_recovery_point=None, backup_set_name: str=None, friendly_name: str=None, virtual_machine_id: str=None, protection_status: str=None, protection_state=None, health_status=None, health_details=None, last_backup_status: str=None, last_backup_time=None, protected_item_data_id: str=None, extended_info=None, **kwargs) -> None: + super(AzureIaaSVMProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, **kwargs) + self.friendly_name = friendly_name + self.virtual_machine_id = virtual_machine_id + self.protection_status = protection_status + self.protection_state = protection_state + self.health_status = health_status + self.health_details = health_details + self.last_backup_status = last_backup_status + self.last_backup_time = last_backup_time + self.protected_item_data_id = protected_item_data_id + self.extended_info = extended_info + self.protected_item_type = 'AzureIaaSVMProtectedItem' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_protection_policy.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_protection_policy.py index ab20b52e2d36..c7c6fd8142d9 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_protection_policy.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_protection_policy.py @@ -15,18 +15,20 @@ class AzureIaaSVMProtectionPolicy(ProtectionPolicy): """IaaS VM workload-specific backup policy. + All required parameters must be populated in order to send to Azure. + :param protected_items_count: Number of items associated with this policy. :type protected_items_count: int - :param backup_management_type: Polymorphic Discriminator + :param backup_management_type: Required. Constant filled by server. :type backup_management_type: str :param schedule_policy: Backup schedule specified as part of backup policy. - :type schedule_policy: :class:`SchedulePolicy - ` + :type schedule_policy: + ~azure.mgmt.recoveryservicesbackup.models.SchedulePolicy :param retention_policy: Retention policy with the details on backup copy retention ranges. - :type retention_policy: :class:`RetentionPolicy - ` + :type retention_policy: + ~azure.mgmt.recoveryservicesbackup.models.RetentionPolicy :param time_zone: TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time". :type time_zone: str @@ -44,9 +46,9 @@ class AzureIaaSVMProtectionPolicy(ProtectionPolicy): 'time_zone': {'key': 'timeZone', 'type': 'str'}, } - def __init__(self, protected_items_count=None, schedule_policy=None, retention_policy=None, time_zone=None): - super(AzureIaaSVMProtectionPolicy, self).__init__(protected_items_count=protected_items_count) - self.schedule_policy = schedule_policy - self.retention_policy = retention_policy - self.time_zone = time_zone + def __init__(self, **kwargs): + super(AzureIaaSVMProtectionPolicy, self).__init__(**kwargs) + self.schedule_policy = kwargs.get('schedule_policy', None) + self.retention_policy = kwargs.get('retention_policy', None) + self.time_zone = kwargs.get('time_zone', None) self.backup_management_type = 'AzureIaasVM' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_protection_policy_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_protection_policy_py3.py new file mode 100644 index 000000000000..19902528cdd3 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_protection_policy_py3.py @@ -0,0 +1,54 @@ +# 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 .protection_policy_py3 import ProtectionPolicy + + +class AzureIaaSVMProtectionPolicy(ProtectionPolicy): + """IaaS VM workload-specific backup policy. + + All required parameters must be populated in order to send to Azure. + + :param protected_items_count: Number of items associated with this policy. + :type protected_items_count: int + :param backup_management_type: Required. Constant filled by server. + :type backup_management_type: str + :param schedule_policy: Backup schedule specified as part of backup + policy. + :type schedule_policy: + ~azure.mgmt.recoveryservicesbackup.models.SchedulePolicy + :param retention_policy: Retention policy with the details on backup copy + retention ranges. + :type retention_policy: + ~azure.mgmt.recoveryservicesbackup.models.RetentionPolicy + :param time_zone: TimeZone optional input as string. For example: TimeZone + = "Pacific Standard Time". + :type time_zone: str + """ + + _validation = { + 'backup_management_type': {'required': True}, + } + + _attribute_map = { + 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'schedule_policy': {'key': 'schedulePolicy', 'type': 'SchedulePolicy'}, + 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + } + + def __init__(self, *, protected_items_count: int=None, schedule_policy=None, retention_policy=None, time_zone: str=None, **kwargs) -> None: + super(AzureIaaSVMProtectionPolicy, self).__init__(protected_items_count=protected_items_count, **kwargs) + self.schedule_policy = schedule_policy + self.retention_policy = retention_policy + self.time_zone = time_zone + self.backup_management_type = 'AzureIaasVM' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_resource_protection_intent.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_resource_protection_intent.py new file mode 100644 index 000000000000..bf255bf15aa2 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_resource_protection_intent.py @@ -0,0 +1,63 @@ +# 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 .protection_intent import ProtectionIntent + + +class AzureResourceProtectionIntent(ProtectionIntent): + """IaaS VM specific backup protection intent item. + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent for the backed + up item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param source_resource_id: ARM ID of the resource to be backed up. + :type source_resource_id: str + :param item_id: ID of the item which is getting protected, In case of + Azure Vm , it is ProtectedItemId + :type item_id: str + :param policy_id: ID of the backup policy with which this item is backed + up. + :type policy_id: str + :param protection_state: Backup state of this backup item. Possible values + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param protection_intent_item_type: Required. Constant filled by server. + :type protection_intent_item_type: str + :param friendly_name: Friendly name of the VM represented by this backup + item. + :type friendly_name: str + """ + + _validation = { + 'protection_intent_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'item_id': {'key': 'itemId', 'type': 'str'}, + 'policy_id': {'key': 'policyId', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'protection_intent_item_type': {'key': 'protectionIntentItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureResourceProtectionIntent, self).__init__(**kwargs) + self.friendly_name = kwargs.get('friendly_name', None) + self.protection_intent_item_type = 'AzureResourceItem' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_resource_protection_intent_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_resource_protection_intent_py3.py new file mode 100644 index 000000000000..90f2fabbd403 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_resource_protection_intent_py3.py @@ -0,0 +1,63 @@ +# 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 .protection_intent_py3 import ProtectionIntent + + +class AzureResourceProtectionIntent(ProtectionIntent): + """IaaS VM specific backup protection intent item. + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent for the backed + up item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param source_resource_id: ARM ID of the resource to be backed up. + :type source_resource_id: str + :param item_id: ID of the item which is getting protected, In case of + Azure Vm , it is ProtectedItemId + :type item_id: str + :param policy_id: ID of the backup policy with which this item is backed + up. + :type policy_id: str + :param protection_state: Backup state of this backup item. Possible values + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param protection_intent_item_type: Required. Constant filled by server. + :type protection_intent_item_type: str + :param friendly_name: Friendly name of the VM represented by this backup + item. + :type friendly_name: str + """ + + _validation = { + 'protection_intent_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'item_id': {'key': 'itemId', 'type': 'str'}, + 'policy_id': {'key': 'policyId', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'protection_intent_item_type': {'key': 'protectionIntentItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + } + + def __init__(self, *, backup_management_type=None, source_resource_id: str=None, item_id: str=None, policy_id: str=None, protection_state=None, friendly_name: str=None, **kwargs) -> None: + super(AzureResourceProtectionIntent, self).__init__(backup_management_type=backup_management_type, source_resource_id=source_resource_id, item_id=item_id, policy_id=policy_id, protection_state=protection_state, **kwargs) + self.friendly_name = friendly_name + self.protection_intent_item_type = 'AzureResourceItem' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sql_container.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sql_container.py index c08dce6949be..2ac37c00314f 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sql_container.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sql_container.py @@ -15,40 +15,37 @@ class AzureSqlContainer(ProtectionContainer): """Azure Sql workload-specific 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. :param friendly_name: Friendly name of the container. :type friendly_name: str :param backup_management_type: Type of backup managemenent for the container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', - 'DPM', 'AzureBackupServer', 'AzureSql' - :type backup_management_type: str or :class:`BackupManagementType - ` + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType :param registration_status: Status of registration of the container with the Recovery Services Vault. :type registration_status: str :param health_status: Status of health of the container. :type health_status: str - :ivar container_type: Type of the container. The value of this property - for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. Classic - Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows - machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is - AzureSqlContainer. Possible values include: 'Invalid', 'Unknown', - 'IaasVMContainer', 'IaasVMServiceContainer', 'DPMContainer', - 'AzureBackupServerContainer', 'MABContainer', 'Cluster', - 'AzureSqlContainer', 'Windows', 'VCenter' - :vartype container_type: str or :class:`ContainerType - ` - :param protectable_object_type: Polymorphic Discriminator - :type protectable_object_type: str + :param container_type: Required. Constant filled by server. + :type container_type: str """ _validation = { - 'container_type': {'readonly': True}, - 'protectable_object_type': {'required': True}, + 'container_type': {'required': True}, } - def __init__(self, friendly_name=None, backup_management_type=None, registration_status=None, health_status=None): - super(AzureSqlContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status) - self.protectable_object_type = 'AzureSqlContainer' + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_type': {'key': 'containerType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureSqlContainer, self).__init__(**kwargs) + self.container_type = 'AzureSqlContainer' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sql_container_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sql_container_py3.py new file mode 100644 index 000000000000..33165f908d5d --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sql_container_py3.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .protection_container_py3 import ProtectionContainer + + +class AzureSqlContainer(ProtectionContainer): + """Azure Sql workload-specific container. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name of the container. + :type friendly_name: str + :param backup_management_type: Type of backup managemenent for the + container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param registration_status: Status of registration of the container with + the Recovery Services Vault. + :type registration_status: str + :param health_status: Status of health of the container. + :type health_status: str + :param container_type: Required. Constant filled by server. + :type container_type: str + """ + + _validation = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_type': {'key': 'containerType', 'type': 'str'}, + } + + def __init__(self, *, friendly_name: str=None, backup_management_type=None, registration_status: str=None, health_status: str=None, **kwargs) -> None: + super(AzureSqlContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status, **kwargs) + self.container_type = 'AzureSqlContainer' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sql_protected_item.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sql_protected_item.py index 4200727003b4..9f35933d3369 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sql_protected_item.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sql_protected_item.py @@ -15,17 +15,20 @@ class AzureSqlProtectedItem(ProtectedItem): """Azure SQL workload-specific backup item. + All required parameters must be populated in order to send to Azure. + :param backup_management_type: Type of backup managemenent for the backed up item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', - 'AzureBackupServer', 'AzureSql' - :type backup_management_type: str or :class:`BackupManagementType - ` + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType :param workload_type: Type of workload this item represents. Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', - 'GenericDataSource' - :type workload_type: str or :class:`DataSourceType - ` + 'GenericDataSource', 'SQLDataBase', 'AzureFileShare' + :type workload_type: str or + ~azure.mgmt.recoveryservicesbackup.models.DataSourceType :param container_name: Unique name of container :type container_name: str :param source_resource_id: ARM ID of the resource to be backed up. @@ -36,7 +39,9 @@ class AzureSqlProtectedItem(ProtectedItem): :param last_recovery_point: Timestamp when the last (latest) backup copy was created for this backup item. :type last_recovery_point: datetime - :param protected_item_type: Polymorphic Discriminator + :param backup_set_name: Name of the backup set the backup item belongs to + :type backup_set_name: str + :param protected_item_type: Required. Constant filled by server. :type protected_item_type: str :param protected_item_data_id: Internal ID of a backup item. Used by Azure SQL Backup engine to contact Recovery Services. @@ -44,11 +49,11 @@ class AzureSqlProtectedItem(ProtectedItem): :param protection_state: Backup state of the backed up item. Possible values include: 'Invalid', 'IRPending', 'Protected', 'ProtectionError', 'ProtectionStopped', 'ProtectionPaused' - :type protection_state: str or :class:`ProtectedItemState - ` + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemState :param extended_info: Additional information for this backup item. - :type extended_info: :class:`AzureSqlProtectedItemExtendedInfo - ` + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureSqlProtectedItemExtendedInfo """ _validation = { @@ -62,15 +67,16 @@ class AzureSqlProtectedItem(ProtectedItem): 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, 'policy_id': {'key': 'policyId', 'type': 'str'}, 'last_recovery_point': {'key': 'lastRecoveryPoint', 'type': 'iso-8601'}, + 'backup_set_name': {'key': 'backupSetName', 'type': 'str'}, 'protected_item_type': {'key': 'protectedItemType', 'type': 'str'}, 'protected_item_data_id': {'key': 'protectedItemDataId', 'type': 'str'}, 'protection_state': {'key': 'protectionState', 'type': 'str'}, 'extended_info': {'key': 'extendedInfo', 'type': 'AzureSqlProtectedItemExtendedInfo'}, } - def __init__(self, backup_management_type=None, workload_type=None, container_name=None, source_resource_id=None, policy_id=None, last_recovery_point=None, protected_item_data_id=None, protection_state=None, extended_info=None): - super(AzureSqlProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point) - self.protected_item_data_id = protected_item_data_id - self.protection_state = protection_state - self.extended_info = extended_info + def __init__(self, **kwargs): + super(AzureSqlProtectedItem, self).__init__(**kwargs) + self.protected_item_data_id = kwargs.get('protected_item_data_id', None) + self.protection_state = kwargs.get('protection_state', None) + self.extended_info = kwargs.get('extended_info', None) self.protected_item_type = 'Microsoft.Sql/servers/databases' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sql_protected_item_extended_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sql_protected_item_extended_info.py index 8b306f3c1868..7b3542dd932d 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sql_protected_item_extended_info.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sql_protected_item_extended_info.py @@ -32,7 +32,8 @@ class AzureSqlProtectedItemExtendedInfo(Model): 'policy_state': {'key': 'policyState', 'type': 'str'}, } - def __init__(self, oldest_recovery_point=None, recovery_point_count=None, policy_state=None): - self.oldest_recovery_point = oldest_recovery_point - self.recovery_point_count = recovery_point_count - self.policy_state = policy_state + def __init__(self, **kwargs): + super(AzureSqlProtectedItemExtendedInfo, self).__init__(**kwargs) + self.oldest_recovery_point = kwargs.get('oldest_recovery_point', None) + self.recovery_point_count = kwargs.get('recovery_point_count', None) + self.policy_state = kwargs.get('policy_state', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sql_protected_item_extended_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sql_protected_item_extended_info_py3.py new file mode 100644 index 000000000000..96c7ad27cdc1 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sql_protected_item_extended_info_py3.py @@ -0,0 +1,39 @@ +# 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 AzureSqlProtectedItemExtendedInfo(Model): + """Additional information on Azure Sql specific protected item. + + :param oldest_recovery_point: The oldest backup copy available for this + item in the service. + :type oldest_recovery_point: datetime + :param recovery_point_count: Number of available backup copies associated + with this backup item. + :type recovery_point_count: int + :param policy_state: State of the backup policy associated with this + backup item. + :type policy_state: str + """ + + _attribute_map = { + 'oldest_recovery_point': {'key': 'oldestRecoveryPoint', 'type': 'iso-8601'}, + 'recovery_point_count': {'key': 'recoveryPointCount', 'type': 'int'}, + 'policy_state': {'key': 'policyState', 'type': 'str'}, + } + + def __init__(self, *, oldest_recovery_point=None, recovery_point_count: int=None, policy_state: str=None, **kwargs) -> None: + super(AzureSqlProtectedItemExtendedInfo, self).__init__(**kwargs) + self.oldest_recovery_point = oldest_recovery_point + self.recovery_point_count = recovery_point_count + self.policy_state = policy_state diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sql_protected_item_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sql_protected_item_py3.py new file mode 100644 index 000000000000..0791cf666cc3 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sql_protected_item_py3.py @@ -0,0 +1,82 @@ +# 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 .protected_item_py3 import ProtectedItem + + +class AzureSqlProtectedItem(ProtectedItem): + """Azure SQL workload-specific backup item. + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent for the backed + up item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param workload_type: Type of workload this item represents. Possible + values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', + 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + 'GenericDataSource', 'SQLDataBase', 'AzureFileShare' + :type workload_type: str or + ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :param container_name: Unique name of container + :type container_name: str + :param source_resource_id: ARM ID of the resource to be backed up. + :type source_resource_id: str + :param policy_id: ID of the backup policy with which this item is backed + up. + :type policy_id: str + :param last_recovery_point: Timestamp when the last (latest) backup copy + was created for this backup item. + :type last_recovery_point: datetime + :param backup_set_name: Name of the backup set the backup item belongs to + :type backup_set_name: str + :param protected_item_type: Required. Constant filled by server. + :type protected_item_type: str + :param protected_item_data_id: Internal ID of a backup item. Used by Azure + SQL Backup engine to contact Recovery Services. + :type protected_item_data_id: str + :param protection_state: Backup state of the backed up item. Possible + values include: 'Invalid', 'IRPending', 'Protected', 'ProtectionError', + 'ProtectionStopped', 'ProtectionPaused' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemState + :param extended_info: Additional information for this backup item. + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureSqlProtectedItemExtendedInfo + """ + + _validation = { + 'protected_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'policy_id': {'key': 'policyId', 'type': 'str'}, + 'last_recovery_point': {'key': 'lastRecoveryPoint', 'type': 'iso-8601'}, + 'backup_set_name': {'key': 'backupSetName', 'type': 'str'}, + 'protected_item_type': {'key': 'protectedItemType', 'type': 'str'}, + 'protected_item_data_id': {'key': 'protectedItemDataId', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureSqlProtectedItemExtendedInfo'}, + } + + def __init__(self, *, backup_management_type=None, workload_type=None, container_name: str=None, source_resource_id: str=None, policy_id: str=None, last_recovery_point=None, backup_set_name: str=None, protected_item_data_id: str=None, protection_state=None, extended_info=None, **kwargs) -> None: + super(AzureSqlProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, **kwargs) + self.protected_item_data_id = protected_item_data_id + self.protection_state = protection_state + self.extended_info = extended_info + self.protected_item_type = 'Microsoft.Sql/servers/databases' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sql_protection_policy.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sql_protection_policy.py index 7decd2104be1..3e8a0a04c40a 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sql_protection_policy.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sql_protection_policy.py @@ -15,13 +15,15 @@ class AzureSqlProtectionPolicy(ProtectionPolicy): """Azure SQL workload-specific backup policy. + All required parameters must be populated in order to send to Azure. + :param protected_items_count: Number of items associated with this policy. :type protected_items_count: int - :param backup_management_type: Polymorphic Discriminator + :param backup_management_type: Required. Constant filled by server. :type backup_management_type: str :param retention_policy: Retention policy details. - :type retention_policy: :class:`RetentionPolicy - ` + :type retention_policy: + ~azure.mgmt.recoveryservicesbackup.models.RetentionPolicy """ _validation = { @@ -34,7 +36,7 @@ class AzureSqlProtectionPolicy(ProtectionPolicy): 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, } - def __init__(self, protected_items_count=None, retention_policy=None): - super(AzureSqlProtectionPolicy, self).__init__(protected_items_count=protected_items_count) - self.retention_policy = retention_policy + def __init__(self, **kwargs): + super(AzureSqlProtectionPolicy, self).__init__(**kwargs) + self.retention_policy = kwargs.get('retention_policy', None) self.backup_management_type = 'AzureSql' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sql_protection_policy_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sql_protection_policy_py3.py new file mode 100644 index 000000000000..af341a49fd86 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sql_protection_policy_py3.py @@ -0,0 +1,42 @@ +# 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 .protection_policy_py3 import ProtectionPolicy + + +class AzureSqlProtectionPolicy(ProtectionPolicy): + """Azure SQL workload-specific backup policy. + + All required parameters must be populated in order to send to Azure. + + :param protected_items_count: Number of items associated with this policy. + :type protected_items_count: int + :param backup_management_type: Required. Constant filled by server. + :type backup_management_type: str + :param retention_policy: Retention policy details. + :type retention_policy: + ~azure.mgmt.recoveryservicesbackup.models.RetentionPolicy + """ + + _validation = { + 'backup_management_type': {'required': True}, + } + + _attribute_map = { + 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, + } + + def __init__(self, *, protected_items_count: int=None, retention_policy=None, **kwargs) -> None: + super(AzureSqlProtectionPolicy, self).__init__(protected_items_count=protected_items_count, **kwargs) + self.retention_policy = retention_policy + self.backup_management_type = 'AzureSql' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sqlag_workload_container_protection_container.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sqlag_workload_container_protection_container.py new file mode 100644 index 000000000000..32e7aadc568f --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sqlag_workload_container_protection_container.py @@ -0,0 +1,62 @@ +# 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 .azure_workload_container import AzureWorkloadContainer + + +class AzureSQLAGWorkloadContainerProtectionContainer(AzureWorkloadContainer): + """Container for SQL workloads under SQL Availability Group. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name of the container. + :type friendly_name: str + :param backup_management_type: Type of backup managemenent for the + container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param registration_status: Status of registration of the container with + the Recovery Services Vault. + :type registration_status: str + :param health_status: Status of health of the container. + :type health_status: str + :param container_type: Required. Constant filled by server. + :type container_type: str + :param source_resource_id: ARM ID of the virtual machine represented by + this Azure Workload Container + :type source_resource_id: str + :param last_updated_time: Time stamp when this container was updated. + :type last_updated_time: datetime + :param extended_info: Additional details of a workload container. + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadContainerExtendedInfo + """ + + _validation = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_type': {'key': 'containerType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'last_updated_time': {'key': 'lastUpdatedTime', 'type': 'iso-8601'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureWorkloadContainerExtendedInfo'}, + } + + def __init__(self, **kwargs): + super(AzureSQLAGWorkloadContainerProtectionContainer, self).__init__(**kwargs) + self.container_type = 'SQLAGWorkLoadContainer' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sqlag_workload_container_protection_container_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sqlag_workload_container_protection_container_py3.py new file mode 100644 index 000000000000..a8485357c201 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_sqlag_workload_container_protection_container_py3.py @@ -0,0 +1,62 @@ +# 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 .azure_workload_container_py3 import AzureWorkloadContainer + + +class AzureSQLAGWorkloadContainerProtectionContainer(AzureWorkloadContainer): + """Container for SQL workloads under SQL Availability Group. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name of the container. + :type friendly_name: str + :param backup_management_type: Type of backup managemenent for the + container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param registration_status: Status of registration of the container with + the Recovery Services Vault. + :type registration_status: str + :param health_status: Status of health of the container. + :type health_status: str + :param container_type: Required. Constant filled by server. + :type container_type: str + :param source_resource_id: ARM ID of the virtual machine represented by + this Azure Workload Container + :type source_resource_id: str + :param last_updated_time: Time stamp when this container was updated. + :type last_updated_time: datetime + :param extended_info: Additional details of a workload container. + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadContainerExtendedInfo + """ + + _validation = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_type': {'key': 'containerType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'last_updated_time': {'key': 'lastUpdatedTime', 'type': 'iso-8601'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureWorkloadContainerExtendedInfo'}, + } + + def __init__(self, *, friendly_name: str=None, backup_management_type=None, registration_status: str=None, health_status: str=None, source_resource_id: str=None, last_updated_time=None, extended_info=None, **kwargs) -> None: + super(AzureSQLAGWorkloadContainerProtectionContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status, source_resource_id=source_resource_id, last_updated_time=last_updated_time, extended_info=extended_info, **kwargs) + self.container_type = 'SQLAGWorkLoadContainer' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_container.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_container.py new file mode 100644 index 000000000000..18db81c8f5de --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_container.py @@ -0,0 +1,67 @@ +# 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 .protection_container import ProtectionContainer + + +class AzureStorageContainer(ProtectionContainer): + """Azure Storage Account workload-specific container. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name of the container. + :type friendly_name: str + :param backup_management_type: Type of backup managemenent for the + container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param registration_status: Status of registration of the container with + the Recovery Services Vault. + :type registration_status: str + :param health_status: Status of health of the container. + :type health_status: str + :param container_type: Required. Constant filled by server. + :type container_type: str + :param source_resource_id: Fully qualified ARM url. + :type source_resource_id: str + :param storage_account_version: Storage account version. + :type storage_account_version: str + :param resource_group: Resource group name of Recovery Services Vault. + :type resource_group: str + :param protected_item_count: Number of items backed up in this container. + :type protected_item_count: long + """ + + _validation = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_type': {'key': 'containerType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'storage_account_version': {'key': 'storageAccountVersion', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'protected_item_count': {'key': 'protectedItemCount', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(AzureStorageContainer, self).__init__(**kwargs) + self.source_resource_id = kwargs.get('source_resource_id', None) + self.storage_account_version = kwargs.get('storage_account_version', None) + self.resource_group = kwargs.get('resource_group', None) + self.protected_item_count = kwargs.get('protected_item_count', None) + self.container_type = 'StorageContainer' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_container_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_container_py3.py new file mode 100644 index 000000000000..7f3a0e0614f7 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_container_py3.py @@ -0,0 +1,67 @@ +# 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 .protection_container_py3 import ProtectionContainer + + +class AzureStorageContainer(ProtectionContainer): + """Azure Storage Account workload-specific container. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name of the container. + :type friendly_name: str + :param backup_management_type: Type of backup managemenent for the + container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param registration_status: Status of registration of the container with + the Recovery Services Vault. + :type registration_status: str + :param health_status: Status of health of the container. + :type health_status: str + :param container_type: Required. Constant filled by server. + :type container_type: str + :param source_resource_id: Fully qualified ARM url. + :type source_resource_id: str + :param storage_account_version: Storage account version. + :type storage_account_version: str + :param resource_group: Resource group name of Recovery Services Vault. + :type resource_group: str + :param protected_item_count: Number of items backed up in this container. + :type protected_item_count: long + """ + + _validation = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_type': {'key': 'containerType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'storage_account_version': {'key': 'storageAccountVersion', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'protected_item_count': {'key': 'protectedItemCount', 'type': 'long'}, + } + + def __init__(self, *, friendly_name: str=None, backup_management_type=None, registration_status: str=None, health_status: str=None, source_resource_id: str=None, storage_account_version: str=None, resource_group: str=None, protected_item_count: int=None, **kwargs) -> None: + super(AzureStorageContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status, **kwargs) + self.source_resource_id = source_resource_id + self.storage_account_version = storage_account_version + self.resource_group = resource_group + self.protected_item_count = protected_item_count + self.container_type = 'StorageContainer' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_error_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_error_info.py new file mode 100644 index 000000000000..3854dac09848 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_error_info.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AzureStorageErrorInfo(Model): + """Azure storage specific error information. + + :param error_code: Error code. + :type error_code: int + :param error_string: Localized error string. + :type error_string: str + :param recommendations: List of localized recommendations for above error + code. + :type recommendations: list[str] + """ + + _attribute_map = { + 'error_code': {'key': 'errorCode', 'type': 'int'}, + 'error_string': {'key': 'errorString', 'type': 'str'}, + 'recommendations': {'key': 'recommendations', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(AzureStorageErrorInfo, self).__init__(**kwargs) + self.error_code = kwargs.get('error_code', None) + self.error_string = kwargs.get('error_string', None) + self.recommendations = kwargs.get('recommendations', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_error_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_error_info_py3.py new file mode 100644 index 000000000000..f2914ed24b34 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_error_info_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AzureStorageErrorInfo(Model): + """Azure storage specific error information. + + :param error_code: Error code. + :type error_code: int + :param error_string: Localized error string. + :type error_string: str + :param recommendations: List of localized recommendations for above error + code. + :type recommendations: list[str] + """ + + _attribute_map = { + 'error_code': {'key': 'errorCode', 'type': 'int'}, + 'error_string': {'key': 'errorString', 'type': 'str'}, + 'recommendations': {'key': 'recommendations', 'type': '[str]'}, + } + + def __init__(self, *, error_code: int=None, error_string: str=None, recommendations=None, **kwargs) -> None: + super(AzureStorageErrorInfo, self).__init__(**kwargs) + self.error_code = error_code + self.error_string = error_string + self.recommendations = recommendations diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_job.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_job.py new file mode 100644 index 000000000000..19bcf3d6d0b2 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_job.py @@ -0,0 +1,90 @@ +# 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 .job import Job + + +class AzureStorageJob(Job): + """Azure storage specific job. + + All required parameters must be populated in order to send to Azure. + + :param entity_friendly_name: Friendly name of the entity on which the + current job is executing. + :type entity_friendly_name: str + :param backup_management_type: Backup management type to execute the + current job. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param operation: The operation name. + :type operation: str + :param status: Job status. + :type status: str + :param start_time: The start time. + :type start_time: datetime + :param end_time: The end time. + :type end_time: datetime + :param activity_id: ActivityId of job. + :type activity_id: str + :param job_type: Required. Constant filled by server. + :type job_type: str + :param duration: Time elapsed during the execution of this job. + :type duration: timedelta + :param actions_info: Gets or sets the state/actions applicable on this job + like cancel/retry. + :type actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] + :param error_details: Error details on execution of this job. + :type error_details: + list[~azure.mgmt.recoveryservicesbackup.models.AzureStorageErrorInfo] + :param storage_account_name: Specifies friendly name of the storage + account. + :type storage_account_name: str + :param storage_account_version: Specifies whether the Storage account is a + Classic or an Azure Resource Manager Storage account. + :type storage_account_version: str + :param extended_info: Additional information about the job. + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureStorageJobExtendedInfo + """ + + _validation = { + 'job_type': {'required': True}, + } + + _attribute_map = { + 'entity_friendly_name': {'key': 'entityFriendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'activity_id': {'key': 'activityId', 'type': 'str'}, + 'job_type': {'key': 'jobType', 'type': 'str'}, + 'duration': {'key': 'duration', 'type': 'duration'}, + 'actions_info': {'key': 'actionsInfo', 'type': '[JobSupportedAction]'}, + 'error_details': {'key': 'errorDetails', 'type': '[AzureStorageErrorInfo]'}, + 'storage_account_name': {'key': 'storageAccountName', 'type': 'str'}, + 'storage_account_version': {'key': 'storageAccountVersion', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureStorageJobExtendedInfo'}, + } + + def __init__(self, **kwargs): + super(AzureStorageJob, self).__init__(**kwargs) + self.duration = kwargs.get('duration', None) + self.actions_info = kwargs.get('actions_info', None) + self.error_details = kwargs.get('error_details', None) + self.storage_account_name = kwargs.get('storage_account_name', None) + self.storage_account_version = kwargs.get('storage_account_version', None) + self.extended_info = kwargs.get('extended_info', None) + self.job_type = 'AzureStorageJob' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_job_extended_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_job_extended_info.py new file mode 100644 index 000000000000..54e3f5b569ea --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_job_extended_info.py @@ -0,0 +1,38 @@ +# 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 AzureStorageJobExtendedInfo(Model): + """Azure Storage workload-specific additional information for job. + + :param tasks_list: List of tasks for this job + :type tasks_list: + list[~azure.mgmt.recoveryservicesbackup.models.AzureStorageJobTaskDetails] + :param property_bag: Job properties. + :type property_bag: dict[str, str] + :param dynamic_error_message: Non localized error message on job + execution. + :type dynamic_error_message: str + """ + + _attribute_map = { + 'tasks_list': {'key': 'tasksList', 'type': '[AzureStorageJobTaskDetails]'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'dynamic_error_message': {'key': 'dynamicErrorMessage', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureStorageJobExtendedInfo, self).__init__(**kwargs) + self.tasks_list = kwargs.get('tasks_list', None) + self.property_bag = kwargs.get('property_bag', None) + self.dynamic_error_message = kwargs.get('dynamic_error_message', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_job_extended_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_job_extended_info_py3.py new file mode 100644 index 000000000000..cf82e7b63c9f --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_job_extended_info_py3.py @@ -0,0 +1,38 @@ +# 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 AzureStorageJobExtendedInfo(Model): + """Azure Storage workload-specific additional information for job. + + :param tasks_list: List of tasks for this job + :type tasks_list: + list[~azure.mgmt.recoveryservicesbackup.models.AzureStorageJobTaskDetails] + :param property_bag: Job properties. + :type property_bag: dict[str, str] + :param dynamic_error_message: Non localized error message on job + execution. + :type dynamic_error_message: str + """ + + _attribute_map = { + 'tasks_list': {'key': 'tasksList', 'type': '[AzureStorageJobTaskDetails]'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'dynamic_error_message': {'key': 'dynamicErrorMessage', 'type': 'str'}, + } + + def __init__(self, *, tasks_list=None, property_bag=None, dynamic_error_message: str=None, **kwargs) -> None: + super(AzureStorageJobExtendedInfo, self).__init__(**kwargs) + self.tasks_list = tasks_list + self.property_bag = property_bag + self.dynamic_error_message = dynamic_error_message diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_job_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_job_py3.py new file mode 100644 index 000000000000..c3a12fabe30a --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_job_py3.py @@ -0,0 +1,90 @@ +# 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 .job_py3 import Job + + +class AzureStorageJob(Job): + """Azure storage specific job. + + All required parameters must be populated in order to send to Azure. + + :param entity_friendly_name: Friendly name of the entity on which the + current job is executing. + :type entity_friendly_name: str + :param backup_management_type: Backup management type to execute the + current job. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param operation: The operation name. + :type operation: str + :param status: Job status. + :type status: str + :param start_time: The start time. + :type start_time: datetime + :param end_time: The end time. + :type end_time: datetime + :param activity_id: ActivityId of job. + :type activity_id: str + :param job_type: Required. Constant filled by server. + :type job_type: str + :param duration: Time elapsed during the execution of this job. + :type duration: timedelta + :param actions_info: Gets or sets the state/actions applicable on this job + like cancel/retry. + :type actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] + :param error_details: Error details on execution of this job. + :type error_details: + list[~azure.mgmt.recoveryservicesbackup.models.AzureStorageErrorInfo] + :param storage_account_name: Specifies friendly name of the storage + account. + :type storage_account_name: str + :param storage_account_version: Specifies whether the Storage account is a + Classic or an Azure Resource Manager Storage account. + :type storage_account_version: str + :param extended_info: Additional information about the job. + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureStorageJobExtendedInfo + """ + + _validation = { + 'job_type': {'required': True}, + } + + _attribute_map = { + 'entity_friendly_name': {'key': 'entityFriendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'activity_id': {'key': 'activityId', 'type': 'str'}, + 'job_type': {'key': 'jobType', 'type': 'str'}, + 'duration': {'key': 'duration', 'type': 'duration'}, + 'actions_info': {'key': 'actionsInfo', 'type': '[JobSupportedAction]'}, + 'error_details': {'key': 'errorDetails', 'type': '[AzureStorageErrorInfo]'}, + 'storage_account_name': {'key': 'storageAccountName', 'type': 'str'}, + 'storage_account_version': {'key': 'storageAccountVersion', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureStorageJobExtendedInfo'}, + } + + def __init__(self, *, entity_friendly_name: str=None, backup_management_type=None, operation: str=None, status: str=None, start_time=None, end_time=None, activity_id: str=None, duration=None, actions_info=None, error_details=None, storage_account_name: str=None, storage_account_version: str=None, extended_info=None, **kwargs) -> None: + super(AzureStorageJob, self).__init__(entity_friendly_name=entity_friendly_name, backup_management_type=backup_management_type, operation=operation, status=status, start_time=start_time, end_time=end_time, activity_id=activity_id, **kwargs) + self.duration = duration + self.actions_info = actions_info + self.error_details = error_details + self.storage_account_name = storage_account_name + self.storage_account_version = storage_account_version + self.extended_info = extended_info + self.job_type = 'AzureStorageJob' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_job_task_details.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_job_task_details.py new file mode 100644 index 000000000000..b6e06b21c7aa --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_job_task_details.py @@ -0,0 +1,32 @@ +# 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 AzureStorageJobTaskDetails(Model): + """Azure storage workload specific job task details. + + :param task_id: The task display name. + :type task_id: str + :param status: The status. + :type status: str + """ + + _attribute_map = { + 'task_id': {'key': 'taskId', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureStorageJobTaskDetails, self).__init__(**kwargs) + self.task_id = kwargs.get('task_id', None) + self.status = kwargs.get('status', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_job_task_details_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_job_task_details_py3.py new file mode 100644 index 000000000000..d6a341e6c35a --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_job_task_details_py3.py @@ -0,0 +1,32 @@ +# 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 AzureStorageJobTaskDetails(Model): + """Azure storage workload specific job task details. + + :param task_id: The task display name. + :type task_id: str + :param status: The status. + :type status: str + """ + + _attribute_map = { + 'task_id': {'key': 'taskId', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, *, task_id: str=None, status: str=None, **kwargs) -> None: + super(AzureStorageJobTaskDetails, self).__init__(**kwargs) + self.task_id = task_id + self.status = status diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_protectable_container.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_protectable_container.py new file mode 100644 index 000000000000..b0d663bba3c5 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_protectable_container.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 .protectable_container import ProtectableContainer + + +class AzureStorageProtectableContainer(ProtectableContainer): + """Azure Storage-specific protectable containers. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name of the container. + :type friendly_name: str + :param backup_management_type: Type of backup managemenent for the + container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param health_status: Status of health of the container. + :type health_status: str + :param container_id: Fabric Id of the container such as ARM Id. + :type container_id: str + :param protectable_container_type: Required. Constant filled by server. + :type protectable_container_type: str + """ + + _validation = { + 'protectable_container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_id': {'key': 'containerId', 'type': 'str'}, + 'protectable_container_type': {'key': 'protectableContainerType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureStorageProtectableContainer, self).__init__(**kwargs) + self.protectable_container_type = 'StorageContainer' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_protectable_container_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_protectable_container_py3.py new file mode 100644 index 000000000000..ba313b6c232d --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_storage_protectable_container_py3.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 .protectable_container_py3 import ProtectableContainer + + +class AzureStorageProtectableContainer(ProtectableContainer): + """Azure Storage-specific protectable containers. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name of the container. + :type friendly_name: str + :param backup_management_type: Type of backup managemenent for the + container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param health_status: Status of health of the container. + :type health_status: str + :param container_id: Fabric Id of the container such as ARM Id. + :type container_id: str + :param protectable_container_type: Required. Constant filled by server. + :type protectable_container_type: str + """ + + _validation = { + 'protectable_container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_id': {'key': 'containerId', 'type': 'str'}, + 'protectable_container_type': {'key': 'protectableContainerType', 'type': 'str'}, + } + + def __init__(self, *, friendly_name: str=None, backup_management_type=None, health_status: str=None, container_id: str=None, **kwargs) -> None: + super(AzureStorageProtectableContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, health_status=health_status, container_id=container_id, **kwargs) + self.protectable_container_type = 'StorageContainer' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_app_container_protectable_container.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_app_container_protectable_container.py new file mode 100644 index 000000000000..39b044f72693 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_app_container_protectable_container.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 .protectable_container import ProtectableContainer + + +class AzureVMAppContainerProtectableContainer(ProtectableContainer): + """Azure workload-specific container. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name of the container. + :type friendly_name: str + :param backup_management_type: Type of backup managemenent for the + container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param health_status: Status of health of the container. + :type health_status: str + :param container_id: Fabric Id of the container such as ARM Id. + :type container_id: str + :param protectable_container_type: Required. Constant filled by server. + :type protectable_container_type: str + """ + + _validation = { + 'protectable_container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_id': {'key': 'containerId', 'type': 'str'}, + 'protectable_container_type': {'key': 'protectableContainerType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureVMAppContainerProtectableContainer, self).__init__(**kwargs) + self.protectable_container_type = 'VMAppContainer' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_app_container_protectable_container_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_app_container_protectable_container_py3.py new file mode 100644 index 000000000000..61d1a07701e7 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_app_container_protectable_container_py3.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 .protectable_container_py3 import ProtectableContainer + + +class AzureVMAppContainerProtectableContainer(ProtectableContainer): + """Azure workload-specific container. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name of the container. + :type friendly_name: str + :param backup_management_type: Type of backup managemenent for the + container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param health_status: Status of health of the container. + :type health_status: str + :param container_id: Fabric Id of the container such as ARM Id. + :type container_id: str + :param protectable_container_type: Required. Constant filled by server. + :type protectable_container_type: str + """ + + _validation = { + 'protectable_container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_id': {'key': 'containerId', 'type': 'str'}, + 'protectable_container_type': {'key': 'protectableContainerType', 'type': 'str'}, + } + + def __init__(self, *, friendly_name: str=None, backup_management_type=None, health_status: str=None, container_id: str=None, **kwargs) -> None: + super(AzureVMAppContainerProtectableContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, health_status=health_status, container_id=container_id, **kwargs) + self.protectable_container_type = 'VMAppContainer' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_app_container_protection_container.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_app_container_protection_container.py new file mode 100644 index 000000000000..8ecd466caa2d --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_app_container_protection_container.py @@ -0,0 +1,62 @@ +# 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 .azure_workload_container import AzureWorkloadContainer + + +class AzureVMAppContainerProtectionContainer(AzureWorkloadContainer): + """Container for SQL workloads under Azure Virtual Machines. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name of the container. + :type friendly_name: str + :param backup_management_type: Type of backup managemenent for the + container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param registration_status: Status of registration of the container with + the Recovery Services Vault. + :type registration_status: str + :param health_status: Status of health of the container. + :type health_status: str + :param container_type: Required. Constant filled by server. + :type container_type: str + :param source_resource_id: ARM ID of the virtual machine represented by + this Azure Workload Container + :type source_resource_id: str + :param last_updated_time: Time stamp when this container was updated. + :type last_updated_time: datetime + :param extended_info: Additional details of a workload container. + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadContainerExtendedInfo + """ + + _validation = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_type': {'key': 'containerType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'last_updated_time': {'key': 'lastUpdatedTime', 'type': 'iso-8601'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureWorkloadContainerExtendedInfo'}, + } + + def __init__(self, **kwargs): + super(AzureVMAppContainerProtectionContainer, self).__init__(**kwargs) + self.container_type = 'VMAppContainer' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_app_container_protection_container_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_app_container_protection_container_py3.py new file mode 100644 index 000000000000..2393cc9360c0 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_app_container_protection_container_py3.py @@ -0,0 +1,62 @@ +# 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 .azure_workload_container_py3 import AzureWorkloadContainer + + +class AzureVMAppContainerProtectionContainer(AzureWorkloadContainer): + """Container for SQL workloads under Azure Virtual Machines. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name of the container. + :type friendly_name: str + :param backup_management_type: Type of backup managemenent for the + container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param registration_status: Status of registration of the container with + the Recovery Services Vault. + :type registration_status: str + :param health_status: Status of health of the container. + :type health_status: str + :param container_type: Required. Constant filled by server. + :type container_type: str + :param source_resource_id: ARM ID of the virtual machine represented by + this Azure Workload Container + :type source_resource_id: str + :param last_updated_time: Time stamp when this container was updated. + :type last_updated_time: datetime + :param extended_info: Additional details of a workload container. + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadContainerExtendedInfo + """ + + _validation = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_type': {'key': 'containerType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'last_updated_time': {'key': 'lastUpdatedTime', 'type': 'iso-8601'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureWorkloadContainerExtendedInfo'}, + } + + def __init__(self, *, friendly_name: str=None, backup_management_type=None, registration_status: str=None, health_status: str=None, source_resource_id: str=None, last_updated_time=None, extended_info=None, **kwargs) -> None: + super(AzureVMAppContainerProtectionContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status, source_resource_id=source_resource_id, last_updated_time=last_updated_time, extended_info=extended_info, **kwargs) + self.container_type = 'VMAppContainer' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_resource_feature_support_request.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_resource_feature_support_request.py new file mode 100644 index 000000000000..dd59b276fd5b --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_resource_feature_support_request.py @@ -0,0 +1,43 @@ +# 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 .feature_support_request import FeatureSupportRequest + + +class AzureVMResourceFeatureSupportRequest(FeatureSupportRequest): + """AzureResource(IaaS VM) Specific feature support request. + + All required parameters must be populated in order to send to Azure. + + :param feature_type: Required. Constant filled by server. + :type feature_type: str + :param vm_size: Size of the resource: VM size(A/D series etc) in case of + IaasVM + :type vm_size: str + :param vm_sku: SKUs (Premium/Managed etc) in case of IaasVM + :type vm_sku: str + """ + + _validation = { + 'feature_type': {'required': True}, + } + + _attribute_map = { + 'feature_type': {'key': 'featureType', 'type': 'str'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'vm_sku': {'key': 'vmSku', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureVMResourceFeatureSupportRequest, self).__init__(**kwargs) + self.vm_size = kwargs.get('vm_size', None) + self.vm_sku = kwargs.get('vm_sku', None) + self.feature_type = 'AzureVMResourceBackup' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_resource_feature_support_request_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_resource_feature_support_request_py3.py new file mode 100644 index 000000000000..8894f7766128 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_resource_feature_support_request_py3.py @@ -0,0 +1,43 @@ +# 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 .feature_support_request_py3 import FeatureSupportRequest + + +class AzureVMResourceFeatureSupportRequest(FeatureSupportRequest): + """AzureResource(IaaS VM) Specific feature support request. + + All required parameters must be populated in order to send to Azure. + + :param feature_type: Required. Constant filled by server. + :type feature_type: str + :param vm_size: Size of the resource: VM size(A/D series etc) in case of + IaasVM + :type vm_size: str + :param vm_sku: SKUs (Premium/Managed etc) in case of IaasVM + :type vm_sku: str + """ + + _validation = { + 'feature_type': {'required': True}, + } + + _attribute_map = { + 'feature_type': {'key': 'featureType', 'type': 'str'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'vm_sku': {'key': 'vmSku', 'type': 'str'}, + } + + def __init__(self, *, vm_size: str=None, vm_sku: str=None, **kwargs) -> None: + super(AzureVMResourceFeatureSupportRequest, self).__init__(**kwargs) + self.vm_size = vm_size + self.vm_sku = vm_sku + self.feature_type = 'AzureVMResourceBackup' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_resource_feature_support_response.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_resource_feature_support_response.py new file mode 100644 index 000000000000..01bd45d0db4a --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_resource_feature_support_response.py @@ -0,0 +1,30 @@ +# 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 AzureVMResourceFeatureSupportResponse(Model): + """Response for feature support requests for Azure IaasVm. + + :param support_status: Support status of feature. Possible values include: + 'Invalid', 'Supported', 'DefaultOFF', 'DefaultON', 'NotSupported' + :type support_status: str or + ~azure.mgmt.recoveryservicesbackup.models.SupportStatus + """ + + _attribute_map = { + 'support_status': {'key': 'supportStatus', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureVMResourceFeatureSupportResponse, self).__init__(**kwargs) + self.support_status = kwargs.get('support_status', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_resource_feature_support_response_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_resource_feature_support_response_py3.py new file mode 100644 index 000000000000..edaaf251d6a5 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_resource_feature_support_response_py3.py @@ -0,0 +1,30 @@ +# 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 AzureVMResourceFeatureSupportResponse(Model): + """Response for feature support requests for Azure IaasVm. + + :param support_status: Support status of feature. Possible values include: + 'Invalid', 'Supported', 'DefaultOFF', 'DefaultON', 'NotSupported' + :type support_status: str or + ~azure.mgmt.recoveryservicesbackup.models.SupportStatus + """ + + _attribute_map = { + 'support_status': {'key': 'supportStatus', 'type': 'str'}, + } + + def __init__(self, *, support_status=None, **kwargs) -> None: + super(AzureVMResourceFeatureSupportResponse, self).__init__(**kwargs) + self.support_status = support_status diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_item.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_item.py new file mode 100644 index 000000000000..cb5fc952701d --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_item.py @@ -0,0 +1,80 @@ +# 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 .workload_item import WorkloadItem + + +class AzureVmWorkloadItem(WorkloadItem): + """Azure VM workload-specific workload item. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureVmWorkloadSQLDatabaseWorkloadItem, + AzureVmWorkloadSQLInstanceWorkloadItem + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent to backup an + item. + :type backup_management_type: str + :param workload_type: Type of workload for the backup management + :type workload_type: str + :param friendly_name: Friendly name of the backup item. + :type friendly_name: str + :param protection_state: State of the back up item. Possible values + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param workload_item_type: Required. Constant filled by server. + :type workload_item_type: str + :param parent_name: Name for instance or AG + :type parent_name: str + :param server_name: Host/Cluster Name for instance or AG + :type server_name: str + :param is_auto_protectable: Indicates if workload item is auto-protectable + :type is_auto_protectable: bool + :param subinquireditemcount: For instance or AG, indicates number of DB's + present + :type subinquireditemcount: int + :param sub_workload_item_count: For instance or AG, indicates number of + DB's to be protected + :type sub_workload_item_count: int + """ + + _validation = { + 'workload_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, + 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, + 'sub_workload_item_count': {'key': 'subWorkloadItemCount', 'type': 'int'}, + } + + _subtype_map = { + 'workload_item_type': {'SQLDataBase': 'AzureVmWorkloadSQLDatabaseWorkloadItem', 'SQLInstance': 'AzureVmWorkloadSQLInstanceWorkloadItem'} + } + + def __init__(self, **kwargs): + super(AzureVmWorkloadItem, self).__init__(**kwargs) + self.parent_name = kwargs.get('parent_name', None) + self.server_name = kwargs.get('server_name', None) + self.is_auto_protectable = kwargs.get('is_auto_protectable', None) + self.subinquireditemcount = kwargs.get('subinquireditemcount', None) + self.sub_workload_item_count = kwargs.get('sub_workload_item_count', None) + self.workload_item_type = 'AzureVmWorkloadItem' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_item_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_item_py3.py new file mode 100644 index 000000000000..b0aa52cf5701 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_item_py3.py @@ -0,0 +1,80 @@ +# 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 .workload_item_py3 import WorkloadItem + + +class AzureVmWorkloadItem(WorkloadItem): + """Azure VM workload-specific workload item. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureVmWorkloadSQLDatabaseWorkloadItem, + AzureVmWorkloadSQLInstanceWorkloadItem + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent to backup an + item. + :type backup_management_type: str + :param workload_type: Type of workload for the backup management + :type workload_type: str + :param friendly_name: Friendly name of the backup item. + :type friendly_name: str + :param protection_state: State of the back up item. Possible values + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param workload_item_type: Required. Constant filled by server. + :type workload_item_type: str + :param parent_name: Name for instance or AG + :type parent_name: str + :param server_name: Host/Cluster Name for instance or AG + :type server_name: str + :param is_auto_protectable: Indicates if workload item is auto-protectable + :type is_auto_protectable: bool + :param subinquireditemcount: For instance or AG, indicates number of DB's + present + :type subinquireditemcount: int + :param sub_workload_item_count: For instance or AG, indicates number of + DB's to be protected + :type sub_workload_item_count: int + """ + + _validation = { + 'workload_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, + 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, + 'sub_workload_item_count': {'key': 'subWorkloadItemCount', 'type': 'int'}, + } + + _subtype_map = { + 'workload_item_type': {'SQLDataBase': 'AzureVmWorkloadSQLDatabaseWorkloadItem', 'SQLInstance': 'AzureVmWorkloadSQLInstanceWorkloadItem'} + } + + def __init__(self, *, backup_management_type: str=None, workload_type: str=None, friendly_name: str=None, protection_state=None, parent_name: str=None, server_name: str=None, is_auto_protectable: bool=None, subinquireditemcount: int=None, sub_workload_item_count: int=None, **kwargs) -> None: + super(AzureVmWorkloadItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, friendly_name=friendly_name, protection_state=protection_state, **kwargs) + self.parent_name = parent_name + self.server_name = server_name + self.is_auto_protectable = is_auto_protectable + self.subinquireditemcount = subinquireditemcount + self.sub_workload_item_count = sub_workload_item_count + self.workload_item_type = 'AzureVmWorkloadItem' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_protectable_item.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_protectable_item.py new file mode 100644 index 000000000000..8710ed72ec12 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_protectable_item.py @@ -0,0 +1,94 @@ +# 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 .workload_protectable_item import WorkloadProtectableItem + + +class AzureVmWorkloadProtectableItem(WorkloadProtectableItem): + """Azure VM workload-specific protectable item. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureVmWorkloadSQLAvailabilityGroupProtectableItem, + AzureVmWorkloadSQLDatabaseProtectableItem, + AzureVmWorkloadSQLInstanceProtectableItem + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent to backup an + item. + :type backup_management_type: str + :param workload_type: Type of workload for the backup management + :type workload_type: str + :param friendly_name: Friendly name of the backup item. + :type friendly_name: str + :param protection_state: State of the back up item. Possible values + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param protectable_item_type: Required. Constant filled by server. + :type protectable_item_type: str + :param parent_name: Name for instance or AG + :type parent_name: str + :param parent_unique_name: Parent Unique Name is added to provide the + service formatted URI Name of the Parent + Only Applicable for data bases where the parent would be either Instance + or a SQL AG. + :type parent_unique_name: str + :param server_name: Host/Cluster Name for instance or AG + :type server_name: str + :param is_auto_protectable: Indicates if protectable item is + auto-protectable + :type is_auto_protectable: bool + :param subinquireditemcount: For instance or AG, indicates number of DB's + present + :type subinquireditemcount: int + :param subprotectableitemcount: For instance or AG, indicates number of + DB's to be protected + :type subprotectableitemcount: int + :param prebackupvalidation: Pre-backup validation for protectable objects + :type prebackupvalidation: + ~azure.mgmt.recoveryservicesbackup.models.PreBackupValidation + """ + + _validation = { + 'protectable_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'parent_unique_name': {'key': 'parentUniqueName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, + 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, + 'subprotectableitemcount': {'key': 'subprotectableitemcount', 'type': 'int'}, + 'prebackupvalidation': {'key': 'prebackupvalidation', 'type': 'PreBackupValidation'}, + } + + _subtype_map = { + 'protectable_item_type': {'SQLAvailabilityGroupContainer': 'AzureVmWorkloadSQLAvailabilityGroupProtectableItem', 'SQLDataBase': 'AzureVmWorkloadSQLDatabaseProtectableItem', 'SQLInstance': 'AzureVmWorkloadSQLInstanceProtectableItem'} + } + + def __init__(self, **kwargs): + super(AzureVmWorkloadProtectableItem, self).__init__(**kwargs) + self.parent_name = kwargs.get('parent_name', None) + self.parent_unique_name = kwargs.get('parent_unique_name', None) + self.server_name = kwargs.get('server_name', None) + self.is_auto_protectable = kwargs.get('is_auto_protectable', None) + self.subinquireditemcount = kwargs.get('subinquireditemcount', None) + self.subprotectableitemcount = kwargs.get('subprotectableitemcount', None) + self.prebackupvalidation = kwargs.get('prebackupvalidation', None) + self.protectable_item_type = 'AzureVmWorkloadProtectableItem' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_protectable_item_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_protectable_item_py3.py new file mode 100644 index 000000000000..613fd25b4687 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_protectable_item_py3.py @@ -0,0 +1,94 @@ +# 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 .workload_protectable_item_py3 import WorkloadProtectableItem + + +class AzureVmWorkloadProtectableItem(WorkloadProtectableItem): + """Azure VM workload-specific protectable item. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureVmWorkloadSQLAvailabilityGroupProtectableItem, + AzureVmWorkloadSQLDatabaseProtectableItem, + AzureVmWorkloadSQLInstanceProtectableItem + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent to backup an + item. + :type backup_management_type: str + :param workload_type: Type of workload for the backup management + :type workload_type: str + :param friendly_name: Friendly name of the backup item. + :type friendly_name: str + :param protection_state: State of the back up item. Possible values + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param protectable_item_type: Required. Constant filled by server. + :type protectable_item_type: str + :param parent_name: Name for instance or AG + :type parent_name: str + :param parent_unique_name: Parent Unique Name is added to provide the + service formatted URI Name of the Parent + Only Applicable for data bases where the parent would be either Instance + or a SQL AG. + :type parent_unique_name: str + :param server_name: Host/Cluster Name for instance or AG + :type server_name: str + :param is_auto_protectable: Indicates if protectable item is + auto-protectable + :type is_auto_protectable: bool + :param subinquireditemcount: For instance or AG, indicates number of DB's + present + :type subinquireditemcount: int + :param subprotectableitemcount: For instance or AG, indicates number of + DB's to be protected + :type subprotectableitemcount: int + :param prebackupvalidation: Pre-backup validation for protectable objects + :type prebackupvalidation: + ~azure.mgmt.recoveryservicesbackup.models.PreBackupValidation + """ + + _validation = { + 'protectable_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'parent_unique_name': {'key': 'parentUniqueName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, + 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, + 'subprotectableitemcount': {'key': 'subprotectableitemcount', 'type': 'int'}, + 'prebackupvalidation': {'key': 'prebackupvalidation', 'type': 'PreBackupValidation'}, + } + + _subtype_map = { + 'protectable_item_type': {'SQLAvailabilityGroupContainer': 'AzureVmWorkloadSQLAvailabilityGroupProtectableItem', 'SQLDataBase': 'AzureVmWorkloadSQLDatabaseProtectableItem', 'SQLInstance': 'AzureVmWorkloadSQLInstanceProtectableItem'} + } + + def __init__(self, *, backup_management_type: str=None, workload_type: str=None, friendly_name: str=None, protection_state=None, parent_name: str=None, parent_unique_name: str=None, server_name: str=None, is_auto_protectable: bool=None, subinquireditemcount: int=None, subprotectableitemcount: int=None, prebackupvalidation=None, **kwargs) -> None: + super(AzureVmWorkloadProtectableItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, friendly_name=friendly_name, protection_state=protection_state, **kwargs) + self.parent_name = parent_name + self.parent_unique_name = parent_unique_name + self.server_name = server_name + self.is_auto_protectable = is_auto_protectable + self.subinquireditemcount = subinquireditemcount + self.subprotectableitemcount = subprotectableitemcount + self.prebackupvalidation = prebackupvalidation + self.protectable_item_type = 'AzureVmWorkloadProtectableItem' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_protected_item_extended_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_protected_item_extended_info.py new file mode 100644 index 000000000000..87cf569285b5 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_protected_item_extended_info.py @@ -0,0 +1,39 @@ +# 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 AzureVmWorkloadProtectedItemExtendedInfo(Model): + """Additional information on Azure Workload for SQL specific backup item. + + :param oldest_recovery_point: The oldest backup copy available for this + backup item. + :type oldest_recovery_point: datetime + :param recovery_point_count: Number of backup copies available for this + backup item. + :type recovery_point_count: int + :param policy_state: Indicates consistency of policy object and policy + applied to this backup item. + :type policy_state: str + """ + + _attribute_map = { + 'oldest_recovery_point': {'key': 'oldestRecoveryPoint', 'type': 'iso-8601'}, + 'recovery_point_count': {'key': 'recoveryPointCount', 'type': 'int'}, + 'policy_state': {'key': 'policyState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureVmWorkloadProtectedItemExtendedInfo, self).__init__(**kwargs) + self.oldest_recovery_point = kwargs.get('oldest_recovery_point', None) + self.recovery_point_count = kwargs.get('recovery_point_count', None) + self.policy_state = kwargs.get('policy_state', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_protected_item_extended_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_protected_item_extended_info_py3.py new file mode 100644 index 000000000000..21ffa134e947 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_protected_item_extended_info_py3.py @@ -0,0 +1,39 @@ +# 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 AzureVmWorkloadProtectedItemExtendedInfo(Model): + """Additional information on Azure Workload for SQL specific backup item. + + :param oldest_recovery_point: The oldest backup copy available for this + backup item. + :type oldest_recovery_point: datetime + :param recovery_point_count: Number of backup copies available for this + backup item. + :type recovery_point_count: int + :param policy_state: Indicates consistency of policy object and policy + applied to this backup item. + :type policy_state: str + """ + + _attribute_map = { + 'oldest_recovery_point': {'key': 'oldestRecoveryPoint', 'type': 'iso-8601'}, + 'recovery_point_count': {'key': 'recoveryPointCount', 'type': 'int'}, + 'policy_state': {'key': 'policyState', 'type': 'str'}, + } + + def __init__(self, *, oldest_recovery_point=None, recovery_point_count: int=None, policy_state: str=None, **kwargs) -> None: + super(AzureVmWorkloadProtectedItemExtendedInfo, self).__init__(**kwargs) + self.oldest_recovery_point = oldest_recovery_point + self.recovery_point_count = recovery_point_count + self.policy_state = policy_state diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_protection_policy.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_protection_policy.py new file mode 100644 index 000000000000..a8fd70352c3b --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_protection_policy.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .protection_policy import ProtectionPolicy + + +class AzureVmWorkloadProtectionPolicy(ProtectionPolicy): + """Azure VM (Mercury) workload-specific backup policy. + + All required parameters must be populated in order to send to Azure. + + :param protected_items_count: Number of items associated with this policy. + :type protected_items_count: int + :param backup_management_type: Required. Constant filled by server. + :type backup_management_type: str + :param work_load_type: Type of workload for the backup management + :type work_load_type: str + :param settings: Common settings for the backup management + :type settings: ~azure.mgmt.recoveryservicesbackup.models.Settings + :param sub_protection_policy: List of sub-protection policies which + includes schedule and retention + :type sub_protection_policy: + list[~azure.mgmt.recoveryservicesbackup.models.SubProtectionPolicy] + """ + + _validation = { + 'backup_management_type': {'required': True}, + } + + _attribute_map = { + 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'work_load_type': {'key': 'workLoadType', 'type': 'str'}, + 'settings': {'key': 'settings', 'type': 'Settings'}, + 'sub_protection_policy': {'key': 'subProtectionPolicy', 'type': '[SubProtectionPolicy]'}, + } + + def __init__(self, **kwargs): + super(AzureVmWorkloadProtectionPolicy, self).__init__(**kwargs) + self.work_load_type = kwargs.get('work_load_type', None) + self.settings = kwargs.get('settings', None) + self.sub_protection_policy = kwargs.get('sub_protection_policy', None) + self.backup_management_type = 'AzureWorkload' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_protection_policy_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_protection_policy_py3.py new file mode 100644 index 000000000000..9d10a880a8f4 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_protection_policy_py3.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .protection_policy_py3 import ProtectionPolicy + + +class AzureVmWorkloadProtectionPolicy(ProtectionPolicy): + """Azure VM (Mercury) workload-specific backup policy. + + All required parameters must be populated in order to send to Azure. + + :param protected_items_count: Number of items associated with this policy. + :type protected_items_count: int + :param backup_management_type: Required. Constant filled by server. + :type backup_management_type: str + :param work_load_type: Type of workload for the backup management + :type work_load_type: str + :param settings: Common settings for the backup management + :type settings: ~azure.mgmt.recoveryservicesbackup.models.Settings + :param sub_protection_policy: List of sub-protection policies which + includes schedule and retention + :type sub_protection_policy: + list[~azure.mgmt.recoveryservicesbackup.models.SubProtectionPolicy] + """ + + _validation = { + 'backup_management_type': {'required': True}, + } + + _attribute_map = { + 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'work_load_type': {'key': 'workLoadType', 'type': 'str'}, + 'settings': {'key': 'settings', 'type': 'Settings'}, + 'sub_protection_policy': {'key': 'subProtectionPolicy', 'type': '[SubProtectionPolicy]'}, + } + + def __init__(self, *, protected_items_count: int=None, work_load_type: str=None, settings=None, sub_protection_policy=None, **kwargs) -> None: + super(AzureVmWorkloadProtectionPolicy, self).__init__(protected_items_count=protected_items_count, **kwargs) + self.work_load_type = work_load_type + self.settings = settings + self.sub_protection_policy = sub_protection_policy + self.backup_management_type = 'AzureWorkload' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_availability_group_protectable_item.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_availability_group_protectable_item.py new file mode 100644 index 000000000000..17c847e0230d --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_availability_group_protectable_item.py @@ -0,0 +1,79 @@ +# 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 .azure_vm_workload_protectable_item import AzureVmWorkloadProtectableItem + + +class AzureVmWorkloadSQLAvailabilityGroupProtectableItem(AzureVmWorkloadProtectableItem): + """Azure VM workload-specific protectable item representing SQL Availability + Group. + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent to backup an + item. + :type backup_management_type: str + :param workload_type: Type of workload for the backup management + :type workload_type: str + :param friendly_name: Friendly name of the backup item. + :type friendly_name: str + :param protection_state: State of the back up item. Possible values + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param protectable_item_type: Required. Constant filled by server. + :type protectable_item_type: str + :param parent_name: Name for instance or AG + :type parent_name: str + :param parent_unique_name: Parent Unique Name is added to provide the + service formatted URI Name of the Parent + Only Applicable for data bases where the parent would be either Instance + or a SQL AG. + :type parent_unique_name: str + :param server_name: Host/Cluster Name for instance or AG + :type server_name: str + :param is_auto_protectable: Indicates if protectable item is + auto-protectable + :type is_auto_protectable: bool + :param subinquireditemcount: For instance or AG, indicates number of DB's + present + :type subinquireditemcount: int + :param subprotectableitemcount: For instance or AG, indicates number of + DB's to be protected + :type subprotectableitemcount: int + :param prebackupvalidation: Pre-backup validation for protectable objects + :type prebackupvalidation: + ~azure.mgmt.recoveryservicesbackup.models.PreBackupValidation + """ + + _validation = { + 'protectable_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'parent_unique_name': {'key': 'parentUniqueName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, + 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, + 'subprotectableitemcount': {'key': 'subprotectableitemcount', 'type': 'int'}, + 'prebackupvalidation': {'key': 'prebackupvalidation', 'type': 'PreBackupValidation'}, + } + + def __init__(self, **kwargs): + super(AzureVmWorkloadSQLAvailabilityGroupProtectableItem, self).__init__(**kwargs) + self.protectable_item_type = 'SQLAvailabilityGroupContainer' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_availability_group_protectable_item_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_availability_group_protectable_item_py3.py new file mode 100644 index 000000000000..d928c60e93be --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_availability_group_protectable_item_py3.py @@ -0,0 +1,79 @@ +# 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 .azure_vm_workload_protectable_item_py3 import AzureVmWorkloadProtectableItem + + +class AzureVmWorkloadSQLAvailabilityGroupProtectableItem(AzureVmWorkloadProtectableItem): + """Azure VM workload-specific protectable item representing SQL Availability + Group. + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent to backup an + item. + :type backup_management_type: str + :param workload_type: Type of workload for the backup management + :type workload_type: str + :param friendly_name: Friendly name of the backup item. + :type friendly_name: str + :param protection_state: State of the back up item. Possible values + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param protectable_item_type: Required. Constant filled by server. + :type protectable_item_type: str + :param parent_name: Name for instance or AG + :type parent_name: str + :param parent_unique_name: Parent Unique Name is added to provide the + service formatted URI Name of the Parent + Only Applicable for data bases where the parent would be either Instance + or a SQL AG. + :type parent_unique_name: str + :param server_name: Host/Cluster Name for instance or AG + :type server_name: str + :param is_auto_protectable: Indicates if protectable item is + auto-protectable + :type is_auto_protectable: bool + :param subinquireditemcount: For instance or AG, indicates number of DB's + present + :type subinquireditemcount: int + :param subprotectableitemcount: For instance or AG, indicates number of + DB's to be protected + :type subprotectableitemcount: int + :param prebackupvalidation: Pre-backup validation for protectable objects + :type prebackupvalidation: + ~azure.mgmt.recoveryservicesbackup.models.PreBackupValidation + """ + + _validation = { + 'protectable_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'parent_unique_name': {'key': 'parentUniqueName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, + 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, + 'subprotectableitemcount': {'key': 'subprotectableitemcount', 'type': 'int'}, + 'prebackupvalidation': {'key': 'prebackupvalidation', 'type': 'PreBackupValidation'}, + } + + def __init__(self, *, backup_management_type: str=None, workload_type: str=None, friendly_name: str=None, protection_state=None, parent_name: str=None, parent_unique_name: str=None, server_name: str=None, is_auto_protectable: bool=None, subinquireditemcount: int=None, subprotectableitemcount: int=None, prebackupvalidation=None, **kwargs) -> None: + super(AzureVmWorkloadSQLAvailabilityGroupProtectableItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, friendly_name=friendly_name, protection_state=protection_state, parent_name=parent_name, parent_unique_name=parent_unique_name, server_name=server_name, is_auto_protectable=is_auto_protectable, subinquireditemcount=subinquireditemcount, subprotectableitemcount=subprotectableitemcount, prebackupvalidation=prebackupvalidation, **kwargs) + self.protectable_item_type = 'SQLAvailabilityGroupContainer' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_database_protectable_item.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_database_protectable_item.py new file mode 100644 index 000000000000..4ad8206ff337 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_database_protectable_item.py @@ -0,0 +1,78 @@ +# 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 .azure_vm_workload_protectable_item import AzureVmWorkloadProtectableItem + + +class AzureVmWorkloadSQLDatabaseProtectableItem(AzureVmWorkloadProtectableItem): + """Azure VM workload-specific protectable item representing SQL Database. + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent to backup an + item. + :type backup_management_type: str + :param workload_type: Type of workload for the backup management + :type workload_type: str + :param friendly_name: Friendly name of the backup item. + :type friendly_name: str + :param protection_state: State of the back up item. Possible values + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param protectable_item_type: Required. Constant filled by server. + :type protectable_item_type: str + :param parent_name: Name for instance or AG + :type parent_name: str + :param parent_unique_name: Parent Unique Name is added to provide the + service formatted URI Name of the Parent + Only Applicable for data bases where the parent would be either Instance + or a SQL AG. + :type parent_unique_name: str + :param server_name: Host/Cluster Name for instance or AG + :type server_name: str + :param is_auto_protectable: Indicates if protectable item is + auto-protectable + :type is_auto_protectable: bool + :param subinquireditemcount: For instance or AG, indicates number of DB's + present + :type subinquireditemcount: int + :param subprotectableitemcount: For instance or AG, indicates number of + DB's to be protected + :type subprotectableitemcount: int + :param prebackupvalidation: Pre-backup validation for protectable objects + :type prebackupvalidation: + ~azure.mgmt.recoveryservicesbackup.models.PreBackupValidation + """ + + _validation = { + 'protectable_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'parent_unique_name': {'key': 'parentUniqueName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, + 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, + 'subprotectableitemcount': {'key': 'subprotectableitemcount', 'type': 'int'}, + 'prebackupvalidation': {'key': 'prebackupvalidation', 'type': 'PreBackupValidation'}, + } + + def __init__(self, **kwargs): + super(AzureVmWorkloadSQLDatabaseProtectableItem, self).__init__(**kwargs) + self.protectable_item_type = 'SQLDataBase' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_database_protectable_item_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_database_protectable_item_py3.py new file mode 100644 index 000000000000..c13578efb69b --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_database_protectable_item_py3.py @@ -0,0 +1,78 @@ +# 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 .azure_vm_workload_protectable_item_py3 import AzureVmWorkloadProtectableItem + + +class AzureVmWorkloadSQLDatabaseProtectableItem(AzureVmWorkloadProtectableItem): + """Azure VM workload-specific protectable item representing SQL Database. + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent to backup an + item. + :type backup_management_type: str + :param workload_type: Type of workload for the backup management + :type workload_type: str + :param friendly_name: Friendly name of the backup item. + :type friendly_name: str + :param protection_state: State of the back up item. Possible values + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param protectable_item_type: Required. Constant filled by server. + :type protectable_item_type: str + :param parent_name: Name for instance or AG + :type parent_name: str + :param parent_unique_name: Parent Unique Name is added to provide the + service formatted URI Name of the Parent + Only Applicable for data bases where the parent would be either Instance + or a SQL AG. + :type parent_unique_name: str + :param server_name: Host/Cluster Name for instance or AG + :type server_name: str + :param is_auto_protectable: Indicates if protectable item is + auto-protectable + :type is_auto_protectable: bool + :param subinquireditemcount: For instance or AG, indicates number of DB's + present + :type subinquireditemcount: int + :param subprotectableitemcount: For instance or AG, indicates number of + DB's to be protected + :type subprotectableitemcount: int + :param prebackupvalidation: Pre-backup validation for protectable objects + :type prebackupvalidation: + ~azure.mgmt.recoveryservicesbackup.models.PreBackupValidation + """ + + _validation = { + 'protectable_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'parent_unique_name': {'key': 'parentUniqueName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, + 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, + 'subprotectableitemcount': {'key': 'subprotectableitemcount', 'type': 'int'}, + 'prebackupvalidation': {'key': 'prebackupvalidation', 'type': 'PreBackupValidation'}, + } + + def __init__(self, *, backup_management_type: str=None, workload_type: str=None, friendly_name: str=None, protection_state=None, parent_name: str=None, parent_unique_name: str=None, server_name: str=None, is_auto_protectable: bool=None, subinquireditemcount: int=None, subprotectableitemcount: int=None, prebackupvalidation=None, **kwargs) -> None: + super(AzureVmWorkloadSQLDatabaseProtectableItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, friendly_name=friendly_name, protection_state=protection_state, parent_name=parent_name, parent_unique_name=parent_unique_name, server_name=server_name, is_auto_protectable=is_auto_protectable, subinquireditemcount=subinquireditemcount, subprotectableitemcount=subprotectableitemcount, prebackupvalidation=prebackupvalidation, **kwargs) + self.protectable_item_type = 'SQLDataBase' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_database_protected_item.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_database_protected_item.py new file mode 100644 index 000000000000..d18550cee706 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_database_protected_item.py @@ -0,0 +1,127 @@ +# 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 .protected_item import ProtectedItem + + +class AzureVmWorkloadSQLDatabaseProtectedItem(ProtectedItem): + """Azure VM workload-specific protected item representing SQL Database. + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent for the backed + up item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param workload_type: Type of workload this item represents. Possible + values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', + 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + 'GenericDataSource', 'SQLDataBase', 'AzureFileShare' + :type workload_type: str or + ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :param container_name: Unique name of container + :type container_name: str + :param source_resource_id: ARM ID of the resource to be backed up. + :type source_resource_id: str + :param policy_id: ID of the backup policy with which this item is backed + up. + :type policy_id: str + :param last_recovery_point: Timestamp when the last (latest) backup copy + was created for this backup item. + :type last_recovery_point: datetime + :param backup_set_name: Name of the backup set the backup item belongs to + :type backup_set_name: str + :param protected_item_type: Required. Constant filled by server. + :type protected_item_type: str + :param friendly_name: Friendly name of the DB represented by this backup + item. + :type friendly_name: str + :param server_name: Host/Cluster Name for instance or AG + :type server_name: str + :param parent_name: Parent name of the DB such as Instance or Availability + Group. + :type parent_name: str + :param parent_type: Parent type of DB, SQLAG or StandAlone + :type parent_type: str + :param protection_status: Backup status of this backup item. + :type protection_status: str + :param protection_state: Backup state of this backup item. Possible values + include: 'Invalid', 'IRPending', 'Protected', 'ProtectionError', + 'ProtectionStopped', 'ProtectionPaused' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionState + :param last_backup_status: Last backup operation status. Possible values: + Healthy, Unhealthy. Possible values include: 'Invalid', 'Healthy', + 'Unhealthy', 'IRPending' + :type last_backup_status: str or + ~azure.mgmt.recoveryservicesbackup.models.LastBackupStatus + :param last_backup_time: Timestamp of the last backup operation on this + backup item. + :type last_backup_time: datetime + :param last_backup_error_detail: Error details in last backup + :type last_backup_error_detail: + ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail + :param protected_item_data_source_id: Data ID of the protected item. + :type protected_item_data_source_id: str + :param protected_item_health_status: Health status of the backup item, + evaluated based on last heartbeat received. Possible values include: + 'Invalid', 'Healthy', 'Unhealthy', 'NotReachable', 'IRPending' + :type protected_item_health_status: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemHealthStatus + :param extended_info: Additional information for this backup item. + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureVmWorkloadProtectedItemExtendedInfo + """ + + _validation = { + 'protected_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'policy_id': {'key': 'policyId', 'type': 'str'}, + 'last_recovery_point': {'key': 'lastRecoveryPoint', 'type': 'iso-8601'}, + 'backup_set_name': {'key': 'backupSetName', 'type': 'str'}, + 'protected_item_type': {'key': 'protectedItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'parent_type': {'key': 'parentType', 'type': 'str'}, + 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, + 'last_backup_time': {'key': 'lastBackupTime', 'type': 'iso-8601'}, + 'last_backup_error_detail': {'key': 'lastBackupErrorDetail', 'type': 'ErrorDetail'}, + 'protected_item_data_source_id': {'key': 'protectedItemDataSourceId', 'type': 'str'}, + 'protected_item_health_status': {'key': 'protectedItemHealthStatus', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureVmWorkloadProtectedItemExtendedInfo'}, + } + + def __init__(self, **kwargs): + super(AzureVmWorkloadSQLDatabaseProtectedItem, self).__init__(**kwargs) + self.friendly_name = kwargs.get('friendly_name', None) + self.server_name = kwargs.get('server_name', None) + self.parent_name = kwargs.get('parent_name', None) + self.parent_type = kwargs.get('parent_type', None) + self.protection_status = kwargs.get('protection_status', None) + self.protection_state = kwargs.get('protection_state', None) + self.last_backup_status = kwargs.get('last_backup_status', None) + self.last_backup_time = kwargs.get('last_backup_time', None) + self.last_backup_error_detail = kwargs.get('last_backup_error_detail', None) + self.protected_item_data_source_id = kwargs.get('protected_item_data_source_id', None) + self.protected_item_health_status = kwargs.get('protected_item_health_status', None) + self.extended_info = kwargs.get('extended_info', None) + self.protected_item_type = 'AzureVmWorkloadSQLDatabase' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_database_protected_item_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_database_protected_item_py3.py new file mode 100644 index 000000000000..d1938b620cf3 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_database_protected_item_py3.py @@ -0,0 +1,127 @@ +# 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 .protected_item_py3 import ProtectedItem + + +class AzureVmWorkloadSQLDatabaseProtectedItem(ProtectedItem): + """Azure VM workload-specific protected item representing SQL Database. + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent for the backed + up item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param workload_type: Type of workload this item represents. Possible + values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', + 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + 'GenericDataSource', 'SQLDataBase', 'AzureFileShare' + :type workload_type: str or + ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :param container_name: Unique name of container + :type container_name: str + :param source_resource_id: ARM ID of the resource to be backed up. + :type source_resource_id: str + :param policy_id: ID of the backup policy with which this item is backed + up. + :type policy_id: str + :param last_recovery_point: Timestamp when the last (latest) backup copy + was created for this backup item. + :type last_recovery_point: datetime + :param backup_set_name: Name of the backup set the backup item belongs to + :type backup_set_name: str + :param protected_item_type: Required. Constant filled by server. + :type protected_item_type: str + :param friendly_name: Friendly name of the DB represented by this backup + item. + :type friendly_name: str + :param server_name: Host/Cluster Name for instance or AG + :type server_name: str + :param parent_name: Parent name of the DB such as Instance or Availability + Group. + :type parent_name: str + :param parent_type: Parent type of DB, SQLAG or StandAlone + :type parent_type: str + :param protection_status: Backup status of this backup item. + :type protection_status: str + :param protection_state: Backup state of this backup item. Possible values + include: 'Invalid', 'IRPending', 'Protected', 'ProtectionError', + 'ProtectionStopped', 'ProtectionPaused' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionState + :param last_backup_status: Last backup operation status. Possible values: + Healthy, Unhealthy. Possible values include: 'Invalid', 'Healthy', + 'Unhealthy', 'IRPending' + :type last_backup_status: str or + ~azure.mgmt.recoveryservicesbackup.models.LastBackupStatus + :param last_backup_time: Timestamp of the last backup operation on this + backup item. + :type last_backup_time: datetime + :param last_backup_error_detail: Error details in last backup + :type last_backup_error_detail: + ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail + :param protected_item_data_source_id: Data ID of the protected item. + :type protected_item_data_source_id: str + :param protected_item_health_status: Health status of the backup item, + evaluated based on last heartbeat received. Possible values include: + 'Invalid', 'Healthy', 'Unhealthy', 'NotReachable', 'IRPending' + :type protected_item_health_status: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemHealthStatus + :param extended_info: Additional information for this backup item. + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureVmWorkloadProtectedItemExtendedInfo + """ + + _validation = { + 'protected_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'policy_id': {'key': 'policyId', 'type': 'str'}, + 'last_recovery_point': {'key': 'lastRecoveryPoint', 'type': 'iso-8601'}, + 'backup_set_name': {'key': 'backupSetName', 'type': 'str'}, + 'protected_item_type': {'key': 'protectedItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'parent_type': {'key': 'parentType', 'type': 'str'}, + 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, + 'last_backup_time': {'key': 'lastBackupTime', 'type': 'iso-8601'}, + 'last_backup_error_detail': {'key': 'lastBackupErrorDetail', 'type': 'ErrorDetail'}, + 'protected_item_data_source_id': {'key': 'protectedItemDataSourceId', 'type': 'str'}, + 'protected_item_health_status': {'key': 'protectedItemHealthStatus', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureVmWorkloadProtectedItemExtendedInfo'}, + } + + def __init__(self, *, backup_management_type=None, workload_type=None, container_name: str=None, source_resource_id: str=None, policy_id: str=None, last_recovery_point=None, backup_set_name: str=None, friendly_name: str=None, server_name: str=None, parent_name: str=None, parent_type: str=None, protection_status: str=None, protection_state=None, last_backup_status=None, last_backup_time=None, last_backup_error_detail=None, protected_item_data_source_id: str=None, protected_item_health_status=None, extended_info=None, **kwargs) -> None: + super(AzureVmWorkloadSQLDatabaseProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, **kwargs) + self.friendly_name = friendly_name + self.server_name = server_name + self.parent_name = parent_name + self.parent_type = parent_type + self.protection_status = protection_status + self.protection_state = protection_state + self.last_backup_status = last_backup_status + self.last_backup_time = last_backup_time + self.last_backup_error_detail = last_backup_error_detail + self.protected_item_data_source_id = protected_item_data_source_id + self.protected_item_health_status = protected_item_health_status + self.extended_info = extended_info + self.protected_item_type = 'AzureVmWorkloadSQLDatabase' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_database_workload_item.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_database_workload_item.py new file mode 100644 index 000000000000..645538ba2f0e --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_database_workload_item.py @@ -0,0 +1,67 @@ +# 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 .azure_vm_workload_item import AzureVmWorkloadItem + + +class AzureVmWorkloadSQLDatabaseWorkloadItem(AzureVmWorkloadItem): + """Azure VM workload-specific workload item representing SQL Database. + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent to backup an + item. + :type backup_management_type: str + :param workload_type: Type of workload for the backup management + :type workload_type: str + :param friendly_name: Friendly name of the backup item. + :type friendly_name: str + :param protection_state: State of the back up item. Possible values + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param workload_item_type: Required. Constant filled by server. + :type workload_item_type: str + :param parent_name: Name for instance or AG + :type parent_name: str + :param server_name: Host/Cluster Name for instance or AG + :type server_name: str + :param is_auto_protectable: Indicates if workload item is auto-protectable + :type is_auto_protectable: bool + :param subinquireditemcount: For instance or AG, indicates number of DB's + present + :type subinquireditemcount: int + :param sub_workload_item_count: For instance or AG, indicates number of + DB's to be protected + :type sub_workload_item_count: int + """ + + _validation = { + 'workload_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, + 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, + 'sub_workload_item_count': {'key': 'subWorkloadItemCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(AzureVmWorkloadSQLDatabaseWorkloadItem, self).__init__(**kwargs) + self.workload_item_type = 'SQLDataBase' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_database_workload_item_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_database_workload_item_py3.py new file mode 100644 index 000000000000..4156594312ef --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_database_workload_item_py3.py @@ -0,0 +1,67 @@ +# 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 .azure_vm_workload_item_py3 import AzureVmWorkloadItem + + +class AzureVmWorkloadSQLDatabaseWorkloadItem(AzureVmWorkloadItem): + """Azure VM workload-specific workload item representing SQL Database. + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent to backup an + item. + :type backup_management_type: str + :param workload_type: Type of workload for the backup management + :type workload_type: str + :param friendly_name: Friendly name of the backup item. + :type friendly_name: str + :param protection_state: State of the back up item. Possible values + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param workload_item_type: Required. Constant filled by server. + :type workload_item_type: str + :param parent_name: Name for instance or AG + :type parent_name: str + :param server_name: Host/Cluster Name for instance or AG + :type server_name: str + :param is_auto_protectable: Indicates if workload item is auto-protectable + :type is_auto_protectable: bool + :param subinquireditemcount: For instance or AG, indicates number of DB's + present + :type subinquireditemcount: int + :param sub_workload_item_count: For instance or AG, indicates number of + DB's to be protected + :type sub_workload_item_count: int + """ + + _validation = { + 'workload_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, + 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, + 'sub_workload_item_count': {'key': 'subWorkloadItemCount', 'type': 'int'}, + } + + def __init__(self, *, backup_management_type: str=None, workload_type: str=None, friendly_name: str=None, protection_state=None, parent_name: str=None, server_name: str=None, is_auto_protectable: bool=None, subinquireditemcount: int=None, sub_workload_item_count: int=None, **kwargs) -> None: + super(AzureVmWorkloadSQLDatabaseWorkloadItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, friendly_name=friendly_name, protection_state=protection_state, parent_name=parent_name, server_name=server_name, is_auto_protectable=is_auto_protectable, subinquireditemcount=subinquireditemcount, sub_workload_item_count=sub_workload_item_count, **kwargs) + self.workload_item_type = 'SQLDataBase' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_instance_protectable_item.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_instance_protectable_item.py new file mode 100644 index 000000000000..5281a2047b25 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_instance_protectable_item.py @@ -0,0 +1,78 @@ +# 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 .azure_vm_workload_protectable_item import AzureVmWorkloadProtectableItem + + +class AzureVmWorkloadSQLInstanceProtectableItem(AzureVmWorkloadProtectableItem): + """Azure VM workload-specific protectable item representing SQL Instance. + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent to backup an + item. + :type backup_management_type: str + :param workload_type: Type of workload for the backup management + :type workload_type: str + :param friendly_name: Friendly name of the backup item. + :type friendly_name: str + :param protection_state: State of the back up item. Possible values + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param protectable_item_type: Required. Constant filled by server. + :type protectable_item_type: str + :param parent_name: Name for instance or AG + :type parent_name: str + :param parent_unique_name: Parent Unique Name is added to provide the + service formatted URI Name of the Parent + Only Applicable for data bases where the parent would be either Instance + or a SQL AG. + :type parent_unique_name: str + :param server_name: Host/Cluster Name for instance or AG + :type server_name: str + :param is_auto_protectable: Indicates if protectable item is + auto-protectable + :type is_auto_protectable: bool + :param subinquireditemcount: For instance or AG, indicates number of DB's + present + :type subinquireditemcount: int + :param subprotectableitemcount: For instance or AG, indicates number of + DB's to be protected + :type subprotectableitemcount: int + :param prebackupvalidation: Pre-backup validation for protectable objects + :type prebackupvalidation: + ~azure.mgmt.recoveryservicesbackup.models.PreBackupValidation + """ + + _validation = { + 'protectable_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'parent_unique_name': {'key': 'parentUniqueName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, + 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, + 'subprotectableitemcount': {'key': 'subprotectableitemcount', 'type': 'int'}, + 'prebackupvalidation': {'key': 'prebackupvalidation', 'type': 'PreBackupValidation'}, + } + + def __init__(self, **kwargs): + super(AzureVmWorkloadSQLInstanceProtectableItem, self).__init__(**kwargs) + self.protectable_item_type = 'SQLInstance' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_instance_protectable_item_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_instance_protectable_item_py3.py new file mode 100644 index 000000000000..e4f23a4b4f3f --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_instance_protectable_item_py3.py @@ -0,0 +1,78 @@ +# 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 .azure_vm_workload_protectable_item_py3 import AzureVmWorkloadProtectableItem + + +class AzureVmWorkloadSQLInstanceProtectableItem(AzureVmWorkloadProtectableItem): + """Azure VM workload-specific protectable item representing SQL Instance. + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent to backup an + item. + :type backup_management_type: str + :param workload_type: Type of workload for the backup management + :type workload_type: str + :param friendly_name: Friendly name of the backup item. + :type friendly_name: str + :param protection_state: State of the back up item. Possible values + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param protectable_item_type: Required. Constant filled by server. + :type protectable_item_type: str + :param parent_name: Name for instance or AG + :type parent_name: str + :param parent_unique_name: Parent Unique Name is added to provide the + service formatted URI Name of the Parent + Only Applicable for data bases where the parent would be either Instance + or a SQL AG. + :type parent_unique_name: str + :param server_name: Host/Cluster Name for instance or AG + :type server_name: str + :param is_auto_protectable: Indicates if protectable item is + auto-protectable + :type is_auto_protectable: bool + :param subinquireditemcount: For instance or AG, indicates number of DB's + present + :type subinquireditemcount: int + :param subprotectableitemcount: For instance or AG, indicates number of + DB's to be protected + :type subprotectableitemcount: int + :param prebackupvalidation: Pre-backup validation for protectable objects + :type prebackupvalidation: + ~azure.mgmt.recoveryservicesbackup.models.PreBackupValidation + """ + + _validation = { + 'protectable_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'parent_unique_name': {'key': 'parentUniqueName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, + 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, + 'subprotectableitemcount': {'key': 'subprotectableitemcount', 'type': 'int'}, + 'prebackupvalidation': {'key': 'prebackupvalidation', 'type': 'PreBackupValidation'}, + } + + def __init__(self, *, backup_management_type: str=None, workload_type: str=None, friendly_name: str=None, protection_state=None, parent_name: str=None, parent_unique_name: str=None, server_name: str=None, is_auto_protectable: bool=None, subinquireditemcount: int=None, subprotectableitemcount: int=None, prebackupvalidation=None, **kwargs) -> None: + super(AzureVmWorkloadSQLInstanceProtectableItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, friendly_name=friendly_name, protection_state=protection_state, parent_name=parent_name, parent_unique_name=parent_unique_name, server_name=server_name, is_auto_protectable=is_auto_protectable, subinquireditemcount=subinquireditemcount, subprotectableitemcount=subprotectableitemcount, prebackupvalidation=prebackupvalidation, **kwargs) + self.protectable_item_type = 'SQLInstance' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_instance_workload_item.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_instance_workload_item.py new file mode 100644 index 000000000000..4842a8ae8448 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_instance_workload_item.py @@ -0,0 +1,72 @@ +# 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 .azure_vm_workload_item import AzureVmWorkloadItem + + +class AzureVmWorkloadSQLInstanceWorkloadItem(AzureVmWorkloadItem): + """Azure VM workload-specific workload item representing SQL Instance. + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent to backup an + item. + :type backup_management_type: str + :param workload_type: Type of workload for the backup management + :type workload_type: str + :param friendly_name: Friendly name of the backup item. + :type friendly_name: str + :param protection_state: State of the back up item. Possible values + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param workload_item_type: Required. Constant filled by server. + :type workload_item_type: str + :param parent_name: Name for instance or AG + :type parent_name: str + :param server_name: Host/Cluster Name for instance or AG + :type server_name: str + :param is_auto_protectable: Indicates if workload item is auto-protectable + :type is_auto_protectable: bool + :param subinquireditemcount: For instance or AG, indicates number of DB's + present + :type subinquireditemcount: int + :param sub_workload_item_count: For instance or AG, indicates number of + DB's to be protected + :type sub_workload_item_count: int + :param data_directory_paths: Data Directory Paths for default directories + :type data_directory_paths: + list[~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectory] + """ + + _validation = { + 'workload_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, + 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, + 'sub_workload_item_count': {'key': 'subWorkloadItemCount', 'type': 'int'}, + 'data_directory_paths': {'key': 'dataDirectoryPaths', 'type': '[SQLDataDirectory]'}, + } + + def __init__(self, **kwargs): + super(AzureVmWorkloadSQLInstanceWorkloadItem, self).__init__(**kwargs) + self.data_directory_paths = kwargs.get('data_directory_paths', None) + self.workload_item_type = 'SQLInstance' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_instance_workload_item_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_instance_workload_item_py3.py new file mode 100644 index 000000000000..14a68cab8040 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_vm_workload_sql_instance_workload_item_py3.py @@ -0,0 +1,72 @@ +# 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 .azure_vm_workload_item_py3 import AzureVmWorkloadItem + + +class AzureVmWorkloadSQLInstanceWorkloadItem(AzureVmWorkloadItem): + """Azure VM workload-specific workload item representing SQL Instance. + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent to backup an + item. + :type backup_management_type: str + :param workload_type: Type of workload for the backup management + :type workload_type: str + :param friendly_name: Friendly name of the backup item. + :type friendly_name: str + :param protection_state: State of the back up item. Possible values + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param workload_item_type: Required. Constant filled by server. + :type workload_item_type: str + :param parent_name: Name for instance or AG + :type parent_name: str + :param server_name: Host/Cluster Name for instance or AG + :type server_name: str + :param is_auto_protectable: Indicates if workload item is auto-protectable + :type is_auto_protectable: bool + :param subinquireditemcount: For instance or AG, indicates number of DB's + present + :type subinquireditemcount: int + :param sub_workload_item_count: For instance or AG, indicates number of + DB's to be protected + :type sub_workload_item_count: int + :param data_directory_paths: Data Directory Paths for default directories + :type data_directory_paths: + list[~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectory] + """ + + _validation = { + 'workload_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, + 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, + 'sub_workload_item_count': {'key': 'subWorkloadItemCount', 'type': 'int'}, + 'data_directory_paths': {'key': 'dataDirectoryPaths', 'type': '[SQLDataDirectory]'}, + } + + def __init__(self, *, backup_management_type: str=None, workload_type: str=None, friendly_name: str=None, protection_state=None, parent_name: str=None, server_name: str=None, is_auto_protectable: bool=None, subinquireditemcount: int=None, sub_workload_item_count: int=None, data_directory_paths=None, **kwargs) -> None: + super(AzureVmWorkloadSQLInstanceWorkloadItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, friendly_name=friendly_name, protection_state=protection_state, parent_name=parent_name, server_name=server_name, is_auto_protectable=is_auto_protectable, subinquireditemcount=subinquireditemcount, sub_workload_item_count=sub_workload_item_count, **kwargs) + self.data_directory_paths = data_directory_paths + self.workload_item_type = 'SQLInstance' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_backup_request.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_backup_request.py new file mode 100644 index 000000000000..d1bd18351161 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_backup_request.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 .backup_request import BackupRequest + + +class AzureWorkloadBackupRequest(BackupRequest): + """AzureWorkload workload-specific backup request. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param backup_type: Type of backup, viz. Full, Differential, Log or + CopyOnlyFull. Possible values include: 'Invalid', 'Full', 'Differential', + 'Log', 'CopyOnlyFull' + :type backup_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupType + :param enable_compression: Bool for Compression setting + :type enable_compression: bool + :param recovery_point_expiry_time_in_utc: Backup copy will expire after + the time specified (UTC). + :type recovery_point_expiry_time_in_utc: datetime + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'backup_type': {'key': 'backupType', 'type': 'str'}, + 'enable_compression': {'key': 'enableCompression', 'type': 'bool'}, + 'recovery_point_expiry_time_in_utc': {'key': 'recoveryPointExpiryTimeInUTC', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(AzureWorkloadBackupRequest, self).__init__(**kwargs) + self.backup_type = kwargs.get('backup_type', None) + self.enable_compression = kwargs.get('enable_compression', None) + self.recovery_point_expiry_time_in_utc = kwargs.get('recovery_point_expiry_time_in_utc', None) + self.object_type = 'AzureWorkloadBackupRequest' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_backup_request_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_backup_request_py3.py new file mode 100644 index 000000000000..2c67d89e11bc --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_backup_request_py3.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 .backup_request_py3 import BackupRequest + + +class AzureWorkloadBackupRequest(BackupRequest): + """AzureWorkload workload-specific backup request. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param backup_type: Type of backup, viz. Full, Differential, Log or + CopyOnlyFull. Possible values include: 'Invalid', 'Full', 'Differential', + 'Log', 'CopyOnlyFull' + :type backup_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupType + :param enable_compression: Bool for Compression setting + :type enable_compression: bool + :param recovery_point_expiry_time_in_utc: Backup copy will expire after + the time specified (UTC). + :type recovery_point_expiry_time_in_utc: datetime + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'backup_type': {'key': 'backupType', 'type': 'str'}, + 'enable_compression': {'key': 'enableCompression', 'type': 'bool'}, + 'recovery_point_expiry_time_in_utc': {'key': 'recoveryPointExpiryTimeInUTC', 'type': 'iso-8601'}, + } + + def __init__(self, *, backup_type=None, enable_compression: bool=None, recovery_point_expiry_time_in_utc=None, **kwargs) -> None: + super(AzureWorkloadBackupRequest, self).__init__(**kwargs) + self.backup_type = backup_type + self.enable_compression = enable_compression + self.recovery_point_expiry_time_in_utc = recovery_point_expiry_time_in_utc + self.object_type = 'AzureWorkloadBackupRequest' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_container.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_container.py new file mode 100644 index 000000000000..543e5c56fbd8 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_container.py @@ -0,0 +1,74 @@ +# 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 .protection_container import ProtectionContainer + + +class AzureWorkloadContainer(ProtectionContainer): + """Container for the workloads running inside Azure Compute or Classic + Compute. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureSQLAGWorkloadContainerProtectionContainer, + AzureVMAppContainerProtectionContainer + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name of the container. + :type friendly_name: str + :param backup_management_type: Type of backup managemenent for the + container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param registration_status: Status of registration of the container with + the Recovery Services Vault. + :type registration_status: str + :param health_status: Status of health of the container. + :type health_status: str + :param container_type: Required. Constant filled by server. + :type container_type: str + :param source_resource_id: ARM ID of the virtual machine represented by + this Azure Workload Container + :type source_resource_id: str + :param last_updated_time: Time stamp when this container was updated. + :type last_updated_time: datetime + :param extended_info: Additional details of a workload container. + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadContainerExtendedInfo + """ + + _validation = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_type': {'key': 'containerType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'last_updated_time': {'key': 'lastUpdatedTime', 'type': 'iso-8601'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureWorkloadContainerExtendedInfo'}, + } + + _subtype_map = { + 'container_type': {'SQLAGWorkLoadContainer': 'AzureSQLAGWorkloadContainerProtectionContainer', 'VMAppContainer': 'AzureVMAppContainerProtectionContainer'} + } + + def __init__(self, **kwargs): + super(AzureWorkloadContainer, self).__init__(**kwargs) + self.source_resource_id = kwargs.get('source_resource_id', None) + self.last_updated_time = kwargs.get('last_updated_time', None) + self.extended_info = kwargs.get('extended_info', None) + self.container_type = 'AzureWorkloadContainer' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_container_extended_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_container_extended_info.py new file mode 100644 index 000000000000..82041f6ddf2c --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_container_extended_info.py @@ -0,0 +1,38 @@ +# 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 AzureWorkloadContainerExtendedInfo(Model): + """Extended information of the container. + + :param host_server_name: Host Os Name in case of Stand Alone and + Cluster Name in case of distributed container. + :type host_server_name: str + :param inquiry_info: Inquiry Status for the container. + :type inquiry_info: ~azure.mgmt.recoveryservicesbackup.models.InquiryInfo + :param nodes_list: List of the nodes in case of distributed container. + :type nodes_list: + list[~azure.mgmt.recoveryservicesbackup.models.DistributedNodesInfo] + """ + + _attribute_map = { + 'host_server_name': {'key': 'hostServerName', 'type': 'str'}, + 'inquiry_info': {'key': 'inquiryInfo', 'type': 'InquiryInfo'}, + 'nodes_list': {'key': 'nodesList', 'type': '[DistributedNodesInfo]'}, + } + + def __init__(self, **kwargs): + super(AzureWorkloadContainerExtendedInfo, self).__init__(**kwargs) + self.host_server_name = kwargs.get('host_server_name', None) + self.inquiry_info = kwargs.get('inquiry_info', None) + self.nodes_list = kwargs.get('nodes_list', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_container_extended_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_container_extended_info_py3.py new file mode 100644 index 000000000000..c69fc5584036 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_container_extended_info_py3.py @@ -0,0 +1,38 @@ +# 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 AzureWorkloadContainerExtendedInfo(Model): + """Extended information of the container. + + :param host_server_name: Host Os Name in case of Stand Alone and + Cluster Name in case of distributed container. + :type host_server_name: str + :param inquiry_info: Inquiry Status for the container. + :type inquiry_info: ~azure.mgmt.recoveryservicesbackup.models.InquiryInfo + :param nodes_list: List of the nodes in case of distributed container. + :type nodes_list: + list[~azure.mgmt.recoveryservicesbackup.models.DistributedNodesInfo] + """ + + _attribute_map = { + 'host_server_name': {'key': 'hostServerName', 'type': 'str'}, + 'inquiry_info': {'key': 'inquiryInfo', 'type': 'InquiryInfo'}, + 'nodes_list': {'key': 'nodesList', 'type': '[DistributedNodesInfo]'}, + } + + def __init__(self, *, host_server_name: str=None, inquiry_info=None, nodes_list=None, **kwargs) -> None: + super(AzureWorkloadContainerExtendedInfo, self).__init__(**kwargs) + self.host_server_name = host_server_name + self.inquiry_info = inquiry_info + self.nodes_list = nodes_list diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_container_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_container_py3.py new file mode 100644 index 000000000000..65f3152ad23b --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_container_py3.py @@ -0,0 +1,74 @@ +# 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 .protection_container_py3 import ProtectionContainer + + +class AzureWorkloadContainer(ProtectionContainer): + """Container for the workloads running inside Azure Compute or Classic + Compute. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureSQLAGWorkloadContainerProtectionContainer, + AzureVMAppContainerProtectionContainer + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name of the container. + :type friendly_name: str + :param backup_management_type: Type of backup managemenent for the + container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param registration_status: Status of registration of the container with + the Recovery Services Vault. + :type registration_status: str + :param health_status: Status of health of the container. + :type health_status: str + :param container_type: Required. Constant filled by server. + :type container_type: str + :param source_resource_id: ARM ID of the virtual machine represented by + this Azure Workload Container + :type source_resource_id: str + :param last_updated_time: Time stamp when this container was updated. + :type last_updated_time: datetime + :param extended_info: Additional details of a workload container. + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadContainerExtendedInfo + """ + + _validation = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_type': {'key': 'containerType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'last_updated_time': {'key': 'lastUpdatedTime', 'type': 'iso-8601'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureWorkloadContainerExtendedInfo'}, + } + + _subtype_map = { + 'container_type': {'SQLAGWorkLoadContainer': 'AzureSQLAGWorkloadContainerProtectionContainer', 'VMAppContainer': 'AzureVMAppContainerProtectionContainer'} + } + + def __init__(self, *, friendly_name: str=None, backup_management_type=None, registration_status: str=None, health_status: str=None, source_resource_id: str=None, last_updated_time=None, extended_info=None, **kwargs) -> None: + super(AzureWorkloadContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status, **kwargs) + self.source_resource_id = source_resource_id + self.last_updated_time = last_updated_time + self.extended_info = extended_info + self.container_type = 'AzureWorkloadContainer' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_error_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_error_info.py new file mode 100644 index 000000000000..f57240012dfa --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_error_info.py @@ -0,0 +1,46 @@ +# 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 AzureWorkloadErrorInfo(Model): + """Azure storage specific error information. + + :param error_code: Error code. + :type error_code: int + :param error_string: Localized error string. + :type error_string: str + :param error_title: Title: Typically, the entity that the error pertains + to. + :type error_title: str + :param recommendations: List of localized recommendations for above error + code. + :type recommendations: list[str] + :param additional_details: Additional details for above error code. + :type additional_details: str + """ + + _attribute_map = { + 'error_code': {'key': 'errorCode', 'type': 'int'}, + 'error_string': {'key': 'errorString', 'type': 'str'}, + 'error_title': {'key': 'errorTitle', 'type': 'str'}, + 'recommendations': {'key': 'recommendations', 'type': '[str]'}, + 'additional_details': {'key': 'additionalDetails', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureWorkloadErrorInfo, self).__init__(**kwargs) + self.error_code = kwargs.get('error_code', None) + self.error_string = kwargs.get('error_string', None) + self.error_title = kwargs.get('error_title', None) + self.recommendations = kwargs.get('recommendations', None) + self.additional_details = kwargs.get('additional_details', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_error_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_error_info_py3.py new file mode 100644 index 000000000000..8d62be768dbb --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_error_info_py3.py @@ -0,0 +1,46 @@ +# 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 AzureWorkloadErrorInfo(Model): + """Azure storage specific error information. + + :param error_code: Error code. + :type error_code: int + :param error_string: Localized error string. + :type error_string: str + :param error_title: Title: Typically, the entity that the error pertains + to. + :type error_title: str + :param recommendations: List of localized recommendations for above error + code. + :type recommendations: list[str] + :param additional_details: Additional details for above error code. + :type additional_details: str + """ + + _attribute_map = { + 'error_code': {'key': 'errorCode', 'type': 'int'}, + 'error_string': {'key': 'errorString', 'type': 'str'}, + 'error_title': {'key': 'errorTitle', 'type': 'str'}, + 'recommendations': {'key': 'recommendations', 'type': '[str]'}, + 'additional_details': {'key': 'additionalDetails', 'type': 'str'}, + } + + def __init__(self, *, error_code: int=None, error_string: str=None, error_title: str=None, recommendations=None, additional_details: str=None, **kwargs) -> None: + super(AzureWorkloadErrorInfo, self).__init__(**kwargs) + self.error_code = error_code + self.error_string = error_string + self.error_title = error_title + self.recommendations = recommendations + self.additional_details = additional_details diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_job.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_job.py new file mode 100644 index 000000000000..6d9a48a6f4b6 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_job.py @@ -0,0 +1,80 @@ +# 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 .job import Job + + +class AzureWorkloadJob(Job): + """Azure storage specific job. + + All required parameters must be populated in order to send to Azure. + + :param entity_friendly_name: Friendly name of the entity on which the + current job is executing. + :type entity_friendly_name: str + :param backup_management_type: Backup management type to execute the + current job. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param operation: The operation name. + :type operation: str + :param status: Job status. + :type status: str + :param start_time: The start time. + :type start_time: datetime + :param end_time: The end time. + :type end_time: datetime + :param activity_id: ActivityId of job. + :type activity_id: str + :param job_type: Required. Constant filled by server. + :type job_type: str + :param duration: Time elapsed during the execution of this job. + :type duration: timedelta + :param actions_info: Gets or sets the state/actions applicable on this job + like cancel/retry. + :type actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] + :param error_details: Error details on execution of this job. + :type error_details: + list[~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadErrorInfo] + :param extended_info: Additional information about the job. + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadJobExtendedInfo + """ + + _validation = { + 'job_type': {'required': True}, + } + + _attribute_map = { + 'entity_friendly_name': {'key': 'entityFriendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'activity_id': {'key': 'activityId', 'type': 'str'}, + 'job_type': {'key': 'jobType', 'type': 'str'}, + 'duration': {'key': 'duration', 'type': 'duration'}, + 'actions_info': {'key': 'actionsInfo', 'type': '[JobSupportedAction]'}, + 'error_details': {'key': 'errorDetails', 'type': '[AzureWorkloadErrorInfo]'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureWorkloadJobExtendedInfo'}, + } + + def __init__(self, **kwargs): + super(AzureWorkloadJob, self).__init__(**kwargs) + self.duration = kwargs.get('duration', None) + self.actions_info = kwargs.get('actions_info', None) + self.error_details = kwargs.get('error_details', None) + self.extended_info = kwargs.get('extended_info', None) + self.job_type = 'AzureWorkloadJob' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_job_extended_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_job_extended_info.py new file mode 100644 index 000000000000..1a548f304e06 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_job_extended_info.py @@ -0,0 +1,38 @@ +# 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 AzureWorkloadJobExtendedInfo(Model): + """Azure VM workload-specific additional information for job. + + :param tasks_list: List of tasks for this job + :type tasks_list: + list[~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadJobTaskDetails] + :param property_bag: Job properties. + :type property_bag: dict[str, str] + :param dynamic_error_message: Non localized error message on job + execution. + :type dynamic_error_message: str + """ + + _attribute_map = { + 'tasks_list': {'key': 'tasksList', 'type': '[AzureWorkloadJobTaskDetails]'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'dynamic_error_message': {'key': 'dynamicErrorMessage', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureWorkloadJobExtendedInfo, self).__init__(**kwargs) + self.tasks_list = kwargs.get('tasks_list', None) + self.property_bag = kwargs.get('property_bag', None) + self.dynamic_error_message = kwargs.get('dynamic_error_message', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_job_extended_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_job_extended_info_py3.py new file mode 100644 index 000000000000..3a4451a348d4 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_job_extended_info_py3.py @@ -0,0 +1,38 @@ +# 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 AzureWorkloadJobExtendedInfo(Model): + """Azure VM workload-specific additional information for job. + + :param tasks_list: List of tasks for this job + :type tasks_list: + list[~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadJobTaskDetails] + :param property_bag: Job properties. + :type property_bag: dict[str, str] + :param dynamic_error_message: Non localized error message on job + execution. + :type dynamic_error_message: str + """ + + _attribute_map = { + 'tasks_list': {'key': 'tasksList', 'type': '[AzureWorkloadJobTaskDetails]'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'dynamic_error_message': {'key': 'dynamicErrorMessage', 'type': 'str'}, + } + + def __init__(self, *, tasks_list=None, property_bag=None, dynamic_error_message: str=None, **kwargs) -> None: + super(AzureWorkloadJobExtendedInfo, self).__init__(**kwargs) + self.tasks_list = tasks_list + self.property_bag = property_bag + self.dynamic_error_message = dynamic_error_message diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_job_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_job_py3.py new file mode 100644 index 000000000000..f0790858750c --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_job_py3.py @@ -0,0 +1,80 @@ +# 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 .job_py3 import Job + + +class AzureWorkloadJob(Job): + """Azure storage specific job. + + All required parameters must be populated in order to send to Azure. + + :param entity_friendly_name: Friendly name of the entity on which the + current job is executing. + :type entity_friendly_name: str + :param backup_management_type: Backup management type to execute the + current job. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param operation: The operation name. + :type operation: str + :param status: Job status. + :type status: str + :param start_time: The start time. + :type start_time: datetime + :param end_time: The end time. + :type end_time: datetime + :param activity_id: ActivityId of job. + :type activity_id: str + :param job_type: Required. Constant filled by server. + :type job_type: str + :param duration: Time elapsed during the execution of this job. + :type duration: timedelta + :param actions_info: Gets or sets the state/actions applicable on this job + like cancel/retry. + :type actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] + :param error_details: Error details on execution of this job. + :type error_details: + list[~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadErrorInfo] + :param extended_info: Additional information about the job. + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadJobExtendedInfo + """ + + _validation = { + 'job_type': {'required': True}, + } + + _attribute_map = { + 'entity_friendly_name': {'key': 'entityFriendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'activity_id': {'key': 'activityId', 'type': 'str'}, + 'job_type': {'key': 'jobType', 'type': 'str'}, + 'duration': {'key': 'duration', 'type': 'duration'}, + 'actions_info': {'key': 'actionsInfo', 'type': '[JobSupportedAction]'}, + 'error_details': {'key': 'errorDetails', 'type': '[AzureWorkloadErrorInfo]'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureWorkloadJobExtendedInfo'}, + } + + def __init__(self, *, entity_friendly_name: str=None, backup_management_type=None, operation: str=None, status: str=None, start_time=None, end_time=None, activity_id: str=None, duration=None, actions_info=None, error_details=None, extended_info=None, **kwargs) -> None: + super(AzureWorkloadJob, self).__init__(entity_friendly_name=entity_friendly_name, backup_management_type=backup_management_type, operation=operation, status=status, start_time=start_time, end_time=end_time, activity_id=activity_id, **kwargs) + self.duration = duration + self.actions_info = actions_info + self.error_details = error_details + self.extended_info = extended_info + self.job_type = 'AzureWorkloadJob' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_job_task_details.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_job_task_details.py new file mode 100644 index 000000000000..c68497693480 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_job_task_details.py @@ -0,0 +1,32 @@ +# 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 AzureWorkloadJobTaskDetails(Model): + """Azure VM workload specific job task details. + + :param task_id: The task display name. + :type task_id: str + :param status: The status. + :type status: str + """ + + _attribute_map = { + 'task_id': {'key': 'taskId', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureWorkloadJobTaskDetails, self).__init__(**kwargs) + self.task_id = kwargs.get('task_id', None) + self.status = kwargs.get('status', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_job_task_details_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_job_task_details_py3.py new file mode 100644 index 000000000000..d6c57c91ecc7 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_job_task_details_py3.py @@ -0,0 +1,32 @@ +# 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 AzureWorkloadJobTaskDetails(Model): + """Azure VM workload specific job task details. + + :param task_id: The task display name. + :type task_id: str + :param status: The status. + :type status: str + """ + + _attribute_map = { + 'task_id': {'key': 'taskId', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, *, task_id: str=None, status: str=None, **kwargs) -> None: + super(AzureWorkloadJobTaskDetails, self).__init__(**kwargs) + self.task_id = task_id + self.status = status diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_recovery_point.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_recovery_point.py new file mode 100644 index 000000000000..aeda9faaf074 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_recovery_point.py @@ -0,0 +1,53 @@ +# 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 .recovery_point import RecoveryPoint + + +class AzureWorkloadRecoveryPoint(RecoveryPoint): + """Workload specific recoverypoint, specifcally encaspulates full/diff + recoverypoint. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureWorkloadSQLRecoveryPoint + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param recovery_point_time_in_utc: UTC time at which recoverypoint was + created + :type recovery_point_time_in_utc: datetime + :param type: Type of restore point. Possible values include: 'Invalid', + 'Full', 'Log', 'Differential' + :type type: str or + ~azure.mgmt.recoveryservicesbackup.models.RestorePointType + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_point_time_in_utc': {'key': 'recoveryPointTimeInUTC', 'type': 'iso-8601'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'AzureWorkloadSQLRecoveryPoint': 'AzureWorkloadSQLRecoveryPoint'} + } + + def __init__(self, **kwargs): + super(AzureWorkloadRecoveryPoint, self).__init__(**kwargs) + self.recovery_point_time_in_utc = kwargs.get('recovery_point_time_in_utc', None) + self.type = kwargs.get('type', None) + self.object_type = 'AzureWorkloadRecoveryPoint' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_recovery_point_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_recovery_point_py3.py new file mode 100644 index 000000000000..4faafb2eddbb --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_recovery_point_py3.py @@ -0,0 +1,53 @@ +# 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 .recovery_point_py3 import RecoveryPoint + + +class AzureWorkloadRecoveryPoint(RecoveryPoint): + """Workload specific recoverypoint, specifcally encaspulates full/diff + recoverypoint. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureWorkloadSQLRecoveryPoint + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param recovery_point_time_in_utc: UTC time at which recoverypoint was + created + :type recovery_point_time_in_utc: datetime + :param type: Type of restore point. Possible values include: 'Invalid', + 'Full', 'Log', 'Differential' + :type type: str or + ~azure.mgmt.recoveryservicesbackup.models.RestorePointType + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_point_time_in_utc': {'key': 'recoveryPointTimeInUTC', 'type': 'iso-8601'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'AzureWorkloadSQLRecoveryPoint': 'AzureWorkloadSQLRecoveryPoint'} + } + + def __init__(self, *, recovery_point_time_in_utc=None, type=None, **kwargs) -> None: + super(AzureWorkloadRecoveryPoint, self).__init__(**kwargs) + self.recovery_point_time_in_utc = recovery_point_time_in_utc + self.type = type + self.object_type = 'AzureWorkloadRecoveryPoint' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_restore_request.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_restore_request.py new file mode 100644 index 000000000000..e43a62db1768 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_restore_request.py @@ -0,0 +1,57 @@ +# 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 .restore_request import RestoreRequest + + +class AzureWorkloadRestoreRequest(RestoreRequest): + """AzureWorkload-specific restore. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureWorkloadSQLRestoreRequest + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param recovery_type: OLR/ALR, RestoreDisks is invalid option. Possible + values include: 'Invalid', 'OriginalLocation', 'AlternateLocation', + 'RestoreDisks' + :type recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :param source_resource_id: Fully qualified ARM ID of the VM on which + workload that was running is being recovered. + :type source_resource_id: str + :param property_bag: Workload specific property bag. + :type property_bag: dict[str, str] + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + } + + _subtype_map = { + 'object_type': {'AzureWorkloadSQLRestoreRequest': 'AzureWorkloadSQLRestoreRequest'} + } + + def __init__(self, **kwargs): + super(AzureWorkloadRestoreRequest, self).__init__(**kwargs) + self.recovery_type = kwargs.get('recovery_type', None) + self.source_resource_id = kwargs.get('source_resource_id', None) + self.property_bag = kwargs.get('property_bag', None) + self.object_type = 'AzureWorkloadRestoreRequest' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_restore_request_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_restore_request_py3.py new file mode 100644 index 000000000000..ad4b341ec594 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_restore_request_py3.py @@ -0,0 +1,57 @@ +# 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 .restore_request_py3 import RestoreRequest + + +class AzureWorkloadRestoreRequest(RestoreRequest): + """AzureWorkload-specific restore. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureWorkloadSQLRestoreRequest + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param recovery_type: OLR/ALR, RestoreDisks is invalid option. Possible + values include: 'Invalid', 'OriginalLocation', 'AlternateLocation', + 'RestoreDisks' + :type recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :param source_resource_id: Fully qualified ARM ID of the VM on which + workload that was running is being recovered. + :type source_resource_id: str + :param property_bag: Workload specific property bag. + :type property_bag: dict[str, str] + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + } + + _subtype_map = { + 'object_type': {'AzureWorkloadSQLRestoreRequest': 'AzureWorkloadSQLRestoreRequest'} + } + + def __init__(self, *, recovery_type=None, source_resource_id: str=None, property_bag=None, **kwargs) -> None: + super(AzureWorkloadRestoreRequest, self).__init__(**kwargs) + self.recovery_type = recovery_type + self.source_resource_id = source_resource_id + self.property_bag = property_bag + self.object_type = 'AzureWorkloadRestoreRequest' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_point_in_time_recovery_point.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_point_in_time_recovery_point.py new file mode 100644 index 000000000000..b4e7793833fd --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_point_in_time_recovery_point.py @@ -0,0 +1,56 @@ +# 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 .azure_workload_sql_recovery_point import AzureWorkloadSQLRecoveryPoint + + +class AzureWorkloadSQLPointInTimeRecoveryPoint(AzureWorkloadSQLRecoveryPoint): + """Recovery point specific to PointInTime. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param recovery_point_time_in_utc: UTC time at which recoverypoint was + created + :type recovery_point_time_in_utc: datetime + :param type: Type of restore point. Possible values include: 'Invalid', + 'Full', 'Log', 'Differential' + :type type: str or + ~azure.mgmt.recoveryservicesbackup.models.RestorePointType + :param extended_info: Extended Info that provides data directory details. + Will be populated in two cases: + When a specific recovery point is accessed using GetRecoveryPoint + Or when ListRecoveryPoints is called for Log RP only with ExtendedInfo + query filter + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadSQLRecoveryPointExtendedInfo + :param time_ranges: List of log ranges + :type time_ranges: + list[~azure.mgmt.recoveryservicesbackup.models.PointInTimeRange] + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_point_time_in_utc': {'key': 'recoveryPointTimeInUTC', 'type': 'iso-8601'}, + 'type': {'key': 'type', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureWorkloadSQLRecoveryPointExtendedInfo'}, + 'time_ranges': {'key': 'timeRanges', 'type': '[PointInTimeRange]'}, + } + + def __init__(self, **kwargs): + super(AzureWorkloadSQLPointInTimeRecoveryPoint, self).__init__(**kwargs) + self.time_ranges = kwargs.get('time_ranges', None) + self.object_type = 'AzureWorkloadSQLPointInTimeRecoveryPoint' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_point_in_time_recovery_point_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_point_in_time_recovery_point_py3.py new file mode 100644 index 000000000000..8a7f76ab55cd --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_point_in_time_recovery_point_py3.py @@ -0,0 +1,56 @@ +# 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 .azure_workload_sql_recovery_point_py3 import AzureWorkloadSQLRecoveryPoint + + +class AzureWorkloadSQLPointInTimeRecoveryPoint(AzureWorkloadSQLRecoveryPoint): + """Recovery point specific to PointInTime. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param recovery_point_time_in_utc: UTC time at which recoverypoint was + created + :type recovery_point_time_in_utc: datetime + :param type: Type of restore point. Possible values include: 'Invalid', + 'Full', 'Log', 'Differential' + :type type: str or + ~azure.mgmt.recoveryservicesbackup.models.RestorePointType + :param extended_info: Extended Info that provides data directory details. + Will be populated in two cases: + When a specific recovery point is accessed using GetRecoveryPoint + Or when ListRecoveryPoints is called for Log RP only with ExtendedInfo + query filter + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadSQLRecoveryPointExtendedInfo + :param time_ranges: List of log ranges + :type time_ranges: + list[~azure.mgmt.recoveryservicesbackup.models.PointInTimeRange] + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_point_time_in_utc': {'key': 'recoveryPointTimeInUTC', 'type': 'iso-8601'}, + 'type': {'key': 'type', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureWorkloadSQLRecoveryPointExtendedInfo'}, + 'time_ranges': {'key': 'timeRanges', 'type': '[PointInTimeRange]'}, + } + + def __init__(self, *, recovery_point_time_in_utc=None, type=None, extended_info=None, time_ranges=None, **kwargs) -> None: + super(AzureWorkloadSQLPointInTimeRecoveryPoint, self).__init__(recovery_point_time_in_utc=recovery_point_time_in_utc, type=type, extended_info=extended_info, **kwargs) + self.time_ranges = time_ranges + self.object_type = 'AzureWorkloadSQLPointInTimeRecoveryPoint' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_point_in_time_restore_request.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_point_in_time_restore_request.py new file mode 100644 index 000000000000..53c86acf62cd --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_point_in_time_restore_request.py @@ -0,0 +1,68 @@ +# 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 .azure_workload_sql_restore_request import AzureWorkloadSQLRestoreRequest + + +class AzureWorkloadSQLPointInTimeRestoreRequest(AzureWorkloadSQLRestoreRequest): + """AzureWorkload SQL -specific restore. Specifically for PointInTime/Log + restore. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param recovery_type: OLR/ALR, RestoreDisks is invalid option. Possible + values include: 'Invalid', 'OriginalLocation', 'AlternateLocation', + 'RestoreDisks' + :type recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :param source_resource_id: Fully qualified ARM ID of the VM on which + workload that was running is being recovered. + :type source_resource_id: str + :param property_bag: Workload specific property bag. + :type property_bag: dict[str, str] + :param should_use_alternate_target_location: Default option set to true. + If this is set to false, alternate data directory must be provided + :type should_use_alternate_target_location: bool + :param is_non_recoverable: SQL specific property where user can chose to + set no-recovery when restore operation is tried + :type is_non_recoverable: bool + :param target_info: Details of target database + :type target_info: + ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo + :param alternate_directory_paths: Data directory details + :type alternate_directory_paths: + list[~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectoryMapping] + :param point_in_time: PointInTime value + :type point_in_time: datetime + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'should_use_alternate_target_location': {'key': 'shouldUseAlternateTargetLocation', 'type': 'bool'}, + 'is_non_recoverable': {'key': 'isNonRecoverable', 'type': 'bool'}, + 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, + 'alternate_directory_paths': {'key': 'alternateDirectoryPaths', 'type': '[SQLDataDirectoryMapping]'}, + 'point_in_time': {'key': 'pointInTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(AzureWorkloadSQLPointInTimeRestoreRequest, self).__init__(**kwargs) + self.point_in_time = kwargs.get('point_in_time', None) + self.object_type = 'AzureWorkloadSQLPointInTimeRestoreRequest' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_point_in_time_restore_request_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_point_in_time_restore_request_py3.py new file mode 100644 index 000000000000..70352a9c2e58 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_point_in_time_restore_request_py3.py @@ -0,0 +1,68 @@ +# 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 .azure_workload_sql_restore_request_py3 import AzureWorkloadSQLRestoreRequest + + +class AzureWorkloadSQLPointInTimeRestoreRequest(AzureWorkloadSQLRestoreRequest): + """AzureWorkload SQL -specific restore. Specifically for PointInTime/Log + restore. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param recovery_type: OLR/ALR, RestoreDisks is invalid option. Possible + values include: 'Invalid', 'OriginalLocation', 'AlternateLocation', + 'RestoreDisks' + :type recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :param source_resource_id: Fully qualified ARM ID of the VM on which + workload that was running is being recovered. + :type source_resource_id: str + :param property_bag: Workload specific property bag. + :type property_bag: dict[str, str] + :param should_use_alternate_target_location: Default option set to true. + If this is set to false, alternate data directory must be provided + :type should_use_alternate_target_location: bool + :param is_non_recoverable: SQL specific property where user can chose to + set no-recovery when restore operation is tried + :type is_non_recoverable: bool + :param target_info: Details of target database + :type target_info: + ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo + :param alternate_directory_paths: Data directory details + :type alternate_directory_paths: + list[~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectoryMapping] + :param point_in_time: PointInTime value + :type point_in_time: datetime + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'should_use_alternate_target_location': {'key': 'shouldUseAlternateTargetLocation', 'type': 'bool'}, + 'is_non_recoverable': {'key': 'isNonRecoverable', 'type': 'bool'}, + 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, + 'alternate_directory_paths': {'key': 'alternateDirectoryPaths', 'type': '[SQLDataDirectoryMapping]'}, + 'point_in_time': {'key': 'pointInTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, recovery_type=None, source_resource_id: str=None, property_bag=None, should_use_alternate_target_location: bool=None, is_non_recoverable: bool=None, target_info=None, alternate_directory_paths=None, point_in_time=None, **kwargs) -> None: + super(AzureWorkloadSQLPointInTimeRestoreRequest, self).__init__(recovery_type=recovery_type, source_resource_id=source_resource_id, property_bag=property_bag, should_use_alternate_target_location=should_use_alternate_target_location, is_non_recoverable=is_non_recoverable, target_info=target_info, alternate_directory_paths=alternate_directory_paths, **kwargs) + self.point_in_time = point_in_time + self.object_type = 'AzureWorkloadSQLPointInTimeRestoreRequest' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_recovery_point.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_recovery_point.py new file mode 100644 index 000000000000..f5d3f2e04ab9 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_recovery_point.py @@ -0,0 +1,60 @@ +# 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 .azure_workload_recovery_point import AzureWorkloadRecoveryPoint + + +class AzureWorkloadSQLRecoveryPoint(AzureWorkloadRecoveryPoint): + """SQL specific recoverypoint, specifcally encaspulates full/diff + recoverypoint alongwith extended info. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureWorkloadSQLPointInTimeRecoveryPoint + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param recovery_point_time_in_utc: UTC time at which recoverypoint was + created + :type recovery_point_time_in_utc: datetime + :param type: Type of restore point. Possible values include: 'Invalid', + 'Full', 'Log', 'Differential' + :type type: str or + ~azure.mgmt.recoveryservicesbackup.models.RestorePointType + :param extended_info: Extended Info that provides data directory details. + Will be populated in two cases: + When a specific recovery point is accessed using GetRecoveryPoint + Or when ListRecoveryPoints is called for Log RP only with ExtendedInfo + query filter + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadSQLRecoveryPointExtendedInfo + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_point_time_in_utc': {'key': 'recoveryPointTimeInUTC', 'type': 'iso-8601'}, + 'type': {'key': 'type', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureWorkloadSQLRecoveryPointExtendedInfo'}, + } + + _subtype_map = { + 'object_type': {'AzureWorkloadSQLPointInTimeRecoveryPoint': 'AzureWorkloadSQLPointInTimeRecoveryPoint'} + } + + def __init__(self, **kwargs): + super(AzureWorkloadSQLRecoveryPoint, self).__init__(**kwargs) + self.extended_info = kwargs.get('extended_info', None) + self.object_type = 'AzureWorkloadSQLRecoveryPoint' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_recovery_point_extended_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_recovery_point_extended_info.py new file mode 100644 index 000000000000..e9833895048c --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_recovery_point_extended_info.py @@ -0,0 +1,35 @@ +# 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 AzureWorkloadSQLRecoveryPointExtendedInfo(Model): + """Extended info class details. + + :param data_directory_time_in_utc: UTC time at which data directory info + was captured + :type data_directory_time_in_utc: datetime + :param data_directory_paths: List of data directory paths during restore + operation. + :type data_directory_paths: + list[~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectory] + """ + + _attribute_map = { + 'data_directory_time_in_utc': {'key': 'dataDirectoryTimeInUTC', 'type': 'iso-8601'}, + 'data_directory_paths': {'key': 'dataDirectoryPaths', 'type': '[SQLDataDirectory]'}, + } + + def __init__(self, **kwargs): + super(AzureWorkloadSQLRecoveryPointExtendedInfo, self).__init__(**kwargs) + self.data_directory_time_in_utc = kwargs.get('data_directory_time_in_utc', None) + self.data_directory_paths = kwargs.get('data_directory_paths', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_recovery_point_extended_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_recovery_point_extended_info_py3.py new file mode 100644 index 000000000000..62481c5488bd --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_recovery_point_extended_info_py3.py @@ -0,0 +1,35 @@ +# 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 AzureWorkloadSQLRecoveryPointExtendedInfo(Model): + """Extended info class details. + + :param data_directory_time_in_utc: UTC time at which data directory info + was captured + :type data_directory_time_in_utc: datetime + :param data_directory_paths: List of data directory paths during restore + operation. + :type data_directory_paths: + list[~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectory] + """ + + _attribute_map = { + 'data_directory_time_in_utc': {'key': 'dataDirectoryTimeInUTC', 'type': 'iso-8601'}, + 'data_directory_paths': {'key': 'dataDirectoryPaths', 'type': '[SQLDataDirectory]'}, + } + + def __init__(self, *, data_directory_time_in_utc=None, data_directory_paths=None, **kwargs) -> None: + super(AzureWorkloadSQLRecoveryPointExtendedInfo, self).__init__(**kwargs) + self.data_directory_time_in_utc = data_directory_time_in_utc + self.data_directory_paths = data_directory_paths diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_recovery_point_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_recovery_point_py3.py new file mode 100644 index 000000000000..a7463257dd06 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_recovery_point_py3.py @@ -0,0 +1,60 @@ +# 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 .azure_workload_recovery_point_py3 import AzureWorkloadRecoveryPoint + + +class AzureWorkloadSQLRecoveryPoint(AzureWorkloadRecoveryPoint): + """SQL specific recoverypoint, specifcally encaspulates full/diff + recoverypoint alongwith extended info. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureWorkloadSQLPointInTimeRecoveryPoint + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param recovery_point_time_in_utc: UTC time at which recoverypoint was + created + :type recovery_point_time_in_utc: datetime + :param type: Type of restore point. Possible values include: 'Invalid', + 'Full', 'Log', 'Differential' + :type type: str or + ~azure.mgmt.recoveryservicesbackup.models.RestorePointType + :param extended_info: Extended Info that provides data directory details. + Will be populated in two cases: + When a specific recovery point is accessed using GetRecoveryPoint + Or when ListRecoveryPoints is called for Log RP only with ExtendedInfo + query filter + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadSQLRecoveryPointExtendedInfo + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_point_time_in_utc': {'key': 'recoveryPointTimeInUTC', 'type': 'iso-8601'}, + 'type': {'key': 'type', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureWorkloadSQLRecoveryPointExtendedInfo'}, + } + + _subtype_map = { + 'object_type': {'AzureWorkloadSQLPointInTimeRecoveryPoint': 'AzureWorkloadSQLPointInTimeRecoveryPoint'} + } + + def __init__(self, *, recovery_point_time_in_utc=None, type=None, extended_info=None, **kwargs) -> None: + super(AzureWorkloadSQLRecoveryPoint, self).__init__(recovery_point_time_in_utc=recovery_point_time_in_utc, type=type, **kwargs) + self.extended_info = extended_info + self.object_type = 'AzureWorkloadSQLRecoveryPoint' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_restore_request.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_restore_request.py new file mode 100644 index 000000000000..536e4afe3713 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_restore_request.py @@ -0,0 +1,74 @@ +# 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 .azure_workload_restore_request import AzureWorkloadRestoreRequest + + +class AzureWorkloadSQLRestoreRequest(AzureWorkloadRestoreRequest): + """AzureWorkload SQL -specific restore. Specifically for full/diff restore. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureWorkloadSQLPointInTimeRestoreRequest + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param recovery_type: OLR/ALR, RestoreDisks is invalid option. Possible + values include: 'Invalid', 'OriginalLocation', 'AlternateLocation', + 'RestoreDisks' + :type recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :param source_resource_id: Fully qualified ARM ID of the VM on which + workload that was running is being recovered. + :type source_resource_id: str + :param property_bag: Workload specific property bag. + :type property_bag: dict[str, str] + :param should_use_alternate_target_location: Default option set to true. + If this is set to false, alternate data directory must be provided + :type should_use_alternate_target_location: bool + :param is_non_recoverable: SQL specific property where user can chose to + set no-recovery when restore operation is tried + :type is_non_recoverable: bool + :param target_info: Details of target database + :type target_info: + ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo + :param alternate_directory_paths: Data directory details + :type alternate_directory_paths: + list[~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectoryMapping] + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'should_use_alternate_target_location': {'key': 'shouldUseAlternateTargetLocation', 'type': 'bool'}, + 'is_non_recoverable': {'key': 'isNonRecoverable', 'type': 'bool'}, + 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, + 'alternate_directory_paths': {'key': 'alternateDirectoryPaths', 'type': '[SQLDataDirectoryMapping]'}, + } + + _subtype_map = { + 'object_type': {'AzureWorkloadSQLPointInTimeRestoreRequest': 'AzureWorkloadSQLPointInTimeRestoreRequest'} + } + + def __init__(self, **kwargs): + super(AzureWorkloadSQLRestoreRequest, self).__init__(**kwargs) + self.should_use_alternate_target_location = kwargs.get('should_use_alternate_target_location', None) + self.is_non_recoverable = kwargs.get('is_non_recoverable', None) + self.target_info = kwargs.get('target_info', None) + self.alternate_directory_paths = kwargs.get('alternate_directory_paths', None) + self.object_type = 'AzureWorkloadSQLRestoreRequest' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_restore_request_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_restore_request_py3.py new file mode 100644 index 000000000000..711bb4f1d18d --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_workload_sql_restore_request_py3.py @@ -0,0 +1,74 @@ +# 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 .azure_workload_restore_request_py3 import AzureWorkloadRestoreRequest + + +class AzureWorkloadSQLRestoreRequest(AzureWorkloadRestoreRequest): + """AzureWorkload SQL -specific restore. Specifically for full/diff restore. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureWorkloadSQLPointInTimeRestoreRequest + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param recovery_type: OLR/ALR, RestoreDisks is invalid option. Possible + values include: 'Invalid', 'OriginalLocation', 'AlternateLocation', + 'RestoreDisks' + :type recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :param source_resource_id: Fully qualified ARM ID of the VM on which + workload that was running is being recovered. + :type source_resource_id: str + :param property_bag: Workload specific property bag. + :type property_bag: dict[str, str] + :param should_use_alternate_target_location: Default option set to true. + If this is set to false, alternate data directory must be provided + :type should_use_alternate_target_location: bool + :param is_non_recoverable: SQL specific property where user can chose to + set no-recovery when restore operation is tried + :type is_non_recoverable: bool + :param target_info: Details of target database + :type target_info: + ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo + :param alternate_directory_paths: Data directory details + :type alternate_directory_paths: + list[~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectoryMapping] + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'should_use_alternate_target_location': {'key': 'shouldUseAlternateTargetLocation', 'type': 'bool'}, + 'is_non_recoverable': {'key': 'isNonRecoverable', 'type': 'bool'}, + 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, + 'alternate_directory_paths': {'key': 'alternateDirectoryPaths', 'type': '[SQLDataDirectoryMapping]'}, + } + + _subtype_map = { + 'object_type': {'AzureWorkloadSQLPointInTimeRestoreRequest': 'AzureWorkloadSQLPointInTimeRestoreRequest'} + } + + def __init__(self, *, recovery_type=None, source_resource_id: str=None, property_bag=None, should_use_alternate_target_location: bool=None, is_non_recoverable: bool=None, target_info=None, alternate_directory_paths=None, **kwargs) -> None: + super(AzureWorkloadSQLRestoreRequest, self).__init__(recovery_type=recovery_type, source_resource_id=source_resource_id, property_bag=property_bag, **kwargs) + self.should_use_alternate_target_location = should_use_alternate_target_location + self.is_non_recoverable = is_non_recoverable + self.target_info = target_info + self.alternate_directory_paths = alternate_directory_paths + self.object_type = 'AzureWorkloadSQLRestoreRequest' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_engine_base.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_engine_base.py index f9b91db0a01a..0cdb3706c690 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_engine_base.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_engine_base.py @@ -16,13 +16,19 @@ class BackupEngineBase(Model): """The base backup engine class. All workload specific backup engines derive from this class. + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureBackupServerEngine, DpmBackupEngine + + All required parameters must be populated in order to send to Azure. + :param friendly_name: Friendly name of the backup engine. :type friendly_name: str :param backup_management_type: Type of backup management for the backup engine. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', - 'AzureBackupServer', 'AzureSql' - :type backup_management_type: str or :class:`BackupManagementType - ` + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType :param registration_status: Registration status of the backup engine with the Recovery Services Vault. :type registration_status: str @@ -47,9 +53,9 @@ class BackupEngineBase(Model): available :type is_dpm_upgrade_available: bool :param extended_info: Extended info of the backupengine - :type extended_info: :class:`BackupEngineExtendedInfo - ` - :param backup_engine_type: Polymorphic Discriminator + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.BackupEngineExtendedInfo + :param backup_engine_type: Required. Constant filled by server. :type backup_engine_type: str """ @@ -68,7 +74,7 @@ class BackupEngineBase(Model): 'dpm_version': {'key': 'dpmVersion', 'type': 'str'}, 'azure_backup_agent_version': {'key': 'azureBackupAgentVersion', 'type': 'str'}, 'is_azure_backup_agent_upgrade_available': {'key': 'isAzureBackupAgentUpgradeAvailable', 'type': 'bool'}, - 'is_dpm_upgrade_available': {'key': 'isDPMUpgradeAvailable', 'type': 'bool'}, + 'is_dpm_upgrade_available': {'key': 'isDpmUpgradeAvailable', 'type': 'bool'}, 'extended_info': {'key': 'extendedInfo', 'type': 'BackupEngineExtendedInfo'}, 'backup_engine_type': {'key': 'backupEngineType', 'type': 'str'}, } @@ -77,17 +83,18 @@ class BackupEngineBase(Model): 'backup_engine_type': {'AzureBackupServerEngine': 'AzureBackupServerEngine', 'DpmBackupEngine': 'DpmBackupEngine'} } - def __init__(self, friendly_name=None, backup_management_type=None, registration_status=None, backup_engine_state=None, health_status=None, can_re_register=None, backup_engine_id=None, dpm_version=None, azure_backup_agent_version=None, is_azure_backup_agent_upgrade_available=None, is_dpm_upgrade_available=None, extended_info=None): - self.friendly_name = friendly_name - self.backup_management_type = backup_management_type - self.registration_status = registration_status - self.backup_engine_state = backup_engine_state - self.health_status = health_status - self.can_re_register = can_re_register - self.backup_engine_id = backup_engine_id - self.dpm_version = dpm_version - self.azure_backup_agent_version = azure_backup_agent_version - self.is_azure_backup_agent_upgrade_available = is_azure_backup_agent_upgrade_available - self.is_dpm_upgrade_available = is_dpm_upgrade_available - self.extended_info = extended_info + def __init__(self, **kwargs): + super(BackupEngineBase, self).__init__(**kwargs) + self.friendly_name = kwargs.get('friendly_name', None) + self.backup_management_type = kwargs.get('backup_management_type', None) + self.registration_status = kwargs.get('registration_status', None) + self.backup_engine_state = kwargs.get('backup_engine_state', None) + self.health_status = kwargs.get('health_status', None) + self.can_re_register = kwargs.get('can_re_register', None) + self.backup_engine_id = kwargs.get('backup_engine_id', None) + self.dpm_version = kwargs.get('dpm_version', None) + self.azure_backup_agent_version = kwargs.get('azure_backup_agent_version', None) + self.is_azure_backup_agent_upgrade_available = kwargs.get('is_azure_backup_agent_upgrade_available', None) + self.is_dpm_upgrade_available = kwargs.get('is_dpm_upgrade_available', None) + self.extended_info = kwargs.get('extended_info', None) self.backup_engine_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_engine_base_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_engine_base_py3.py new file mode 100644 index 000000000000..ec49d322d2cb --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_engine_base_py3.py @@ -0,0 +1,100 @@ +# 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 BackupEngineBase(Model): + """The base backup engine class. All workload specific backup engines derive + from this class. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureBackupServerEngine, DpmBackupEngine + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name of the backup engine. + :type friendly_name: str + :param backup_management_type: Type of backup management for the backup + engine. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param registration_status: Registration status of the backup engine with + the Recovery Services Vault. + :type registration_status: str + :param backup_engine_state: Status of the backup engine with the Recovery + Services Vault. = {Active/Deleting/DeleteFailed} + :type backup_engine_state: str + :param health_status: Backup status of the backup engine. + :type health_status: str + :param can_re_register: Flag indicating if the backup engine be + registered, once already registered. + :type can_re_register: bool + :param backup_engine_id: ID of the backup engine. + :type backup_engine_id: str + :param dpm_version: Backup engine version + :type dpm_version: str + :param azure_backup_agent_version: Backup agent version + :type azure_backup_agent_version: str + :param is_azure_backup_agent_upgrade_available: To check if backup agent + upgrade available + :type is_azure_backup_agent_upgrade_available: bool + :param is_dpm_upgrade_available: To check if backup engine upgrade + available + :type is_dpm_upgrade_available: bool + :param extended_info: Extended info of the backupengine + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.BackupEngineExtendedInfo + :param backup_engine_type: Required. Constant filled by server. + :type backup_engine_type: str + """ + + _validation = { + 'backup_engine_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'backup_engine_state': {'key': 'backupEngineState', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'can_re_register': {'key': 'canReRegister', 'type': 'bool'}, + 'backup_engine_id': {'key': 'backupEngineId', 'type': 'str'}, + 'dpm_version': {'key': 'dpmVersion', 'type': 'str'}, + 'azure_backup_agent_version': {'key': 'azureBackupAgentVersion', 'type': 'str'}, + 'is_azure_backup_agent_upgrade_available': {'key': 'isAzureBackupAgentUpgradeAvailable', 'type': 'bool'}, + 'is_dpm_upgrade_available': {'key': 'isDpmUpgradeAvailable', 'type': 'bool'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'BackupEngineExtendedInfo'}, + 'backup_engine_type': {'key': 'backupEngineType', 'type': 'str'}, + } + + _subtype_map = { + 'backup_engine_type': {'AzureBackupServerEngine': 'AzureBackupServerEngine', 'DpmBackupEngine': 'DpmBackupEngine'} + } + + def __init__(self, *, friendly_name: str=None, backup_management_type=None, registration_status: str=None, backup_engine_state: str=None, health_status: str=None, can_re_register: bool=None, backup_engine_id: str=None, dpm_version: str=None, azure_backup_agent_version: str=None, is_azure_backup_agent_upgrade_available: bool=None, is_dpm_upgrade_available: bool=None, extended_info=None, **kwargs) -> None: + super(BackupEngineBase, self).__init__(**kwargs) + self.friendly_name = friendly_name + self.backup_management_type = backup_management_type + self.registration_status = registration_status + self.backup_engine_state = backup_engine_state + self.health_status = health_status + self.can_re_register = can_re_register + self.backup_engine_id = backup_engine_id + self.dpm_version = dpm_version + self.azure_backup_agent_version = azure_backup_agent_version + self.is_azure_backup_agent_upgrade_available = is_azure_backup_agent_upgrade_available + self.is_dpm_upgrade_available = is_dpm_upgrade_available + self.extended_info = extended_info + self.backup_engine_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_engine_base_resource.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_engine_base_resource.py index 52253a45d182..ae46131075b6 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_engine_base_resource.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_engine_base_resource.py @@ -29,12 +29,12 @@ class BackupEngineBaseResource(Resource): :param location: Resource location. :type location: str :param tags: Resource tags. - :type tags: dict + :type tags: dict[str, str] :param e_tag: Optional ETag. :type e_tag: str :param properties: BackupEngineBaseResource properties - :type properties: :class:`BackupEngineBase - ` + :type properties: + ~azure.mgmt.recoveryservicesbackup.models.BackupEngineBase """ _validation = { @@ -53,6 +53,6 @@ class BackupEngineBaseResource(Resource): 'properties': {'key': 'properties', 'type': 'BackupEngineBase'}, } - def __init__(self, location=None, tags=None, e_tag=None, properties=None): - super(BackupEngineBaseResource, self).__init__(location=location, tags=tags, e_tag=e_tag) - self.properties = properties + def __init__(self, **kwargs): + super(BackupEngineBaseResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_engine_base_resource_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_engine_base_resource_py3.py new file mode 100644 index 000000000000..45748b34a630 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_engine_base_resource_py3.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class BackupEngineBaseResource(Resource): + """The base backup engine class. All workload specific backup engines derive + from this class. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param e_tag: Optional ETag. + :type e_tag: str + :param properties: BackupEngineBaseResource properties + :type properties: + ~azure.mgmt.recoveryservicesbackup.models.BackupEngineBase + """ + + _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}'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'BackupEngineBase'}, + } + + def __init__(self, *, location: str=None, tags=None, e_tag: str=None, properties=None, **kwargs) -> None: + super(BackupEngineBaseResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) + self.properties = properties diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_engine_extended_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_engine_extended_info.py index ea92d78c0f97..77f8334ce9f7 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_engine_extended_info.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_engine_extended_info.py @@ -48,12 +48,13 @@ class BackupEngineExtendedInfo(Model): 'azure_protected_instances': {'key': 'azureProtectedInstances', 'type': 'int'}, } - def __init__(self, database_name=None, protected_items_count=None, protected_servers_count=None, disk_count=None, used_disk_space=None, available_disk_space=None, refreshed_at=None, azure_protected_instances=None): - self.database_name = database_name - self.protected_items_count = protected_items_count - self.protected_servers_count = protected_servers_count - self.disk_count = disk_count - self.used_disk_space = used_disk_space - self.available_disk_space = available_disk_space - self.refreshed_at = refreshed_at - self.azure_protected_instances = azure_protected_instances + def __init__(self, **kwargs): + super(BackupEngineExtendedInfo, self).__init__(**kwargs) + self.database_name = kwargs.get('database_name', None) + self.protected_items_count = kwargs.get('protected_items_count', None) + self.protected_servers_count = kwargs.get('protected_servers_count', None) + self.disk_count = kwargs.get('disk_count', None) + self.used_disk_space = kwargs.get('used_disk_space', None) + self.available_disk_space = kwargs.get('available_disk_space', None) + self.refreshed_at = kwargs.get('refreshed_at', None) + self.azure_protected_instances = kwargs.get('azure_protected_instances', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_engine_extended_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_engine_extended_info_py3.py new file mode 100644 index 000000000000..4631dc11e281 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_engine_extended_info_py3.py @@ -0,0 +1,60 @@ +# 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 BackupEngineExtendedInfo(Model): + """Additional information on backup engine. + + :param database_name: Database name of backup engine. + :type database_name: str + :param protected_items_count: Number of protected items in the backup + engine. + :type protected_items_count: int + :param protected_servers_count: Number of protected servers in the backup + engine. + :type protected_servers_count: int + :param disk_count: Number of disks in the backup engine. + :type disk_count: int + :param used_disk_space: Diskspace used in the backup engine. + :type used_disk_space: float + :param available_disk_space: Diskspace currently available in the backup + engine. + :type available_disk_space: float + :param refreshed_at: Last refresh time in the backup engine. + :type refreshed_at: datetime + :param azure_protected_instances: Protected instances in the backup + engine. + :type azure_protected_instances: int + """ + + _attribute_map = { + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, + 'protected_servers_count': {'key': 'protectedServersCount', 'type': 'int'}, + 'disk_count': {'key': 'diskCount', 'type': 'int'}, + 'used_disk_space': {'key': 'usedDiskSpace', 'type': 'float'}, + 'available_disk_space': {'key': 'availableDiskSpace', 'type': 'float'}, + 'refreshed_at': {'key': 'refreshedAt', 'type': 'iso-8601'}, + 'azure_protected_instances': {'key': 'azureProtectedInstances', 'type': 'int'}, + } + + def __init__(self, *, database_name: str=None, protected_items_count: int=None, protected_servers_count: int=None, disk_count: int=None, used_disk_space: float=None, available_disk_space: float=None, refreshed_at=None, azure_protected_instances: int=None, **kwargs) -> None: + super(BackupEngineExtendedInfo, self).__init__(**kwargs) + self.database_name = database_name + self.protected_items_count = protected_items_count + self.protected_servers_count = protected_servers_count + self.disk_count = disk_count + self.used_disk_space = used_disk_space + self.available_disk_space = available_disk_space + self.refreshed_at = refreshed_at + self.azure_protected_instances = azure_protected_instances diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_management_usage.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_management_usage.py index 1d9f79b02464..5270e7fb4f16 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_management_usage.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_management_usage.py @@ -17,8 +17,7 @@ class BackupManagementUsage(Model): :param unit: Unit of the usage. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond' - :type unit: str or :class:`UsagesUnit - ` + :type unit: str or ~azure.mgmt.recoveryservicesbackup.models.UsagesUnit :param quota_period: Quota period of usage. :type quota_period: str :param next_reset_time: Next reset time of usage. @@ -28,8 +27,7 @@ class BackupManagementUsage(Model): :param limit: Limit of usage. :type limit: long :param name: Name of usage. - :type name: :class:`NameInfo - ` + :type name: ~azure.mgmt.recoveryservicesbackup.models.NameInfo """ _attribute_map = { @@ -41,10 +39,11 @@ class BackupManagementUsage(Model): 'name': {'key': 'name', 'type': 'NameInfo'}, } - def __init__(self, unit=None, quota_period=None, next_reset_time=None, current_value=None, limit=None, name=None): - self.unit = unit - self.quota_period = quota_period - self.next_reset_time = next_reset_time - self.current_value = current_value - self.limit = limit - self.name = name + def __init__(self, **kwargs): + super(BackupManagementUsage, self).__init__(**kwargs) + self.unit = kwargs.get('unit', None) + self.quota_period = kwargs.get('quota_period', None) + self.next_reset_time = kwargs.get('next_reset_time', None) + self.current_value = kwargs.get('current_value', None) + self.limit = kwargs.get('limit', None) + self.name = kwargs.get('name', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_management_usage_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_management_usage_py3.py new file mode 100644 index 000000000000..32baaa0cc26d --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_management_usage_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BackupManagementUsage(Model): + """Backup management usages of a vault. + + :param unit: Unit of the usage. Possible values include: 'Count', 'Bytes', + 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond' + :type unit: str or ~azure.mgmt.recoveryservicesbackup.models.UsagesUnit + :param quota_period: Quota period of usage. + :type quota_period: str + :param next_reset_time: Next reset time of usage. + :type next_reset_time: datetime + :param current_value: Current value of usage. + :type current_value: long + :param limit: Limit of usage. + :type limit: long + :param name: Name of usage. + :type name: ~azure.mgmt.recoveryservicesbackup.models.NameInfo + """ + + _attribute_map = { + 'unit': {'key': 'unit', 'type': 'str'}, + 'quota_period': {'key': 'quotaPeriod', 'type': 'str'}, + 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, + 'current_value': {'key': 'currentValue', 'type': 'long'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'NameInfo'}, + } + + def __init__(self, *, unit=None, quota_period: str=None, next_reset_time=None, current_value: int=None, limit: int=None, name=None, **kwargs) -> None: + super(BackupManagementUsage, self).__init__(**kwargs) + self.unit = unit + self.quota_period = quota_period + self.next_reset_time = next_reset_time + self.current_value = current_value + self.limit = limit + self.name = name diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_request.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_request.py index e4669df9bd3e..767c62f47a94 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_request.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_request.py @@ -16,7 +16,13 @@ class BackupRequest(Model): """Base class for backup request. Workload-specific backup requests are derived from this class. - :param object_type: Polymorphic Discriminator + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureFileShareBackupRequest, AzureWorkloadBackupRequest, + IaasVMBackupRequest + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. :type object_type: str """ @@ -29,8 +35,9 @@ class BackupRequest(Model): } _subtype_map = { - 'object_type': {'IaasVMBackupRequest': 'IaasVMBackupRequest'} + 'object_type': {'AzureFileShareBackupRequest': 'AzureFileShareBackupRequest', 'AzureWorkloadBackupRequest': 'AzureWorkloadBackupRequest', 'IaasVMBackupRequest': 'IaasVMBackupRequest'} } - def __init__(self): + def __init__(self, **kwargs): + super(BackupRequest, self).__init__(**kwargs) self.object_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_request_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_request_py3.py new file mode 100644 index 000000000000..cfff72e59785 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_request_py3.py @@ -0,0 +1,43 @@ +# 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 BackupRequest(Model): + """Base class for backup request. Workload-specific backup requests are + derived from this class. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureFileShareBackupRequest, AzureWorkloadBackupRequest, + IaasVMBackupRequest + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'AzureFileShareBackupRequest': 'AzureFileShareBackupRequest', 'AzureWorkloadBackupRequest': 'AzureWorkloadBackupRequest', 'IaasVMBackupRequest': 'IaasVMBackupRequest'} + } + + def __init__(self, **kwargs) -> None: + super(BackupRequest, self).__init__(**kwargs) + self.object_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_request_resource.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_request_resource.py index 715e406bee74..6a44c20b9fd9 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_request_resource.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_request_resource.py @@ -29,12 +29,11 @@ class BackupRequestResource(Resource): :param location: Resource location. :type location: str :param tags: Resource tags. - :type tags: dict + :type tags: dict[str, str] :param e_tag: Optional ETag. :type e_tag: str :param properties: BackupRequestResource properties - :type properties: :class:`BackupRequest - ` + :type properties: ~azure.mgmt.recoveryservicesbackup.models.BackupRequest """ _validation = { @@ -53,6 +52,6 @@ class BackupRequestResource(Resource): 'properties': {'key': 'properties', 'type': 'BackupRequest'}, } - def __init__(self, location=None, tags=None, e_tag=None, properties=None): - super(BackupRequestResource, self).__init__(location=location, tags=tags, e_tag=e_tag) - self.properties = properties + def __init__(self, **kwargs): + super(BackupRequestResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_request_resource_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_request_resource_py3.py new file mode 100644 index 000000000000..d251d72bfeea --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_request_resource_py3.py @@ -0,0 +1,57 @@ +# 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 BackupRequestResource(Resource): + """Base class for backup request. Workload-specific backup requests are + derived from this class. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param e_tag: Optional ETag. + :type e_tag: str + :param properties: BackupRequestResource properties + :type properties: ~azure.mgmt.recoveryservicesbackup.models.BackupRequest + """ + + _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}'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'BackupRequest'}, + } + + def __init__(self, *, location: str=None, tags=None, e_tag: str=None, properties=None, **kwargs) -> None: + super(BackupRequestResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) + self.properties = properties diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_resource_config.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_resource_config.py index aff6daa3398b..e3aa05d35790 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_resource_config.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_resource_config.py @@ -15,22 +15,29 @@ class BackupResourceConfig(Model): """The resource storage details. + :param storage_model_type: Storage type. Possible values include: + 'Invalid', 'GeoRedundant', 'LocallyRedundant' + :type storage_model_type: str or + ~azure.mgmt.recoveryservicesbackup.models.StorageType :param storage_type: Storage type. Possible values include: 'Invalid', 'GeoRedundant', 'LocallyRedundant' - :type storage_type: str or :class:`StorageType - ` + :type storage_type: str or + ~azure.mgmt.recoveryservicesbackup.models.StorageType :param storage_type_state: Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is always Locked. Possible values include: 'Invalid', 'Locked', 'Unlocked' - :type storage_type_state: str or :class:`StorageTypeState - ` + :type storage_type_state: str or + ~azure.mgmt.recoveryservicesbackup.models.StorageTypeState """ _attribute_map = { + 'storage_model_type': {'key': 'storageModelType', 'type': 'str'}, 'storage_type': {'key': 'storageType', 'type': 'str'}, 'storage_type_state': {'key': 'storageTypeState', 'type': 'str'}, } - def __init__(self, storage_type=None, storage_type_state=None): - self.storage_type = storage_type - self.storage_type_state = storage_type_state + def __init__(self, **kwargs): + super(BackupResourceConfig, self).__init__(**kwargs) + self.storage_model_type = kwargs.get('storage_model_type', None) + self.storage_type = kwargs.get('storage_type', None) + self.storage_type_state = kwargs.get('storage_type_state', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_resource_config_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_resource_config_py3.py new file mode 100644 index 000000000000..2a2521a6d519 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_resource_config_py3.py @@ -0,0 +1,43 @@ +# 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 BackupResourceConfig(Model): + """The resource storage details. + + :param storage_model_type: Storage type. Possible values include: + 'Invalid', 'GeoRedundant', 'LocallyRedundant' + :type storage_model_type: str or + ~azure.mgmt.recoveryservicesbackup.models.StorageType + :param storage_type: Storage type. Possible values include: 'Invalid', + 'GeoRedundant', 'LocallyRedundant' + :type storage_type: str or + ~azure.mgmt.recoveryservicesbackup.models.StorageType + :param storage_type_state: Locked or Unlocked. Once a machine is + registered against a resource, the storageTypeState is always Locked. + Possible values include: 'Invalid', 'Locked', 'Unlocked' + :type storage_type_state: str or + ~azure.mgmt.recoveryservicesbackup.models.StorageTypeState + """ + + _attribute_map = { + 'storage_model_type': {'key': 'storageModelType', 'type': 'str'}, + 'storage_type': {'key': 'storageType', 'type': 'str'}, + 'storage_type_state': {'key': 'storageTypeState', 'type': 'str'}, + } + + def __init__(self, *, storage_model_type=None, storage_type=None, storage_type_state=None, **kwargs) -> None: + super(BackupResourceConfig, self).__init__(**kwargs) + self.storage_model_type = storage_model_type + self.storage_type = storage_type + self.storage_type_state = storage_type_state diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_resource_config_resource.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_resource_config_resource.py index 2e5004998915..bbe4915987ce 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_resource_config_resource.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_resource_config_resource.py @@ -28,12 +28,12 @@ class BackupResourceConfigResource(Resource): :param location: Resource location. :type location: str :param tags: Resource tags. - :type tags: dict + :type tags: dict[str, str] :param e_tag: Optional ETag. :type e_tag: str :param properties: BackupResourceConfigResource properties - :type properties: :class:`BackupResourceConfig - ` + :type properties: + ~azure.mgmt.recoveryservicesbackup.models.BackupResourceConfig """ _validation = { @@ -52,6 +52,6 @@ class BackupResourceConfigResource(Resource): 'properties': {'key': 'properties', 'type': 'BackupResourceConfig'}, } - def __init__(self, location=None, tags=None, e_tag=None, properties=None): - super(BackupResourceConfigResource, self).__init__(location=location, tags=tags, e_tag=e_tag) - self.properties = properties + def __init__(self, **kwargs): + super(BackupResourceConfigResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_resource_config_resource_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_resource_config_resource_py3.py new file mode 100644 index 000000000000..fc12fbd0c9cc --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_resource_config_resource_py3.py @@ -0,0 +1,57 @@ +# 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 BackupResourceConfigResource(Resource): + """The resource storage details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param e_tag: Optional ETag. + :type e_tag: str + :param properties: BackupResourceConfigResource properties + :type properties: + ~azure.mgmt.recoveryservicesbackup.models.BackupResourceConfig + """ + + _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}'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'BackupResourceConfig'}, + } + + def __init__(self, *, location: str=None, tags=None, e_tag: str=None, properties=None, **kwargs) -> None: + super(BackupResourceConfigResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) + self.properties = properties diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_resource_vault_config.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_resource_vault_config.py index bd3af53de403..dfd35a8188ca 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_resource_vault_config.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_resource_vault_config.py @@ -15,28 +15,35 @@ class BackupResourceVaultConfig(Model): """Backup resource vault config details. + :param storage_model_type: Storage type. Possible values include: + 'Invalid', 'GeoRedundant', 'LocallyRedundant' + :type storage_model_type: str or + ~azure.mgmt.recoveryservicesbackup.models.StorageType :param storage_type: Storage type. Possible values include: 'Invalid', 'GeoRedundant', 'LocallyRedundant' - :type storage_type: str or :class:`StorageType - ` + :type storage_type: str or + ~azure.mgmt.recoveryservicesbackup.models.StorageType :param storage_type_state: Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is always Locked. Possible values include: 'Invalid', 'Locked', 'Unlocked' - :type storage_type_state: str or :class:`StorageTypeState - ` + :type storage_type_state: str or + ~azure.mgmt.recoveryservicesbackup.models.StorageTypeState :param enhanced_security_state: Enabled or Disabled. Possible values include: 'Invalid', 'Enabled', 'Disabled' - :type enhanced_security_state: str or :class:`EnhancedSecurityState - ` + :type enhanced_security_state: str or + ~azure.mgmt.recoveryservicesbackup.models.EnhancedSecurityState """ _attribute_map = { + 'storage_model_type': {'key': 'storageModelType', 'type': 'str'}, 'storage_type': {'key': 'storageType', 'type': 'str'}, 'storage_type_state': {'key': 'storageTypeState', 'type': 'str'}, 'enhanced_security_state': {'key': 'enhancedSecurityState', 'type': 'str'}, } - def __init__(self, storage_type=None, storage_type_state=None, enhanced_security_state=None): - self.storage_type = storage_type - self.storage_type_state = storage_type_state - self.enhanced_security_state = enhanced_security_state + def __init__(self, **kwargs): + super(BackupResourceVaultConfig, self).__init__(**kwargs) + self.storage_model_type = kwargs.get('storage_model_type', None) + self.storage_type = kwargs.get('storage_type', None) + self.storage_type_state = kwargs.get('storage_type_state', None) + self.enhanced_security_state = kwargs.get('enhanced_security_state', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_resource_vault_config_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_resource_vault_config_py3.py new file mode 100644 index 000000000000..89a2b66157c2 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_resource_vault_config_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BackupResourceVaultConfig(Model): + """Backup resource vault config details. + + :param storage_model_type: Storage type. Possible values include: + 'Invalid', 'GeoRedundant', 'LocallyRedundant' + :type storage_model_type: str or + ~azure.mgmt.recoveryservicesbackup.models.StorageType + :param storage_type: Storage type. Possible values include: 'Invalid', + 'GeoRedundant', 'LocallyRedundant' + :type storage_type: str or + ~azure.mgmt.recoveryservicesbackup.models.StorageType + :param storage_type_state: Locked or Unlocked. Once a machine is + registered against a resource, the storageTypeState is always Locked. + Possible values include: 'Invalid', 'Locked', 'Unlocked' + :type storage_type_state: str or + ~azure.mgmt.recoveryservicesbackup.models.StorageTypeState + :param enhanced_security_state: Enabled or Disabled. Possible values + include: 'Invalid', 'Enabled', 'Disabled' + :type enhanced_security_state: str or + ~azure.mgmt.recoveryservicesbackup.models.EnhancedSecurityState + """ + + _attribute_map = { + 'storage_model_type': {'key': 'storageModelType', 'type': 'str'}, + 'storage_type': {'key': 'storageType', 'type': 'str'}, + 'storage_type_state': {'key': 'storageTypeState', 'type': 'str'}, + 'enhanced_security_state': {'key': 'enhancedSecurityState', 'type': 'str'}, + } + + def __init__(self, *, storage_model_type=None, storage_type=None, storage_type_state=None, enhanced_security_state=None, **kwargs) -> None: + super(BackupResourceVaultConfig, self).__init__(**kwargs) + self.storage_model_type = storage_model_type + self.storage_type = storage_type + self.storage_type_state = storage_type_state + self.enhanced_security_state = enhanced_security_state diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_resource_vault_config_resource.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_resource_vault_config_resource.py index 71e6eaaaa35e..fd1d87aa7b15 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_resource_vault_config_resource.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_resource_vault_config_resource.py @@ -28,12 +28,12 @@ class BackupResourceVaultConfigResource(Resource): :param location: Resource location. :type location: str :param tags: Resource tags. - :type tags: dict + :type tags: dict[str, str] :param e_tag: Optional ETag. :type e_tag: str :param properties: BackupResourceVaultConfigResource properties - :type properties: :class:`BackupResourceVaultConfig - ` + :type properties: + ~azure.mgmt.recoveryservicesbackup.models.BackupResourceVaultConfig """ _validation = { @@ -52,6 +52,6 @@ class BackupResourceVaultConfigResource(Resource): 'properties': {'key': 'properties', 'type': 'BackupResourceVaultConfig'}, } - def __init__(self, location=None, tags=None, e_tag=None, properties=None): - super(BackupResourceVaultConfigResource, self).__init__(location=location, tags=tags, e_tag=e_tag) - self.properties = properties + def __init__(self, **kwargs): + super(BackupResourceVaultConfigResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_resource_vault_config_resource_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_resource_vault_config_resource_py3.py new file mode 100644 index 000000000000..410c47ef4b52 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_resource_vault_config_resource_py3.py @@ -0,0 +1,57 @@ +# 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 BackupResourceVaultConfigResource(Resource): + """Backup resource vault config details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param e_tag: Optional ETag. + :type e_tag: str + :param properties: BackupResourceVaultConfigResource properties + :type properties: + ~azure.mgmt.recoveryservicesbackup.models.BackupResourceVaultConfig + """ + + _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}'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'BackupResourceVaultConfig'}, + } + + def __init__(self, *, location: str=None, tags=None, e_tag: str=None, properties=None, **kwargs) -> None: + super(BackupResourceVaultConfigResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) + self.properties = properties diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_status_request.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_status_request.py new file mode 100644 index 000000000000..aa4ff0110d16 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_status_request.py @@ -0,0 +1,40 @@ +# 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 BackupStatusRequest(Model): + """BackupStatus request. + + :param resource_type: Container Type - VM, SQLPaaS, DPM, AzureFileShare. + Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', + 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + 'GenericDataSource', 'SQLDataBase', 'AzureFileShare' + :type resource_type: str or + ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :param resource_id: Entire ARM resource id of the resource + :type resource_id: str + :param po_logical_name: Protectable Item Logical Name + :type po_logical_name: str + """ + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'po_logical_name': {'key': 'poLogicalName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(BackupStatusRequest, self).__init__(**kwargs) + self.resource_type = kwargs.get('resource_type', None) + self.resource_id = kwargs.get('resource_id', None) + self.po_logical_name = kwargs.get('po_logical_name', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_status_request_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_status_request_py3.py new file mode 100644 index 000000000000..660f7ef77535 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_status_request_py3.py @@ -0,0 +1,40 @@ +# 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 BackupStatusRequest(Model): + """BackupStatus request. + + :param resource_type: Container Type - VM, SQLPaaS, DPM, AzureFileShare. + Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', + 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + 'GenericDataSource', 'SQLDataBase', 'AzureFileShare' + :type resource_type: str or + ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :param resource_id: Entire ARM resource id of the resource + :type resource_id: str + :param po_logical_name: Protectable Item Logical Name + :type po_logical_name: str + """ + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'po_logical_name': {'key': 'poLogicalName', 'type': 'str'}, + } + + def __init__(self, *, resource_type=None, resource_id: str=None, po_logical_name: str=None, **kwargs) -> None: + super(BackupStatusRequest, self).__init__(**kwargs) + self.resource_type = resource_type + self.resource_id = resource_id + self.po_logical_name = po_logical_name diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_status_response.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_status_response.py new file mode 100644 index 000000000000..73c3e7f2eab0 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_status_response.py @@ -0,0 +1,67 @@ +# 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 BackupStatusResponse(Model): + """BackupStatus response. + + :param protection_status: Specifies whether the container is registered or + not. Possible values include: 'Invalid', 'NotProtected', 'Protecting', + 'Protected', 'ProtectionFailed' + :type protection_status: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param vault_id: Specifies the arm resource id of the vault + :type vault_id: str + :param fabric_name: Specifies the fabric name - Azure or AAD. Possible + values include: 'Invalid', 'Azure' + :type fabric_name: str or + ~azure.mgmt.recoveryservicesbackup.models.FabricName + :param container_name: Specifies the product specific container name. E.g. + iaasvmcontainer;iaasvmcontainer;csname;vmname. This is required for portal + :type container_name: str + :param protected_item_name: Specifies the product specific ds name. E.g. + vm;iaasvmcontainer;csname;vmname. This is required for portal + :type protected_item_name: str + :param error_code: ErrorCode in case of intent failed + :type error_code: str + :param error_message: ErrorMessage in case of intent failed. + :type error_message: str + :param policy_name: Specifies the policy name which is used for protection + :type policy_name: str + :param registration_status: Container registration status + :type registration_status: str + """ + + _attribute_map = { + 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, + 'vault_id': {'key': 'vaultId', 'type': 'str'}, + 'fabric_name': {'key': 'fabricName', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'protected_item_name': {'key': 'protectedItemName', 'type': 'str'}, + 'error_code': {'key': 'errorCode', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'policy_name': {'key': 'policyName', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(BackupStatusResponse, self).__init__(**kwargs) + self.protection_status = kwargs.get('protection_status', None) + self.vault_id = kwargs.get('vault_id', None) + self.fabric_name = kwargs.get('fabric_name', None) + self.container_name = kwargs.get('container_name', None) + self.protected_item_name = kwargs.get('protected_item_name', None) + self.error_code = kwargs.get('error_code', None) + self.error_message = kwargs.get('error_message', None) + self.policy_name = kwargs.get('policy_name', None) + self.registration_status = kwargs.get('registration_status', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_status_response_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_status_response_py3.py new file mode 100644 index 000000000000..4c2a61e02acd --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/backup_status_response_py3.py @@ -0,0 +1,67 @@ +# 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 BackupStatusResponse(Model): + """BackupStatus response. + + :param protection_status: Specifies whether the container is registered or + not. Possible values include: 'Invalid', 'NotProtected', 'Protecting', + 'Protected', 'ProtectionFailed' + :type protection_status: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param vault_id: Specifies the arm resource id of the vault + :type vault_id: str + :param fabric_name: Specifies the fabric name - Azure or AAD. Possible + values include: 'Invalid', 'Azure' + :type fabric_name: str or + ~azure.mgmt.recoveryservicesbackup.models.FabricName + :param container_name: Specifies the product specific container name. E.g. + iaasvmcontainer;iaasvmcontainer;csname;vmname. This is required for portal + :type container_name: str + :param protected_item_name: Specifies the product specific ds name. E.g. + vm;iaasvmcontainer;csname;vmname. This is required for portal + :type protected_item_name: str + :param error_code: ErrorCode in case of intent failed + :type error_code: str + :param error_message: ErrorMessage in case of intent failed. + :type error_message: str + :param policy_name: Specifies the policy name which is used for protection + :type policy_name: str + :param registration_status: Container registration status + :type registration_status: str + """ + + _attribute_map = { + 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, + 'vault_id': {'key': 'vaultId', 'type': 'str'}, + 'fabric_name': {'key': 'fabricName', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'protected_item_name': {'key': 'protectedItemName', 'type': 'str'}, + 'error_code': {'key': 'errorCode', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'policy_name': {'key': 'policyName', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + } + + def __init__(self, *, protection_status=None, vault_id: str=None, fabric_name=None, container_name: str=None, protected_item_name: str=None, error_code: str=None, error_message: str=None, policy_name: str=None, registration_status: str=None, **kwargs) -> None: + super(BackupStatusResponse, self).__init__(**kwargs) + self.protection_status = protection_status + self.vault_id = vault_id + self.fabric_name = fabric_name + self.container_name = container_name + self.protected_item_name = protected_item_name + self.error_code = error_code + self.error_message = error_message + self.policy_name = policy_name + self.registration_status = registration_status diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bek_details.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bek_details.py index 99532fe0648b..9b6af4177bbf 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bek_details.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bek_details.py @@ -29,7 +29,8 @@ class BEKDetails(Model): 'secret_data': {'key': 'secretData', 'type': 'str'}, } - def __init__(self, secret_url=None, secret_vault_id=None, secret_data=None): - self.secret_url = secret_url - self.secret_vault_id = secret_vault_id - self.secret_data = secret_data + def __init__(self, **kwargs): + super(BEKDetails, self).__init__(**kwargs) + self.secret_url = kwargs.get('secret_url', None) + self.secret_vault_id = kwargs.get('secret_vault_id', None) + self.secret_data = kwargs.get('secret_data', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bek_details_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bek_details_py3.py new file mode 100644 index 000000000000..9dc2d6166a2b --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bek_details_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BEKDetails(Model): + """BEK is bitlocker encrpytion key. + + :param secret_url: Secret is BEK. + :type secret_url: str + :param secret_vault_id: ID of the Key Vault where this Secret is stored. + :type secret_vault_id: str + :param secret_data: BEK data. + :type secret_data: str + """ + + _attribute_map = { + 'secret_url': {'key': 'secretUrl', 'type': 'str'}, + 'secret_vault_id': {'key': 'secretVaultId', 'type': 'str'}, + 'secret_data': {'key': 'secretData', 'type': 'str'}, + } + + def __init__(self, *, secret_url: str=None, secret_vault_id: str=None, secret_data: str=None, **kwargs) -> None: + super(BEKDetails, self).__init__(**kwargs) + self.secret_url = secret_url + self.secret_vault_id = secret_vault_id + self.secret_data = secret_data diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_backup_engine_query_object.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_backup_engine_query_object.py index c765c043c74f..fce28e4791b0 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_backup_engine_query_object.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_backup_engine_query_object.py @@ -23,5 +23,6 @@ class BMSBackupEngineQueryObject(Model): 'expand': {'key': 'expand', 'type': 'str'}, } - def __init__(self, expand=None): - self.expand = expand + def __init__(self, **kwargs): + super(BMSBackupEngineQueryObject, self).__init__(**kwargs) + self.expand = kwargs.get('expand', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_backup_engine_query_object_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_backup_engine_query_object_py3.py new file mode 100644 index 000000000000..03b20834b6e9 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_backup_engine_query_object_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BMSBackupEngineQueryObject(Model): + """Query parameters to fetch list of backup engines. + + :param expand: attribute to add extended info + :type expand: str + """ + + _attribute_map = { + 'expand': {'key': 'expand', 'type': 'str'}, + } + + def __init__(self, *, expand: str=None, **kwargs) -> None: + super(BMSBackupEngineQueryObject, self).__init__(**kwargs) + self.expand = expand diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_backup_engines_query_object.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_backup_engines_query_object.py index 7d92b9d8bfe4..ce54a15579d5 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_backup_engines_query_object.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_backup_engines_query_object.py @@ -17,9 +17,10 @@ class BMSBackupEnginesQueryObject(Model): :param backup_management_type: Backup management type for the backup engine. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', - 'AzureBackupServer', 'AzureSql' - :type backup_management_type: str or :class:`BackupManagementType - ` + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType :param friendly_name: Friendly name of the backup engine. :type friendly_name: str :param expand: Attribute to add extended info. @@ -32,7 +33,8 @@ class BMSBackupEnginesQueryObject(Model): 'expand': {'key': 'expand', 'type': 'str'}, } - def __init__(self, backup_management_type=None, friendly_name=None, expand=None): - self.backup_management_type = backup_management_type - self.friendly_name = friendly_name - self.expand = expand + def __init__(self, **kwargs): + super(BMSBackupEnginesQueryObject, self).__init__(**kwargs) + self.backup_management_type = kwargs.get('backup_management_type', None) + self.friendly_name = kwargs.get('friendly_name', None) + self.expand = kwargs.get('expand', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_backup_engines_query_object_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_backup_engines_query_object_py3.py new file mode 100644 index 000000000000..427b3a8d2861 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_backup_engines_query_object_py3.py @@ -0,0 +1,40 @@ +# 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 BMSBackupEnginesQueryObject(Model): + """Query parameters to fetch list of backup engines. + + :param backup_management_type: Backup management type for the backup + engine. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param friendly_name: Friendly name of the backup engine. + :type friendly_name: str + :param expand: Attribute to add extended info. + :type expand: str + """ + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'expand': {'key': 'expand', 'type': 'str'}, + } + + def __init__(self, *, backup_management_type=None, friendly_name: str=None, expand: str=None, **kwargs) -> None: + super(BMSBackupEnginesQueryObject, self).__init__(**kwargs) + self.backup_management_type = backup_management_type + self.friendly_name = friendly_name + self.expand = expand diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_backup_summaries_query_object.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_backup_summaries_query_object.py index f3241255ae0d..9d953bf5098f 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_backup_summaries_query_object.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_backup_summaries_query_object.py @@ -18,13 +18,13 @@ class BMSBackupSummariesQueryObject(Model): :param type: Backup management type for this container. Possible values include: 'Invalid', 'BackupProtectedItemCountSummary', 'BackupProtectionContainerCountSummary' - :type type: str or :class:`Type - ` + :type type: str or ~azure.mgmt.recoveryservicesbackup.models.Type """ _attribute_map = { 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, type=None): - self.type = type + def __init__(self, **kwargs): + super(BMSBackupSummariesQueryObject, self).__init__(**kwargs) + self.type = kwargs.get('type', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_backup_summaries_query_object_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_backup_summaries_query_object_py3.py new file mode 100644 index 000000000000..78ba8dfab7f5 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_backup_summaries_query_object_py3.py @@ -0,0 +1,30 @@ +# 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 BMSBackupSummariesQueryObject(Model): + """Query parameters to fetch backup summaries. + + :param type: Backup management type for this container. Possible values + include: 'Invalid', 'BackupProtectedItemCountSummary', + 'BackupProtectionContainerCountSummary' + :type type: str or ~azure.mgmt.recoveryservicesbackup.models.Type + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, type=None, **kwargs) -> None: + super(BMSBackupSummariesQueryObject, self).__init__(**kwargs) + self.type = type diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_container_query_object.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_container_query_object.py index 5e8ce41d3d9e..60fc16110e72 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_container_query_object.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_container_query_object.py @@ -15,19 +15,26 @@ class BMSContainerQueryObject(Model): """The query filters that can be used with the list containers API. - :param backup_management_type: Backup management type for this container. - Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', - 'AzureBackupServer', 'AzureSql' - :type backup_management_type: str or :class:`BackupManagementType - ` + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Required. Backup management type for this + container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType :param container_type: Type of container for filter. Possible values include: 'Invalid', 'Unknown', 'IaasVMContainer', 'IaasVMServiceContainer', 'DPMContainer', 'AzureBackupServerContainer', - 'MABContainer', 'Cluster', 'AzureSqlContainer', 'Windows', 'VCenter' - :type container_type: str or :class:`ContainerType - ` + 'MABContainer', 'Cluster', 'AzureSqlContainer', 'Windows', 'VCenter', + 'VMAppContainer', 'SQLAGWorkLoadContainer', 'StorageContainer', + 'GenericContainer' + :type container_type: str or + ~azure.mgmt.recoveryservicesbackup.models.ContainerType :param backup_engine_name: Backup engine name :type backup_engine_name: str + :param fabric_name: Fabric name for filter + :type fabric_name: str :param status: Status of registration of this container with the Recovery Services Vault. :type status: str @@ -43,13 +50,16 @@ class BMSContainerQueryObject(Model): 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, 'container_type': {'key': 'containerType', 'type': 'str'}, 'backup_engine_name': {'key': 'backupEngineName', 'type': 'str'}, + 'fabric_name': {'key': 'fabricName', 'type': 'str'}, 'status': {'key': 'status', 'type': 'str'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, } - def __init__(self, backup_management_type, container_type=None, backup_engine_name=None, status=None, friendly_name=None): - self.backup_management_type = backup_management_type - self.container_type = container_type - self.backup_engine_name = backup_engine_name - self.status = status - self.friendly_name = friendly_name + def __init__(self, **kwargs): + super(BMSContainerQueryObject, self).__init__(**kwargs) + self.backup_management_type = kwargs.get('backup_management_type', None) + self.container_type = kwargs.get('container_type', None) + self.backup_engine_name = kwargs.get('backup_engine_name', None) + self.fabric_name = kwargs.get('fabric_name', None) + self.status = kwargs.get('status', None) + self.friendly_name = kwargs.get('friendly_name', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_container_query_object_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_container_query_object_py3.py new file mode 100644 index 000000000000..f941a05d0469 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_container_query_object_py3.py @@ -0,0 +1,65 @@ +# 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 BMSContainerQueryObject(Model): + """The query filters that can be used with the list containers API. + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Required. Backup management type for this + container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param container_type: Type of container for filter. Possible values + include: 'Invalid', 'Unknown', 'IaasVMContainer', + 'IaasVMServiceContainer', 'DPMContainer', 'AzureBackupServerContainer', + 'MABContainer', 'Cluster', 'AzureSqlContainer', 'Windows', 'VCenter', + 'VMAppContainer', 'SQLAGWorkLoadContainer', 'StorageContainer', + 'GenericContainer' + :type container_type: str or + ~azure.mgmt.recoveryservicesbackup.models.ContainerType + :param backup_engine_name: Backup engine name + :type backup_engine_name: str + :param fabric_name: Fabric name for filter + :type fabric_name: str + :param status: Status of registration of this container with the Recovery + Services Vault. + :type status: str + :param friendly_name: Friendly name of this container. + :type friendly_name: str + """ + + _validation = { + 'backup_management_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'container_type': {'key': 'containerType', 'type': 'str'}, + 'backup_engine_name': {'key': 'backupEngineName', 'type': 'str'}, + 'fabric_name': {'key': 'fabricName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + } + + def __init__(self, *, backup_management_type, container_type=None, backup_engine_name: str=None, fabric_name: str=None, status: str=None, friendly_name: str=None, **kwargs) -> None: + super(BMSContainerQueryObject, self).__init__(**kwargs) + self.backup_management_type = backup_management_type + self.container_type = container_type + self.backup_engine_name = backup_engine_name + self.fabric_name = fabric_name + self.status = status + self.friendly_name = friendly_name diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_refresh_containers_query_object.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_refresh_containers_query_object.py new file mode 100644 index 000000000000..e781671827fe --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_refresh_containers_query_object.py @@ -0,0 +1,32 @@ +# 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 BMSRefreshContainersQueryObject(Model): + """The query filters that can be used with the list containers API. + + :param backup_management_type: Backup management type for this container. + Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + """ + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(BMSRefreshContainersQueryObject, self).__init__(**kwargs) + self.backup_management_type = kwargs.get('backup_management_type', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_refresh_containers_query_object_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_refresh_containers_query_object_py3.py new file mode 100644 index 000000000000..250bc8b15692 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_refresh_containers_query_object_py3.py @@ -0,0 +1,32 @@ +# 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 BMSRefreshContainersQueryObject(Model): + """The query filters that can be used with the list containers API. + + :param backup_management_type: Backup management type for this container. + Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + """ + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + } + + def __init__(self, *, backup_management_type=None, **kwargs) -> None: + super(BMSRefreshContainersQueryObject, self).__init__(**kwargs) + self.backup_management_type = backup_management_type diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_workload_item_query_object.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_workload_item_query_object.py new file mode 100644 index 000000000000..b91b23fe7059 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_workload_item_query_object.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BMSWorkloadItemQueryObject(Model): + """Filters to list items that can be backed up. + + :param backup_management_type: Backup management type. Possible values + include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', + 'AzureSql', 'AzureStorage', 'AzureWorkload', 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param workload_item_type: Workload Item type. Possible values include: + 'Invalid', 'SQLInstance', 'SQLDataBase' + :type workload_item_type: str or + ~azure.mgmt.recoveryservicesbackup.models.WorkloadItemType + :param workload_type: Workload type. Possible values include: 'Invalid', + 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', + 'VMwareVM', 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', + 'AzureFileShare' + :type workload_type: str or + ~azure.mgmt.recoveryservicesbackup.models.WorkloadType + :param protection_status: Backup status query parameter. Possible values + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_status: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + """ + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(BMSWorkloadItemQueryObject, self).__init__(**kwargs) + self.backup_management_type = kwargs.get('backup_management_type', None) + self.workload_item_type = kwargs.get('workload_item_type', None) + self.workload_type = kwargs.get('workload_type', None) + self.protection_status = kwargs.get('protection_status', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_workload_item_query_object_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_workload_item_query_object_py3.py new file mode 100644 index 000000000000..4e9799049f70 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bms_workload_item_query_object_py3.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BMSWorkloadItemQueryObject(Model): + """Filters to list items that can be backed up. + + :param backup_management_type: Backup management type. Possible values + include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', + 'AzureSql', 'AzureStorage', 'AzureWorkload', 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param workload_item_type: Workload Item type. Possible values include: + 'Invalid', 'SQLInstance', 'SQLDataBase' + :type workload_item_type: str or + ~azure.mgmt.recoveryservicesbackup.models.WorkloadItemType + :param workload_type: Workload type. Possible values include: 'Invalid', + 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', + 'VMwareVM', 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', + 'AzureFileShare' + :type workload_type: str or + ~azure.mgmt.recoveryservicesbackup.models.WorkloadType + :param protection_status: Backup status query parameter. Possible values + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_status: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + """ + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, + } + + def __init__(self, *, backup_management_type=None, workload_item_type=None, workload_type=None, protection_status=None, **kwargs) -> None: + super(BMSWorkloadItemQueryObject, self).__init__(**kwargs) + self.backup_management_type = backup_management_type + self.workload_item_type = workload_item_type + self.workload_type = workload_type + self.protection_status = protection_status diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bmspo_query_object.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bmspo_query_object.py index 3ea23b587105..bfe4d1466505 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bmspo_query_object.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bmspo_query_object.py @@ -17,9 +17,18 @@ class BMSPOQueryObject(Model): :param backup_management_type: Backup management type. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', - 'AzureSql' - :type backup_management_type: str or :class:`BackupManagementType - ` + 'AzureSql', 'AzureStorage', 'AzureWorkload', 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param workload_type: Workload type. Possible values include: 'Invalid', + 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', + 'VMwareVM', 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', + 'AzureFileShare' + :type workload_type: str or + ~azure.mgmt.recoveryservicesbackup.models.WorkloadType + :param container_name: Full name of the container whose Protectable + Objects should be returned. + :type container_name: str :param status: Backup status query parameter. :type status: str :param friendly_name: Friendly name. @@ -28,11 +37,16 @@ class BMSPOQueryObject(Model): _attribute_map = { 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, 'status': {'key': 'status', 'type': 'str'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, } - def __init__(self, backup_management_type=None, status=None, friendly_name=None): - self.backup_management_type = backup_management_type - self.status = status - self.friendly_name = friendly_name + def __init__(self, **kwargs): + super(BMSPOQueryObject, self).__init__(**kwargs) + self.backup_management_type = kwargs.get('backup_management_type', None) + self.workload_type = kwargs.get('workload_type', None) + self.container_name = kwargs.get('container_name', None) + self.status = kwargs.get('status', None) + self.friendly_name = kwargs.get('friendly_name', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bmspo_query_object_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bmspo_query_object_py3.py new file mode 100644 index 000000000000..9cdfc290eec3 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bmspo_query_object_py3.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BMSPOQueryObject(Model): + """Filters to list items that can be backed up. + + :param backup_management_type: Backup management type. Possible values + include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', + 'AzureSql', 'AzureStorage', 'AzureWorkload', 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param workload_type: Workload type. Possible values include: 'Invalid', + 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', + 'VMwareVM', 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', + 'AzureFileShare' + :type workload_type: str or + ~azure.mgmt.recoveryservicesbackup.models.WorkloadType + :param container_name: Full name of the container whose Protectable + Objects should be returned. + :type container_name: str + :param status: Backup status query parameter. + :type status: str + :param friendly_name: Friendly name. + :type friendly_name: str + """ + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + } + + def __init__(self, *, backup_management_type=None, workload_type=None, container_name: str=None, status: str=None, friendly_name: str=None, **kwargs) -> None: + super(BMSPOQueryObject, self).__init__(**kwargs) + self.backup_management_type = backup_management_type + self.workload_type = workload_type + self.container_name = container_name + self.status = status + self.friendly_name = friendly_name diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bmsrp_query_object.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bmsrp_query_object.py index c061a90e0956..7230da406afd 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bmsrp_query_object.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bmsrp_query_object.py @@ -19,13 +19,26 @@ class BMSRPQueryObject(Model): :type start_date: datetime :param end_date: Backup copies created before this time. :type end_date: datetime + :param restore_point_query_type: RestorePoint type. Possible values + include: 'Invalid', 'Full', 'Log', 'Differential', 'FullAndDifferential', + 'All' + :type restore_point_query_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RestorePointQueryType + :param extended_info: In Get Recovery Point, it tells whether extended + information about recovery point is asked. + :type extended_info: bool """ _attribute_map = { 'start_date': {'key': 'startDate', 'type': 'iso-8601'}, 'end_date': {'key': 'endDate', 'type': 'iso-8601'}, + 'restore_point_query_type': {'key': 'restorePointQueryType', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'bool'}, } - def __init__(self, start_date=None, end_date=None): - self.start_date = start_date - self.end_date = end_date + def __init__(self, **kwargs): + super(BMSRPQueryObject, self).__init__(**kwargs) + self.start_date = kwargs.get('start_date', None) + self.end_date = kwargs.get('end_date', None) + self.restore_point_query_type = kwargs.get('restore_point_query_type', None) + self.extended_info = kwargs.get('extended_info', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bmsrp_query_object_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bmsrp_query_object_py3.py new file mode 100644 index 000000000000..91fe873bcaa1 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/bmsrp_query_object_py3.py @@ -0,0 +1,44 @@ +# 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 BMSRPQueryObject(Model): + """Filters to list backup copies. + + :param start_date: Backup copies created after this time. + :type start_date: datetime + :param end_date: Backup copies created before this time. + :type end_date: datetime + :param restore_point_query_type: RestorePoint type. Possible values + include: 'Invalid', 'Full', 'Log', 'Differential', 'FullAndDifferential', + 'All' + :type restore_point_query_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RestorePointQueryType + :param extended_info: In Get Recovery Point, it tells whether extended + information about recovery point is asked. + :type extended_info: bool + """ + + _attribute_map = { + 'start_date': {'key': 'startDate', 'type': 'iso-8601'}, + 'end_date': {'key': 'endDate', 'type': 'iso-8601'}, + 'restore_point_query_type': {'key': 'restorePointQueryType', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'bool'}, + } + + def __init__(self, *, start_date=None, end_date=None, restore_point_query_type=None, extended_info: bool=None, **kwargs) -> None: + super(BMSRPQueryObject, self).__init__(**kwargs) + self.start_date = start_date + self.end_date = end_date + self.restore_point_query_type = restore_point_query_type + self.extended_info = extended_info diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_display.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_display.py index dbc271de1f39..d9557c7b3122 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_display.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_display.py @@ -17,23 +17,25 @@ class ClientDiscoveryDisplay(Model): :param provider: Name of the provider for display purposes :type provider: str - :param resource: Name of the resource type for display purposes + :param resource: ResourceType for which this Operation can be performed. :type resource: str - :param operation: Name of the operation for display purposes + :param operation: Operations Name itself. :type operation: str - :param description: Description of the operation for display purposes + :param description: Description of the operation having details of what + operation is about. :type description: str """ _attribute_map = { - 'provider': {'key': 'Provider', 'type': 'str'}, - 'resource': {'key': 'Resource', 'type': 'str'}, - 'operation': {'key': 'Operation', 'type': 'str'}, - 'description': {'key': 'Description', 'type': 'str'}, + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, } - def __init__(self, provider=None, resource=None, operation=None, description=None): - self.provider = provider - self.resource = resource - self.operation = operation - self.description = description + def __init__(self, **kwargs): + super(ClientDiscoveryDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_display_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_display_py3.py new file mode 100644 index 000000000000..61ce520a52bd --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_display_py3.py @@ -0,0 +1,41 @@ +# 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 ClientDiscoveryDisplay(Model): + """Localized display information of an operation. + + :param provider: Name of the provider for display purposes + :type provider: str + :param resource: ResourceType for which this Operation can be performed. + :type resource: str + :param operation: Operations Name itself. + :type operation: str + :param description: Description of the operation having details of what + operation is about. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + super(ClientDiscoveryDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_for_log_specification.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_for_log_specification.py index 7180ca7b37d9..139a249e82d2 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_for_log_specification.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_for_log_specification.py @@ -15,11 +15,11 @@ class ClientDiscoveryForLogSpecification(Model): """Class to represent shoebox log specification in json client discovery. - :param name: Name + :param name: Name for shoebox log specification. :type name: str :param display_name: Localized display name :type display_name: str - :param blob_duration: blob duration + :param blob_duration: blob duration of shoebox log specification :type blob_duration: str """ @@ -29,7 +29,8 @@ class ClientDiscoveryForLogSpecification(Model): 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, } - def __init__(self, name=None, display_name=None, blob_duration=None): - self.name = name - self.display_name = display_name - self.blob_duration = blob_duration + def __init__(self, **kwargs): + super(ClientDiscoveryForLogSpecification, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + self.blob_duration = kwargs.get('blob_duration', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_for_log_specification_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_for_log_specification_py3.py new file mode 100644 index 000000000000..10c285303734 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_for_log_specification_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClientDiscoveryForLogSpecification(Model): + """Class to represent shoebox log specification in json client discovery. + + :param name: Name for shoebox log specification. + :type name: str + :param display_name: Localized display name + :type display_name: str + :param blob_duration: blob duration of shoebox log specification + :type blob_duration: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, display_name: str=None, blob_duration: str=None, **kwargs) -> None: + super(ClientDiscoveryForLogSpecification, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.blob_duration = blob_duration diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_for_properties.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_for_properties.py index 1899787fd6cb..04533c66702e 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_for_properties.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_for_properties.py @@ -17,13 +17,13 @@ class ClientDiscoveryForProperties(Model): :param service_specification: Operation properties. :type service_specification: - :class:`ClientDiscoveryForServiceSpecification - ` + ~azure.mgmt.recoveryservicesbackup.models.ClientDiscoveryForServiceSpecification """ _attribute_map = { 'service_specification': {'key': 'serviceSpecification', 'type': 'ClientDiscoveryForServiceSpecification'}, } - def __init__(self, service_specification=None): - self.service_specification = service_specification + def __init__(self, **kwargs): + super(ClientDiscoveryForProperties, self).__init__(**kwargs) + self.service_specification = kwargs.get('service_specification', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_for_properties_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_for_properties_py3.py new file mode 100644 index 000000000000..6d38e3b28eb0 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_for_properties_py3.py @@ -0,0 +1,29 @@ +# 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 ClientDiscoveryForProperties(Model): + """Class to represent shoebox properties in json client discovery. + + :param service_specification: Operation properties. + :type service_specification: + ~azure.mgmt.recoveryservicesbackup.models.ClientDiscoveryForServiceSpecification + """ + + _attribute_map = { + 'service_specification': {'key': 'serviceSpecification', 'type': 'ClientDiscoveryForServiceSpecification'}, + } + + def __init__(self, *, service_specification=None, **kwargs) -> None: + super(ClientDiscoveryForProperties, self).__init__(**kwargs) + self.service_specification = service_specification diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_for_service_specification.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_for_service_specification.py index ff9a41aa81e7..f4cdef1ebb56 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_for_service_specification.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_for_service_specification.py @@ -16,14 +16,14 @@ class ClientDiscoveryForServiceSpecification(Model): """Class to represent shoebox service specification in json client discovery. :param log_specifications: List of log specifications of this operation. - :type log_specifications: list of - :class:`ClientDiscoveryForLogSpecification - ` + :type log_specifications: + list[~azure.mgmt.recoveryservicesbackup.models.ClientDiscoveryForLogSpecification] """ _attribute_map = { 'log_specifications': {'key': 'logSpecifications', 'type': '[ClientDiscoveryForLogSpecification]'}, } - def __init__(self, log_specifications=None): - self.log_specifications = log_specifications + def __init__(self, **kwargs): + super(ClientDiscoveryForServiceSpecification, self).__init__(**kwargs) + self.log_specifications = kwargs.get('log_specifications', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_for_service_specification_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_for_service_specification_py3.py new file mode 100644 index 000000000000..7e53d894a468 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_for_service_specification_py3.py @@ -0,0 +1,29 @@ +# 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 ClientDiscoveryForServiceSpecification(Model): + """Class to represent shoebox service specification in json client discovery. + + :param log_specifications: List of log specifications of this operation. + :type log_specifications: + list[~azure.mgmt.recoveryservicesbackup.models.ClientDiscoveryForLogSpecification] + """ + + _attribute_map = { + 'log_specifications': {'key': 'logSpecifications', 'type': '[ClientDiscoveryForLogSpecification]'}, + } + + def __init__(self, *, log_specifications=None, **kwargs) -> None: + super(ClientDiscoveryForServiceSpecification, self).__init__(**kwargs) + self.log_specifications = log_specifications diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_value_for_single_api.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_value_for_single_api.py index f54c40e3f02d..0f3256de9959 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_value_for_single_api.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_value_for_single_api.py @@ -15,29 +15,30 @@ class ClientDiscoveryValueForSingleApi(Model): """Available operation details. - :param name: Name + :param name: Name of the Operation. :type name: str :param display: Contains the localized display information for this particular operation - :type display: :class:`ClientDiscoveryDisplay - ` + :type display: + ~azure.mgmt.recoveryservicesbackup.models.ClientDiscoveryDisplay :param origin: The intended executor of the operation;governs the display of the operation in the RBAC UX and the audit logs UX :type origin: str - :param properties: Properties - :type properties: :class:`ClientDiscoveryForProperties - ` + :param properties: ShoeBox properties for the given operation. + :type properties: + ~azure.mgmt.recoveryservicesbackup.models.ClientDiscoveryForProperties """ _attribute_map = { - 'name': {'key': 'Name', 'type': 'str'}, - 'display': {'key': 'Display', 'type': 'ClientDiscoveryDisplay'}, - 'origin': {'key': 'Origin', 'type': 'str'}, - 'properties': {'key': 'Properties', 'type': 'ClientDiscoveryForProperties'}, + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'ClientDiscoveryDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ClientDiscoveryForProperties'}, } - def __init__(self, name=None, display=None, origin=None, properties=None): - self.name = name - self.display = display - self.origin = origin - self.properties = properties + def __init__(self, **kwargs): + super(ClientDiscoveryValueForSingleApi, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + self.origin = kwargs.get('origin', None) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_value_for_single_api_paged.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_value_for_single_api_paged.py index 06f86acadd6a..bc7b09691a43 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_value_for_single_api_paged.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_value_for_single_api_paged.py @@ -18,8 +18,8 @@ class ClientDiscoveryValueForSingleApiPaged(Paged): """ _attribute_map = { - 'next_link': {'key': 'NextLink', 'type': 'str'}, - 'current_page': {'key': 'Value', 'type': '[ClientDiscoveryValueForSingleApi]'} + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ClientDiscoveryValueForSingleApi]'} } def __init__(self, *args, **kwargs): diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_value_for_single_api_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_value_for_single_api_py3.py new file mode 100644 index 000000000000..9fd16e7785e3 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_discovery_value_for_single_api_py3.py @@ -0,0 +1,44 @@ +# 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 ClientDiscoveryValueForSingleApi(Model): + """Available operation details. + + :param name: Name of the Operation. + :type name: str + :param display: Contains the localized display information for this + particular operation + :type display: + ~azure.mgmt.recoveryservicesbackup.models.ClientDiscoveryDisplay + :param origin: The intended executor of the operation;governs the display + of the operation in the RBAC UX and the audit logs UX + :type origin: str + :param properties: ShoeBox properties for the given operation. + :type properties: + ~azure.mgmt.recoveryservicesbackup.models.ClientDiscoveryForProperties + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'ClientDiscoveryDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ClientDiscoveryForProperties'}, + } + + def __init__(self, *, name: str=None, display=None, origin: str=None, properties=None, **kwargs) -> None: + super(ClientDiscoveryValueForSingleApi, self).__init__(**kwargs) + self.name = name + self.display = display + self.origin = origin + self.properties = properties diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_script_for_connect.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_script_for_connect.py index 2cc3977710e3..a4bb71aa83f7 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_script_for_connect.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_script_for_connect.py @@ -41,9 +41,10 @@ class ClientScriptForConnect(Model): 'script_name_suffix': {'key': 'scriptNameSuffix', 'type': 'str'}, } - def __init__(self, script_content=None, script_extension=None, os_type=None, url=None, script_name_suffix=None): - self.script_content = script_content - self.script_extension = script_extension - self.os_type = os_type - self.url = url - self.script_name_suffix = script_name_suffix + def __init__(self, **kwargs): + super(ClientScriptForConnect, self).__init__(**kwargs) + self.script_content = kwargs.get('script_content', None) + self.script_extension = kwargs.get('script_extension', None) + self.os_type = kwargs.get('os_type', None) + self.url = kwargs.get('url', None) + self.script_name_suffix = kwargs.get('script_name_suffix', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_script_for_connect_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_script_for_connect_py3.py new file mode 100644 index 000000000000..c43e2efc94ae --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/client_script_for_connect_py3.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 msrest.serialization import Model + + +class ClientScriptForConnect(Model): + """Client script details for file / folder restore. + + :param script_content: File content of the client script for file / folder + restore. + :type script_content: str + :param script_extension: File extension of the client script for file / + folder restore - .ps1 , .sh , etc. + :type script_extension: str + :param os_type: OS type - Windows, Linux etc. for which this file / folder + restore client script works. + :type os_type: str + :param url: URL of Executable from where to source the content. If this is + not null then ScriptContent should not be used + :type url: str + :param script_name_suffix: Mandator suffix that should be added to the + name of script that is given for download to user. + If its null or empty then , ignore it. + :type script_name_suffix: str + """ + + _attribute_map = { + 'script_content': {'key': 'scriptContent', 'type': 'str'}, + 'script_extension': {'key': 'scriptExtension', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'script_name_suffix': {'key': 'scriptNameSuffix', 'type': 'str'}, + } + + def __init__(self, *, script_content: str=None, script_extension: str=None, os_type: str=None, url: str=None, script_name_suffix: str=None, **kwargs) -> None: + super(ClientScriptForConnect, self).__init__(**kwargs) + self.script_content = script_content + self.script_extension = script_extension + self.os_type = os_type + self.url = url + self.script_name_suffix = script_name_suffix diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/container_identity_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/container_identity_info.py new file mode 100644 index 000000000000..fedf3666b33c --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/container_identity_info.py @@ -0,0 +1,41 @@ +# 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 ContainerIdentityInfo(Model): + """Container identity information. + + :param unique_name: Unique name of the container + :type unique_name: str + :param aad_tenant_id: Protection container identity - AAD Tenant + :type aad_tenant_id: str + :param service_principal_client_id: Protection container identity - AAD + Service Principal + :type service_principal_client_id: str + :param audience: Protection container identity - Audience + :type audience: str + """ + + _attribute_map = { + 'unique_name': {'key': 'uniqueName', 'type': 'str'}, + 'aad_tenant_id': {'key': 'aadTenantId', 'type': 'str'}, + 'service_principal_client_id': {'key': 'servicePrincipalClientId', 'type': 'str'}, + 'audience': {'key': 'audience', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ContainerIdentityInfo, self).__init__(**kwargs) + self.unique_name = kwargs.get('unique_name', None) + self.aad_tenant_id = kwargs.get('aad_tenant_id', None) + self.service_principal_client_id = kwargs.get('service_principal_client_id', None) + self.audience = kwargs.get('audience', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/container_identity_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/container_identity_info_py3.py new file mode 100644 index 000000000000..e94bc41c6905 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/container_identity_info_py3.py @@ -0,0 +1,41 @@ +# 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 ContainerIdentityInfo(Model): + """Container identity information. + + :param unique_name: Unique name of the container + :type unique_name: str + :param aad_tenant_id: Protection container identity - AAD Tenant + :type aad_tenant_id: str + :param service_principal_client_id: Protection container identity - AAD + Service Principal + :type service_principal_client_id: str + :param audience: Protection container identity - Audience + :type audience: str + """ + + _attribute_map = { + 'unique_name': {'key': 'uniqueName', 'type': 'str'}, + 'aad_tenant_id': {'key': 'aadTenantId', 'type': 'str'}, + 'service_principal_client_id': {'key': 'servicePrincipalClientId', 'type': 'str'}, + 'audience': {'key': 'audience', 'type': 'str'}, + } + + def __init__(self, *, unique_name: str=None, aad_tenant_id: str=None, service_principal_client_id: str=None, audience: str=None, **kwargs) -> None: + super(ContainerIdentityInfo, self).__init__(**kwargs) + self.unique_name = unique_name + self.aad_tenant_id = aad_tenant_id + self.service_principal_client_id = service_principal_client_id + self.audience = audience diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/daily_retention_format.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/daily_retention_format.py index 4f851fc1c95f..652748549107 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/daily_retention_format.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/daily_retention_format.py @@ -16,13 +16,14 @@ class DailyRetentionFormat(Model): """Daily retention format. :param days_of_the_month: List of days of the month. - :type days_of_the_month: list of :class:`Day - ` + :type days_of_the_month: + list[~azure.mgmt.recoveryservicesbackup.models.Day] """ _attribute_map = { 'days_of_the_month': {'key': 'daysOfTheMonth', 'type': '[Day]'}, } - def __init__(self, days_of_the_month=None): - self.days_of_the_month = days_of_the_month + def __init__(self, **kwargs): + super(DailyRetentionFormat, self).__init__(**kwargs) + self.days_of_the_month = kwargs.get('days_of_the_month', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/daily_retention_format_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/daily_retention_format_py3.py new file mode 100644 index 000000000000..35e4fff27b05 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/daily_retention_format_py3.py @@ -0,0 +1,29 @@ +# 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 DailyRetentionFormat(Model): + """Daily retention format. + + :param days_of_the_month: List of days of the month. + :type days_of_the_month: + list[~azure.mgmt.recoveryservicesbackup.models.Day] + """ + + _attribute_map = { + 'days_of_the_month': {'key': 'daysOfTheMonth', 'type': '[Day]'}, + } + + def __init__(self, *, days_of_the_month=None, **kwargs) -> None: + super(DailyRetentionFormat, self).__init__(**kwargs) + self.days_of_the_month = days_of_the_month diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/daily_retention_schedule.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/daily_retention_schedule.py index 337da1689ccc..c12b5c466e45 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/daily_retention_schedule.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/daily_retention_schedule.py @@ -16,10 +16,10 @@ class DailyRetentionSchedule(Model): """Daily retention schedule. :param retention_times: Retention times of retention policy. - :type retention_times: list of datetime + :type retention_times: list[datetime] :param retention_duration: Retention duration of retention Policy. - :type retention_duration: :class:`RetentionDuration - ` + :type retention_duration: + ~azure.mgmt.recoveryservicesbackup.models.RetentionDuration """ _attribute_map = { @@ -27,6 +27,7 @@ class DailyRetentionSchedule(Model): 'retention_duration': {'key': 'retentionDuration', 'type': 'RetentionDuration'}, } - def __init__(self, retention_times=None, retention_duration=None): - self.retention_times = retention_times - self.retention_duration = retention_duration + def __init__(self, **kwargs): + super(DailyRetentionSchedule, self).__init__(**kwargs) + self.retention_times = kwargs.get('retention_times', None) + self.retention_duration = kwargs.get('retention_duration', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/daily_retention_schedule_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/daily_retention_schedule_py3.py new file mode 100644 index 000000000000..ff5842e35192 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/daily_retention_schedule_py3.py @@ -0,0 +1,33 @@ +# 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 DailyRetentionSchedule(Model): + """Daily retention schedule. + + :param retention_times: Retention times of retention policy. + :type retention_times: list[datetime] + :param retention_duration: Retention duration of retention Policy. + :type retention_duration: + ~azure.mgmt.recoveryservicesbackup.models.RetentionDuration + """ + + _attribute_map = { + 'retention_times': {'key': 'retentionTimes', 'type': '[iso-8601]'}, + 'retention_duration': {'key': 'retentionDuration', 'type': 'RetentionDuration'}, + } + + def __init__(self, *, retention_times=None, retention_duration=None, **kwargs) -> None: + super(DailyRetentionSchedule, self).__init__(**kwargs) + self.retention_times = retention_times + self.retention_duration = retention_duration diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/day.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/day.py index 55c736f2d102..8a7c1d5f576a 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/day.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/day.py @@ -26,6 +26,7 @@ class Day(Model): 'is_last': {'key': 'isLast', 'type': 'bool'}, } - def __init__(self, date_property=None, is_last=None): - self.date_property = date_property - self.is_last = is_last + def __init__(self, **kwargs): + super(Day, self).__init__(**kwargs) + self.date_property = kwargs.get('date_property', None) + self.is_last = kwargs.get('is_last', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/day_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/day_py3.py new file mode 100644 index 000000000000..682ed8c4c949 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/day_py3.py @@ -0,0 +1,32 @@ +# 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 Day(Model): + """Day of the week. + + :param date_property: Date of the month + :type date_property: int + :param is_last: Whether Date is last date of month + :type is_last: bool + """ + + _attribute_map = { + 'date_property': {'key': 'date', 'type': 'int'}, + 'is_last': {'key': 'isLast', 'type': 'bool'}, + } + + def __init__(self, *, date_property: int=None, is_last: bool=None, **kwargs) -> None: + super(Day, self).__init__(**kwargs) + self.date_property = date_property + self.is_last = is_last diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/distributed_nodes_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/distributed_nodes_info.py new file mode 100644 index 000000000000..1d4704723e57 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/distributed_nodes_info.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DistributedNodesInfo(Model): + """This is used to represent the various nodes of the distributed container. + + :param node_name: Name of the node under a distributed container. + :type node_name: str + :param status: Status of this Node. + Failed | Succeeded + :type status: str + :param error_detail: Error Details if the Status is non-success. + :type error_detail: ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail + """ + + _attribute_map = { + 'node_name': {'key': 'nodeName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'error_detail': {'key': 'errorDetail', 'type': 'ErrorDetail'}, + } + + def __init__(self, **kwargs): + super(DistributedNodesInfo, self).__init__(**kwargs) + self.node_name = kwargs.get('node_name', None) + self.status = kwargs.get('status', None) + self.error_detail = kwargs.get('error_detail', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/distributed_nodes_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/distributed_nodes_info_py3.py new file mode 100644 index 000000000000..7491ca827c74 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/distributed_nodes_info_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DistributedNodesInfo(Model): + """This is used to represent the various nodes of the distributed container. + + :param node_name: Name of the node under a distributed container. + :type node_name: str + :param status: Status of this Node. + Failed | Succeeded + :type status: str + :param error_detail: Error Details if the Status is non-success. + :type error_detail: ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail + """ + + _attribute_map = { + 'node_name': {'key': 'nodeName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'error_detail': {'key': 'errorDetail', 'type': 'ErrorDetail'}, + } + + def __init__(self, *, node_name: str=None, status: str=None, error_detail=None, **kwargs) -> None: + super(DistributedNodesInfo, self).__init__(**kwargs) + self.node_name = node_name + self.status = status + self.error_detail = error_detail diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_backup_engine.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_backup_engine.py index 8f48c94ab6cb..df5c918d22fd 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_backup_engine.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_backup_engine.py @@ -15,13 +15,16 @@ class DpmBackupEngine(BackupEngineBase): """Data Protection Manager (DPM) specific backup engine. + All required parameters must be populated in order to send to Azure. + :param friendly_name: Friendly name of the backup engine. :type friendly_name: str :param backup_management_type: Type of backup management for the backup engine. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', - 'AzureBackupServer', 'AzureSql' - :type backup_management_type: str or :class:`BackupManagementType - ` + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType :param registration_status: Registration status of the backup engine with the Recovery Services Vault. :type registration_status: str @@ -46,9 +49,9 @@ class DpmBackupEngine(BackupEngineBase): available :type is_dpm_upgrade_available: bool :param extended_info: Extended info of the backupengine - :type extended_info: :class:`BackupEngineExtendedInfo - ` - :param backup_engine_type: Polymorphic Discriminator + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.BackupEngineExtendedInfo + :param backup_engine_type: Required. Constant filled by server. :type backup_engine_type: str """ @@ -56,6 +59,22 @@ class DpmBackupEngine(BackupEngineBase): 'backup_engine_type': {'required': True}, } - def __init__(self, friendly_name=None, backup_management_type=None, registration_status=None, backup_engine_state=None, health_status=None, can_re_register=None, backup_engine_id=None, dpm_version=None, azure_backup_agent_version=None, is_azure_backup_agent_upgrade_available=None, is_dpm_upgrade_available=None, extended_info=None): - super(DpmBackupEngine, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, backup_engine_state=backup_engine_state, health_status=health_status, can_re_register=can_re_register, backup_engine_id=backup_engine_id, dpm_version=dpm_version, azure_backup_agent_version=azure_backup_agent_version, is_azure_backup_agent_upgrade_available=is_azure_backup_agent_upgrade_available, is_dpm_upgrade_available=is_dpm_upgrade_available, extended_info=extended_info) + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'backup_engine_state': {'key': 'backupEngineState', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'can_re_register': {'key': 'canReRegister', 'type': 'bool'}, + 'backup_engine_id': {'key': 'backupEngineId', 'type': 'str'}, + 'dpm_version': {'key': 'dpmVersion', 'type': 'str'}, + 'azure_backup_agent_version': {'key': 'azureBackupAgentVersion', 'type': 'str'}, + 'is_azure_backup_agent_upgrade_available': {'key': 'isAzureBackupAgentUpgradeAvailable', 'type': 'bool'}, + 'is_dpm_upgrade_available': {'key': 'isDpmUpgradeAvailable', 'type': 'bool'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'BackupEngineExtendedInfo'}, + 'backup_engine_type': {'key': 'backupEngineType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DpmBackupEngine, self).__init__(**kwargs) self.backup_engine_type = 'DpmBackupEngine' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_backup_engine_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_backup_engine_py3.py new file mode 100644 index 000000000000..421b22f5a77d --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_backup_engine_py3.py @@ -0,0 +1,80 @@ +# 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 .backup_engine_base_py3 import BackupEngineBase + + +class DpmBackupEngine(BackupEngineBase): + """Data Protection Manager (DPM) specific backup engine. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name of the backup engine. + :type friendly_name: str + :param backup_management_type: Type of backup management for the backup + engine. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param registration_status: Registration status of the backup engine with + the Recovery Services Vault. + :type registration_status: str + :param backup_engine_state: Status of the backup engine with the Recovery + Services Vault. = {Active/Deleting/DeleteFailed} + :type backup_engine_state: str + :param health_status: Backup status of the backup engine. + :type health_status: str + :param can_re_register: Flag indicating if the backup engine be + registered, once already registered. + :type can_re_register: bool + :param backup_engine_id: ID of the backup engine. + :type backup_engine_id: str + :param dpm_version: Backup engine version + :type dpm_version: str + :param azure_backup_agent_version: Backup agent version + :type azure_backup_agent_version: str + :param is_azure_backup_agent_upgrade_available: To check if backup agent + upgrade available + :type is_azure_backup_agent_upgrade_available: bool + :param is_dpm_upgrade_available: To check if backup engine upgrade + available + :type is_dpm_upgrade_available: bool + :param extended_info: Extended info of the backupengine + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.BackupEngineExtendedInfo + :param backup_engine_type: Required. Constant filled by server. + :type backup_engine_type: str + """ + + _validation = { + 'backup_engine_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'backup_engine_state': {'key': 'backupEngineState', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'can_re_register': {'key': 'canReRegister', 'type': 'bool'}, + 'backup_engine_id': {'key': 'backupEngineId', 'type': 'str'}, + 'dpm_version': {'key': 'dpmVersion', 'type': 'str'}, + 'azure_backup_agent_version': {'key': 'azureBackupAgentVersion', 'type': 'str'}, + 'is_azure_backup_agent_upgrade_available': {'key': 'isAzureBackupAgentUpgradeAvailable', 'type': 'bool'}, + 'is_dpm_upgrade_available': {'key': 'isDpmUpgradeAvailable', 'type': 'bool'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'BackupEngineExtendedInfo'}, + 'backup_engine_type': {'key': 'backupEngineType', 'type': 'str'}, + } + + def __init__(self, *, friendly_name: str=None, backup_management_type=None, registration_status: str=None, backup_engine_state: str=None, health_status: str=None, can_re_register: bool=None, backup_engine_id: str=None, dpm_version: str=None, azure_backup_agent_version: str=None, is_azure_backup_agent_upgrade_available: bool=None, is_dpm_upgrade_available: bool=None, extended_info=None, **kwargs) -> None: + super(DpmBackupEngine, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, backup_engine_state=backup_engine_state, health_status=health_status, can_re_register=can_re_register, backup_engine_id=backup_engine_id, dpm_version=dpm_version, azure_backup_agent_version=azure_backup_agent_version, is_azure_backup_agent_upgrade_available=is_azure_backup_agent_upgrade_available, is_dpm_upgrade_available=is_dpm_upgrade_available, extended_info=extended_info, **kwargs) + self.backup_engine_type = 'DpmBackupEngine' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_container.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_container.py index 6704fc6d1e65..8afa45340990 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_container.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_container.py @@ -15,33 +15,23 @@ class DpmContainer(ProtectionContainer): """DPM workload-specific protection 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. :param friendly_name: Friendly name of the container. :type friendly_name: str :param backup_management_type: Type of backup managemenent for the container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', - 'DPM', 'AzureBackupServer', 'AzureSql' - :type backup_management_type: str or :class:`BackupManagementType - ` + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType :param registration_status: Status of registration of the container with the Recovery Services Vault. :type registration_status: str :param health_status: Status of health of the container. :type health_status: str - :ivar container_type: Type of the container. The value of this property - for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. Classic - Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows - machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is - AzureSqlContainer. Possible values include: 'Invalid', 'Unknown', - 'IaasVMContainer', 'IaasVMServiceContainer', 'DPMContainer', - 'AzureBackupServerContainer', 'MABContainer', 'Cluster', - 'AzureSqlContainer', 'Windows', 'VCenter' - :vartype container_type: str or :class:`ContainerType - ` - :param protectable_object_type: Polymorphic Discriminator - :type protectable_object_type: str + :param container_type: Required. Constant filled by server. + :type container_type: str :param can_re_register: Specifies whether the container is re-registrable. :type can_re_register: bool :param container_id: ID of container. @@ -51,19 +41,18 @@ class DpmContainer(ProtectionContainer): :param dpm_agent_version: Backup engine Agent version :type dpm_agent_version: str :param dpm_servers: List of BackupEngines protecting the container - :type dpm_servers: list of str + :type dpm_servers: list[str] :param upgrade_available: To check if upgrade available :type upgrade_available: bool :param protection_status: Protection status of the container. :type protection_status: str :param extended_info: Extended Info of the container. - :type extended_info: :class:`DPMContainerExtendedInfo - ` + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.DPMContainerExtendedInfo """ _validation = { - 'container_type': {'readonly': True}, - 'protectable_object_type': {'required': True}, + 'container_type': {'required': True}, } _attribute_map = { @@ -72,25 +61,24 @@ class DpmContainer(ProtectionContainer): 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, 'health_status': {'key': 'healthStatus', 'type': 'str'}, 'container_type': {'key': 'containerType', 'type': 'str'}, - 'protectable_object_type': {'key': 'protectableObjectType', 'type': 'str'}, 'can_re_register': {'key': 'canReRegister', 'type': 'bool'}, 'container_id': {'key': 'containerId', 'type': 'str'}, 'protected_item_count': {'key': 'protectedItemCount', 'type': 'long'}, 'dpm_agent_version': {'key': 'dpmAgentVersion', 'type': 'str'}, - 'dpm_servers': {'key': 'DPMServers', 'type': '[str]'}, - 'upgrade_available': {'key': 'UpgradeAvailable', 'type': 'bool'}, + 'dpm_servers': {'key': 'dpmServers', 'type': '[str]'}, + 'upgrade_available': {'key': 'upgradeAvailable', 'type': 'bool'}, 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, 'extended_info': {'key': 'extendedInfo', 'type': 'DPMContainerExtendedInfo'}, } - def __init__(self, friendly_name=None, backup_management_type=None, registration_status=None, health_status=None, can_re_register=None, container_id=None, protected_item_count=None, dpm_agent_version=None, dpm_servers=None, upgrade_available=None, protection_status=None, extended_info=None): - super(DpmContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status) - self.can_re_register = can_re_register - self.container_id = container_id - self.protected_item_count = protected_item_count - self.dpm_agent_version = dpm_agent_version - self.dpm_servers = dpm_servers - self.upgrade_available = upgrade_available - self.protection_status = protection_status - self.extended_info = extended_info - self.protectable_object_type = 'DPMContainer' + def __init__(self, **kwargs): + super(DpmContainer, self).__init__(**kwargs) + self.can_re_register = kwargs.get('can_re_register', None) + self.container_id = kwargs.get('container_id', None) + self.protected_item_count = kwargs.get('protected_item_count', None) + self.dpm_agent_version = kwargs.get('dpm_agent_version', None) + self.dpm_servers = kwargs.get('dpm_servers', None) + self.upgrade_available = kwargs.get('upgrade_available', None) + self.protection_status = kwargs.get('protection_status', None) + self.extended_info = kwargs.get('extended_info', None) + self.container_type = 'DPMContainer' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_container_extended_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_container_extended_info.py index 07e66a823f12..67bffbfbb39f 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_container_extended_info.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_container_extended_info.py @@ -23,5 +23,6 @@ class DPMContainerExtendedInfo(Model): 'last_refreshed_at': {'key': 'lastRefreshedAt', 'type': 'iso-8601'}, } - def __init__(self, last_refreshed_at=None): - self.last_refreshed_at = last_refreshed_at + def __init__(self, **kwargs): + super(DPMContainerExtendedInfo, self).__init__(**kwargs) + self.last_refreshed_at = kwargs.get('last_refreshed_at', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_container_extended_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_container_extended_info_py3.py new file mode 100644 index 000000000000..4af64b9cbc4b --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_container_extended_info_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DPMContainerExtendedInfo(Model): + """Additional information of the DPMContainer. + + :param last_refreshed_at: Last refresh time of the DPMContainer. + :type last_refreshed_at: datetime + """ + + _attribute_map = { + 'last_refreshed_at': {'key': 'lastRefreshedAt', 'type': 'iso-8601'}, + } + + def __init__(self, *, last_refreshed_at=None, **kwargs) -> None: + super(DPMContainerExtendedInfo, self).__init__(**kwargs) + self.last_refreshed_at = last_refreshed_at diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_container_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_container_py3.py new file mode 100644 index 000000000000..e22cb7d8a8f9 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_container_py3.py @@ -0,0 +1,84 @@ +# 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 .protection_container_py3 import ProtectionContainer + + +class DpmContainer(ProtectionContainer): + """DPM workload-specific protection container. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name of the container. + :type friendly_name: str + :param backup_management_type: Type of backup managemenent for the + container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param registration_status: Status of registration of the container with + the Recovery Services Vault. + :type registration_status: str + :param health_status: Status of health of the container. + :type health_status: str + :param container_type: Required. Constant filled by server. + :type container_type: str + :param can_re_register: Specifies whether the container is re-registrable. + :type can_re_register: bool + :param container_id: ID of container. + :type container_id: str + :param protected_item_count: Number of protected items in the BackupEngine + :type protected_item_count: long + :param dpm_agent_version: Backup engine Agent version + :type dpm_agent_version: str + :param dpm_servers: List of BackupEngines protecting the container + :type dpm_servers: list[str] + :param upgrade_available: To check if upgrade available + :type upgrade_available: bool + :param protection_status: Protection status of the container. + :type protection_status: str + :param extended_info: Extended Info of the container. + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.DPMContainerExtendedInfo + """ + + _validation = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_type': {'key': 'containerType', 'type': 'str'}, + 'can_re_register': {'key': 'canReRegister', 'type': 'bool'}, + 'container_id': {'key': 'containerId', 'type': 'str'}, + 'protected_item_count': {'key': 'protectedItemCount', 'type': 'long'}, + 'dpm_agent_version': {'key': 'dpmAgentVersion', 'type': 'str'}, + 'dpm_servers': {'key': 'dpmServers', 'type': '[str]'}, + 'upgrade_available': {'key': 'upgradeAvailable', 'type': 'bool'}, + 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'DPMContainerExtendedInfo'}, + } + + def __init__(self, *, friendly_name: str=None, backup_management_type=None, registration_status: str=None, health_status: str=None, can_re_register: bool=None, container_id: str=None, protected_item_count: int=None, dpm_agent_version: str=None, dpm_servers=None, upgrade_available: bool=None, protection_status: str=None, extended_info=None, **kwargs) -> None: + super(DpmContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status, **kwargs) + self.can_re_register = can_re_register + self.container_id = container_id + self.protected_item_count = protected_item_count + self.dpm_agent_version = dpm_agent_version + self.dpm_servers = dpm_servers + self.upgrade_available = upgrade_available + self.protection_status = protection_status + self.extended_info = extended_info + self.container_type = 'DPMContainer' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_error_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_error_info.py index 35d1c704762f..5d932919b0b4 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_error_info.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_error_info.py @@ -19,7 +19,7 @@ class DpmErrorInfo(Model): :type error_string: str :param recommendations: List of localized recommendations for above error code. - :type recommendations: list of str + :type recommendations: list[str] """ _attribute_map = { @@ -27,6 +27,7 @@ class DpmErrorInfo(Model): 'recommendations': {'key': 'recommendations', 'type': '[str]'}, } - def __init__(self, error_string=None, recommendations=None): - self.error_string = error_string - self.recommendations = recommendations + def __init__(self, **kwargs): + super(DpmErrorInfo, self).__init__(**kwargs) + self.error_string = kwargs.get('error_string', None) + self.recommendations = kwargs.get('recommendations', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_error_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_error_info_py3.py new file mode 100644 index 000000000000..e4806c947e22 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_error_info_py3.py @@ -0,0 +1,33 @@ +# 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 DpmErrorInfo(Model): + """DPM workload-specific error information. + + :param error_string: Localized error string. + :type error_string: str + :param recommendations: List of localized recommendations for above error + code. + :type recommendations: list[str] + """ + + _attribute_map = { + 'error_string': {'key': 'errorString', 'type': 'str'}, + 'recommendations': {'key': 'recommendations', 'type': '[str]'}, + } + + def __init__(self, *, error_string: str=None, recommendations=None, **kwargs) -> None: + super(DpmErrorInfo, self).__init__(**kwargs) + self.error_string = error_string + self.recommendations = recommendations diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_job.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_job.py index 9f4fb0794329..cbd00e99a4ce 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_job.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_job.py @@ -15,14 +15,17 @@ class DpmJob(Job): """DPM workload-specifc job object. + All required parameters must be populated in order to send to Azure. + :param entity_friendly_name: Friendly name of the entity on which the current job is executing. :type entity_friendly_name: str :param backup_management_type: Backup management type to execute the current job. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', - 'DPM', 'AzureBackupServer', 'AzureSql' - :type backup_management_type: str or :class:`BackupManagementType - ` + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType :param operation: The operation name. :type operation: str :param status: Job status. @@ -33,7 +36,7 @@ class DpmJob(Job): :type end_time: datetime :param activity_id: ActivityId of job. :type activity_id: str - :param job_type: Polymorphic Discriminator + :param job_type: Required. Constant filled by server. :type job_type: str :param duration: Time elapsed for job. :type duration: timedelta @@ -49,14 +52,14 @@ class DpmJob(Job): :type workload_type: str :param actions_info: The state/actions applicable on this job like cancel/retry. - :type actions_info: list of str or :class:`JobSupportedAction - ` + :type actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] :param error_details: The errors. - :type error_details: list of :class:`DpmErrorInfo - ` + :type error_details: + list[~azure.mgmt.recoveryservicesbackup.models.DpmErrorInfo] :param extended_info: Additional information for this job. - :type extended_info: :class:`DpmJobExtendedInfo - ` + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.DpmJobExtendedInfo """ _validation = { @@ -82,14 +85,14 @@ class DpmJob(Job): 'extended_info': {'key': 'extendedInfo', 'type': 'DpmJobExtendedInfo'}, } - def __init__(self, entity_friendly_name=None, backup_management_type=None, operation=None, status=None, start_time=None, end_time=None, activity_id=None, duration=None, dpm_server_name=None, container_name=None, container_type=None, workload_type=None, actions_info=None, error_details=None, extended_info=None): - super(DpmJob, self).__init__(entity_friendly_name=entity_friendly_name, backup_management_type=backup_management_type, operation=operation, status=status, start_time=start_time, end_time=end_time, activity_id=activity_id) - self.duration = duration - self.dpm_server_name = dpm_server_name - self.container_name = container_name - self.container_type = container_type - self.workload_type = workload_type - self.actions_info = actions_info - self.error_details = error_details - self.extended_info = extended_info + def __init__(self, **kwargs): + super(DpmJob, self).__init__(**kwargs) + self.duration = kwargs.get('duration', None) + self.dpm_server_name = kwargs.get('dpm_server_name', None) + self.container_name = kwargs.get('container_name', None) + self.container_type = kwargs.get('container_type', None) + self.workload_type = kwargs.get('workload_type', None) + self.actions_info = kwargs.get('actions_info', None) + self.error_details = kwargs.get('error_details', None) + self.extended_info = kwargs.get('extended_info', None) self.job_type = 'DpmJob' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_job_extended_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_job_extended_info.py index 11c596d89593..838e5e040ec4 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_job_extended_info.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_job_extended_info.py @@ -16,10 +16,10 @@ class DpmJobExtendedInfo(Model): """Additional information on the DPM workload-specific job. :param tasks_list: List of tasks associated with this job. - :type tasks_list: list of :class:`DpmJobTaskDetails - ` + :type tasks_list: + list[~azure.mgmt.recoveryservicesbackup.models.DpmJobTaskDetails] :param property_bag: The job properties. - :type property_bag: dict + :type property_bag: dict[str, str] :param dynamic_error_message: Non localized error message on job execution. :type dynamic_error_message: str @@ -31,7 +31,8 @@ class DpmJobExtendedInfo(Model): 'dynamic_error_message': {'key': 'dynamicErrorMessage', 'type': 'str'}, } - def __init__(self, tasks_list=None, property_bag=None, dynamic_error_message=None): - self.tasks_list = tasks_list - self.property_bag = property_bag - self.dynamic_error_message = dynamic_error_message + def __init__(self, **kwargs): + super(DpmJobExtendedInfo, self).__init__(**kwargs) + self.tasks_list = kwargs.get('tasks_list', None) + self.property_bag = kwargs.get('property_bag', None) + self.dynamic_error_message = kwargs.get('dynamic_error_message', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_job_extended_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_job_extended_info_py3.py new file mode 100644 index 000000000000..577a16ff7e97 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_job_extended_info_py3.py @@ -0,0 +1,38 @@ +# 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 DpmJobExtendedInfo(Model): + """Additional information on the DPM workload-specific job. + + :param tasks_list: List of tasks associated with this job. + :type tasks_list: + list[~azure.mgmt.recoveryservicesbackup.models.DpmJobTaskDetails] + :param property_bag: The job properties. + :type property_bag: dict[str, str] + :param dynamic_error_message: Non localized error message on job + execution. + :type dynamic_error_message: str + """ + + _attribute_map = { + 'tasks_list': {'key': 'tasksList', 'type': '[DpmJobTaskDetails]'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'dynamic_error_message': {'key': 'dynamicErrorMessage', 'type': 'str'}, + } + + def __init__(self, *, tasks_list=None, property_bag=None, dynamic_error_message: str=None, **kwargs) -> None: + super(DpmJobExtendedInfo, self).__init__(**kwargs) + self.tasks_list = tasks_list + self.property_bag = property_bag + self.dynamic_error_message = dynamic_error_message diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_job_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_job_py3.py new file mode 100644 index 000000000000..bdf9247db742 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_job_py3.py @@ -0,0 +1,98 @@ +# 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 .job_py3 import Job + + +class DpmJob(Job): + """DPM workload-specifc job object. + + All required parameters must be populated in order to send to Azure. + + :param entity_friendly_name: Friendly name of the entity on which the + current job is executing. + :type entity_friendly_name: str + :param backup_management_type: Backup management type to execute the + current job. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param operation: The operation name. + :type operation: str + :param status: Job status. + :type status: str + :param start_time: The start time. + :type start_time: datetime + :param end_time: The end time. + :type end_time: datetime + :param activity_id: ActivityId of job. + :type activity_id: str + :param job_type: Required. Constant filled by server. + :type job_type: str + :param duration: Time elapsed for job. + :type duration: timedelta + :param dpm_server_name: DPM server name managing the backup item or backup + job. + :type dpm_server_name: str + :param container_name: Name of cluster/server protecting current backup + item, if any. + :type container_name: str + :param container_type: Type of container. + :type container_type: str + :param workload_type: Type of backup item. + :type workload_type: str + :param actions_info: The state/actions applicable on this job like + cancel/retry. + :type actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] + :param error_details: The errors. + :type error_details: + list[~azure.mgmt.recoveryservicesbackup.models.DpmErrorInfo] + :param extended_info: Additional information for this job. + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.DpmJobExtendedInfo + """ + + _validation = { + 'job_type': {'required': True}, + } + + _attribute_map = { + 'entity_friendly_name': {'key': 'entityFriendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'activity_id': {'key': 'activityId', 'type': 'str'}, + 'job_type': {'key': 'jobType', 'type': 'str'}, + 'duration': {'key': 'duration', 'type': 'duration'}, + 'dpm_server_name': {'key': 'dpmServerName', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'container_type': {'key': 'containerType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'actions_info': {'key': 'actionsInfo', 'type': '[JobSupportedAction]'}, + 'error_details': {'key': 'errorDetails', 'type': '[DpmErrorInfo]'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'DpmJobExtendedInfo'}, + } + + def __init__(self, *, entity_friendly_name: str=None, backup_management_type=None, operation: str=None, status: str=None, start_time=None, end_time=None, activity_id: str=None, duration=None, dpm_server_name: str=None, container_name: str=None, container_type: str=None, workload_type: str=None, actions_info=None, error_details=None, extended_info=None, **kwargs) -> None: + super(DpmJob, self).__init__(entity_friendly_name=entity_friendly_name, backup_management_type=backup_management_type, operation=operation, status=status, start_time=start_time, end_time=end_time, activity_id=activity_id, **kwargs) + self.duration = duration + self.dpm_server_name = dpm_server_name + self.container_name = container_name + self.container_type = container_type + self.workload_type = workload_type + self.actions_info = actions_info + self.error_details = error_details + self.extended_info = extended_info + self.job_type = 'DpmJob' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_job_task_details.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_job_task_details.py index 99ae0f74d0a4..66ad8b27d105 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_job_task_details.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_job_task_details.py @@ -35,9 +35,10 @@ class DpmJobTaskDetails(Model): 'status': {'key': 'status', 'type': 'str'}, } - def __init__(self, task_id=None, start_time=None, end_time=None, duration=None, status=None): - self.task_id = task_id - self.start_time = start_time - self.end_time = end_time - self.duration = duration - self.status = status + def __init__(self, **kwargs): + super(DpmJobTaskDetails, self).__init__(**kwargs) + self.task_id = kwargs.get('task_id', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.duration = kwargs.get('duration', None) + self.status = kwargs.get('status', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_job_task_details_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_job_task_details_py3.py new file mode 100644 index 000000000000..aa641bd67510 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_job_task_details_py3.py @@ -0,0 +1,44 @@ +# 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 DpmJobTaskDetails(Model): + """DPM workload-specific job task details. + + :param task_id: The task display name. + :type task_id: str + :param start_time: The start time. + :type start_time: datetime + :param end_time: The end time. + :type end_time: datetime + :param duration: Time elapsed for task. + :type duration: timedelta + :param status: The status. + :type status: str + """ + + _attribute_map = { + 'task_id': {'key': 'taskId', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'duration': {'key': 'duration', 'type': 'duration'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, *, task_id: str=None, start_time=None, end_time=None, duration=None, status: str=None, **kwargs) -> None: + super(DpmJobTaskDetails, self).__init__(**kwargs) + self.task_id = task_id + self.start_time = start_time + self.end_time = end_time + self.duration = duration + self.status = status diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_protected_item.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_protected_item.py index a718e01852e5..c6ebdd4f0a1c 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_protected_item.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_protected_item.py @@ -15,17 +15,20 @@ class DPMProtectedItem(ProtectedItem): """Additional information on Backup engine specific backup item. + All required parameters must be populated in order to send to Azure. + :param backup_management_type: Type of backup managemenent for the backed up item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', - 'AzureBackupServer', 'AzureSql' - :type backup_management_type: str or :class:`BackupManagementType - ` + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType :param workload_type: Type of workload this item represents. Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', - 'GenericDataSource' - :type workload_type: str or :class:`DataSourceType - ` + 'GenericDataSource', 'SQLDataBase', 'AzureFileShare' + :type workload_type: str or + ~azure.mgmt.recoveryservicesbackup.models.DataSourceType :param container_name: Unique name of container :type container_name: str :param source_resource_id: ARM ID of the resource to be backed up. @@ -36,7 +39,9 @@ class DPMProtectedItem(ProtectedItem): :param last_recovery_point: Timestamp when the last (latest) backup copy was created for this backup item. :type last_recovery_point: datetime - :param protected_item_type: Polymorphic Discriminator + :param backup_set_name: Name of the backup set the backup item belongs to + :type backup_set_name: str + :param protected_item_type: Required. Constant filled by server. :type protected_item_type: str :param friendly_name: Friendly name of the managed item :type friendly_name: str @@ -46,14 +51,14 @@ class DPMProtectedItem(ProtectedItem): :param protection_state: Protection state of the backupengine. Possible values include: 'Invalid', 'IRPending', 'Protected', 'ProtectionError', 'ProtectionStopped', 'ProtectionPaused' - :type protection_state: str or :class:`ProtectedItemState - ` + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemState :param is_scheduled_for_deferred_delete: To check if backup item is scheduled for deferred delete :type is_scheduled_for_deferred_delete: bool :param extended_info: Extended info of the backup item. - :type extended_info: :class:`DPMProtectedItemExtendedInfo - ` + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.DPMProtectedItemExtendedInfo """ _validation = { @@ -67,6 +72,7 @@ class DPMProtectedItem(ProtectedItem): 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, 'policy_id': {'key': 'policyId', 'type': 'str'}, 'last_recovery_point': {'key': 'lastRecoveryPoint', 'type': 'iso-8601'}, + 'backup_set_name': {'key': 'backupSetName', 'type': 'str'}, 'protected_item_type': {'key': 'protectedItemType', 'type': 'str'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'backup_engine_name': {'key': 'backupEngineName', 'type': 'str'}, @@ -75,11 +81,11 @@ class DPMProtectedItem(ProtectedItem): 'extended_info': {'key': 'extendedInfo', 'type': 'DPMProtectedItemExtendedInfo'}, } - def __init__(self, backup_management_type=None, workload_type=None, container_name=None, source_resource_id=None, policy_id=None, last_recovery_point=None, friendly_name=None, backup_engine_name=None, protection_state=None, is_scheduled_for_deferred_delete=None, extended_info=None): - super(DPMProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point) - self.friendly_name = friendly_name - self.backup_engine_name = backup_engine_name - self.protection_state = protection_state - self.is_scheduled_for_deferred_delete = is_scheduled_for_deferred_delete - self.extended_info = extended_info + def __init__(self, **kwargs): + super(DPMProtectedItem, self).__init__(**kwargs) + self.friendly_name = kwargs.get('friendly_name', None) + self.backup_engine_name = kwargs.get('backup_engine_name', None) + self.protection_state = kwargs.get('protection_state', None) + self.is_scheduled_for_deferred_delete = kwargs.get('is_scheduled_for_deferred_delete', None) + self.extended_info = kwargs.get('extended_info', None) self.protected_item_type = 'DPMProtectedItem' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_protected_item_extended_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_protected_item_extended_info.py index 25d1e65d3620..0b09e52b592e 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_protected_item_extended_info.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_protected_item_extended_info.py @@ -17,7 +17,7 @@ class DPMProtectedItemExtendedInfo(Model): :param protectable_object_load_path: Attribute to provide information on various DBs. - :type protectable_object_load_path: dict + :type protectable_object_load_path: dict[str, str] :param protected: To check if backup item is disk protected. :type protected: bool :param is_present_on_cloud: To check if backup item is cloud protected. @@ -63,18 +63,19 @@ class DPMProtectedItemExtendedInfo(Model): 'total_disk_storage_size_in_bytes': {'key': 'totalDiskStorageSizeInBytes', 'type': 'str'}, } - def __init__(self, protectable_object_load_path=None, protected=None, is_present_on_cloud=None, last_backup_status=None, last_refreshed_at=None, oldest_recovery_point=None, recovery_point_count=None, on_premise_oldest_recovery_point=None, on_premise_latest_recovery_point=None, on_premise_recovery_point_count=None, is_collocated=None, protection_group_name=None, disk_storage_used_in_bytes=None, total_disk_storage_size_in_bytes=None): - self.protectable_object_load_path = protectable_object_load_path - self.protected = protected - self.is_present_on_cloud = is_present_on_cloud - self.last_backup_status = last_backup_status - self.last_refreshed_at = last_refreshed_at - self.oldest_recovery_point = oldest_recovery_point - self.recovery_point_count = recovery_point_count - self.on_premise_oldest_recovery_point = on_premise_oldest_recovery_point - self.on_premise_latest_recovery_point = on_premise_latest_recovery_point - self.on_premise_recovery_point_count = on_premise_recovery_point_count - self.is_collocated = is_collocated - self.protection_group_name = protection_group_name - self.disk_storage_used_in_bytes = disk_storage_used_in_bytes - self.total_disk_storage_size_in_bytes = total_disk_storage_size_in_bytes + def __init__(self, **kwargs): + super(DPMProtectedItemExtendedInfo, self).__init__(**kwargs) + self.protectable_object_load_path = kwargs.get('protectable_object_load_path', None) + self.protected = kwargs.get('protected', None) + self.is_present_on_cloud = kwargs.get('is_present_on_cloud', None) + self.last_backup_status = kwargs.get('last_backup_status', None) + self.last_refreshed_at = kwargs.get('last_refreshed_at', None) + self.oldest_recovery_point = kwargs.get('oldest_recovery_point', None) + self.recovery_point_count = kwargs.get('recovery_point_count', None) + self.on_premise_oldest_recovery_point = kwargs.get('on_premise_oldest_recovery_point', None) + self.on_premise_latest_recovery_point = kwargs.get('on_premise_latest_recovery_point', None) + self.on_premise_recovery_point_count = kwargs.get('on_premise_recovery_point_count', None) + self.is_collocated = kwargs.get('is_collocated', None) + self.protection_group_name = kwargs.get('protection_group_name', None) + self.disk_storage_used_in_bytes = kwargs.get('disk_storage_used_in_bytes', None) + self.total_disk_storage_size_in_bytes = kwargs.get('total_disk_storage_size_in_bytes', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_protected_item_extended_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_protected_item_extended_info_py3.py new file mode 100644 index 000000000000..3458fdb847e8 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_protected_item_extended_info_py3.py @@ -0,0 +1,81 @@ +# 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 DPMProtectedItemExtendedInfo(Model): + """Additional information of DPM Protected item. + + :param protectable_object_load_path: Attribute to provide information on + various DBs. + :type protectable_object_load_path: dict[str, str] + :param protected: To check if backup item is disk protected. + :type protected: bool + :param is_present_on_cloud: To check if backup item is cloud protected. + :type is_present_on_cloud: bool + :param last_backup_status: Last backup status information on backup item. + :type last_backup_status: str + :param last_refreshed_at: Last refresh time on backup item. + :type last_refreshed_at: datetime + :param oldest_recovery_point: Oldest cloud recovery point time. + :type oldest_recovery_point: datetime + :param recovery_point_count: cloud recovery point count. + :type recovery_point_count: int + :param on_premise_oldest_recovery_point: Oldest disk recovery point time. + :type on_premise_oldest_recovery_point: datetime + :param on_premise_latest_recovery_point: latest disk recovery point time. + :type on_premise_latest_recovery_point: datetime + :param on_premise_recovery_point_count: disk recovery point count. + :type on_premise_recovery_point_count: int + :param is_collocated: To check if backup item is collocated. + :type is_collocated: bool + :param protection_group_name: Protection group name of the backup item. + :type protection_group_name: str + :param disk_storage_used_in_bytes: Used Disk storage in bytes. + :type disk_storage_used_in_bytes: str + :param total_disk_storage_size_in_bytes: total Disk storage in bytes. + :type total_disk_storage_size_in_bytes: str + """ + + _attribute_map = { + 'protectable_object_load_path': {'key': 'protectableObjectLoadPath', 'type': '{str}'}, + 'protected': {'key': 'protected', 'type': 'bool'}, + 'is_present_on_cloud': {'key': 'isPresentOnCloud', 'type': 'bool'}, + 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, + 'last_refreshed_at': {'key': 'lastRefreshedAt', 'type': 'iso-8601'}, + 'oldest_recovery_point': {'key': 'oldestRecoveryPoint', 'type': 'iso-8601'}, + 'recovery_point_count': {'key': 'recoveryPointCount', 'type': 'int'}, + 'on_premise_oldest_recovery_point': {'key': 'onPremiseOldestRecoveryPoint', 'type': 'iso-8601'}, + 'on_premise_latest_recovery_point': {'key': 'onPremiseLatestRecoveryPoint', 'type': 'iso-8601'}, + 'on_premise_recovery_point_count': {'key': 'onPremiseRecoveryPointCount', 'type': 'int'}, + 'is_collocated': {'key': 'isCollocated', 'type': 'bool'}, + 'protection_group_name': {'key': 'protectionGroupName', 'type': 'str'}, + 'disk_storage_used_in_bytes': {'key': 'diskStorageUsedInBytes', 'type': 'str'}, + 'total_disk_storage_size_in_bytes': {'key': 'totalDiskStorageSizeInBytes', 'type': 'str'}, + } + + def __init__(self, *, protectable_object_load_path=None, protected: bool=None, is_present_on_cloud: bool=None, last_backup_status: str=None, last_refreshed_at=None, oldest_recovery_point=None, recovery_point_count: int=None, on_premise_oldest_recovery_point=None, on_premise_latest_recovery_point=None, on_premise_recovery_point_count: int=None, is_collocated: bool=None, protection_group_name: str=None, disk_storage_used_in_bytes: str=None, total_disk_storage_size_in_bytes: str=None, **kwargs) -> None: + super(DPMProtectedItemExtendedInfo, self).__init__(**kwargs) + self.protectable_object_load_path = protectable_object_load_path + self.protected = protected + self.is_present_on_cloud = is_present_on_cloud + self.last_backup_status = last_backup_status + self.last_refreshed_at = last_refreshed_at + self.oldest_recovery_point = oldest_recovery_point + self.recovery_point_count = recovery_point_count + self.on_premise_oldest_recovery_point = on_premise_oldest_recovery_point + self.on_premise_latest_recovery_point = on_premise_latest_recovery_point + self.on_premise_recovery_point_count = on_premise_recovery_point_count + self.is_collocated = is_collocated + self.protection_group_name = protection_group_name + self.disk_storage_used_in_bytes = disk_storage_used_in_bytes + self.total_disk_storage_size_in_bytes = total_disk_storage_size_in_bytes diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_protected_item_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_protected_item_py3.py new file mode 100644 index 000000000000..0796c3150308 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/dpm_protected_item_py3.py @@ -0,0 +1,91 @@ +# 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 .protected_item_py3 import ProtectedItem + + +class DPMProtectedItem(ProtectedItem): + """Additional information on Backup engine specific backup item. + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent for the backed + up item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param workload_type: Type of workload this item represents. Possible + values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', + 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + 'GenericDataSource', 'SQLDataBase', 'AzureFileShare' + :type workload_type: str or + ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :param container_name: Unique name of container + :type container_name: str + :param source_resource_id: ARM ID of the resource to be backed up. + :type source_resource_id: str + :param policy_id: ID of the backup policy with which this item is backed + up. + :type policy_id: str + :param last_recovery_point: Timestamp when the last (latest) backup copy + was created for this backup item. + :type last_recovery_point: datetime + :param backup_set_name: Name of the backup set the backup item belongs to + :type backup_set_name: str + :param protected_item_type: Required. Constant filled by server. + :type protected_item_type: str + :param friendly_name: Friendly name of the managed item + :type friendly_name: str + :param backup_engine_name: Backup Management server protecting this backup + item + :type backup_engine_name: str + :param protection_state: Protection state of the backupengine. Possible + values include: 'Invalid', 'IRPending', 'Protected', 'ProtectionError', + 'ProtectionStopped', 'ProtectionPaused' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemState + :param is_scheduled_for_deferred_delete: To check if backup item is + scheduled for deferred delete + :type is_scheduled_for_deferred_delete: bool + :param extended_info: Extended info of the backup item. + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.DPMProtectedItemExtendedInfo + """ + + _validation = { + 'protected_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'policy_id': {'key': 'policyId', 'type': 'str'}, + 'last_recovery_point': {'key': 'lastRecoveryPoint', 'type': 'iso-8601'}, + 'backup_set_name': {'key': 'backupSetName', 'type': 'str'}, + 'protected_item_type': {'key': 'protectedItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_engine_name': {'key': 'backupEngineName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'is_scheduled_for_deferred_delete': {'key': 'isScheduledForDeferredDelete', 'type': 'bool'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'DPMProtectedItemExtendedInfo'}, + } + + def __init__(self, *, backup_management_type=None, workload_type=None, container_name: str=None, source_resource_id: str=None, policy_id: str=None, last_recovery_point=None, backup_set_name: str=None, friendly_name: str=None, backup_engine_name: str=None, protection_state=None, is_scheduled_for_deferred_delete: bool=None, extended_info=None, **kwargs) -> None: + super(DPMProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, **kwargs) + self.friendly_name = friendly_name + self.backup_engine_name = backup_engine_name + self.protection_state = protection_state + self.is_scheduled_for_deferred_delete = is_scheduled_for_deferred_delete + self.extended_info = extended_info + self.protected_item_type = 'DPMProtectedItem' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/encryption_details.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/encryption_details.py index 409b93a678fd..3444fbcb0414 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/encryption_details.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/encryption_details.py @@ -36,9 +36,10 @@ class EncryptionDetails(Model): 'secret_key_vault_id': {'key': 'secretKeyVaultId', 'type': 'str'}, } - def __init__(self, encryption_enabled=None, kek_url=None, secret_key_url=None, kek_vault_id=None, secret_key_vault_id=None): - self.encryption_enabled = encryption_enabled - self.kek_url = kek_url - self.secret_key_url = secret_key_url - self.kek_vault_id = kek_vault_id - self.secret_key_vault_id = secret_key_vault_id + def __init__(self, **kwargs): + super(EncryptionDetails, self).__init__(**kwargs) + self.encryption_enabled = kwargs.get('encryption_enabled', None) + self.kek_url = kwargs.get('kek_url', None) + self.secret_key_url = kwargs.get('secret_key_url', None) + self.kek_vault_id = kwargs.get('kek_vault_id', None) + self.secret_key_vault_id = kwargs.get('secret_key_vault_id', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/encryption_details_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/encryption_details_py3.py new file mode 100644 index 000000000000..1549a4f757c9 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/encryption_details_py3.py @@ -0,0 +1,45 @@ +# 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 EncryptionDetails(Model): + """Details needed if the VM was encrypted at the time of backup. + + :param encryption_enabled: Identifies whether this backup copy represents + an encrypted VM at the time of backup. + :type encryption_enabled: bool + :param kek_url: Key Url. + :type kek_url: str + :param secret_key_url: Secret Url. + :type secret_key_url: str + :param kek_vault_id: ID of Key Vault where KEK is stored. + :type kek_vault_id: str + :param secret_key_vault_id: ID of Key Vault where Secret is stored. + :type secret_key_vault_id: str + """ + + _attribute_map = { + 'encryption_enabled': {'key': 'encryptionEnabled', 'type': 'bool'}, + 'kek_url': {'key': 'kekUrl', 'type': 'str'}, + 'secret_key_url': {'key': 'secretKeyUrl', 'type': 'str'}, + 'kek_vault_id': {'key': 'kekVaultId', 'type': 'str'}, + 'secret_key_vault_id': {'key': 'secretKeyVaultId', 'type': 'str'}, + } + + def __init__(self, *, encryption_enabled: bool=None, kek_url: str=None, secret_key_url: str=None, kek_vault_id: str=None, secret_key_vault_id: str=None, **kwargs) -> None: + super(EncryptionDetails, self).__init__(**kwargs) + self.encryption_enabled = encryption_enabled + self.kek_url = kek_url + self.secret_key_url = secret_key_url + self.kek_vault_id = kek_vault_id + self.secret_key_vault_id = secret_key_vault_id diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/error_detail.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/error_detail.py new file mode 100644 index 000000000000..6214b21c5eed --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/error_detail.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ErrorDetail(Model): + """Error Detail class which encapsulates Code, Message and Recommendations. + + :param code: Error code. + :type code: str + :param message: Error Message related to the Code. + :type message: str + :param recommendations: List of recommendation strings. + :type recommendations: list[str] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'recommendations': {'key': 'recommendations', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(ErrorDetail, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.recommendations = kwargs.get('recommendations', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/error_detail_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/error_detail_py3.py new file mode 100644 index 000000000000..3b5282aeeaac --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/error_detail_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ErrorDetail(Model): + """Error Detail class which encapsulates Code, Message and Recommendations. + + :param code: Error code. + :type code: str + :param message: Error Message related to the Code. + :type message: str + :param recommendations: List of recommendation strings. + :type recommendations: list[str] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'recommendations': {'key': 'recommendations', 'type': '[str]'}, + } + + def __init__(self, *, code: str=None, message: str=None, recommendations=None, **kwargs) -> None: + super(ErrorDetail, self).__init__(**kwargs) + self.code = code + self.message = message + self.recommendations = recommendations diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/export_jobs_operation_result_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/export_jobs_operation_result_info.py index b2a6358e8ca4..cbfd3d06c161 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/export_jobs_operation_result_info.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/export_jobs_operation_result_info.py @@ -15,7 +15,9 @@ class ExportJobsOperationResultInfo(OperationResultInfoBase): """This class is used to send blob details after exporting jobs. - :param object_type: Polymorphic Discriminator + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. :type object_type: str :param blob_url: URL of the blob into which the serialized string of list of jobs is exported. @@ -34,8 +36,8 @@ class ExportJobsOperationResultInfo(OperationResultInfoBase): 'blob_sas_key': {'key': 'blobSasKey', 'type': 'str'}, } - def __init__(self, blob_url=None, blob_sas_key=None): - super(ExportJobsOperationResultInfo, self).__init__() - self.blob_url = blob_url - self.blob_sas_key = blob_sas_key + def __init__(self, **kwargs): + super(ExportJobsOperationResultInfo, self).__init__(**kwargs) + self.blob_url = kwargs.get('blob_url', None) + self.blob_sas_key = kwargs.get('blob_sas_key', None) self.object_type = 'ExportJobsOperationResultInfo' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/export_jobs_operation_result_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/export_jobs_operation_result_info_py3.py new file mode 100644 index 000000000000..1325aca53840 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/export_jobs_operation_result_info_py3.py @@ -0,0 +1,43 @@ +# 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 .operation_result_info_base_py3 import OperationResultInfoBase + + +class ExportJobsOperationResultInfo(OperationResultInfoBase): + """This class is used to send blob details after exporting jobs. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param blob_url: URL of the blob into which the serialized string of list + of jobs is exported. + :type blob_url: str + :param blob_sas_key: SAS key to access the blob. It expires in 15 mins. + :type blob_sas_key: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'blob_url': {'key': 'blobUrl', 'type': 'str'}, + 'blob_sas_key': {'key': 'blobSasKey', 'type': 'str'}, + } + + def __init__(self, *, blob_url: str=None, blob_sas_key: str=None, **kwargs) -> None: + super(ExportJobsOperationResultInfo, self).__init__(**kwargs) + self.blob_url = blob_url + self.blob_sas_key = blob_sas_key + self.object_type = 'ExportJobsOperationResultInfo' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/feature_support_request.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/feature_support_request.py new file mode 100644 index 000000000000..b739bdd9a923 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/feature_support_request.py @@ -0,0 +1,41 @@ +# 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 FeatureSupportRequest(Model): + """Base class for feature request. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureVMResourceFeatureSupportRequest + + All required parameters must be populated in order to send to Azure. + + :param feature_type: Required. Constant filled by server. + :type feature_type: str + """ + + _validation = { + 'feature_type': {'required': True}, + } + + _attribute_map = { + 'feature_type': {'key': 'featureType', 'type': 'str'}, + } + + _subtype_map = { + 'feature_type': {'AzureVMResourceBackup': 'AzureVMResourceFeatureSupportRequest'} + } + + def __init__(self, **kwargs): + super(FeatureSupportRequest, self).__init__(**kwargs) + self.feature_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/feature_support_request_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/feature_support_request_py3.py new file mode 100644 index 000000000000..ee165936837e --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/feature_support_request_py3.py @@ -0,0 +1,41 @@ +# 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 FeatureSupportRequest(Model): + """Base class for feature request. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureVMResourceFeatureSupportRequest + + All required parameters must be populated in order to send to Azure. + + :param feature_type: Required. Constant filled by server. + :type feature_type: str + """ + + _validation = { + 'feature_type': {'required': True}, + } + + _attribute_map = { + 'feature_type': {'key': 'featureType', 'type': 'str'}, + } + + _subtype_map = { + 'feature_type': {'AzureVMResourceBackup': 'AzureVMResourceFeatureSupportRequest'} + } + + def __init__(self, **kwargs) -> None: + super(FeatureSupportRequest, self).__init__(**kwargs) + self.feature_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_container.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_container.py new file mode 100644 index 000000000000..f6e8fff7ae9f --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_container.py @@ -0,0 +1,61 @@ +# 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 .protection_container import ProtectionContainer + + +class GenericContainer(ProtectionContainer): + """Base class for generic container of backup items. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name of the container. + :type friendly_name: str + :param backup_management_type: Type of backup managemenent for the + container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param registration_status: Status of registration of the container with + the Recovery Services Vault. + :type registration_status: str + :param health_status: Status of health of the container. + :type health_status: str + :param container_type: Required. Constant filled by server. + :type container_type: str + :param fabric_name: Name of the container's fabric + :type fabric_name: str + :param extended_information: Extended information (not returned in List + container API calls) + :type extended_information: + ~azure.mgmt.recoveryservicesbackup.models.GenericContainerExtendedInfo + """ + + _validation = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_type': {'key': 'containerType', 'type': 'str'}, + 'fabric_name': {'key': 'fabricName', 'type': 'str'}, + 'extended_information': {'key': 'extendedInformation', 'type': 'GenericContainerExtendedInfo'}, + } + + def __init__(self, **kwargs): + super(GenericContainer, self).__init__(**kwargs) + self.fabric_name = kwargs.get('fabric_name', None) + self.extended_information = kwargs.get('extended_information', None) + self.container_type = 'GenericContainer' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_container_extended_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_container_extended_info.py new file mode 100644 index 000000000000..b5873d24f8e7 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_container_extended_info.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class GenericContainerExtendedInfo(Model): + """Container extended information. + + :param raw_cert_data: Public key of container cert + :type raw_cert_data: str + :param container_identity_info: Container identity information + :type container_identity_info: + ~azure.mgmt.recoveryservicesbackup.models.ContainerIdentityInfo + :param service_endpoints: Azure Backup Service Endpoints for the container + :type service_endpoints: dict[str, str] + """ + + _attribute_map = { + 'raw_cert_data': {'key': 'rawCertData', 'type': 'str'}, + 'container_identity_info': {'key': 'containerIdentityInfo', 'type': 'ContainerIdentityInfo'}, + 'service_endpoints': {'key': 'serviceEndpoints', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(GenericContainerExtendedInfo, self).__init__(**kwargs) + self.raw_cert_data = kwargs.get('raw_cert_data', None) + self.container_identity_info = kwargs.get('container_identity_info', None) + self.service_endpoints = kwargs.get('service_endpoints', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_container_extended_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_container_extended_info_py3.py new file mode 100644 index 000000000000..fdec4c143961 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_container_extended_info_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class GenericContainerExtendedInfo(Model): + """Container extended information. + + :param raw_cert_data: Public key of container cert + :type raw_cert_data: str + :param container_identity_info: Container identity information + :type container_identity_info: + ~azure.mgmt.recoveryservicesbackup.models.ContainerIdentityInfo + :param service_endpoints: Azure Backup Service Endpoints for the container + :type service_endpoints: dict[str, str] + """ + + _attribute_map = { + 'raw_cert_data': {'key': 'rawCertData', 'type': 'str'}, + 'container_identity_info': {'key': 'containerIdentityInfo', 'type': 'ContainerIdentityInfo'}, + 'service_endpoints': {'key': 'serviceEndpoints', 'type': '{str}'}, + } + + def __init__(self, *, raw_cert_data: str=None, container_identity_info=None, service_endpoints=None, **kwargs) -> None: + super(GenericContainerExtendedInfo, self).__init__(**kwargs) + self.raw_cert_data = raw_cert_data + self.container_identity_info = container_identity_info + self.service_endpoints = service_endpoints diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_container_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_container_py3.py new file mode 100644 index 000000000000..798bed079b56 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_container_py3.py @@ -0,0 +1,61 @@ +# 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 .protection_container_py3 import ProtectionContainer + + +class GenericContainer(ProtectionContainer): + """Base class for generic container of backup items. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name of the container. + :type friendly_name: str + :param backup_management_type: Type of backup managemenent for the + container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param registration_status: Status of registration of the container with + the Recovery Services Vault. + :type registration_status: str + :param health_status: Status of health of the container. + :type health_status: str + :param container_type: Required. Constant filled by server. + :type container_type: str + :param fabric_name: Name of the container's fabric + :type fabric_name: str + :param extended_information: Extended information (not returned in List + container API calls) + :type extended_information: + ~azure.mgmt.recoveryservicesbackup.models.GenericContainerExtendedInfo + """ + + _validation = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_type': {'key': 'containerType', 'type': 'str'}, + 'fabric_name': {'key': 'fabricName', 'type': 'str'}, + 'extended_information': {'key': 'extendedInformation', 'type': 'GenericContainerExtendedInfo'}, + } + + def __init__(self, *, friendly_name: str=None, backup_management_type=None, registration_status: str=None, health_status: str=None, fabric_name: str=None, extended_information=None, **kwargs) -> None: + super(GenericContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status, **kwargs) + self.fabric_name = fabric_name + self.extended_information = extended_information + self.container_type = 'GenericContainer' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_protected_item.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_protected_item.py new file mode 100644 index 000000000000..94562b06e9e5 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_protected_item.py @@ -0,0 +1,94 @@ +# 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 .protected_item import ProtectedItem + + +class GenericProtectedItem(ProtectedItem): + """Base class for backup items. + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent for the backed + up item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param workload_type: Type of workload this item represents. Possible + values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', + 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + 'GenericDataSource', 'SQLDataBase', 'AzureFileShare' + :type workload_type: str or + ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :param container_name: Unique name of container + :type container_name: str + :param source_resource_id: ARM ID of the resource to be backed up. + :type source_resource_id: str + :param policy_id: ID of the backup policy with which this item is backed + up. + :type policy_id: str + :param last_recovery_point: Timestamp when the last (latest) backup copy + was created for this backup item. + :type last_recovery_point: datetime + :param backup_set_name: Name of the backup set the backup item belongs to + :type backup_set_name: str + :param protected_item_type: Required. Constant filled by server. + :type protected_item_type: str + :param friendly_name: Friendly name of the container. + :type friendly_name: str + :param policy_state: Indicates consistency of policy object and policy + applied to this backup item. + :type policy_state: str + :param protection_state: Backup state of this backup item. Possible values + include: 'Invalid', 'IRPending', 'Protected', 'ProtectionError', + 'ProtectionStopped', 'ProtectionPaused' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionState + :param protected_item_id: Data Plane Service ID of the protected item. + :type protected_item_id: long + :param source_associations: Loosely coupled (type, value) associations + (example - parent of a protected item) + :type source_associations: dict[str, str] + :param fabric_name: Name of this backup item's fabric. + :type fabric_name: str + """ + + _validation = { + 'protected_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'policy_id': {'key': 'policyId', 'type': 'str'}, + 'last_recovery_point': {'key': 'lastRecoveryPoint', 'type': 'iso-8601'}, + 'backup_set_name': {'key': 'backupSetName', 'type': 'str'}, + 'protected_item_type': {'key': 'protectedItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'policy_state': {'key': 'policyState', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'protected_item_id': {'key': 'protectedItemId', 'type': 'long'}, + 'source_associations': {'key': 'sourceAssociations', 'type': '{str}'}, + 'fabric_name': {'key': 'fabricName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GenericProtectedItem, self).__init__(**kwargs) + self.friendly_name = kwargs.get('friendly_name', None) + self.policy_state = kwargs.get('policy_state', None) + self.protection_state = kwargs.get('protection_state', None) + self.protected_item_id = kwargs.get('protected_item_id', None) + self.source_associations = kwargs.get('source_associations', None) + self.fabric_name = kwargs.get('fabric_name', None) + self.protected_item_type = 'GenericProtectedItem' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_protected_item_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_protected_item_py3.py new file mode 100644 index 000000000000..50bf890f08fb --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_protected_item_py3.py @@ -0,0 +1,94 @@ +# 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 .protected_item_py3 import ProtectedItem + + +class GenericProtectedItem(ProtectedItem): + """Base class for backup items. + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent for the backed + up item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param workload_type: Type of workload this item represents. Possible + values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', + 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + 'GenericDataSource', 'SQLDataBase', 'AzureFileShare' + :type workload_type: str or + ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :param container_name: Unique name of container + :type container_name: str + :param source_resource_id: ARM ID of the resource to be backed up. + :type source_resource_id: str + :param policy_id: ID of the backup policy with which this item is backed + up. + :type policy_id: str + :param last_recovery_point: Timestamp when the last (latest) backup copy + was created for this backup item. + :type last_recovery_point: datetime + :param backup_set_name: Name of the backup set the backup item belongs to + :type backup_set_name: str + :param protected_item_type: Required. Constant filled by server. + :type protected_item_type: str + :param friendly_name: Friendly name of the container. + :type friendly_name: str + :param policy_state: Indicates consistency of policy object and policy + applied to this backup item. + :type policy_state: str + :param protection_state: Backup state of this backup item. Possible values + include: 'Invalid', 'IRPending', 'Protected', 'ProtectionError', + 'ProtectionStopped', 'ProtectionPaused' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionState + :param protected_item_id: Data Plane Service ID of the protected item. + :type protected_item_id: long + :param source_associations: Loosely coupled (type, value) associations + (example - parent of a protected item) + :type source_associations: dict[str, str] + :param fabric_name: Name of this backup item's fabric. + :type fabric_name: str + """ + + _validation = { + 'protected_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'policy_id': {'key': 'policyId', 'type': 'str'}, + 'last_recovery_point': {'key': 'lastRecoveryPoint', 'type': 'iso-8601'}, + 'backup_set_name': {'key': 'backupSetName', 'type': 'str'}, + 'protected_item_type': {'key': 'protectedItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'policy_state': {'key': 'policyState', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'protected_item_id': {'key': 'protectedItemId', 'type': 'long'}, + 'source_associations': {'key': 'sourceAssociations', 'type': '{str}'}, + 'fabric_name': {'key': 'fabricName', 'type': 'str'}, + } + + def __init__(self, *, backup_management_type=None, workload_type=None, container_name: str=None, source_resource_id: str=None, policy_id: str=None, last_recovery_point=None, backup_set_name: str=None, friendly_name: str=None, policy_state: str=None, protection_state=None, protected_item_id: int=None, source_associations=None, fabric_name: str=None, **kwargs) -> None: + super(GenericProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, **kwargs) + self.friendly_name = friendly_name + self.policy_state = policy_state + self.protection_state = protection_state + self.protected_item_id = protected_item_id + self.source_associations = source_associations + self.fabric_name = fabric_name + self.protected_item_type = 'GenericProtectedItem' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_protection_policy.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_protection_policy.py new file mode 100644 index 000000000000..7fffd691ec15 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_protection_policy.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .protection_policy import ProtectionPolicy + + +class GenericProtectionPolicy(ProtectionPolicy): + """Azure VM (Mercury) workload-specific backup policy. + + All required parameters must be populated in order to send to Azure. + + :param protected_items_count: Number of items associated with this policy. + :type protected_items_count: int + :param backup_management_type: Required. Constant filled by server. + :type backup_management_type: str + :param sub_protection_policy: List of sub-protection policies which + includes schedule and retention + :type sub_protection_policy: + list[~azure.mgmt.recoveryservicesbackup.models.SubProtectionPolicy] + :param time_zone: TimeZone optional input as string. For example: TimeZone + = "Pacific Standard Time". + :type time_zone: str + :param fabric_name: Name of this policy's fabric. + :type fabric_name: str + """ + + _validation = { + 'backup_management_type': {'required': True}, + } + + _attribute_map = { + 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'sub_protection_policy': {'key': 'subProtectionPolicy', 'type': '[SubProtectionPolicy]'}, + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + 'fabric_name': {'key': 'fabricName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GenericProtectionPolicy, self).__init__(**kwargs) + self.sub_protection_policy = kwargs.get('sub_protection_policy', None) + self.time_zone = kwargs.get('time_zone', None) + self.fabric_name = kwargs.get('fabric_name', None) + self.backup_management_type = 'GenericProtectionPolicy' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_protection_policy_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_protection_policy_py3.py new file mode 100644 index 000000000000..bbead520304a --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_protection_policy_py3.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .protection_policy_py3 import ProtectionPolicy + + +class GenericProtectionPolicy(ProtectionPolicy): + """Azure VM (Mercury) workload-specific backup policy. + + All required parameters must be populated in order to send to Azure. + + :param protected_items_count: Number of items associated with this policy. + :type protected_items_count: int + :param backup_management_type: Required. Constant filled by server. + :type backup_management_type: str + :param sub_protection_policy: List of sub-protection policies which + includes schedule and retention + :type sub_protection_policy: + list[~azure.mgmt.recoveryservicesbackup.models.SubProtectionPolicy] + :param time_zone: TimeZone optional input as string. For example: TimeZone + = "Pacific Standard Time". + :type time_zone: str + :param fabric_name: Name of this policy's fabric. + :type fabric_name: str + """ + + _validation = { + 'backup_management_type': {'required': True}, + } + + _attribute_map = { + 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'sub_protection_policy': {'key': 'subProtectionPolicy', 'type': '[SubProtectionPolicy]'}, + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + 'fabric_name': {'key': 'fabricName', 'type': 'str'}, + } + + def __init__(self, *, protected_items_count: int=None, sub_protection_policy=None, time_zone: str=None, fabric_name: str=None, **kwargs) -> None: + super(GenericProtectionPolicy, self).__init__(protected_items_count=protected_items_count, **kwargs) + self.sub_protection_policy = sub_protection_policy + self.time_zone = time_zone + self.fabric_name = fabric_name + self.backup_management_type = 'GenericProtectionPolicy' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_recovery_point.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_recovery_point.py index 7b64f5d9840e..fee7c7287519 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_recovery_point.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_recovery_point.py @@ -15,7 +15,9 @@ class GenericRecoveryPoint(RecoveryPoint): """Generic backup copy. - :param object_type: Polymorphic Discriminator + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. :type object_type: str :param friendly_name: Friendly name of the backup copy. :type friendly_name: str @@ -40,10 +42,10 @@ class GenericRecoveryPoint(RecoveryPoint): 'recovery_point_additional_info': {'key': 'recoveryPointAdditionalInfo', 'type': 'str'}, } - def __init__(self, friendly_name=None, recovery_point_type=None, recovery_point_time=None, recovery_point_additional_info=None): - super(GenericRecoveryPoint, self).__init__() - self.friendly_name = friendly_name - self.recovery_point_type = recovery_point_type - self.recovery_point_time = recovery_point_time - self.recovery_point_additional_info = recovery_point_additional_info + def __init__(self, **kwargs): + super(GenericRecoveryPoint, self).__init__(**kwargs) + self.friendly_name = kwargs.get('friendly_name', None) + self.recovery_point_type = kwargs.get('recovery_point_type', None) + self.recovery_point_time = kwargs.get('recovery_point_time', None) + self.recovery_point_additional_info = kwargs.get('recovery_point_additional_info', None) self.object_type = 'GenericRecoveryPoint' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_recovery_point_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_recovery_point_py3.py new file mode 100644 index 000000000000..33b3743a9351 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/generic_recovery_point_py3.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .recovery_point_py3 import RecoveryPoint + + +class GenericRecoveryPoint(RecoveryPoint): + """Generic backup copy. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param friendly_name: Friendly name of the backup copy. + :type friendly_name: str + :param recovery_point_type: Type of the backup copy. + :type recovery_point_type: str + :param recovery_point_time: Time at which this backup copy was created. + :type recovery_point_time: datetime + :param recovery_point_additional_info: Additional information associated + with this backup copy. + :type recovery_point_additional_info: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'recovery_point_type': {'key': 'recoveryPointType', 'type': 'str'}, + 'recovery_point_time': {'key': 'recoveryPointTime', 'type': 'iso-8601'}, + 'recovery_point_additional_info': {'key': 'recoveryPointAdditionalInfo', 'type': 'str'}, + } + + def __init__(self, *, friendly_name: str=None, recovery_point_type: str=None, recovery_point_time=None, recovery_point_additional_info: str=None, **kwargs) -> None: + super(GenericRecoveryPoint, self).__init__(**kwargs) + self.friendly_name = friendly_name + self.recovery_point_type = recovery_point_type + self.recovery_point_time = recovery_point_time + self.recovery_point_additional_info = recovery_point_additional_info + self.object_type = 'GenericRecoveryPoint' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/get_protected_item_query_object.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/get_protected_item_query_object.py index 2c6cd9e1db40..75c1eebca8de 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/get_protected_item_query_object.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/get_protected_item_query_object.py @@ -24,5 +24,6 @@ class GetProtectedItemQueryObject(Model): 'expand': {'key': 'expand', 'type': 'str'}, } - def __init__(self, expand=None): - self.expand = expand + def __init__(self, **kwargs): + super(GetProtectedItemQueryObject, self).__init__(**kwargs) + self.expand = kwargs.get('expand', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/get_protected_item_query_object_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/get_protected_item_query_object_py3.py new file mode 100644 index 000000000000..0954d0b1cb3a --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/get_protected_item_query_object_py3.py @@ -0,0 +1,29 @@ +# 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 GetProtectedItemQueryObject(Model): + """Filters to list backup items. + + :param expand: Specifies if the additional information should be provided + for this item. + :type expand: str + """ + + _attribute_map = { + 'expand': {'key': 'expand', 'type': 'str'}, + } + + def __init__(self, *, expand: str=None, **kwargs) -> None: + super(GetProtectedItemQueryObject, self).__init__(**kwargs) + self.expand = expand diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaa_svm_container.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaa_svm_container.py index d62a466b95a6..e6cff11c018b 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaa_svm_container.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaa_svm_container.py @@ -15,33 +15,27 @@ class IaaSVMContainer(ProtectionContainer): """IaaS VM workload-specific container. - Variables are only populated by the server, and will be ignored when - sending a request. + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureIaaSClassicComputeVMContainer, + AzureIaaSComputeVMContainer + + All required parameters must be populated in order to send to Azure. :param friendly_name: Friendly name of the container. :type friendly_name: str :param backup_management_type: Type of backup managemenent for the container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', - 'DPM', 'AzureBackupServer', 'AzureSql' - :type backup_management_type: str or :class:`BackupManagementType - ` + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType :param registration_status: Status of registration of the container with the Recovery Services Vault. :type registration_status: str :param health_status: Status of health of the container. :type health_status: str - :ivar container_type: Type of the container. The value of this property - for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. Classic - Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows - machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is - AzureSqlContainer. Possible values include: 'Invalid', 'Unknown', - 'IaasVMContainer', 'IaasVMServiceContainer', 'DPMContainer', - 'AzureBackupServerContainer', 'MABContainer', 'Cluster', - 'AzureSqlContainer', 'Windows', 'VCenter' - :vartype container_type: str or :class:`ContainerType - ` - :param protectable_object_type: Polymorphic Discriminator - :type protectable_object_type: str + :param container_type: Required. Constant filled by server. + :type container_type: str :param virtual_machine_id: Fully qualified ARM url of the virtual machine represented by this Azure IaaS VM container. :type virtual_machine_id: str @@ -53,8 +47,7 @@ class IaaSVMContainer(ProtectionContainer): """ _validation = { - 'container_type': {'readonly': True}, - 'protectable_object_type': {'required': True}, + 'container_type': {'required': True}, } _attribute_map = { @@ -63,19 +56,18 @@ class IaaSVMContainer(ProtectionContainer): 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, 'health_status': {'key': 'healthStatus', 'type': 'str'}, 'container_type': {'key': 'containerType', 'type': 'str'}, - 'protectable_object_type': {'key': 'protectableObjectType', 'type': 'str'}, 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, 'virtual_machine_version': {'key': 'virtualMachineVersion', 'type': 'str'}, 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, } _subtype_map = { - 'protectable_object_type': {'Microsoft.ClassicCompute/virtualMachines': 'AzureIaaSClassicComputeVMContainer', 'Microsoft.Compute/virtualMachines': 'AzureIaaSComputeVMContainer'} + 'container_type': {'Microsoft.ClassicCompute/virtualMachines': 'AzureIaaSClassicComputeVMContainer', 'Microsoft.Compute/virtualMachines': 'AzureIaaSComputeVMContainer'} } - def __init__(self, friendly_name=None, backup_management_type=None, registration_status=None, health_status=None, virtual_machine_id=None, virtual_machine_version=None, resource_group=None): - super(IaaSVMContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status) - self.virtual_machine_id = virtual_machine_id - self.virtual_machine_version = virtual_machine_version - self.resource_group = resource_group - self.protectable_object_type = 'IaaSVMContainer' + def __init__(self, **kwargs): + super(IaaSVMContainer, self).__init__(**kwargs) + self.virtual_machine_id = kwargs.get('virtual_machine_id', None) + self.virtual_machine_version = kwargs.get('virtual_machine_version', None) + self.resource_group = kwargs.get('resource_group', None) + self.container_type = 'IaaSVMContainer' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaa_svm_container_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaa_svm_container_py3.py new file mode 100644 index 000000000000..aa191ed67510 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaa_svm_container_py3.py @@ -0,0 +1,73 @@ +# 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 .protection_container_py3 import ProtectionContainer + + +class IaaSVMContainer(ProtectionContainer): + """IaaS VM workload-specific container. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureIaaSClassicComputeVMContainer, + AzureIaaSComputeVMContainer + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name of the container. + :type friendly_name: str + :param backup_management_type: Type of backup managemenent for the + container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param registration_status: Status of registration of the container with + the Recovery Services Vault. + :type registration_status: str + :param health_status: Status of health of the container. + :type health_status: str + :param container_type: Required. Constant filled by server. + :type container_type: str + :param virtual_machine_id: Fully qualified ARM url of the virtual machine + represented by this Azure IaaS VM container. + :type virtual_machine_id: str + :param virtual_machine_version: Specifies whether the container represents + a Classic or an Azure Resource Manager VM. + :type virtual_machine_version: str + :param resource_group: Resource group name of Recovery Services Vault. + :type resource_group: str + """ + + _validation = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_type': {'key': 'containerType', 'type': 'str'}, + 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, + 'virtual_machine_version': {'key': 'virtualMachineVersion', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + } + + _subtype_map = { + 'container_type': {'Microsoft.ClassicCompute/virtualMachines': 'AzureIaaSClassicComputeVMContainer', 'Microsoft.Compute/virtualMachines': 'AzureIaaSComputeVMContainer'} + } + + def __init__(self, *, friendly_name: str=None, backup_management_type=None, registration_status: str=None, health_status: str=None, virtual_machine_id: str=None, virtual_machine_version: str=None, resource_group: str=None, **kwargs) -> None: + super(IaaSVMContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status, **kwargs) + self.virtual_machine_id = virtual_machine_id + self.virtual_machine_version = virtual_machine_version + self.resource_group = resource_group + self.container_type = 'IaaSVMContainer' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaa_svm_protectable_item.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaa_svm_protectable_item.py index 91f80ce4dc67..91ee79134281 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaa_svm_protectable_item.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaa_svm_protectable_item.py @@ -15,16 +15,25 @@ class IaaSVMProtectableItem(WorkloadProtectableItem): """IaaS VM workload-specific backup item. + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureIaaSClassicComputeVMProtectableItem, + AzureIaaSComputeVMProtectableItem + + All required parameters must be populated in order to send to Azure. + :param backup_management_type: Type of backup managemenent to backup an item. :type backup_management_type: str + :param workload_type: Type of workload for the backup management + :type workload_type: str :param friendly_name: Friendly name of the backup item. :type friendly_name: str :param protection_state: State of the back up item. Possible values - include: 'Invalid', 'NotProtected', 'Protecting', 'Protected' - :type protection_state: str or :class:`ProtectionStatus - ` - :param protectable_item_type: Polymorphic Discriminator + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param protectable_item_type: Required. Constant filled by server. :type protectable_item_type: str :param virtual_machine_id: Fully qualified ARM ID of the virtual machine. :type virtual_machine_id: str @@ -36,6 +45,7 @@ class IaaSVMProtectableItem(WorkloadProtectableItem): _attribute_map = { 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'protection_state': {'key': 'protectionState', 'type': 'str'}, 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, @@ -46,7 +56,7 @@ class IaaSVMProtectableItem(WorkloadProtectableItem): 'protectable_item_type': {'Microsoft.ClassicCompute/virtualMachines': 'AzureIaaSClassicComputeVMProtectableItem', 'Microsoft.Compute/virtualMachines': 'AzureIaaSComputeVMProtectableItem'} } - def __init__(self, backup_management_type=None, friendly_name=None, protection_state=None, virtual_machine_id=None): - super(IaaSVMProtectableItem, self).__init__(backup_management_type=backup_management_type, friendly_name=friendly_name, protection_state=protection_state) - self.virtual_machine_id = virtual_machine_id + def __init__(self, **kwargs): + super(IaaSVMProtectableItem, self).__init__(**kwargs) + self.virtual_machine_id = kwargs.get('virtual_machine_id', None) self.protectable_item_type = 'IaaSVMProtectableItem' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaa_svm_protectable_item_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaa_svm_protectable_item_py3.py new file mode 100644 index 000000000000..1bba588a7717 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaa_svm_protectable_item_py3.py @@ -0,0 +1,62 @@ +# 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 .workload_protectable_item_py3 import WorkloadProtectableItem + + +class IaaSVMProtectableItem(WorkloadProtectableItem): + """IaaS VM workload-specific backup item. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureIaaSClassicComputeVMProtectableItem, + AzureIaaSComputeVMProtectableItem + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent to backup an + item. + :type backup_management_type: str + :param workload_type: Type of workload for the backup management + :type workload_type: str + :param friendly_name: Friendly name of the backup item. + :type friendly_name: str + :param protection_state: State of the back up item. Possible values + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param protectable_item_type: Required. Constant filled by server. + :type protectable_item_type: str + :param virtual_machine_id: Fully qualified ARM ID of the virtual machine. + :type virtual_machine_id: str + """ + + _validation = { + 'protectable_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, + 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, + } + + _subtype_map = { + 'protectable_item_type': {'Microsoft.ClassicCompute/virtualMachines': 'AzureIaaSClassicComputeVMProtectableItem', 'Microsoft.Compute/virtualMachines': 'AzureIaaSComputeVMProtectableItem'} + } + + def __init__(self, *, backup_management_type: str=None, workload_type: str=None, friendly_name: str=None, protection_state=None, virtual_machine_id: str=None, **kwargs) -> None: + super(IaaSVMProtectableItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, friendly_name=friendly_name, protection_state=protection_state, **kwargs) + self.virtual_machine_id = virtual_machine_id + self.protectable_item_type = 'IaaSVMProtectableItem' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaas_vm_backup_request.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaas_vm_backup_request.py index c22594118d27..c3603259a10b 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaas_vm_backup_request.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaas_vm_backup_request.py @@ -15,7 +15,9 @@ class IaasVMBackupRequest(BackupRequest): """IaaS VM workload-specific backup request. - :param object_type: Polymorphic Discriminator + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. :type object_type: str :param recovery_point_expiry_time_in_utc: Backup copy will expire after the time specified (UTC). @@ -31,7 +33,7 @@ class IaasVMBackupRequest(BackupRequest): 'recovery_point_expiry_time_in_utc': {'key': 'recoveryPointExpiryTimeInUTC', 'type': 'iso-8601'}, } - def __init__(self, recovery_point_expiry_time_in_utc=None): - super(IaasVMBackupRequest, self).__init__() - self.recovery_point_expiry_time_in_utc = recovery_point_expiry_time_in_utc + def __init__(self, **kwargs): + super(IaasVMBackupRequest, self).__init__(**kwargs) + self.recovery_point_expiry_time_in_utc = kwargs.get('recovery_point_expiry_time_in_utc', None) self.object_type = 'IaasVMBackupRequest' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaas_vm_backup_request_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaas_vm_backup_request_py3.py new file mode 100644 index 000000000000..af4e4a228c6b --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaas_vm_backup_request_py3.py @@ -0,0 +1,39 @@ +# 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 .backup_request_py3 import BackupRequest + + +class IaasVMBackupRequest(BackupRequest): + """IaaS VM workload-specific backup request. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param recovery_point_expiry_time_in_utc: Backup copy will expire after + the time specified (UTC). + :type recovery_point_expiry_time_in_utc: datetime + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_point_expiry_time_in_utc': {'key': 'recoveryPointExpiryTimeInUTC', 'type': 'iso-8601'}, + } + + def __init__(self, *, recovery_point_expiry_time_in_utc=None, **kwargs) -> None: + super(IaasVMBackupRequest, self).__init__(**kwargs) + self.recovery_point_expiry_time_in_utc = recovery_point_expiry_time_in_utc + self.object_type = 'IaasVMBackupRequest' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaas_vm_recovery_point.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaas_vm_recovery_point.py index c63ee3597a56..19d50115fb87 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaas_vm_recovery_point.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaas_vm_recovery_point.py @@ -15,7 +15,9 @@ class IaasVMRecoveryPoint(RecoveryPoint): """IaaS VM workload specific backup copy. - :param object_type: Polymorphic Discriminator + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. :type object_type: str :param recovery_point_type: Type of the backup copy. :type recovery_point_type: str @@ -32,15 +34,14 @@ class IaasVMRecoveryPoint(RecoveryPoint): :type is_source_vm_encrypted: bool :param key_and_secret: Required details for recovering an encrypted VM. Applicable only when IsSourceVMEncrypted is true. - :type key_and_secret: :class:`KeyAndSecretDetails - ` + :type key_and_secret: + ~azure.mgmt.recoveryservicesbackup.models.KeyAndSecretDetails :param is_instant_ilr_session_active: Is the session to recover items from this backup copy still active. :type is_instant_ilr_session_active: bool :param recovery_point_tier_details: Recovery point tier information. - :type recovery_point_tier_details: list of - :class:`RecoveryPointTierInformation - ` + :type recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformation] :param is_managed_virtual_machine: Whether VM is with Managed Disks :type is_managed_virtual_machine: bool :param virtual_machine_size: Virtual Machine Size @@ -61,24 +62,24 @@ class IaasVMRecoveryPoint(RecoveryPoint): 'source_vm_storage_type': {'key': 'sourceVMStorageType', 'type': 'str'}, 'is_source_vm_encrypted': {'key': 'isSourceVMEncrypted', 'type': 'bool'}, 'key_and_secret': {'key': 'keyAndSecret', 'type': 'KeyAndSecretDetails'}, - 'is_instant_ilr_session_active': {'key': 'isInstantILRSessionActive', 'type': 'bool'}, + 'is_instant_ilr_session_active': {'key': 'isInstantIlrSessionActive', 'type': 'bool'}, 'recovery_point_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformation]'}, 'is_managed_virtual_machine': {'key': 'isManagedVirtualMachine', 'type': 'bool'}, 'virtual_machine_size': {'key': 'virtualMachineSize', 'type': 'str'}, 'original_storage_account_option': {'key': 'originalStorageAccountOption', 'type': 'bool'}, } - def __init__(self, recovery_point_type=None, recovery_point_time=None, recovery_point_additional_info=None, source_vm_storage_type=None, is_source_vm_encrypted=None, key_and_secret=None, is_instant_ilr_session_active=None, recovery_point_tier_details=None, is_managed_virtual_machine=None, virtual_machine_size=None, original_storage_account_option=None): - super(IaasVMRecoveryPoint, self).__init__() - self.recovery_point_type = recovery_point_type - self.recovery_point_time = recovery_point_time - self.recovery_point_additional_info = recovery_point_additional_info - self.source_vm_storage_type = source_vm_storage_type - self.is_source_vm_encrypted = is_source_vm_encrypted - self.key_and_secret = key_and_secret - self.is_instant_ilr_session_active = is_instant_ilr_session_active - self.recovery_point_tier_details = recovery_point_tier_details - self.is_managed_virtual_machine = is_managed_virtual_machine - self.virtual_machine_size = virtual_machine_size - self.original_storage_account_option = original_storage_account_option + def __init__(self, **kwargs): + super(IaasVMRecoveryPoint, self).__init__(**kwargs) + self.recovery_point_type = kwargs.get('recovery_point_type', None) + self.recovery_point_time = kwargs.get('recovery_point_time', None) + self.recovery_point_additional_info = kwargs.get('recovery_point_additional_info', None) + self.source_vm_storage_type = kwargs.get('source_vm_storage_type', None) + self.is_source_vm_encrypted = kwargs.get('is_source_vm_encrypted', None) + self.key_and_secret = kwargs.get('key_and_secret', None) + self.is_instant_ilr_session_active = kwargs.get('is_instant_ilr_session_active', None) + self.recovery_point_tier_details = kwargs.get('recovery_point_tier_details', None) + self.is_managed_virtual_machine = kwargs.get('is_managed_virtual_machine', None) + self.virtual_machine_size = kwargs.get('virtual_machine_size', None) + self.original_storage_account_option = kwargs.get('original_storage_account_option', None) self.object_type = 'IaasVMRecoveryPoint' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaas_vm_recovery_point_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaas_vm_recovery_point_py3.py new file mode 100644 index 000000000000..533f533b0078 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaas_vm_recovery_point_py3.py @@ -0,0 +1,85 @@ +# 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 .recovery_point_py3 import RecoveryPoint + + +class IaasVMRecoveryPoint(RecoveryPoint): + """IaaS VM workload specific backup copy. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param recovery_point_type: Type of the backup copy. + :type recovery_point_type: str + :param recovery_point_time: Time at which this backup copy was created. + :type recovery_point_time: datetime + :param recovery_point_additional_info: Additional information associated + with this backup copy. + :type recovery_point_additional_info: str + :param source_vm_storage_type: Storage type of the VM whose backup copy is + created. + :type source_vm_storage_type: str + :param is_source_vm_encrypted: Identifies whether the VM was encrypted + when the backup copy is created. + :type is_source_vm_encrypted: bool + :param key_and_secret: Required details for recovering an encrypted VM. + Applicable only when IsSourceVMEncrypted is true. + :type key_and_secret: + ~azure.mgmt.recoveryservicesbackup.models.KeyAndSecretDetails + :param is_instant_ilr_session_active: Is the session to recover items from + this backup copy still active. + :type is_instant_ilr_session_active: bool + :param recovery_point_tier_details: Recovery point tier information. + :type recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformation] + :param is_managed_virtual_machine: Whether VM is with Managed Disks + :type is_managed_virtual_machine: bool + :param virtual_machine_size: Virtual Machine Size + :type virtual_machine_size: str + :param original_storage_account_option: Original SA Option + :type original_storage_account_option: bool + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_point_type': {'key': 'recoveryPointType', 'type': 'str'}, + 'recovery_point_time': {'key': 'recoveryPointTime', 'type': 'iso-8601'}, + 'recovery_point_additional_info': {'key': 'recoveryPointAdditionalInfo', 'type': 'str'}, + 'source_vm_storage_type': {'key': 'sourceVMStorageType', 'type': 'str'}, + 'is_source_vm_encrypted': {'key': 'isSourceVMEncrypted', 'type': 'bool'}, + 'key_and_secret': {'key': 'keyAndSecret', 'type': 'KeyAndSecretDetails'}, + 'is_instant_ilr_session_active': {'key': 'isInstantIlrSessionActive', 'type': 'bool'}, + 'recovery_point_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformation]'}, + 'is_managed_virtual_machine': {'key': 'isManagedVirtualMachine', 'type': 'bool'}, + 'virtual_machine_size': {'key': 'virtualMachineSize', 'type': 'str'}, + 'original_storage_account_option': {'key': 'originalStorageAccountOption', 'type': 'bool'}, + } + + def __init__(self, *, recovery_point_type: str=None, recovery_point_time=None, recovery_point_additional_info: str=None, source_vm_storage_type: str=None, is_source_vm_encrypted: bool=None, key_and_secret=None, is_instant_ilr_session_active: bool=None, recovery_point_tier_details=None, is_managed_virtual_machine: bool=None, virtual_machine_size: str=None, original_storage_account_option: bool=None, **kwargs) -> None: + super(IaasVMRecoveryPoint, self).__init__(**kwargs) + self.recovery_point_type = recovery_point_type + self.recovery_point_time = recovery_point_time + self.recovery_point_additional_info = recovery_point_additional_info + self.source_vm_storage_type = source_vm_storage_type + self.is_source_vm_encrypted = is_source_vm_encrypted + self.key_and_secret = key_and_secret + self.is_instant_ilr_session_active = is_instant_ilr_session_active + self.recovery_point_tier_details = recovery_point_tier_details + self.is_managed_virtual_machine = is_managed_virtual_machine + self.virtual_machine_size = virtual_machine_size + self.original_storage_account_option = original_storage_account_option + self.object_type = 'IaasVMRecoveryPoint' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaas_vm_restore_request.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaas_vm_restore_request.py index 6cf482e860e1..88695e95a6bf 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaas_vm_restore_request.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaas_vm_restore_request.py @@ -15,14 +15,16 @@ class IaasVMRestoreRequest(RestoreRequest): """IaaS VM workload-specific restore. - :param object_type: Polymorphic Discriminator + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. :type object_type: str :param recovery_point_id: ID of the backup copy to be recovered. :type recovery_point_id: str :param recovery_type: Type of this recovery. Possible values include: 'Invalid', 'OriginalLocation', 'AlternateLocation', 'RestoreDisks' - :type recovery_type: str or :class:`RecoveryType - ` + :type recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RecoveryType :param source_resource_id: Fully qualified ARM ID of the VM which is being recovered. :type source_resource_id: str @@ -60,12 +62,12 @@ class IaasVMRestoreRequest(RestoreRequest): while restoring the VM. If this is false, VM will be restored to the same cloud service as it was at the time of backup. :type create_new_cloud_service: bool - :param original_storage_account_option: + :param original_storage_account_option: Original SA Option :type original_storage_account_option: bool :param encryption_details: Details needed if the VM was encrypted at the time of backup. - :type encryption_details: :class:`EncryptionDetails - ` + :type encryption_details: + ~azure.mgmt.recoveryservicesbackup.models.EncryptionDetails """ _validation = { @@ -90,20 +92,20 @@ class IaasVMRestoreRequest(RestoreRequest): 'encryption_details': {'key': 'encryptionDetails', 'type': 'EncryptionDetails'}, } - def __init__(self, recovery_point_id=None, recovery_type=None, source_resource_id=None, target_virtual_machine_id=None, target_resource_group_id=None, storage_account_id=None, virtual_network_id=None, subnet_id=None, target_domain_name_id=None, region=None, affinity_group=None, create_new_cloud_service=None, original_storage_account_option=None, encryption_details=None): - super(IaasVMRestoreRequest, self).__init__() - self.recovery_point_id = recovery_point_id - self.recovery_type = recovery_type - self.source_resource_id = source_resource_id - self.target_virtual_machine_id = target_virtual_machine_id - self.target_resource_group_id = target_resource_group_id - self.storage_account_id = storage_account_id - self.virtual_network_id = virtual_network_id - self.subnet_id = subnet_id - self.target_domain_name_id = target_domain_name_id - self.region = region - self.affinity_group = affinity_group - self.create_new_cloud_service = create_new_cloud_service - self.original_storage_account_option = original_storage_account_option - self.encryption_details = encryption_details + def __init__(self, **kwargs): + super(IaasVMRestoreRequest, self).__init__(**kwargs) + self.recovery_point_id = kwargs.get('recovery_point_id', None) + self.recovery_type = kwargs.get('recovery_type', None) + self.source_resource_id = kwargs.get('source_resource_id', None) + self.target_virtual_machine_id = kwargs.get('target_virtual_machine_id', None) + self.target_resource_group_id = kwargs.get('target_resource_group_id', None) + self.storage_account_id = kwargs.get('storage_account_id', None) + self.virtual_network_id = kwargs.get('virtual_network_id', None) + self.subnet_id = kwargs.get('subnet_id', None) + self.target_domain_name_id = kwargs.get('target_domain_name_id', None) + self.region = kwargs.get('region', None) + self.affinity_group = kwargs.get('affinity_group', None) + self.create_new_cloud_service = kwargs.get('create_new_cloud_service', None) + self.original_storage_account_option = kwargs.get('original_storage_account_option', None) + self.encryption_details = kwargs.get('encryption_details', None) self.object_type = 'IaasVMRestoreRequest' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaas_vm_restore_request_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaas_vm_restore_request_py3.py new file mode 100644 index 000000000000..91bb2c31beff --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaas_vm_restore_request_py3.py @@ -0,0 +1,111 @@ +# 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 .restore_request_py3 import RestoreRequest + + +class IaasVMRestoreRequest(RestoreRequest): + """IaaS VM workload-specific restore. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param recovery_point_id: ID of the backup copy to be recovered. + :type recovery_point_id: str + :param recovery_type: Type of this recovery. Possible values include: + 'Invalid', 'OriginalLocation', 'AlternateLocation', 'RestoreDisks' + :type recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :param source_resource_id: Fully qualified ARM ID of the VM which is being + recovered. + :type source_resource_id: str + :param target_virtual_machine_id: This is the complete ARM Id of the VM + that will be created. + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + :type target_virtual_machine_id: str + :param target_resource_group_id: This is the ARM Id of the resource group + that you want to create for this Virtual machine and other artifacts. + For e.g. /subscriptions/{subId}/resourcegroups/{rg} + :type target_resource_group_id: str + :param storage_account_id: Fully qualified ARM ID of the storage account + to which the VM has to be restored. + :type storage_account_id: str + :param virtual_network_id: This is the virtual network Id of the vnet that + will be attached to the virtual machine. + User will be validated for join action permissions in the linked access. + :type virtual_network_id: str + :param subnet_id: Subnet ID, is the subnet ID associated with the to be + restored VM. For Classic VMs it would be {VnetID}/Subnet/{SubnetName} and, + for the Azure Resource Manager VMs it would be ARM resource ID used to + represent the subnet. + :type subnet_id: str + :param target_domain_name_id: Fully qualified ARM ID of the domain name to + be associated to the VM being restored. This applies only to Classic + Virtual Machines. + :type target_domain_name_id: str + :param region: Region in which the virtual machine is restored. + :type region: str + :param affinity_group: Affinity group associated to VM to be restored. + Used only for Classic Compute Virtual Machines. + :type affinity_group: str + :param create_new_cloud_service: Should a new cloud service be created + while restoring the VM. If this is false, VM will be restored to the same + cloud service as it was at the time of backup. + :type create_new_cloud_service: bool + :param original_storage_account_option: Original SA Option + :type original_storage_account_option: bool + :param encryption_details: Details needed if the VM was encrypted at the + time of backup. + :type encryption_details: + ~azure.mgmt.recoveryservicesbackup.models.EncryptionDetails + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_point_id': {'key': 'recoveryPointId', 'type': 'str'}, + 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', 'type': 'str'}, + 'target_resource_group_id': {'key': 'targetResourceGroupId', 'type': 'str'}, + 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, + 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, + 'subnet_id': {'key': 'subnetId', 'type': 'str'}, + 'target_domain_name_id': {'key': 'targetDomainNameId', 'type': 'str'}, + 'region': {'key': 'region', 'type': 'str'}, + 'affinity_group': {'key': 'affinityGroup', 'type': 'str'}, + 'create_new_cloud_service': {'key': 'createNewCloudService', 'type': 'bool'}, + 'original_storage_account_option': {'key': 'originalStorageAccountOption', 'type': 'bool'}, + 'encryption_details': {'key': 'encryptionDetails', 'type': 'EncryptionDetails'}, + } + + def __init__(self, *, recovery_point_id: str=None, recovery_type=None, source_resource_id: str=None, target_virtual_machine_id: str=None, target_resource_group_id: str=None, storage_account_id: str=None, virtual_network_id: str=None, subnet_id: str=None, target_domain_name_id: str=None, region: str=None, affinity_group: str=None, create_new_cloud_service: bool=None, original_storage_account_option: bool=None, encryption_details=None, **kwargs) -> None: + super(IaasVMRestoreRequest, self).__init__(**kwargs) + self.recovery_point_id = recovery_point_id + self.recovery_type = recovery_type + self.source_resource_id = source_resource_id + self.target_virtual_machine_id = target_virtual_machine_id + self.target_resource_group_id = target_resource_group_id + self.storage_account_id = storage_account_id + self.virtual_network_id = virtual_network_id + self.subnet_id = subnet_id + self.target_domain_name_id = target_domain_name_id + self.region = region + self.affinity_group = affinity_group + self.create_new_cloud_service = create_new_cloud_service + self.original_storage_account_option = original_storage_account_option + self.encryption_details = encryption_details + self.object_type = 'IaasVMRestoreRequest' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaas_vmilr_registration_request.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaas_vmilr_registration_request.py index a0ecb03aa0dd..6ab623f22e73 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaas_vmilr_registration_request.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaas_vmilr_registration_request.py @@ -15,7 +15,9 @@ class IaasVMILRRegistrationRequest(ILRRequest): """Restore files/folders from a backup copy of IaaS VM. - :param object_type: Polymorphic Discriminator + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. :type object_type: str :param recovery_point_id: ID of the IaaS VM backup copy from where the files/folders have to be restored. @@ -42,10 +44,10 @@ class IaasVMILRRegistrationRequest(ILRRequest): 'renew_existing_registration': {'key': 'renewExistingRegistration', 'type': 'bool'}, } - def __init__(self, recovery_point_id=None, virtual_machine_id=None, initiator_name=None, renew_existing_registration=None): - super(IaasVMILRRegistrationRequest, self).__init__() - self.recovery_point_id = recovery_point_id - self.virtual_machine_id = virtual_machine_id - self.initiator_name = initiator_name - self.renew_existing_registration = renew_existing_registration + def __init__(self, **kwargs): + super(IaasVMILRRegistrationRequest, self).__init__(**kwargs) + self.recovery_point_id = kwargs.get('recovery_point_id', None) + self.virtual_machine_id = kwargs.get('virtual_machine_id', None) + self.initiator_name = kwargs.get('initiator_name', None) + self.renew_existing_registration = kwargs.get('renew_existing_registration', None) self.object_type = 'IaasVMILRRegistrationRequest' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaas_vmilr_registration_request_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaas_vmilr_registration_request_py3.py new file mode 100644 index 000000000000..65c309171e34 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/iaas_vmilr_registration_request_py3.py @@ -0,0 +1,53 @@ +# 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 .ilr_request_py3 import ILRRequest + + +class IaasVMILRRegistrationRequest(ILRRequest): + """Restore files/folders from a backup copy of IaaS VM. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param recovery_point_id: ID of the IaaS VM backup copy from where the + files/folders have to be restored. + :type recovery_point_id: str + :param virtual_machine_id: Fully qualified ARM ID of the virtual machine + whose the files / folders have to be restored. + :type virtual_machine_id: str + :param initiator_name: iSCSI initiator name. + :type initiator_name: str + :param renew_existing_registration: Whether to renew existing registration + with the iSCSI server. + :type renew_existing_registration: bool + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_point_id': {'key': 'recoveryPointId', 'type': 'str'}, + 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, + 'initiator_name': {'key': 'initiatorName', 'type': 'str'}, + 'renew_existing_registration': {'key': 'renewExistingRegistration', 'type': 'bool'}, + } + + def __init__(self, *, recovery_point_id: str=None, virtual_machine_id: str=None, initiator_name: str=None, renew_existing_registration: bool=None, **kwargs) -> None: + super(IaasVMILRRegistrationRequest, self).__init__(**kwargs) + self.recovery_point_id = recovery_point_id + self.virtual_machine_id = virtual_machine_id + self.initiator_name = initiator_name + self.renew_existing_registration = renew_existing_registration + self.object_type = 'IaasVMILRRegistrationRequest' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/ilr_request.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/ilr_request.py index 496bfb107837..277056ae7482 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/ilr_request.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/ilr_request.py @@ -15,7 +15,12 @@ class ILRRequest(Model): """Parameters to restore file/folders API. - :param object_type: Polymorphic Discriminator + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: IaasVMILRRegistrationRequest + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. :type object_type: str """ @@ -31,5 +36,6 @@ class ILRRequest(Model): 'object_type': {'IaasVMILRRegistrationRequest': 'IaasVMILRRegistrationRequest'} } - def __init__(self): + def __init__(self, **kwargs): + super(ILRRequest, self).__init__(**kwargs) self.object_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/ilr_request_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/ilr_request_py3.py new file mode 100644 index 000000000000..318d3106ac80 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/ilr_request_py3.py @@ -0,0 +1,41 @@ +# 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 ILRRequest(Model): + """Parameters to restore file/folders API. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: IaasVMILRRegistrationRequest + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'IaasVMILRRegistrationRequest': 'IaasVMILRRegistrationRequest'} + } + + def __init__(self, **kwargs) -> None: + super(ILRRequest, self).__init__(**kwargs) + self.object_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/ilr_request_resource.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/ilr_request_resource.py index 93f036c382de..c5686c5cb5f2 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/ilr_request_resource.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/ilr_request_resource.py @@ -28,12 +28,11 @@ class ILRRequestResource(Resource): :param location: Resource location. :type location: str :param tags: Resource tags. - :type tags: dict + :type tags: dict[str, str] :param e_tag: Optional ETag. :type e_tag: str :param properties: ILRRequestResource properties - :type properties: :class:`ILRRequest - ` + :type properties: ~azure.mgmt.recoveryservicesbackup.models.ILRRequest """ _validation = { @@ -52,6 +51,6 @@ class ILRRequestResource(Resource): 'properties': {'key': 'properties', 'type': 'ILRRequest'}, } - def __init__(self, location=None, tags=None, e_tag=None, properties=None): - super(ILRRequestResource, self).__init__(location=location, tags=tags, e_tag=e_tag) - self.properties = properties + def __init__(self, **kwargs): + super(ILRRequestResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/ilr_request_resource_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/ilr_request_resource_py3.py new file mode 100644 index 000000000000..c5556e712450 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/ilr_request_resource_py3.py @@ -0,0 +1,56 @@ +# 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 ILRRequestResource(Resource): + """Parameters to restore file/folders API. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param e_tag: Optional ETag. + :type e_tag: str + :param properties: ILRRequestResource properties + :type properties: ~azure.mgmt.recoveryservicesbackup.models.ILRRequest + """ + + _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}'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ILRRequest'}, + } + + def __init__(self, *, location: str=None, tags=None, e_tag: str=None, properties=None, **kwargs) -> None: + super(ILRRequestResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) + self.properties = properties diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/inquiry_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/inquiry_info.py new file mode 100644 index 000000000000..560696785506 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/inquiry_info.py @@ -0,0 +1,40 @@ +# 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 InquiryInfo(Model): + """Details about inquired protectable items under a given container. + + :param status: Inquiry Status for this container such as + InProgress | Failed | Succeeded + :type status: str + :param error_detail: Error Details if the Status is non-success. + :type error_detail: ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail + :param inquiry_details: Inquiry Details which will have workload specific + details. + For e.g. - For SQL and oracle this will contain different details. + :type inquiry_details: + list[~azure.mgmt.recoveryservicesbackup.models.WorkloadInquiryDetails] + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'error_detail': {'key': 'errorDetail', 'type': 'ErrorDetail'}, + 'inquiry_details': {'key': 'inquiryDetails', 'type': '[WorkloadInquiryDetails]'}, + } + + def __init__(self, **kwargs): + super(InquiryInfo, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.error_detail = kwargs.get('error_detail', None) + self.inquiry_details = kwargs.get('inquiry_details', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/inquiry_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/inquiry_info_py3.py new file mode 100644 index 000000000000..85838afd1907 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/inquiry_info_py3.py @@ -0,0 +1,40 @@ +# 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 InquiryInfo(Model): + """Details about inquired protectable items under a given container. + + :param status: Inquiry Status for this container such as + InProgress | Failed | Succeeded + :type status: str + :param error_detail: Error Details if the Status is non-success. + :type error_detail: ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail + :param inquiry_details: Inquiry Details which will have workload specific + details. + For e.g. - For SQL and oracle this will contain different details. + :type inquiry_details: + list[~azure.mgmt.recoveryservicesbackup.models.WorkloadInquiryDetails] + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'error_detail': {'key': 'errorDetail', 'type': 'ErrorDetail'}, + 'inquiry_details': {'key': 'inquiryDetails', 'type': '[WorkloadInquiryDetails]'}, + } + + def __init__(self, *, status: str=None, error_detail=None, inquiry_details=None, **kwargs) -> None: + super(InquiryInfo, self).__init__(**kwargs) + self.status = status + self.error_detail = error_detail + self.inquiry_details = inquiry_details diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/inquiry_validation.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/inquiry_validation.py new file mode 100644 index 000000000000..3940e1cb0232 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/inquiry_validation.py @@ -0,0 +1,32 @@ +# 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 InquiryValidation(Model): + """Validation for inquired protectable items under a given container. + + :param status: Status for the Inquiry Validation. + :type status: str + :param error_detail: Error Detail in case the status is non-success. + :type error_detail: ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'error_detail': {'key': 'errorDetail', 'type': 'ErrorDetail'}, + } + + def __init__(self, **kwargs): + super(InquiryValidation, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.error_detail = kwargs.get('error_detail', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/inquiry_validation_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/inquiry_validation_py3.py new file mode 100644 index 000000000000..149ecb872812 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/inquiry_validation_py3.py @@ -0,0 +1,32 @@ +# 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 InquiryValidation(Model): + """Validation for inquired protectable items under a given container. + + :param status: Status for the Inquiry Validation. + :type status: str + :param error_detail: Error Detail in case the status is non-success. + :type error_detail: ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'error_detail': {'key': 'errorDetail', 'type': 'ErrorDetail'}, + } + + def __init__(self, *, status: str=None, error_detail=None, **kwargs) -> None: + super(InquiryValidation, self).__init__(**kwargs) + self.status = status + self.error_detail = error_detail diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/instant_item_recovery_target.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/instant_item_recovery_target.py index 04bea6f37492..353ed474bbc1 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/instant_item_recovery_target.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/instant_item_recovery_target.py @@ -16,13 +16,14 @@ class InstantItemRecoveryTarget(Model): """Target details for file / folder restore. :param client_scripts: List of client scripts. - :type client_scripts: list of :class:`ClientScriptForConnect - ` + :type client_scripts: + list[~azure.mgmt.recoveryservicesbackup.models.ClientScriptForConnect] """ _attribute_map = { 'client_scripts': {'key': 'clientScripts', 'type': '[ClientScriptForConnect]'}, } - def __init__(self, client_scripts=None): - self.client_scripts = client_scripts + def __init__(self, **kwargs): + super(InstantItemRecoveryTarget, self).__init__(**kwargs) + self.client_scripts = kwargs.get('client_scripts', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/instant_item_recovery_target_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/instant_item_recovery_target_py3.py new file mode 100644 index 000000000000..096ccb322e2a --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/instant_item_recovery_target_py3.py @@ -0,0 +1,29 @@ +# 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 InstantItemRecoveryTarget(Model): + """Target details for file / folder restore. + + :param client_scripts: List of client scripts. + :type client_scripts: + list[~azure.mgmt.recoveryservicesbackup.models.ClientScriptForConnect] + """ + + _attribute_map = { + 'client_scripts': {'key': 'clientScripts', 'type': '[ClientScriptForConnect]'}, + } + + def __init__(self, *, client_scripts=None, **kwargs) -> None: + super(InstantItemRecoveryTarget, self).__init__(**kwargs) + self.client_scripts = client_scripts diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/job.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/job.py index f9b11988760e..8f92979c163f 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/job.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/job.py @@ -15,14 +15,21 @@ class Job(Model): """Defines workload agnostic properties for a job. + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureIaaSVMJob, AzureStorageJob, AzureWorkloadJob, DpmJob, + MabJob + + All required parameters must be populated in order to send to Azure. + :param entity_friendly_name: Friendly name of the entity on which the current job is executing. :type entity_friendly_name: str :param backup_management_type: Backup management type to execute the current job. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', - 'DPM', 'AzureBackupServer', 'AzureSql' - :type backup_management_type: str or :class:`BackupManagementType - ` + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType :param operation: The operation name. :type operation: str :param status: Job status. @@ -33,7 +40,7 @@ class Job(Model): :type end_time: datetime :param activity_id: ActivityId of job. :type activity_id: str - :param job_type: Polymorphic Discriminator + :param job_type: Required. Constant filled by server. :type job_type: str """ @@ -53,15 +60,16 @@ class Job(Model): } _subtype_map = { - 'job_type': {'AzureIaaSVMJob': 'AzureIaaSVMJob', 'DpmJob': 'DpmJob', 'MabJob': 'MabJob'} + 'job_type': {'AzureIaaSVMJob': 'AzureIaaSVMJob', 'AzureStorageJob': 'AzureStorageJob', 'AzureWorkloadJob': 'AzureWorkloadJob', 'DpmJob': 'DpmJob', 'MabJob': 'MabJob'} } - def __init__(self, entity_friendly_name=None, backup_management_type=None, operation=None, status=None, start_time=None, end_time=None, activity_id=None): - self.entity_friendly_name = entity_friendly_name - self.backup_management_type = backup_management_type - self.operation = operation - self.status = status - self.start_time = start_time - self.end_time = end_time - self.activity_id = activity_id + def __init__(self, **kwargs): + super(Job, self).__init__(**kwargs) + self.entity_friendly_name = kwargs.get('entity_friendly_name', None) + self.backup_management_type = kwargs.get('backup_management_type', None) + self.operation = kwargs.get('operation', None) + self.status = kwargs.get('status', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.activity_id = kwargs.get('activity_id', None) self.job_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/job_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/job_py3.py new file mode 100644 index 000000000000..2b826769010e --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/job_py3.py @@ -0,0 +1,75 @@ +# 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 Job(Model): + """Defines workload agnostic properties for a job. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureIaaSVMJob, AzureStorageJob, AzureWorkloadJob, DpmJob, + MabJob + + All required parameters must be populated in order to send to Azure. + + :param entity_friendly_name: Friendly name of the entity on which the + current job is executing. + :type entity_friendly_name: str + :param backup_management_type: Backup management type to execute the + current job. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param operation: The operation name. + :type operation: str + :param status: Job status. + :type status: str + :param start_time: The start time. + :type start_time: datetime + :param end_time: The end time. + :type end_time: datetime + :param activity_id: ActivityId of job. + :type activity_id: str + :param job_type: Required. Constant filled by server. + :type job_type: str + """ + + _validation = { + 'job_type': {'required': True}, + } + + _attribute_map = { + 'entity_friendly_name': {'key': 'entityFriendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'activity_id': {'key': 'activityId', 'type': 'str'}, + 'job_type': {'key': 'jobType', 'type': 'str'}, + } + + _subtype_map = { + 'job_type': {'AzureIaaSVMJob': 'AzureIaaSVMJob', 'AzureStorageJob': 'AzureStorageJob', 'AzureWorkloadJob': 'AzureWorkloadJob', 'DpmJob': 'DpmJob', 'MabJob': 'MabJob'} + } + + def __init__(self, *, entity_friendly_name: str=None, backup_management_type=None, operation: str=None, status: str=None, start_time=None, end_time=None, activity_id: str=None, **kwargs) -> None: + super(Job, self).__init__(**kwargs) + self.entity_friendly_name = entity_friendly_name + self.backup_management_type = backup_management_type + self.operation = operation + self.status = status + self.start_time = start_time + self.end_time = end_time + self.activity_id = activity_id + self.job_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/job_query_object.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/job_query_object.py index 9c1e3235e80a..49844525d847 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/job_query_object.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/job_query_object.py @@ -18,18 +18,18 @@ class JobQueryObject(Model): :param status: Status of the job. Possible values include: 'Invalid', 'InProgress', 'Completed', 'Failed', 'CompletedWithWarnings', 'Cancelled', 'Cancelling' - :type status: str or :class:`JobStatus - ` + :type status: str or ~azure.mgmt.recoveryservicesbackup.models.JobStatus :param backup_management_type: Type of backup managmenent for the job. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', - 'AzureBackupServer', 'AzureSql' - :type backup_management_type: str or :class:`BackupManagementType - ` + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType :param operation: Type of operation. Possible values include: 'Invalid', 'Register', 'UnRegister', 'ConfigureBackup', 'Backup', 'Restore', 'DisableBackup', 'DeleteBackupData' - :type operation: str or :class:`JobOperationType - ` + :type operation: str or + ~azure.mgmt.recoveryservicesbackup.models.JobOperationType :param job_id: JobID represents the job uniquely. :type job_id: str :param start_time: Job has started at this time. Value is in UTC. @@ -47,10 +47,11 @@ class JobQueryObject(Model): 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, } - def __init__(self, status=None, backup_management_type=None, operation=None, job_id=None, start_time=None, end_time=None): - self.status = status - self.backup_management_type = backup_management_type - self.operation = operation - self.job_id = job_id - self.start_time = start_time - self.end_time = end_time + def __init__(self, **kwargs): + super(JobQueryObject, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.backup_management_type = kwargs.get('backup_management_type', None) + self.operation = kwargs.get('operation', None) + self.job_id = kwargs.get('job_id', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/job_query_object_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/job_query_object_py3.py new file mode 100644 index 000000000000..dd765394d866 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/job_query_object_py3.py @@ -0,0 +1,57 @@ +# 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 JobQueryObject(Model): + """Filters to list the jobs. + + :param status: Status of the job. Possible values include: 'Invalid', + 'InProgress', 'Completed', 'Failed', 'CompletedWithWarnings', 'Cancelled', + 'Cancelling' + :type status: str or ~azure.mgmt.recoveryservicesbackup.models.JobStatus + :param backup_management_type: Type of backup managmenent for the job. + Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param operation: Type of operation. Possible values include: 'Invalid', + 'Register', 'UnRegister', 'ConfigureBackup', 'Backup', 'Restore', + 'DisableBackup', 'DeleteBackupData' + :type operation: str or + ~azure.mgmt.recoveryservicesbackup.models.JobOperationType + :param job_id: JobID represents the job uniquely. + :type job_id: str + :param start_time: Job has started at this time. Value is in UTC. + :type start_time: datetime + :param end_time: Job has ended at this time. Value is in UTC. + :type end_time: datetime + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'job_id': {'key': 'jobId', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, status=None, backup_management_type=None, operation=None, job_id: str=None, start_time=None, end_time=None, **kwargs) -> None: + super(JobQueryObject, self).__init__(**kwargs) + self.status = status + self.backup_management_type = backup_management_type + self.operation = operation + self.job_id = job_id + self.start_time = start_time + self.end_time = end_time diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/job_resource.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/job_resource.py index daf894e97687..b66dadbeb2da 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/job_resource.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/job_resource.py @@ -28,12 +28,11 @@ class JobResource(Resource): :param location: Resource location. :type location: str :param tags: Resource tags. - :type tags: dict + :type tags: dict[str, str] :param e_tag: Optional ETag. :type e_tag: str :param properties: JobResource properties - :type properties: :class:`Job - ` + :type properties: ~azure.mgmt.recoveryservicesbackup.models.Job """ _validation = { @@ -52,6 +51,6 @@ class JobResource(Resource): 'properties': {'key': 'properties', 'type': 'Job'}, } - def __init__(self, location=None, tags=None, e_tag=None, properties=None): - super(JobResource, self).__init__(location=location, tags=tags, e_tag=e_tag) - self.properties = properties + def __init__(self, **kwargs): + super(JobResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/job_resource_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/job_resource_py3.py new file mode 100644 index 000000000000..844c8775d27e --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/job_resource_py3.py @@ -0,0 +1,56 @@ +# 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 JobResource(Resource): + """Defines workload agnostic properties for a job. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param e_tag: Optional ETag. + :type e_tag: str + :param properties: JobResource properties + :type properties: ~azure.mgmt.recoveryservicesbackup.models.Job + """ + + _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}'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'Job'}, + } + + def __init__(self, *, location: str=None, tags=None, e_tag: str=None, properties=None, **kwargs) -> None: + super(JobResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) + self.properties = properties diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/kek_details.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/kek_details.py index 33585955a5ae..7497bcb8c2a8 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/kek_details.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/kek_details.py @@ -29,7 +29,8 @@ class KEKDetails(Model): 'key_backup_data': {'key': 'keyBackupData', 'type': 'str'}, } - def __init__(self, key_url=None, key_vault_id=None, key_backup_data=None): - self.key_url = key_url - self.key_vault_id = key_vault_id - self.key_backup_data = key_backup_data + def __init__(self, **kwargs): + super(KEKDetails, self).__init__(**kwargs) + self.key_url = kwargs.get('key_url', None) + self.key_vault_id = kwargs.get('key_vault_id', None) + self.key_backup_data = kwargs.get('key_backup_data', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/kek_details_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/kek_details_py3.py new file mode 100644 index 000000000000..0dc4ab746c3b --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/kek_details_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class KEKDetails(Model): + """KEK is encryption key for BEK. + + :param key_url: Key is KEK. + :type key_url: str + :param key_vault_id: Key Vault ID where this Key is stored. + :type key_vault_id: str + :param key_backup_data: KEK data. + :type key_backup_data: str + """ + + _attribute_map = { + 'key_url': {'key': 'keyUrl', 'type': 'str'}, + 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, + 'key_backup_data': {'key': 'keyBackupData', 'type': 'str'}, + } + + def __init__(self, *, key_url: str=None, key_vault_id: str=None, key_backup_data: str=None, **kwargs) -> None: + super(KEKDetails, self).__init__(**kwargs) + self.key_url = key_url + self.key_vault_id = key_vault_id + self.key_backup_data = key_backup_data diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/key_and_secret_details.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/key_and_secret_details.py index 4b19658a7142..03652133a779 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/key_and_secret_details.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/key_and_secret_details.py @@ -21,11 +21,9 @@ class KeyAndSecretDetails(Model): BEK and KEK can potentiallty have different vault ids. :param kek_details: KEK is encryption key for BEK. - :type kek_details: :class:`KEKDetails - ` + :type kek_details: ~azure.mgmt.recoveryservicesbackup.models.KEKDetails :param bek_details: BEK is bitlocker encrpytion key. - :type bek_details: :class:`BEKDetails - ` + :type bek_details: ~azure.mgmt.recoveryservicesbackup.models.BEKDetails """ _attribute_map = { @@ -33,6 +31,7 @@ class KeyAndSecretDetails(Model): 'bek_details': {'key': 'bekDetails', 'type': 'BEKDetails'}, } - def __init__(self, kek_details=None, bek_details=None): - self.kek_details = kek_details - self.bek_details = bek_details + def __init__(self, **kwargs): + super(KeyAndSecretDetails, self).__init__(**kwargs) + self.kek_details = kwargs.get('kek_details', None) + self.bek_details = kwargs.get('bek_details', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/key_and_secret_details_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/key_and_secret_details_py3.py new file mode 100644 index 000000000000..cb66582adff4 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/key_and_secret_details_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class KeyAndSecretDetails(Model): + """BEK is bitlocker key. + KEK is encryption key for BEK + If the VM was encrypted then we will store follwing details : + 1. Secret(BEK) - Url + Backup Data + vaultId. + 2. Key(KEK) - Url + Backup Data + vaultId. + BEK and KEK can potentiallty have different vault ids. + + :param kek_details: KEK is encryption key for BEK. + :type kek_details: ~azure.mgmt.recoveryservicesbackup.models.KEKDetails + :param bek_details: BEK is bitlocker encrpytion key. + :type bek_details: ~azure.mgmt.recoveryservicesbackup.models.BEKDetails + """ + + _attribute_map = { + 'kek_details': {'key': 'kekDetails', 'type': 'KEKDetails'}, + 'bek_details': {'key': 'bekDetails', 'type': 'BEKDetails'}, + } + + def __init__(self, *, kek_details=None, bek_details=None, **kwargs) -> None: + super(KeyAndSecretDetails, self).__init__(**kwargs) + self.kek_details = kek_details + self.bek_details = bek_details diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/log_schedule_policy.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/log_schedule_policy.py new file mode 100644 index 000000000000..f5ccd6e0544c --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/log_schedule_policy.py @@ -0,0 +1,39 @@ +# 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 .schedule_policy import SchedulePolicy + + +class LogSchedulePolicy(SchedulePolicy): + """Log policy schedule. + + All required parameters must be populated in order to send to Azure. + + :param schedule_policy_type: Required. Constant filled by server. + :type schedule_policy_type: str + :param schedule_frequency_in_mins: Frequency of the log schedule operation + of this policy in minutes. + :type schedule_frequency_in_mins: int + """ + + _validation = { + 'schedule_policy_type': {'required': True}, + } + + _attribute_map = { + 'schedule_policy_type': {'key': 'schedulePolicyType', 'type': 'str'}, + 'schedule_frequency_in_mins': {'key': 'scheduleFrequencyInMins', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(LogSchedulePolicy, self).__init__(**kwargs) + self.schedule_frequency_in_mins = kwargs.get('schedule_frequency_in_mins', None) + self.schedule_policy_type = 'LogSchedulePolicy' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/log_schedule_policy_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/log_schedule_policy_py3.py new file mode 100644 index 000000000000..19495f52c8db --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/log_schedule_policy_py3.py @@ -0,0 +1,39 @@ +# 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 .schedule_policy_py3 import SchedulePolicy + + +class LogSchedulePolicy(SchedulePolicy): + """Log policy schedule. + + All required parameters must be populated in order to send to Azure. + + :param schedule_policy_type: Required. Constant filled by server. + :type schedule_policy_type: str + :param schedule_frequency_in_mins: Frequency of the log schedule operation + of this policy in minutes. + :type schedule_frequency_in_mins: int + """ + + _validation = { + 'schedule_policy_type': {'required': True}, + } + + _attribute_map = { + 'schedule_policy_type': {'key': 'schedulePolicyType', 'type': 'str'}, + 'schedule_frequency_in_mins': {'key': 'scheduleFrequencyInMins', 'type': 'int'}, + } + + def __init__(self, *, schedule_frequency_in_mins: int=None, **kwargs) -> None: + super(LogSchedulePolicy, self).__init__(**kwargs) + self.schedule_frequency_in_mins = schedule_frequency_in_mins + self.schedule_policy_type = 'LogSchedulePolicy' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/long_term_retention_policy.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/long_term_retention_policy.py index bd997bd87ba9..9d7a905f80d7 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/long_term_retention_policy.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/long_term_retention_policy.py @@ -15,23 +15,25 @@ class LongTermRetentionPolicy(RetentionPolicy): """Long term retention policy. - :param retention_policy_type: Polymorphic Discriminator + All required parameters must be populated in order to send to Azure. + + :param retention_policy_type: Required. Constant filled by server. :type retention_policy_type: str :param daily_schedule: Daily retention schedule of the protection policy. - :type daily_schedule: :class:`DailyRetentionSchedule - ` + :type daily_schedule: + ~azure.mgmt.recoveryservicesbackup.models.DailyRetentionSchedule :param weekly_schedule: Weekly retention schedule of the protection policy. - :type weekly_schedule: :class:`WeeklyRetentionSchedule - ` + :type weekly_schedule: + ~azure.mgmt.recoveryservicesbackup.models.WeeklyRetentionSchedule :param monthly_schedule: Monthly retention schedule of the protection policy. - :type monthly_schedule: :class:`MonthlyRetentionSchedule - ` + :type monthly_schedule: + ~azure.mgmt.recoveryservicesbackup.models.MonthlyRetentionSchedule :param yearly_schedule: Yearly retention schedule of the protection policy. - :type yearly_schedule: :class:`YearlyRetentionSchedule - ` + :type yearly_schedule: + ~azure.mgmt.recoveryservicesbackup.models.YearlyRetentionSchedule """ _validation = { @@ -46,10 +48,10 @@ class LongTermRetentionPolicy(RetentionPolicy): 'yearly_schedule': {'key': 'yearlySchedule', 'type': 'YearlyRetentionSchedule'}, } - def __init__(self, daily_schedule=None, weekly_schedule=None, monthly_schedule=None, yearly_schedule=None): - super(LongTermRetentionPolicy, self).__init__() - self.daily_schedule = daily_schedule - self.weekly_schedule = weekly_schedule - self.monthly_schedule = monthly_schedule - self.yearly_schedule = yearly_schedule + def __init__(self, **kwargs): + super(LongTermRetentionPolicy, self).__init__(**kwargs) + self.daily_schedule = kwargs.get('daily_schedule', None) + self.weekly_schedule = kwargs.get('weekly_schedule', None) + self.monthly_schedule = kwargs.get('monthly_schedule', None) + self.yearly_schedule = kwargs.get('yearly_schedule', None) self.retention_policy_type = 'LongTermRetentionPolicy' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/long_term_retention_policy_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/long_term_retention_policy_py3.py new file mode 100644 index 000000000000..d153eac6bd20 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/long_term_retention_policy_py3.py @@ -0,0 +1,57 @@ +# 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 .retention_policy_py3 import RetentionPolicy + + +class LongTermRetentionPolicy(RetentionPolicy): + """Long term retention policy. + + All required parameters must be populated in order to send to Azure. + + :param retention_policy_type: Required. Constant filled by server. + :type retention_policy_type: str + :param daily_schedule: Daily retention schedule of the protection policy. + :type daily_schedule: + ~azure.mgmt.recoveryservicesbackup.models.DailyRetentionSchedule + :param weekly_schedule: Weekly retention schedule of the protection + policy. + :type weekly_schedule: + ~azure.mgmt.recoveryservicesbackup.models.WeeklyRetentionSchedule + :param monthly_schedule: Monthly retention schedule of the protection + policy. + :type monthly_schedule: + ~azure.mgmt.recoveryservicesbackup.models.MonthlyRetentionSchedule + :param yearly_schedule: Yearly retention schedule of the protection + policy. + :type yearly_schedule: + ~azure.mgmt.recoveryservicesbackup.models.YearlyRetentionSchedule + """ + + _validation = { + 'retention_policy_type': {'required': True}, + } + + _attribute_map = { + 'retention_policy_type': {'key': 'retentionPolicyType', 'type': 'str'}, + 'daily_schedule': {'key': 'dailySchedule', 'type': 'DailyRetentionSchedule'}, + 'weekly_schedule': {'key': 'weeklySchedule', 'type': 'WeeklyRetentionSchedule'}, + 'monthly_schedule': {'key': 'monthlySchedule', 'type': 'MonthlyRetentionSchedule'}, + 'yearly_schedule': {'key': 'yearlySchedule', 'type': 'YearlyRetentionSchedule'}, + } + + def __init__(self, *, daily_schedule=None, weekly_schedule=None, monthly_schedule=None, yearly_schedule=None, **kwargs) -> None: + super(LongTermRetentionPolicy, self).__init__(**kwargs) + self.daily_schedule = daily_schedule + self.weekly_schedule = weekly_schedule + self.monthly_schedule = monthly_schedule + self.yearly_schedule = yearly_schedule + self.retention_policy_type = 'LongTermRetentionPolicy' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/long_term_schedule_policy.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/long_term_schedule_policy.py index c3357df16160..b288abafc000 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/long_term_schedule_policy.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/long_term_schedule_policy.py @@ -15,7 +15,9 @@ class LongTermSchedulePolicy(SchedulePolicy): """Long term policy schedule. - :param schedule_policy_type: Polymorphic Discriminator + All required parameters must be populated in order to send to Azure. + + :param schedule_policy_type: Required. Constant filled by server. :type schedule_policy_type: str """ @@ -23,6 +25,10 @@ class LongTermSchedulePolicy(SchedulePolicy): 'schedule_policy_type': {'required': True}, } - def __init__(self): - super(LongTermSchedulePolicy, self).__init__() + _attribute_map = { + 'schedule_policy_type': {'key': 'schedulePolicyType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LongTermSchedulePolicy, self).__init__(**kwargs) self.schedule_policy_type = 'LongTermSchedulePolicy' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/long_term_schedule_policy_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/long_term_schedule_policy_py3.py new file mode 100644 index 000000000000..af275e0ccf3d --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/long_term_schedule_policy_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .schedule_policy_py3 import SchedulePolicy + + +class LongTermSchedulePolicy(SchedulePolicy): + """Long term policy schedule. + + All required parameters must be populated in order to send to Azure. + + :param schedule_policy_type: Required. Constant filled by server. + :type schedule_policy_type: str + """ + + _validation = { + 'schedule_policy_type': {'required': True}, + } + + _attribute_map = { + 'schedule_policy_type': {'key': 'schedulePolicyType', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(LongTermSchedulePolicy, self).__init__(**kwargs) + self.schedule_policy_type = 'LongTermSchedulePolicy' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_container.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_container.py index cffbc38ea2af..290446d78c3d 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_container.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_container.py @@ -15,33 +15,23 @@ class MabContainer(ProtectionContainer): """Container with items backed up using MAB backup engine. - Variables are only populated by the server, and will be ignored when - sending a request. + All required parameters must be populated in order to send to Azure. :param friendly_name: Friendly name of the container. :type friendly_name: str :param backup_management_type: Type of backup managemenent for the container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', - 'DPM', 'AzureBackupServer', 'AzureSql' - :type backup_management_type: str or :class:`BackupManagementType - ` + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType :param registration_status: Status of registration of the container with the Recovery Services Vault. :type registration_status: str :param health_status: Status of health of the container. :type health_status: str - :ivar container_type: Type of the container. The value of this property - for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. Classic - Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows - machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is - AzureSqlContainer. Possible values include: 'Invalid', 'Unknown', - 'IaasVMContainer', 'IaasVMServiceContainer', 'DPMContainer', - 'AzureBackupServerContainer', 'MABContainer', 'Cluster', - 'AzureSqlContainer', 'Windows', 'VCenter' - :vartype container_type: str or :class:`ContainerType - ` - :param protectable_object_type: Polymorphic Discriminator - :type protectable_object_type: str + :param container_type: Required. Constant filled by server. + :type container_type: str :param can_re_register: Can the container be registered one more time. :type can_re_register: bool :param container_id: ContainerID represents the container. @@ -51,13 +41,17 @@ class MabContainer(ProtectionContainer): :param agent_version: Agent version of this container. :type agent_version: str :param extended_info: Additional information for this container - :type extended_info: :class:`MabContainerExtendedInfo - ` + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.MabContainerExtendedInfo + :param mab_container_health_details: Health details on this mab container. + :type mab_container_health_details: + list[~azure.mgmt.recoveryservicesbackup.models.MABContainerHealthDetails] + :param container_health_state: Health state of mab container. + :type container_health_state: str """ _validation = { - 'container_type': {'readonly': True}, - 'protectable_object_type': {'required': True}, + 'container_type': {'required': True}, } _attribute_map = { @@ -66,19 +60,22 @@ class MabContainer(ProtectionContainer): 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, 'health_status': {'key': 'healthStatus', 'type': 'str'}, 'container_type': {'key': 'containerType', 'type': 'str'}, - 'protectable_object_type': {'key': 'protectableObjectType', 'type': 'str'}, 'can_re_register': {'key': 'canReRegister', 'type': 'bool'}, 'container_id': {'key': 'containerId', 'type': 'long'}, 'protected_item_count': {'key': 'protectedItemCount', 'type': 'long'}, 'agent_version': {'key': 'agentVersion', 'type': 'str'}, 'extended_info': {'key': 'extendedInfo', 'type': 'MabContainerExtendedInfo'}, + 'mab_container_health_details': {'key': 'mabContainerHealthDetails', 'type': '[MABContainerHealthDetails]'}, + 'container_health_state': {'key': 'containerHealthState', 'type': 'str'}, } - def __init__(self, friendly_name=None, backup_management_type=None, registration_status=None, health_status=None, can_re_register=None, container_id=None, protected_item_count=None, agent_version=None, extended_info=None): - super(MabContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status) - self.can_re_register = can_re_register - self.container_id = container_id - self.protected_item_count = protected_item_count - self.agent_version = agent_version - self.extended_info = extended_info - self.protectable_object_type = 'MABWindowsContainer' + def __init__(self, **kwargs): + super(MabContainer, self).__init__(**kwargs) + self.can_re_register = kwargs.get('can_re_register', None) + self.container_id = kwargs.get('container_id', None) + self.protected_item_count = kwargs.get('protected_item_count', None) + self.agent_version = kwargs.get('agent_version', None) + self.extended_info = kwargs.get('extended_info', None) + self.mab_container_health_details = kwargs.get('mab_container_health_details', None) + self.container_health_state = kwargs.get('container_health_state', None) + self.container_type = 'MABWindowsContainer' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_container_extended_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_container_extended_info.py index 515cbbd9f164..300c7892ca5c 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_container_extended_info.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_container_extended_info.py @@ -20,11 +20,12 @@ class MabContainerExtendedInfo(Model): :param backup_item_type: Type of backup items associated with this container. Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', - 'SystemState', 'Client', 'GenericDataSource' - :type backup_item_type: str or :class:`BackupItemType - ` + 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', + 'AzureFileShare' + :type backup_item_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupItemType :param backup_items: List of backup items associated with this container. - :type backup_items: list of str + :type backup_items: list[str] :param policy_name: Backup policy associated with this container. :type policy_name: str :param last_backup_status: Latest backup status of this container. @@ -39,9 +40,10 @@ class MabContainerExtendedInfo(Model): 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, } - def __init__(self, last_refreshed_at=None, backup_item_type=None, backup_items=None, policy_name=None, last_backup_status=None): - self.last_refreshed_at = last_refreshed_at - self.backup_item_type = backup_item_type - self.backup_items = backup_items - self.policy_name = policy_name - self.last_backup_status = last_backup_status + def __init__(self, **kwargs): + super(MabContainerExtendedInfo, self).__init__(**kwargs) + self.last_refreshed_at = kwargs.get('last_refreshed_at', None) + self.backup_item_type = kwargs.get('backup_item_type', None) + self.backup_items = kwargs.get('backup_items', None) + self.policy_name = kwargs.get('policy_name', None) + self.last_backup_status = kwargs.get('last_backup_status', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_container_extended_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_container_extended_info_py3.py new file mode 100644 index 000000000000..6fa456af82dc --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_container_extended_info_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MabContainerExtendedInfo(Model): + """Additional information of the container. + + :param last_refreshed_at: Time stamp when this container was refreshed. + :type last_refreshed_at: datetime + :param backup_item_type: Type of backup items associated with this + container. Possible values include: 'Invalid', 'VM', 'FileFolder', + 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', + 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', + 'AzureFileShare' + :type backup_item_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupItemType + :param backup_items: List of backup items associated with this container. + :type backup_items: list[str] + :param policy_name: Backup policy associated with this container. + :type policy_name: str + :param last_backup_status: Latest backup status of this container. + :type last_backup_status: str + """ + + _attribute_map = { + 'last_refreshed_at': {'key': 'lastRefreshedAt', 'type': 'iso-8601'}, + 'backup_item_type': {'key': 'backupItemType', 'type': 'str'}, + 'backup_items': {'key': 'backupItems', 'type': '[str]'}, + 'policy_name': {'key': 'policyName', 'type': 'str'}, + 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, + } + + def __init__(self, *, last_refreshed_at=None, backup_item_type=None, backup_items=None, policy_name: str=None, last_backup_status: str=None, **kwargs) -> None: + super(MabContainerExtendedInfo, self).__init__(**kwargs) + self.last_refreshed_at = last_refreshed_at + self.backup_item_type = backup_item_type + self.backup_items = backup_items + self.policy_name = policy_name + self.last_backup_status = last_backup_status diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_container_health_details.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_container_health_details.py new file mode 100644 index 000000000000..854c2d790cf5 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_container_health_details.py @@ -0,0 +1,40 @@ +# 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 MABContainerHealthDetails(Model): + """MAB workload-specific Health Details. + + :param code: Health Code + :type code: int + :param title: Health Title + :type title: str + :param message: Health Message + :type message: str + :param recommendations: Health Recommended Actions + :type recommendations: list[str] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'int'}, + 'title': {'key': 'title', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'recommendations': {'key': 'recommendations', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(MABContainerHealthDetails, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.title = kwargs.get('title', None) + self.message = kwargs.get('message', None) + self.recommendations = kwargs.get('recommendations', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_container_health_details_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_container_health_details_py3.py new file mode 100644 index 000000000000..1acdd3eca91b --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_container_health_details_py3.py @@ -0,0 +1,40 @@ +# 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 MABContainerHealthDetails(Model): + """MAB workload-specific Health Details. + + :param code: Health Code + :type code: int + :param title: Health Title + :type title: str + :param message: Health Message + :type message: str + :param recommendations: Health Recommended Actions + :type recommendations: list[str] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'int'}, + 'title': {'key': 'title', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'recommendations': {'key': 'recommendations', 'type': '[str]'}, + } + + def __init__(self, *, code: int=None, title: str=None, message: str=None, recommendations=None, **kwargs) -> None: + super(MABContainerHealthDetails, self).__init__(**kwargs) + self.code = code + self.title = title + self.message = message + self.recommendations = recommendations diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_container_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_container_py3.py new file mode 100644 index 000000000000..042cea2fa5cb --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_container_py3.py @@ -0,0 +1,81 @@ +# 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 .protection_container_py3 import ProtectionContainer + + +class MabContainer(ProtectionContainer): + """Container with items backed up using MAB backup engine. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name of the container. + :type friendly_name: str + :param backup_management_type: Type of backup managemenent for the + container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param registration_status: Status of registration of the container with + the Recovery Services Vault. + :type registration_status: str + :param health_status: Status of health of the container. + :type health_status: str + :param container_type: Required. Constant filled by server. + :type container_type: str + :param can_re_register: Can the container be registered one more time. + :type can_re_register: bool + :param container_id: ContainerID represents the container. + :type container_id: long + :param protected_item_count: Number of items backed up in this container. + :type protected_item_count: long + :param agent_version: Agent version of this container. + :type agent_version: str + :param extended_info: Additional information for this container + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.MabContainerExtendedInfo + :param mab_container_health_details: Health details on this mab container. + :type mab_container_health_details: + list[~azure.mgmt.recoveryservicesbackup.models.MABContainerHealthDetails] + :param container_health_state: Health state of mab container. + :type container_health_state: str + """ + + _validation = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_type': {'key': 'containerType', 'type': 'str'}, + 'can_re_register': {'key': 'canReRegister', 'type': 'bool'}, + 'container_id': {'key': 'containerId', 'type': 'long'}, + 'protected_item_count': {'key': 'protectedItemCount', 'type': 'long'}, + 'agent_version': {'key': 'agentVersion', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'MabContainerExtendedInfo'}, + 'mab_container_health_details': {'key': 'mabContainerHealthDetails', 'type': '[MABContainerHealthDetails]'}, + 'container_health_state': {'key': 'containerHealthState', 'type': 'str'}, + } + + def __init__(self, *, friendly_name: str=None, backup_management_type=None, registration_status: str=None, health_status: str=None, can_re_register: bool=None, container_id: int=None, protected_item_count: int=None, agent_version: str=None, extended_info=None, mab_container_health_details=None, container_health_state: str=None, **kwargs) -> None: + super(MabContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status, **kwargs) + self.can_re_register = can_re_register + self.container_id = container_id + self.protected_item_count = protected_item_count + self.agent_version = agent_version + self.extended_info = extended_info + self.mab_container_health_details = mab_container_health_details + self.container_health_state = container_health_state + self.container_type = 'MABWindowsContainer' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_error_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_error_info.py index d57e90b3fdea..9ef4846087a4 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_error_info.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_error_info.py @@ -18,7 +18,7 @@ class MabErrorInfo(Model): :param error_string: Localized error string. :type error_string: str :param recommendations: List of localized recommendations. - :type recommendations: list of str + :type recommendations: list[str] """ _attribute_map = { @@ -26,6 +26,7 @@ class MabErrorInfo(Model): 'recommendations': {'key': 'recommendations', 'type': '[str]'}, } - def __init__(self, error_string=None, recommendations=None): - self.error_string = error_string - self.recommendations = recommendations + def __init__(self, **kwargs): + super(MabErrorInfo, self).__init__(**kwargs) + self.error_string = kwargs.get('error_string', None) + self.recommendations = kwargs.get('recommendations', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_error_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_error_info_py3.py new file mode 100644 index 000000000000..89a026089da1 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_error_info_py3.py @@ -0,0 +1,32 @@ +# 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 MabErrorInfo(Model): + """MAB workload-specific error information. + + :param error_string: Localized error string. + :type error_string: str + :param recommendations: List of localized recommendations. + :type recommendations: list[str] + """ + + _attribute_map = { + 'error_string': {'key': 'errorString', 'type': 'str'}, + 'recommendations': {'key': 'recommendations', 'type': '[str]'}, + } + + def __init__(self, *, error_string: str=None, recommendations=None, **kwargs) -> None: + super(MabErrorInfo, self).__init__(**kwargs) + self.error_string = error_string + self.recommendations = recommendations diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_file_folder_protected_item.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_file_folder_protected_item.py index 25969c227884..7e406334f413 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_file_folder_protected_item.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_file_folder_protected_item.py @@ -15,17 +15,20 @@ class MabFileFolderProtectedItem(ProtectedItem): """MAB workload-specific backup item. + All required parameters must be populated in order to send to Azure. + :param backup_management_type: Type of backup managemenent for the backed up item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', - 'AzureBackupServer', 'AzureSql' - :type backup_management_type: str or :class:`BackupManagementType - ` + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType :param workload_type: Type of workload this item represents. Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', - 'GenericDataSource' - :type workload_type: str or :class:`DataSourceType - ` + 'GenericDataSource', 'SQLDataBase', 'AzureFileShare' + :type workload_type: str or + ~azure.mgmt.recoveryservicesbackup.models.DataSourceType :param container_name: Unique name of container :type container_name: str :param source_resource_id: ARM ID of the resource to be backed up. @@ -36,7 +39,9 @@ class MabFileFolderProtectedItem(ProtectedItem): :param last_recovery_point: Timestamp when the last (latest) backup copy was created for this backup item. :type last_recovery_point: datetime - :param protected_item_type: Polymorphic Discriminator + :param backup_set_name: Name of the backup set the backup item belongs to + :type backup_set_name: str + :param protected_item_type: Required. Constant filled by server. :type protected_item_type: str :param friendly_name: Friendly name of this backup item. :type friendly_name: str @@ -54,8 +59,8 @@ class MabFileFolderProtectedItem(ProtectedItem): :param deferred_delete_sync_time_in_utc: Sync time for deferred deletion. :type deferred_delete_sync_time_in_utc: long :param extended_info: Additional information with this backup item. - :type extended_info: :class:`MabFileFolderProtectedItemExtendedInfo - ` + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.MabFileFolderProtectedItemExtendedInfo """ _validation = { @@ -69,6 +74,7 @@ class MabFileFolderProtectedItem(ProtectedItem): 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, 'policy_id': {'key': 'policyId', 'type': 'str'}, 'last_recovery_point': {'key': 'lastRecoveryPoint', 'type': 'iso-8601'}, + 'backup_set_name': {'key': 'backupSetName', 'type': 'str'}, 'protected_item_type': {'key': 'protectedItemType', 'type': 'str'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'computer_name': {'key': 'computerName', 'type': 'str'}, @@ -79,13 +85,13 @@ class MabFileFolderProtectedItem(ProtectedItem): 'extended_info': {'key': 'extendedInfo', 'type': 'MabFileFolderProtectedItemExtendedInfo'}, } - def __init__(self, backup_management_type=None, workload_type=None, container_name=None, source_resource_id=None, policy_id=None, last_recovery_point=None, friendly_name=None, computer_name=None, last_backup_status=None, protection_state=None, is_scheduled_for_deferred_delete=None, deferred_delete_sync_time_in_utc=None, extended_info=None): - super(MabFileFolderProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point) - self.friendly_name = friendly_name - self.computer_name = computer_name - self.last_backup_status = last_backup_status - self.protection_state = protection_state - self.is_scheduled_for_deferred_delete = is_scheduled_for_deferred_delete - self.deferred_delete_sync_time_in_utc = deferred_delete_sync_time_in_utc - self.extended_info = extended_info + def __init__(self, **kwargs): + super(MabFileFolderProtectedItem, self).__init__(**kwargs) + self.friendly_name = kwargs.get('friendly_name', None) + self.computer_name = kwargs.get('computer_name', None) + self.last_backup_status = kwargs.get('last_backup_status', None) + self.protection_state = kwargs.get('protection_state', None) + self.is_scheduled_for_deferred_delete = kwargs.get('is_scheduled_for_deferred_delete', None) + self.deferred_delete_sync_time_in_utc = kwargs.get('deferred_delete_sync_time_in_utc', None) + self.extended_info = kwargs.get('extended_info', None) self.protected_item_type = 'MabFileFolderProtectedItem' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_file_folder_protected_item_extended_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_file_folder_protected_item_extended_info.py index 07c902a4fb9e..9b5dbe440819 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_file_folder_protected_item_extended_info.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_file_folder_protected_item_extended_info.py @@ -30,7 +30,8 @@ class MabFileFolderProtectedItemExtendedInfo(Model): 'recovery_point_count': {'key': 'recoveryPointCount', 'type': 'int'}, } - def __init__(self, last_refreshed_at=None, oldest_recovery_point=None, recovery_point_count=None): - self.last_refreshed_at = last_refreshed_at - self.oldest_recovery_point = oldest_recovery_point - self.recovery_point_count = recovery_point_count + def __init__(self, **kwargs): + super(MabFileFolderProtectedItemExtendedInfo, self).__init__(**kwargs) + self.last_refreshed_at = kwargs.get('last_refreshed_at', None) + self.oldest_recovery_point = kwargs.get('oldest_recovery_point', None) + self.recovery_point_count = kwargs.get('recovery_point_count', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_file_folder_protected_item_extended_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_file_folder_protected_item_extended_info_py3.py new file mode 100644 index 000000000000..246830841cfe --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_file_folder_protected_item_extended_info_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MabFileFolderProtectedItemExtendedInfo(Model): + """Additional information on the backed up item. + + :param last_refreshed_at: Last time when the agent data synced to service. + :type last_refreshed_at: datetime + :param oldest_recovery_point: The oldest backup copy available. + :type oldest_recovery_point: datetime + :param recovery_point_count: Number of backup copies associated with the + backup item. + :type recovery_point_count: int + """ + + _attribute_map = { + 'last_refreshed_at': {'key': 'lastRefreshedAt', 'type': 'iso-8601'}, + 'oldest_recovery_point': {'key': 'oldestRecoveryPoint', 'type': 'iso-8601'}, + 'recovery_point_count': {'key': 'recoveryPointCount', 'type': 'int'}, + } + + def __init__(self, *, last_refreshed_at=None, oldest_recovery_point=None, recovery_point_count: int=None, **kwargs) -> None: + super(MabFileFolderProtectedItemExtendedInfo, self).__init__(**kwargs) + self.last_refreshed_at = last_refreshed_at + self.oldest_recovery_point = oldest_recovery_point + self.recovery_point_count = recovery_point_count diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_file_folder_protected_item_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_file_folder_protected_item_py3.py new file mode 100644 index 000000000000..77dc4ffc8a24 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_file_folder_protected_item_py3.py @@ -0,0 +1,97 @@ +# 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 .protected_item_py3 import ProtectedItem + + +class MabFileFolderProtectedItem(ProtectedItem): + """MAB workload-specific backup item. + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent for the backed + up item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param workload_type: Type of workload this item represents. Possible + values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', + 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + 'GenericDataSource', 'SQLDataBase', 'AzureFileShare' + :type workload_type: str or + ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :param container_name: Unique name of container + :type container_name: str + :param source_resource_id: ARM ID of the resource to be backed up. + :type source_resource_id: str + :param policy_id: ID of the backup policy with which this item is backed + up. + :type policy_id: str + :param last_recovery_point: Timestamp when the last (latest) backup copy + was created for this backup item. + :type last_recovery_point: datetime + :param backup_set_name: Name of the backup set the backup item belongs to + :type backup_set_name: str + :param protected_item_type: Required. Constant filled by server. + :type protected_item_type: str + :param friendly_name: Friendly name of this backup item. + :type friendly_name: str + :param computer_name: Name of the computer associated with this backup + item. + :type computer_name: str + :param last_backup_status: Status of last backup operation. + :type last_backup_status: str + :param protection_state: Protected, ProtectionStopped, IRPending or + ProtectionError + :type protection_state: str + :param is_scheduled_for_deferred_delete: Specifies if the item is + scheduled for deferred deletion. + :type is_scheduled_for_deferred_delete: bool + :param deferred_delete_sync_time_in_utc: Sync time for deferred deletion. + :type deferred_delete_sync_time_in_utc: long + :param extended_info: Additional information with this backup item. + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.MabFileFolderProtectedItemExtendedInfo + """ + + _validation = { + 'protected_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'policy_id': {'key': 'policyId', 'type': 'str'}, + 'last_recovery_point': {'key': 'lastRecoveryPoint', 'type': 'iso-8601'}, + 'backup_set_name': {'key': 'backupSetName', 'type': 'str'}, + 'protected_item_type': {'key': 'protectedItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'computer_name': {'key': 'computerName', 'type': 'str'}, + 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'is_scheduled_for_deferred_delete': {'key': 'isScheduledForDeferredDelete', 'type': 'bool'}, + 'deferred_delete_sync_time_in_utc': {'key': 'deferredDeleteSyncTimeInUTC', 'type': 'long'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'MabFileFolderProtectedItemExtendedInfo'}, + } + + def __init__(self, *, backup_management_type=None, workload_type=None, container_name: str=None, source_resource_id: str=None, policy_id: str=None, last_recovery_point=None, backup_set_name: str=None, friendly_name: str=None, computer_name: str=None, last_backup_status: str=None, protection_state: str=None, is_scheduled_for_deferred_delete: bool=None, deferred_delete_sync_time_in_utc: int=None, extended_info=None, **kwargs) -> None: + super(MabFileFolderProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, **kwargs) + self.friendly_name = friendly_name + self.computer_name = computer_name + self.last_backup_status = last_backup_status + self.protection_state = protection_state + self.is_scheduled_for_deferred_delete = is_scheduled_for_deferred_delete + self.deferred_delete_sync_time_in_utc = deferred_delete_sync_time_in_utc + self.extended_info = extended_info + self.protected_item_type = 'MabFileFolderProtectedItem' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_job.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_job.py index 2e568b44e66d..39b5ca2f1797 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_job.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_job.py @@ -15,14 +15,17 @@ class MabJob(Job): """MAB workload-specific job. + All required parameters must be populated in order to send to Azure. + :param entity_friendly_name: Friendly name of the entity on which the current job is executing. :type entity_friendly_name: str :param backup_management_type: Backup management type to execute the current job. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', - 'DPM', 'AzureBackupServer', 'AzureSql' - :type backup_management_type: str or :class:`BackupManagementType - ` + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType :param operation: The operation name. :type operation: str :param status: Job status. @@ -33,33 +36,36 @@ class MabJob(Job): :type end_time: datetime :param activity_id: ActivityId of job. :type activity_id: str - :param job_type: Polymorphic Discriminator + :param job_type: Required. Constant filled by server. :type job_type: str :param duration: Time taken by job to run. :type duration: timedelta :param actions_info: The state/actions applicable on jobs like cancel/retry. - :type actions_info: list of str or :class:`JobSupportedAction - ` + :type actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] :param mab_server_name: Name of server protecting the DS. :type mab_server_name: str :param mab_server_type: Server type of MAB container. Possible values include: 'Invalid', 'Unknown', 'IaasVMContainer', 'IaasVMServiceContainer', 'DPMContainer', 'AzureBackupServerContainer', - 'MABContainer', 'Cluster', 'AzureSqlContainer', 'Windows', 'VCenter' - :type mab_server_type: str or :class:`MabServerType - ` + 'MABContainer', 'Cluster', 'AzureSqlContainer', 'Windows', 'VCenter', + 'VMAppContainer', 'SQLAGWorkLoadContainer', 'StorageContainer', + 'GenericContainer' + :type mab_server_type: str or + ~azure.mgmt.recoveryservicesbackup.models.MabServerType :param workload_type: Workload type of backup item. Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', - 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', 'GenericDataSource' - :type workload_type: str or :class:`WorkloadType - ` + 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', 'GenericDataSource', + 'SQLDataBase', 'AzureFileShare' + :type workload_type: str or + ~azure.mgmt.recoveryservicesbackup.models.WorkloadType :param error_details: The errors. - :type error_details: list of :class:`MabErrorInfo - ` + :type error_details: + list[~azure.mgmt.recoveryservicesbackup.models.MabErrorInfo] :param extended_info: Additional information on the job. - :type extended_info: :class:`MabJobExtendedInfo - ` + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.MabJobExtendedInfo """ _validation = { @@ -84,13 +90,13 @@ class MabJob(Job): 'extended_info': {'key': 'extendedInfo', 'type': 'MabJobExtendedInfo'}, } - def __init__(self, entity_friendly_name=None, backup_management_type=None, operation=None, status=None, start_time=None, end_time=None, activity_id=None, duration=None, actions_info=None, mab_server_name=None, mab_server_type=None, workload_type=None, error_details=None, extended_info=None): - super(MabJob, self).__init__(entity_friendly_name=entity_friendly_name, backup_management_type=backup_management_type, operation=operation, status=status, start_time=start_time, end_time=end_time, activity_id=activity_id) - self.duration = duration - self.actions_info = actions_info - self.mab_server_name = mab_server_name - self.mab_server_type = mab_server_type - self.workload_type = workload_type - self.error_details = error_details - self.extended_info = extended_info + def __init__(self, **kwargs): + super(MabJob, self).__init__(**kwargs) + self.duration = kwargs.get('duration', None) + self.actions_info = kwargs.get('actions_info', None) + self.mab_server_name = kwargs.get('mab_server_name', None) + self.mab_server_type = kwargs.get('mab_server_type', None) + self.workload_type = kwargs.get('workload_type', None) + self.error_details = kwargs.get('error_details', None) + self.extended_info = kwargs.get('extended_info', None) self.job_type = 'MabJob' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_job_extended_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_job_extended_info.py index 4f1e4616e72d..a0bec3fdf6c3 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_job_extended_info.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_job_extended_info.py @@ -16,10 +16,10 @@ class MabJobExtendedInfo(Model): """Additional information for the MAB workload-specific job. :param tasks_list: List of tasks for this job. - :type tasks_list: list of :class:`MabJobTaskDetails - ` + :type tasks_list: + list[~azure.mgmt.recoveryservicesbackup.models.MabJobTaskDetails] :param property_bag: The job properties. - :type property_bag: dict + :type property_bag: dict[str, str] :param dynamic_error_message: Non localized error message specific to this job. :type dynamic_error_message: str @@ -31,7 +31,8 @@ class MabJobExtendedInfo(Model): 'dynamic_error_message': {'key': 'dynamicErrorMessage', 'type': 'str'}, } - def __init__(self, tasks_list=None, property_bag=None, dynamic_error_message=None): - self.tasks_list = tasks_list - self.property_bag = property_bag - self.dynamic_error_message = dynamic_error_message + def __init__(self, **kwargs): + super(MabJobExtendedInfo, self).__init__(**kwargs) + self.tasks_list = kwargs.get('tasks_list', None) + self.property_bag = kwargs.get('property_bag', None) + self.dynamic_error_message = kwargs.get('dynamic_error_message', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_job_extended_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_job_extended_info_py3.py new file mode 100644 index 000000000000..33b4c436af78 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_job_extended_info_py3.py @@ -0,0 +1,38 @@ +# 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 MabJobExtendedInfo(Model): + """Additional information for the MAB workload-specific job. + + :param tasks_list: List of tasks for this job. + :type tasks_list: + list[~azure.mgmt.recoveryservicesbackup.models.MabJobTaskDetails] + :param property_bag: The job properties. + :type property_bag: dict[str, str] + :param dynamic_error_message: Non localized error message specific to this + job. + :type dynamic_error_message: str + """ + + _attribute_map = { + 'tasks_list': {'key': 'tasksList', 'type': '[MabJobTaskDetails]'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'dynamic_error_message': {'key': 'dynamicErrorMessage', 'type': 'str'}, + } + + def __init__(self, *, tasks_list=None, property_bag=None, dynamic_error_message: str=None, **kwargs) -> None: + super(MabJobExtendedInfo, self).__init__(**kwargs) + self.tasks_list = tasks_list + self.property_bag = property_bag + self.dynamic_error_message = dynamic_error_message diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_job_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_job_py3.py new file mode 100644 index 000000000000..77822f0e41f9 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_job_py3.py @@ -0,0 +1,102 @@ +# 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 .job_py3 import Job + + +class MabJob(Job): + """MAB workload-specific job. + + All required parameters must be populated in order to send to Azure. + + :param entity_friendly_name: Friendly name of the entity on which the + current job is executing. + :type entity_friendly_name: str + :param backup_management_type: Backup management type to execute the + current job. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param operation: The operation name. + :type operation: str + :param status: Job status. + :type status: str + :param start_time: The start time. + :type start_time: datetime + :param end_time: The end time. + :type end_time: datetime + :param activity_id: ActivityId of job. + :type activity_id: str + :param job_type: Required. Constant filled by server. + :type job_type: str + :param duration: Time taken by job to run. + :type duration: timedelta + :param actions_info: The state/actions applicable on jobs like + cancel/retry. + :type actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] + :param mab_server_name: Name of server protecting the DS. + :type mab_server_name: str + :param mab_server_type: Server type of MAB container. Possible values + include: 'Invalid', 'Unknown', 'IaasVMContainer', + 'IaasVMServiceContainer', 'DPMContainer', 'AzureBackupServerContainer', + 'MABContainer', 'Cluster', 'AzureSqlContainer', 'Windows', 'VCenter', + 'VMAppContainer', 'SQLAGWorkLoadContainer', 'StorageContainer', + 'GenericContainer' + :type mab_server_type: str or + ~azure.mgmt.recoveryservicesbackup.models.MabServerType + :param workload_type: Workload type of backup item. Possible values + include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', + 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', 'GenericDataSource', + 'SQLDataBase', 'AzureFileShare' + :type workload_type: str or + ~azure.mgmt.recoveryservicesbackup.models.WorkloadType + :param error_details: The errors. + :type error_details: + list[~azure.mgmt.recoveryservicesbackup.models.MabErrorInfo] + :param extended_info: Additional information on the job. + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.MabJobExtendedInfo + """ + + _validation = { + 'job_type': {'required': True}, + } + + _attribute_map = { + 'entity_friendly_name': {'key': 'entityFriendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'activity_id': {'key': 'activityId', 'type': 'str'}, + 'job_type': {'key': 'jobType', 'type': 'str'}, + 'duration': {'key': 'duration', 'type': 'duration'}, + 'actions_info': {'key': 'actionsInfo', 'type': '[JobSupportedAction]'}, + 'mab_server_name': {'key': 'mabServerName', 'type': 'str'}, + 'mab_server_type': {'key': 'mabServerType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'error_details': {'key': 'errorDetails', 'type': '[MabErrorInfo]'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'MabJobExtendedInfo'}, + } + + def __init__(self, *, entity_friendly_name: str=None, backup_management_type=None, operation: str=None, status: str=None, start_time=None, end_time=None, activity_id: str=None, duration=None, actions_info=None, mab_server_name: str=None, mab_server_type=None, workload_type=None, error_details=None, extended_info=None, **kwargs) -> None: + super(MabJob, self).__init__(entity_friendly_name=entity_friendly_name, backup_management_type=backup_management_type, operation=operation, status=status, start_time=start_time, end_time=end_time, activity_id=activity_id, **kwargs) + self.duration = duration + self.actions_info = actions_info + self.mab_server_name = mab_server_name + self.mab_server_type = mab_server_type + self.workload_type = workload_type + self.error_details = error_details + self.extended_info = extended_info + self.job_type = 'MabJob' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_job_task_details.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_job_task_details.py index 79c06f11d80d..4bdd129d8932 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_job_task_details.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_job_task_details.py @@ -35,9 +35,10 @@ class MabJobTaskDetails(Model): 'status': {'key': 'status', 'type': 'str'}, } - def __init__(self, task_id=None, start_time=None, end_time=None, duration=None, status=None): - self.task_id = task_id - self.start_time = start_time - self.end_time = end_time - self.duration = duration - self.status = status + def __init__(self, **kwargs): + super(MabJobTaskDetails, self).__init__(**kwargs) + self.task_id = kwargs.get('task_id', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.duration = kwargs.get('duration', None) + self.status = kwargs.get('status', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_job_task_details_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_job_task_details_py3.py new file mode 100644 index 000000000000..da73da96a7f0 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_job_task_details_py3.py @@ -0,0 +1,44 @@ +# 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 MabJobTaskDetails(Model): + """MAB workload-specific job task details. + + :param task_id: The task display name. + :type task_id: str + :param start_time: The start time. + :type start_time: datetime + :param end_time: The end time. + :type end_time: datetime + :param duration: Time elapsed for task. + :type duration: timedelta + :param status: The status. + :type status: str + """ + + _attribute_map = { + 'task_id': {'key': 'taskId', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'duration': {'key': 'duration', 'type': 'duration'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, *, task_id: str=None, start_time=None, end_time=None, duration=None, status: str=None, **kwargs) -> None: + super(MabJobTaskDetails, self).__init__(**kwargs) + self.task_id = task_id + self.start_time = start_time + self.end_time = end_time + self.duration = duration + self.status = status diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_protection_policy.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_protection_policy.py index e3082f9017a4..f44ea6e7311a 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_protection_policy.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_protection_policy.py @@ -15,16 +15,18 @@ class MabProtectionPolicy(ProtectionPolicy): """Mab container-specific backup policy. + All required parameters must be populated in order to send to Azure. + :param protected_items_count: Number of items associated with this policy. :type protected_items_count: int - :param backup_management_type: Polymorphic Discriminator + :param backup_management_type: Required. Constant filled by server. :type backup_management_type: str :param schedule_policy: Backup schedule of backup policy. - :type schedule_policy: :class:`SchedulePolicy - ` + :type schedule_policy: + ~azure.mgmt.recoveryservicesbackup.models.SchedulePolicy :param retention_policy: Retention policy details. - :type retention_policy: :class:`RetentionPolicy - ` + :type retention_policy: + ~azure.mgmt.recoveryservicesbackup.models.RetentionPolicy """ _validation = { @@ -38,8 +40,8 @@ class MabProtectionPolicy(ProtectionPolicy): 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, } - def __init__(self, protected_items_count=None, schedule_policy=None, retention_policy=None): - super(MabProtectionPolicy, self).__init__(protected_items_count=protected_items_count) - self.schedule_policy = schedule_policy - self.retention_policy = retention_policy + def __init__(self, **kwargs): + super(MabProtectionPolicy, self).__init__(**kwargs) + self.schedule_policy = kwargs.get('schedule_policy', None) + self.retention_policy = kwargs.get('retention_policy', None) self.backup_management_type = 'MAB' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_protection_policy_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_protection_policy_py3.py new file mode 100644 index 000000000000..e5ef4e29d7b5 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/mab_protection_policy_py3.py @@ -0,0 +1,47 @@ +# 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 .protection_policy_py3 import ProtectionPolicy + + +class MabProtectionPolicy(ProtectionPolicy): + """Mab container-specific backup policy. + + All required parameters must be populated in order to send to Azure. + + :param protected_items_count: Number of items associated with this policy. + :type protected_items_count: int + :param backup_management_type: Required. Constant filled by server. + :type backup_management_type: str + :param schedule_policy: Backup schedule of backup policy. + :type schedule_policy: + ~azure.mgmt.recoveryservicesbackup.models.SchedulePolicy + :param retention_policy: Retention policy details. + :type retention_policy: + ~azure.mgmt.recoveryservicesbackup.models.RetentionPolicy + """ + + _validation = { + 'backup_management_type': {'required': True}, + } + + _attribute_map = { + 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'schedule_policy': {'key': 'schedulePolicy', 'type': 'SchedulePolicy'}, + 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, + } + + def __init__(self, *, protected_items_count: int=None, schedule_policy=None, retention_policy=None, **kwargs) -> None: + super(MabProtectionPolicy, self).__init__(protected_items_count=protected_items_count, **kwargs) + self.schedule_policy = schedule_policy + self.retention_policy = retention_policy + self.backup_management_type = 'MAB' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/monthly_retention_schedule.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/monthly_retention_schedule.py index f3a4ea2e5ff6..27a68660d1f9 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/monthly_retention_schedule.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/monthly_retention_schedule.py @@ -19,21 +19,20 @@ class MonthlyRetentionSchedule(Model): monthly retention policy. Possible values include: 'Invalid', 'Daily', 'Weekly' :type retention_schedule_format_type: str or - :class:`RetentionScheduleFormat - ` + ~azure.mgmt.recoveryservicesbackup.models.RetentionScheduleFormat :param retention_schedule_daily: Daily retention format for monthly retention policy. - :type retention_schedule_daily: :class:`DailyRetentionFormat - ` + :type retention_schedule_daily: + ~azure.mgmt.recoveryservicesbackup.models.DailyRetentionFormat :param retention_schedule_weekly: Weekly retention format for monthly retention policy. - :type retention_schedule_weekly: :class:`WeeklyRetentionFormat - ` + :type retention_schedule_weekly: + ~azure.mgmt.recoveryservicesbackup.models.WeeklyRetentionFormat :param retention_times: Retention times of retention policy. - :type retention_times: list of datetime + :type retention_times: list[datetime] :param retention_duration: Retention duration of retention Policy. - :type retention_duration: :class:`RetentionDuration - ` + :type retention_duration: + ~azure.mgmt.recoveryservicesbackup.models.RetentionDuration """ _attribute_map = { @@ -44,9 +43,10 @@ class MonthlyRetentionSchedule(Model): 'retention_duration': {'key': 'retentionDuration', 'type': 'RetentionDuration'}, } - def __init__(self, retention_schedule_format_type=None, retention_schedule_daily=None, retention_schedule_weekly=None, retention_times=None, retention_duration=None): - self.retention_schedule_format_type = retention_schedule_format_type - self.retention_schedule_daily = retention_schedule_daily - self.retention_schedule_weekly = retention_schedule_weekly - self.retention_times = retention_times - self.retention_duration = retention_duration + def __init__(self, **kwargs): + super(MonthlyRetentionSchedule, self).__init__(**kwargs) + self.retention_schedule_format_type = kwargs.get('retention_schedule_format_type', None) + self.retention_schedule_daily = kwargs.get('retention_schedule_daily', None) + self.retention_schedule_weekly = kwargs.get('retention_schedule_weekly', None) + self.retention_times = kwargs.get('retention_times', None) + self.retention_duration = kwargs.get('retention_duration', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/monthly_retention_schedule_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/monthly_retention_schedule_py3.py new file mode 100644 index 000000000000..0f76a43c6d4c --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/monthly_retention_schedule_py3.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MonthlyRetentionSchedule(Model): + """Monthly retention schedule. + + :param retention_schedule_format_type: Retention schedule format type for + monthly retention policy. Possible values include: 'Invalid', 'Daily', + 'Weekly' + :type retention_schedule_format_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RetentionScheduleFormat + :param retention_schedule_daily: Daily retention format for monthly + retention policy. + :type retention_schedule_daily: + ~azure.mgmt.recoveryservicesbackup.models.DailyRetentionFormat + :param retention_schedule_weekly: Weekly retention format for monthly + retention policy. + :type retention_schedule_weekly: + ~azure.mgmt.recoveryservicesbackup.models.WeeklyRetentionFormat + :param retention_times: Retention times of retention policy. + :type retention_times: list[datetime] + :param retention_duration: Retention duration of retention Policy. + :type retention_duration: + ~azure.mgmt.recoveryservicesbackup.models.RetentionDuration + """ + + _attribute_map = { + 'retention_schedule_format_type': {'key': 'retentionScheduleFormatType', 'type': 'str'}, + 'retention_schedule_daily': {'key': 'retentionScheduleDaily', 'type': 'DailyRetentionFormat'}, + 'retention_schedule_weekly': {'key': 'retentionScheduleWeekly', 'type': 'WeeklyRetentionFormat'}, + 'retention_times': {'key': 'retentionTimes', 'type': '[iso-8601]'}, + 'retention_duration': {'key': 'retentionDuration', 'type': 'RetentionDuration'}, + } + + def __init__(self, *, retention_schedule_format_type=None, retention_schedule_daily=None, retention_schedule_weekly=None, retention_times=None, retention_duration=None, **kwargs) -> None: + super(MonthlyRetentionSchedule, self).__init__(**kwargs) + self.retention_schedule_format_type = retention_schedule_format_type + self.retention_schedule_daily = retention_schedule_daily + self.retention_schedule_weekly = retention_schedule_weekly + self.retention_times = retention_times + self.retention_duration = retention_duration diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/name_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/name_info.py index 647b137a7f5d..fe124296d77a 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/name_info.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/name_info.py @@ -26,6 +26,7 @@ class NameInfo(Model): 'localized_value': {'key': 'localizedValue', 'type': 'str'}, } - def __init__(self, value=None, localized_value=None): - self.value = value - self.localized_value = localized_value + def __init__(self, **kwargs): + super(NameInfo, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.localized_value = kwargs.get('localized_value', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/name_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/name_info_py3.py new file mode 100644 index 000000000000..92ebeac4e05f --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/name_info_py3.py @@ -0,0 +1,32 @@ +# 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 NameInfo(Model): + """The name of usage. + + :param value: Value of usage. + :type value: str + :param localized_value: Localized value of usage. + :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(NameInfo, self).__init__(**kwargs) + self.value = value + self.localized_value = localized_value diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_result_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_result_info.py index 8d367af660b3..d8ef467de12e 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_result_info.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_result_info.py @@ -15,10 +15,12 @@ class OperationResultInfo(OperationResultInfoBase): """Operation result info. - :param object_type: Polymorphic Discriminator + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. :type object_type: str :param job_list: List of jobs created by this operation. - :type job_list: list of str + :type job_list: list[str] """ _validation = { @@ -30,7 +32,7 @@ class OperationResultInfo(OperationResultInfoBase): 'job_list': {'key': 'jobList', 'type': '[str]'}, } - def __init__(self, job_list=None): - super(OperationResultInfo, self).__init__() - self.job_list = job_list + def __init__(self, **kwargs): + super(OperationResultInfo, self).__init__(**kwargs) + self.job_list = kwargs.get('job_list', None) self.object_type = 'OperationResultInfo' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_result_info_base.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_result_info_base.py index 0952b67e9fb0..ce015a5df5b2 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_result_info_base.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_result_info_base.py @@ -15,7 +15,12 @@ class OperationResultInfoBase(Model): """Base class for operation result info. - :param object_type: Polymorphic Discriminator + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ExportJobsOperationResultInfo, OperationResultInfo + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. :type object_type: str """ @@ -31,5 +36,6 @@ class OperationResultInfoBase(Model): 'object_type': {'ExportJobsOperationResultInfo': 'ExportJobsOperationResultInfo', 'OperationResultInfo': 'OperationResultInfo'} } - def __init__(self): + def __init__(self, **kwargs): + super(OperationResultInfoBase, self).__init__(**kwargs) self.object_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_result_info_base_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_result_info_base_py3.py new file mode 100644 index 000000000000..e39b4b30edf3 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_result_info_base_py3.py @@ -0,0 +1,41 @@ +# 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 OperationResultInfoBase(Model): + """Base class for operation result info. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ExportJobsOperationResultInfo, OperationResultInfo + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'ExportJobsOperationResultInfo': 'ExportJobsOperationResultInfo', 'OperationResultInfo': 'OperationResultInfo'} + } + + def __init__(self, **kwargs) -> None: + super(OperationResultInfoBase, self).__init__(**kwargs) + self.object_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_result_info_base_resource.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_result_info_base_resource.py index 4f6580c62f60..8c5aa269a2dc 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_result_info_base_resource.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_result_info_base_resource.py @@ -29,21 +29,21 @@ class OperationResultInfoBaseResource(OperationWorkerResponse): 'ExpectationFailed', 'UpgradeRequired', 'InternalServerError', 'NotImplemented', 'BadGateway', 'ServiceUnavailable', 'GatewayTimeout', 'HttpVersionNotSupported' - :type status_code: str or :class:`HttpStatusCode - ` + :type status_code: str or + ~azure.mgmt.recoveryservicesbackup.models.HttpStatusCode :param headers: HTTP headers associated with this operation. - :type headers: dict + :type headers: dict[str, list[str]] :param operation: OperationResultInfoBaseResource operation - :type operation: :class:`OperationResultInfoBase - ` + :type operation: + ~azure.mgmt.recoveryservicesbackup.models.OperationResultInfoBase """ _attribute_map = { 'status_code': {'key': 'statusCode', 'type': 'HttpStatusCode'}, - 'headers': {'key': 'Headers', 'type': '{[str]}'}, + 'headers': {'key': 'headers', 'type': '{[str]}'}, 'operation': {'key': 'operation', 'type': 'OperationResultInfoBase'}, } - def __init__(self, status_code=None, headers=None, operation=None): - super(OperationResultInfoBaseResource, self).__init__(status_code=status_code, headers=headers) - self.operation = operation + def __init__(self, **kwargs): + super(OperationResultInfoBaseResource, self).__init__(**kwargs) + self.operation = kwargs.get('operation', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_result_info_base_resource_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_result_info_base_resource_py3.py new file mode 100644 index 000000000000..e784f7d5884a --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_result_info_base_resource_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .operation_worker_response_py3 import OperationWorkerResponse + + +class OperationResultInfoBaseResource(OperationWorkerResponse): + """Base class for operation result info. + + :param status_code: HTTP Status Code of the operation. Possible values + include: 'Continue', 'SwitchingProtocols', 'OK', 'Created', 'Accepted', + 'NonAuthoritativeInformation', 'NoContent', 'ResetContent', + 'PartialContent', 'MultipleChoices', 'Ambiguous', 'MovedPermanently', + 'Moved', 'Found', 'Redirect', 'SeeOther', 'RedirectMethod', 'NotModified', + 'UseProxy', 'Unused', 'TemporaryRedirect', 'RedirectKeepVerb', + 'BadRequest', 'Unauthorized', 'PaymentRequired', 'Forbidden', 'NotFound', + 'MethodNotAllowed', 'NotAcceptable', 'ProxyAuthenticationRequired', + 'RequestTimeout', 'Conflict', 'Gone', 'LengthRequired', + 'PreconditionFailed', 'RequestEntityTooLarge', 'RequestUriTooLong', + 'UnsupportedMediaType', 'RequestedRangeNotSatisfiable', + 'ExpectationFailed', 'UpgradeRequired', 'InternalServerError', + 'NotImplemented', 'BadGateway', 'ServiceUnavailable', 'GatewayTimeout', + 'HttpVersionNotSupported' + :type status_code: str or + ~azure.mgmt.recoveryservicesbackup.models.HttpStatusCode + :param headers: HTTP headers associated with this operation. + :type headers: dict[str, list[str]] + :param operation: OperationResultInfoBaseResource operation + :type operation: + ~azure.mgmt.recoveryservicesbackup.models.OperationResultInfoBase + """ + + _attribute_map = { + 'status_code': {'key': 'statusCode', 'type': 'HttpStatusCode'}, + 'headers': {'key': 'headers', 'type': '{[str]}'}, + 'operation': {'key': 'operation', 'type': 'OperationResultInfoBase'}, + } + + def __init__(self, *, status_code=None, headers=None, operation=None, **kwargs) -> None: + super(OperationResultInfoBaseResource, self).__init__(status_code=status_code, headers=headers, **kwargs) + self.operation = operation diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_result_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_result_info_py3.py new file mode 100644 index 000000000000..28273a8f3a78 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_result_info_py3.py @@ -0,0 +1,38 @@ +# 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 .operation_result_info_base_py3 import OperationResultInfoBase + + +class OperationResultInfo(OperationResultInfoBase): + """Operation result info. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param job_list: List of jobs created by this operation. + :type job_list: list[str] + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'job_list': {'key': 'jobList', 'type': '[str]'}, + } + + def __init__(self, *, job_list=None, **kwargs) -> None: + super(OperationResultInfo, self).__init__(**kwargs) + self.job_list = job_list + self.object_type = 'OperationResultInfo' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status.py index baeceaec7bc9..e57e8b6be760 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status.py @@ -21,18 +21,18 @@ class OperationStatus(Model): :type name: str :param status: Operation status. Possible values include: 'Invalid', 'InProgress', 'Succeeded', 'Failed', 'Canceled' - :type status: str or :class:`OperationStatusValues - ` + :type status: str or + ~azure.mgmt.recoveryservicesbackup.models.OperationStatusValues :param start_time: Operation start time. Format: ISO-8601. :type start_time: datetime :param end_time: Operation end time. Format: ISO-8601. :type end_time: datetime :param error: Error information related to this operation. - :type error: :class:`OperationStatusError - ` + :type error: + ~azure.mgmt.recoveryservicesbackup.models.OperationStatusError :param properties: Additional information associated with this operation. - :type properties: :class:`OperationStatusExtendedInfo - ` + :type properties: + ~azure.mgmt.recoveryservicesbackup.models.OperationStatusExtendedInfo """ _attribute_map = { @@ -45,11 +45,12 @@ class OperationStatus(Model): 'properties': {'key': 'properties', 'type': 'OperationStatusExtendedInfo'}, } - def __init__(self, id=None, name=None, status=None, start_time=None, end_time=None, error=None, properties=None): - self.id = id - self.name = name - self.status = status - self.start_time = start_time - self.end_time = end_time - self.error = error - self.properties = properties + def __init__(self, **kwargs): + super(OperationStatus, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.status = kwargs.get('status', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.error = kwargs.get('error', None) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_error.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_error.py index 2284b1fe67fe..a7414e3400c6 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_error.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_error.py @@ -26,6 +26,7 @@ class OperationStatusError(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self, code=None, message=None): - self.code = code - self.message = message + def __init__(self, **kwargs): + super(OperationStatusError, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_error_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_error_py3.py new file mode 100644 index 000000000000..982a7c177867 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_error_py3.py @@ -0,0 +1,32 @@ +# 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 OperationStatusError(Model): + """Error information associated with operation status call. + + :param code: Error code of the operation failure. + :type code: str + :param message: Error message displayed if the operation failure. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: + super(OperationStatusError, self).__init__(**kwargs) + self.code = code + self.message = message diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_extended_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_extended_info.py index 300596c78941..f89804223cd0 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_extended_info.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_extended_info.py @@ -15,7 +15,13 @@ class OperationStatusExtendedInfo(Model): """Base class for additional information of operation status. - :param object_type: Polymorphic Discriminator + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: OperationStatusJobExtendedInfo, + OperationStatusJobsExtendedInfo, OperationStatusProvisionILRExtendedInfo + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. :type object_type: str """ @@ -31,5 +37,6 @@ class OperationStatusExtendedInfo(Model): 'object_type': {'OperationStatusJobExtendedInfo': 'OperationStatusJobExtendedInfo', 'OperationStatusJobsExtendedInfo': 'OperationStatusJobsExtendedInfo', 'OperationStatusProvisionILRExtendedInfo': 'OperationStatusProvisionILRExtendedInfo'} } - def __init__(self): + def __init__(self, **kwargs): + super(OperationStatusExtendedInfo, self).__init__(**kwargs) self.object_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_extended_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_extended_info_py3.py new file mode 100644 index 000000000000..166aab47470d --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_extended_info_py3.py @@ -0,0 +1,42 @@ +# 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 OperationStatusExtendedInfo(Model): + """Base class for additional information of operation status. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: OperationStatusJobExtendedInfo, + OperationStatusJobsExtendedInfo, OperationStatusProvisionILRExtendedInfo + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'OperationStatusJobExtendedInfo': 'OperationStatusJobExtendedInfo', 'OperationStatusJobsExtendedInfo': 'OperationStatusJobsExtendedInfo', 'OperationStatusProvisionILRExtendedInfo': 'OperationStatusProvisionILRExtendedInfo'} + } + + def __init__(self, **kwargs) -> None: + super(OperationStatusExtendedInfo, self).__init__(**kwargs) + self.object_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_job_extended_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_job_extended_info.py index 854b1cb311e2..5357cae92e03 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_job_extended_info.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_job_extended_info.py @@ -15,7 +15,9 @@ class OperationStatusJobExtendedInfo(OperationStatusExtendedInfo): """Operation status job extended info. - :param object_type: Polymorphic Discriminator + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. :type object_type: str :param job_id: ID of the job created for this protected item. :type job_id: str @@ -30,7 +32,7 @@ class OperationStatusJobExtendedInfo(OperationStatusExtendedInfo): 'job_id': {'key': 'jobId', 'type': 'str'}, } - def __init__(self, job_id=None): - super(OperationStatusJobExtendedInfo, self).__init__() - self.job_id = job_id + def __init__(self, **kwargs): + super(OperationStatusJobExtendedInfo, self).__init__(**kwargs) + self.job_id = kwargs.get('job_id', None) self.object_type = 'OperationStatusJobExtendedInfo' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_job_extended_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_job_extended_info_py3.py new file mode 100644 index 000000000000..a64796ae4fd3 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_job_extended_info_py3.py @@ -0,0 +1,38 @@ +# 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 .operation_status_extended_info_py3 import OperationStatusExtendedInfo + + +class OperationStatusJobExtendedInfo(OperationStatusExtendedInfo): + """Operation status job extended info. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param job_id: ID of the job created for this protected item. + :type job_id: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'job_id': {'key': 'jobId', 'type': 'str'}, + } + + def __init__(self, *, job_id: str=None, **kwargs) -> None: + super(OperationStatusJobExtendedInfo, self).__init__(**kwargs) + self.job_id = job_id + self.object_type = 'OperationStatusJobExtendedInfo' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_jobs_extended_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_jobs_extended_info.py index b0e9428364e0..a28b6b8690ba 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_jobs_extended_info.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_jobs_extended_info.py @@ -15,13 +15,15 @@ class OperationStatusJobsExtendedInfo(OperationStatusExtendedInfo): """Operation status extended info for list of jobs. - :param object_type: Polymorphic Discriminator + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. :type object_type: str :param job_ids: IDs of the jobs created for the protected item. - :type job_ids: list of str + :type job_ids: list[str] :param failed_jobs_error: Stores all the failed jobs along with the corresponding error codes. - :type failed_jobs_error: dict + :type failed_jobs_error: dict[str, str] """ _validation = { @@ -34,8 +36,8 @@ class OperationStatusJobsExtendedInfo(OperationStatusExtendedInfo): 'failed_jobs_error': {'key': 'failedJobsError', 'type': '{str}'}, } - def __init__(self, job_ids=None, failed_jobs_error=None): - super(OperationStatusJobsExtendedInfo, self).__init__() - self.job_ids = job_ids - self.failed_jobs_error = failed_jobs_error + def __init__(self, **kwargs): + super(OperationStatusJobsExtendedInfo, self).__init__(**kwargs) + self.job_ids = kwargs.get('job_ids', None) + self.failed_jobs_error = kwargs.get('failed_jobs_error', None) self.object_type = 'OperationStatusJobsExtendedInfo' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_jobs_extended_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_jobs_extended_info_py3.py new file mode 100644 index 000000000000..afa2cc0a4bbb --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_jobs_extended_info_py3.py @@ -0,0 +1,43 @@ +# 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 .operation_status_extended_info_py3 import OperationStatusExtendedInfo + + +class OperationStatusJobsExtendedInfo(OperationStatusExtendedInfo): + """Operation status extended info for list of jobs. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param job_ids: IDs of the jobs created for the protected item. + :type job_ids: list[str] + :param failed_jobs_error: Stores all the failed jobs along with the + corresponding error codes. + :type failed_jobs_error: dict[str, str] + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'job_ids': {'key': 'jobIds', 'type': '[str]'}, + 'failed_jobs_error': {'key': 'failedJobsError', 'type': '{str}'}, + } + + def __init__(self, *, job_ids=None, failed_jobs_error=None, **kwargs) -> None: + super(OperationStatusJobsExtendedInfo, self).__init__(**kwargs) + self.job_ids = job_ids + self.failed_jobs_error = failed_jobs_error + self.object_type = 'OperationStatusJobsExtendedInfo' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_provision_ilr_extended_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_provision_ilr_extended_info.py index dc701c4810b5..3a18cc08753b 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_provision_ilr_extended_info.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_provision_ilr_extended_info.py @@ -15,11 +15,13 @@ class OperationStatusProvisionILRExtendedInfo(OperationStatusExtendedInfo): """Operation status extended info for ILR provision action. - :param object_type: Polymorphic Discriminator + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. :type object_type: str :param recovery_target: Target details for file / folder restore. - :type recovery_target: :class:`InstantItemRecoveryTarget - ` + :type recovery_target: + ~azure.mgmt.recoveryservicesbackup.models.InstantItemRecoveryTarget """ _validation = { @@ -31,7 +33,7 @@ class OperationStatusProvisionILRExtendedInfo(OperationStatusExtendedInfo): 'recovery_target': {'key': 'recoveryTarget', 'type': 'InstantItemRecoveryTarget'}, } - def __init__(self, recovery_target=None): - super(OperationStatusProvisionILRExtendedInfo, self).__init__() - self.recovery_target = recovery_target + def __init__(self, **kwargs): + super(OperationStatusProvisionILRExtendedInfo, self).__init__(**kwargs) + self.recovery_target = kwargs.get('recovery_target', None) self.object_type = 'OperationStatusProvisionILRExtendedInfo' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_provision_ilr_extended_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_provision_ilr_extended_info_py3.py new file mode 100644 index 000000000000..8f6b4e9c6552 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_provision_ilr_extended_info_py3.py @@ -0,0 +1,39 @@ +# 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 .operation_status_extended_info_py3 import OperationStatusExtendedInfo + + +class OperationStatusProvisionILRExtendedInfo(OperationStatusExtendedInfo): + """Operation status extended info for ILR provision action. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param recovery_target: Target details for file / folder restore. + :type recovery_target: + ~azure.mgmt.recoveryservicesbackup.models.InstantItemRecoveryTarget + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_target': {'key': 'recoveryTarget', 'type': 'InstantItemRecoveryTarget'}, + } + + def __init__(self, *, recovery_target=None, **kwargs) -> None: + super(OperationStatusProvisionILRExtendedInfo, self).__init__(**kwargs) + self.recovery_target = recovery_target + self.object_type = 'OperationStatusProvisionILRExtendedInfo' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_py3.py new file mode 100644 index 000000000000..8c8891c2ac3a --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_py3.py @@ -0,0 +1,56 @@ +# 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 OperationStatus(Model): + """Operation status. + + :param id: ID of the operation. + :type id: str + :param name: Name of the operation. + :type name: str + :param status: Operation status. Possible values include: 'Invalid', + 'InProgress', 'Succeeded', 'Failed', 'Canceled' + :type status: str or + ~azure.mgmt.recoveryservicesbackup.models.OperationStatusValues + :param start_time: Operation start time. Format: ISO-8601. + :type start_time: datetime + :param end_time: Operation end time. Format: ISO-8601. + :type end_time: datetime + :param error: Error information related to this operation. + :type error: + ~azure.mgmt.recoveryservicesbackup.models.OperationStatusError + :param properties: Additional information associated with this operation. + :type properties: + ~azure.mgmt.recoveryservicesbackup.models.OperationStatusExtendedInfo + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'error': {'key': 'error', 'type': 'OperationStatusError'}, + 'properties': {'key': 'properties', 'type': 'OperationStatusExtendedInfo'}, + } + + def __init__(self, *, id: str=None, name: str=None, status=None, start_time=None, end_time=None, error=None, properties=None, **kwargs) -> None: + super(OperationStatus, self).__init__(**kwargs) + self.id = id + self.name = name + self.status = status + self.start_time = start_time + self.end_time = end_time + self.error = error + self.properties = properties diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_worker_response.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_worker_response.py index 720cf4c736f9..8ac66d5c1115 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_worker_response.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_worker_response.py @@ -29,17 +29,18 @@ class OperationWorkerResponse(Model): 'ExpectationFailed', 'UpgradeRequired', 'InternalServerError', 'NotImplemented', 'BadGateway', 'ServiceUnavailable', 'GatewayTimeout', 'HttpVersionNotSupported' - :type status_code: str or :class:`HttpStatusCode - ` + :type status_code: str or + ~azure.mgmt.recoveryservicesbackup.models.HttpStatusCode :param headers: HTTP headers associated with this operation. - :type headers: dict + :type headers: dict[str, list[str]] """ _attribute_map = { 'status_code': {'key': 'statusCode', 'type': 'HttpStatusCode'}, - 'headers': {'key': 'Headers', 'type': '{[str]}'}, + 'headers': {'key': 'headers', 'type': '{[str]}'}, } - def __init__(self, status_code=None, headers=None): - self.status_code = status_code - self.headers = headers + def __init__(self, **kwargs): + super(OperationWorkerResponse, self).__init__(**kwargs) + self.status_code = kwargs.get('status_code', None) + self.headers = kwargs.get('headers', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_worker_response_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_worker_response_py3.py new file mode 100644 index 000000000000..018ac4341bca --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_worker_response_py3.py @@ -0,0 +1,46 @@ +# 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 OperationWorkerResponse(Model): + """This is the base class for operation result responses. + + :param status_code: HTTP Status Code of the operation. Possible values + include: 'Continue', 'SwitchingProtocols', 'OK', 'Created', 'Accepted', + 'NonAuthoritativeInformation', 'NoContent', 'ResetContent', + 'PartialContent', 'MultipleChoices', 'Ambiguous', 'MovedPermanently', + 'Moved', 'Found', 'Redirect', 'SeeOther', 'RedirectMethod', 'NotModified', + 'UseProxy', 'Unused', 'TemporaryRedirect', 'RedirectKeepVerb', + 'BadRequest', 'Unauthorized', 'PaymentRequired', 'Forbidden', 'NotFound', + 'MethodNotAllowed', 'NotAcceptable', 'ProxyAuthenticationRequired', + 'RequestTimeout', 'Conflict', 'Gone', 'LengthRequired', + 'PreconditionFailed', 'RequestEntityTooLarge', 'RequestUriTooLong', + 'UnsupportedMediaType', 'RequestedRangeNotSatisfiable', + 'ExpectationFailed', 'UpgradeRequired', 'InternalServerError', + 'NotImplemented', 'BadGateway', 'ServiceUnavailable', 'GatewayTimeout', + 'HttpVersionNotSupported' + :type status_code: str or + ~azure.mgmt.recoveryservicesbackup.models.HttpStatusCode + :param headers: HTTP headers associated with this operation. + :type headers: dict[str, list[str]] + """ + + _attribute_map = { + 'status_code': {'key': 'statusCode', 'type': 'HttpStatusCode'}, + 'headers': {'key': 'headers', 'type': '{[str]}'}, + } + + def __init__(self, *, status_code=None, headers=None, **kwargs) -> None: + super(OperationWorkerResponse, self).__init__(**kwargs) + self.status_code = status_code + self.headers = headers diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/point_in_time_range.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/point_in_time_range.py new file mode 100644 index 000000000000..bbea884d6f6a --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/point_in_time_range.py @@ -0,0 +1,32 @@ +# 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 PointInTimeRange(Model): + """Provides details for log ranges. + + :param start_time: Start time of the time range for log recovery. + :type start_time: datetime + :param end_time: End time of the time range for log recovery. + :type end_time: datetime + """ + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(PointInTimeRange, self).__init__(**kwargs) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/point_in_time_range_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/point_in_time_range_py3.py new file mode 100644 index 000000000000..1298a1590f57 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/point_in_time_range_py3.py @@ -0,0 +1,32 @@ +# 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 PointInTimeRange(Model): + """Provides details for log ranges. + + :param start_time: Start time of the time range for log recovery. + :type start_time: datetime + :param end_time: End time of the time range for log recovery. + :type end_time: datetime + """ + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, start_time=None, end_time=None, **kwargs) -> None: + super(PointInTimeRange, self).__init__(**kwargs) + self.start_time = start_time + self.end_time = end_time diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/pre_backup_validation.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/pre_backup_validation.py new file mode 100644 index 000000000000..4f0faa2b829b --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/pre_backup_validation.py @@ -0,0 +1,40 @@ +# 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 PreBackupValidation(Model): + """Pre-backup validation for Azure VM Workload provider. + + :param status: Status of protectable item, i.e. + InProgress,Succeeded,Failed. Possible values include: 'Invalid', + 'Success', 'Failed' + :type status: str or + ~azure.mgmt.recoveryservicesbackup.models.InquiryStatus + :param code: Error code of protectable item + :type code: str + :param message: Message corresponding to the error code for the + protectable item + :type message: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PreBackupValidation, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/pre_backup_validation_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/pre_backup_validation_py3.py new file mode 100644 index 000000000000..afa24b320665 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/pre_backup_validation_py3.py @@ -0,0 +1,40 @@ +# 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 PreBackupValidation(Model): + """Pre-backup validation for Azure VM Workload provider. + + :param status: Status of protectable item, i.e. + InProgress,Succeeded,Failed. Possible values include: 'Invalid', + 'Success', 'Failed' + :type status: str or + ~azure.mgmt.recoveryservicesbackup.models.InquiryStatus + :param code: Error code of protectable item + :type code: str + :param message: Message corresponding to the error code for the + protectable item + :type message: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, status=None, code: str=None, message: str=None, **kwargs) -> None: + super(PreBackupValidation, self).__init__(**kwargs) + self.status = status + self.code = code + self.message = message diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/pre_validate_enable_backup_request.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/pre_validate_enable_backup_request.py new file mode 100644 index 000000000000..116f56e224e1 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/pre_validate_enable_backup_request.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 msrest.serialization import Model + + +class PreValidateEnableBackupRequest(Model): + """Contract to validate if backup can be enabled on the given resource in a + given vault and given configuration. + It will validate followings + 1. Vault capacity + 2. VM is already protected + 3. Any VM related configuration passed in properties. + + :param resource_type: Container Type - VM, SQLPaaS, DPM etc. Possible + values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', + 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + 'GenericDataSource', 'SQLDataBase', 'AzureFileShare' + :type resource_type: str or + ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :param resource_id: Entire ARM VM Id + :type resource_id: str + :param vault_id: Entire vault id of the resource + :type vault_id: str + :param properties: Configuration of VM if any needs to be validated like + OS type etc + :type properties: str + """ + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'vault_id': {'key': 'vaultId', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PreValidateEnableBackupRequest, self).__init__(**kwargs) + self.resource_type = kwargs.get('resource_type', None) + self.resource_id = kwargs.get('resource_id', None) + self.vault_id = kwargs.get('vault_id', None) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/pre_validate_enable_backup_request_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/pre_validate_enable_backup_request_py3.py new file mode 100644 index 000000000000..61b556bce8d8 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/pre_validate_enable_backup_request_py3.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 msrest.serialization import Model + + +class PreValidateEnableBackupRequest(Model): + """Contract to validate if backup can be enabled on the given resource in a + given vault and given configuration. + It will validate followings + 1. Vault capacity + 2. VM is already protected + 3. Any VM related configuration passed in properties. + + :param resource_type: Container Type - VM, SQLPaaS, DPM etc. Possible + values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', + 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + 'GenericDataSource', 'SQLDataBase', 'AzureFileShare' + :type resource_type: str or + ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :param resource_id: Entire ARM VM Id + :type resource_id: str + :param vault_id: Entire vault id of the resource + :type vault_id: str + :param properties: Configuration of VM if any needs to be validated like + OS type etc + :type properties: str + """ + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'vault_id': {'key': 'vaultId', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'str'}, + } + + def __init__(self, *, resource_type=None, resource_id: str=None, vault_id: str=None, properties: str=None, **kwargs) -> None: + super(PreValidateEnableBackupRequest, self).__init__(**kwargs) + self.resource_type = resource_type + self.resource_id = resource_id + self.vault_id = vault_id + self.properties = properties diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/pre_validate_enable_backup_response.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/pre_validate_enable_backup_response.py new file mode 100644 index 000000000000..e99d75d55ada --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/pre_validate_enable_backup_response.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PreValidateEnableBackupResponse(Model): + """Response contract for enable backup validation request. + + :param status: Validation Status. Possible values include: 'Invalid', + 'Succeeded', 'Failed' + :type status: str or + ~azure.mgmt.recoveryservicesbackup.models.ValidationStatus + :param error_code: Response error code + :type error_code: str + :param error_message: Response error message + :type error_message: str + :param recommendation: Recommended action for user + :type recommendation: str + :param container_name: Specifies the product specific container name. E.g. + iaasvmcontainer;iaasvmcontainer;rgname;vmname. This is required for portal + :type container_name: str + :param protected_item_name: Specifies the product specific ds name. E.g. + vm;iaasvmcontainer;rgname;vmname. This is required for portal + :type protected_item_name: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'error_code': {'key': 'errorCode', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'recommendation': {'key': 'recommendation', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'protected_item_name': {'key': 'protectedItemName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PreValidateEnableBackupResponse, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.error_code = kwargs.get('error_code', None) + self.error_message = kwargs.get('error_message', None) + self.recommendation = kwargs.get('recommendation', None) + self.container_name = kwargs.get('container_name', None) + self.protected_item_name = kwargs.get('protected_item_name', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/pre_validate_enable_backup_response_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/pre_validate_enable_backup_response_py3.py new file mode 100644 index 000000000000..b8bd4db91af6 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/pre_validate_enable_backup_response_py3.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PreValidateEnableBackupResponse(Model): + """Response contract for enable backup validation request. + + :param status: Validation Status. Possible values include: 'Invalid', + 'Succeeded', 'Failed' + :type status: str or + ~azure.mgmt.recoveryservicesbackup.models.ValidationStatus + :param error_code: Response error code + :type error_code: str + :param error_message: Response error message + :type error_message: str + :param recommendation: Recommended action for user + :type recommendation: str + :param container_name: Specifies the product specific container name. E.g. + iaasvmcontainer;iaasvmcontainer;rgname;vmname. This is required for portal + :type container_name: str + :param protected_item_name: Specifies the product specific ds name. E.g. + vm;iaasvmcontainer;rgname;vmname. This is required for portal + :type protected_item_name: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'error_code': {'key': 'errorCode', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'recommendation': {'key': 'recommendation', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'protected_item_name': {'key': 'protectedItemName', 'type': 'str'}, + } + + def __init__(self, *, status=None, error_code: str=None, error_message: str=None, recommendation: str=None, container_name: str=None, protected_item_name: str=None, **kwargs) -> None: + super(PreValidateEnableBackupResponse, self).__init__(**kwargs) + self.status = status + self.error_code = error_code + self.error_message = error_message + self.recommendation = recommendation + self.container_name = container_name + self.protected_item_name = protected_item_name diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protectable_container.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protectable_container.py new file mode 100644 index 000000000000..38b505835a97 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protectable_container.py @@ -0,0 +1,62 @@ +# 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 ProtectableContainer(Model): + """Protectable Container Class. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureStorageProtectableContainer, + AzureVMAppContainerProtectableContainer + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name of the container. + :type friendly_name: str + :param backup_management_type: Type of backup managemenent for the + container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param health_status: Status of health of the container. + :type health_status: str + :param container_id: Fabric Id of the container such as ARM Id. + :type container_id: str + :param protectable_container_type: Required. Constant filled by server. + :type protectable_container_type: str + """ + + _validation = { + 'protectable_container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_id': {'key': 'containerId', 'type': 'str'}, + 'protectable_container_type': {'key': 'protectableContainerType', 'type': 'str'}, + } + + _subtype_map = { + 'protectable_container_type': {'StorageContainer': 'AzureStorageProtectableContainer', 'VMAppContainer': 'AzureVMAppContainerProtectableContainer'} + } + + def __init__(self, **kwargs): + super(ProtectableContainer, self).__init__(**kwargs) + self.friendly_name = kwargs.get('friendly_name', None) + self.backup_management_type = kwargs.get('backup_management_type', None) + self.health_status = kwargs.get('health_status', None) + self.container_id = kwargs.get('container_id', None) + self.protectable_container_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protectable_container_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protectable_container_py3.py new file mode 100644 index 000000000000..2356a1036f4e --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protectable_container_py3.py @@ -0,0 +1,62 @@ +# 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 ProtectableContainer(Model): + """Protectable Container Class. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureStorageProtectableContainer, + AzureVMAppContainerProtectableContainer + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name of the container. + :type friendly_name: str + :param backup_management_type: Type of backup managemenent for the + container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param health_status: Status of health of the container. + :type health_status: str + :param container_id: Fabric Id of the container such as ARM Id. + :type container_id: str + :param protectable_container_type: Required. Constant filled by server. + :type protectable_container_type: str + """ + + _validation = { + 'protectable_container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_id': {'key': 'containerId', 'type': 'str'}, + 'protectable_container_type': {'key': 'protectableContainerType', 'type': 'str'}, + } + + _subtype_map = { + 'protectable_container_type': {'StorageContainer': 'AzureStorageProtectableContainer', 'VMAppContainer': 'AzureVMAppContainerProtectableContainer'} + } + + def __init__(self, *, friendly_name: str=None, backup_management_type=None, health_status: str=None, container_id: str=None, **kwargs) -> None: + super(ProtectableContainer, self).__init__(**kwargs) + self.friendly_name = friendly_name + self.backup_management_type = backup_management_type + self.health_status = health_status + self.container_id = container_id + self.protectable_container_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protectable_container_resource.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protectable_container_resource.py new file mode 100644 index 000000000000..383e12d15ddc --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protectable_container_resource.py @@ -0,0 +1,57 @@ +# 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 ProtectableContainerResource(Resource): + """Protectable Container Class. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param e_tag: Optional ETag. + :type e_tag: str + :param properties: ProtectableContainerResource properties + :type properties: + ~azure.mgmt.recoveryservicesbackup.models.ProtectableContainer + """ + + _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}'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ProtectableContainer'}, + } + + def __init__(self, **kwargs): + super(ProtectableContainerResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protectable_container_resource_paged.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protectable_container_resource_paged.py new file mode 100644 index 000000000000..a02dfe9b0496 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protectable_container_resource_paged.py @@ -0,0 +1,27 @@ +# 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 ProtectableContainerResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`ProtectableContainerResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ProtectableContainerResource]'} + } + + def __init__(self, *args, **kwargs): + + super(ProtectableContainerResourcePaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protectable_container_resource_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protectable_container_resource_py3.py new file mode 100644 index 000000000000..e24aa5568a44 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protectable_container_resource_py3.py @@ -0,0 +1,57 @@ +# 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 ProtectableContainerResource(Resource): + """Protectable Container Class. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param e_tag: Optional ETag. + :type e_tag: str + :param properties: ProtectableContainerResource properties + :type properties: + ~azure.mgmt.recoveryservicesbackup.models.ProtectableContainer + """ + + _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}'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ProtectableContainer'}, + } + + def __init__(self, *, location: str=None, tags=None, e_tag: str=None, properties=None, **kwargs) -> None: + super(ProtectableContainerResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) + self.properties = properties diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protected_item.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protected_item.py index ea82418794fd..65e486c106ff 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protected_item.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protected_item.py @@ -15,17 +15,25 @@ class ProtectedItem(Model): """Base class for backup items. + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureFileshareProtectedItem, AzureIaaSVMProtectedItem, + AzureSqlProtectedItem, AzureVmWorkloadSQLDatabaseProtectedItem, + DPMProtectedItem, GenericProtectedItem, MabFileFolderProtectedItem + + All required parameters must be populated in order to send to Azure. + :param backup_management_type: Type of backup managemenent for the backed up item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', - 'AzureBackupServer', 'AzureSql' - :type backup_management_type: str or :class:`BackupManagementType - ` + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType :param workload_type: Type of workload this item represents. Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', - 'GenericDataSource' - :type workload_type: str or :class:`DataSourceType - ` + 'GenericDataSource', 'SQLDataBase', 'AzureFileShare' + :type workload_type: str or + ~azure.mgmt.recoveryservicesbackup.models.DataSourceType :param container_name: Unique name of container :type container_name: str :param source_resource_id: ARM ID of the resource to be backed up. @@ -36,7 +44,9 @@ class ProtectedItem(Model): :param last_recovery_point: Timestamp when the last (latest) backup copy was created for this backup item. :type last_recovery_point: datetime - :param protected_item_type: Polymorphic Discriminator + :param backup_set_name: Name of the backup set the backup item belongs to + :type backup_set_name: str + :param protected_item_type: Required. Constant filled by server. :type protected_item_type: str """ @@ -51,18 +61,21 @@ class ProtectedItem(Model): 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, 'policy_id': {'key': 'policyId', 'type': 'str'}, 'last_recovery_point': {'key': 'lastRecoveryPoint', 'type': 'iso-8601'}, + 'backup_set_name': {'key': 'backupSetName', 'type': 'str'}, 'protected_item_type': {'key': 'protectedItemType', 'type': 'str'}, } _subtype_map = { - 'protected_item_type': {'AzureIaaSVMProtectedItem': 'AzureIaaSVMProtectedItem', 'Microsoft.Sql/servers/databases': 'AzureSqlProtectedItem', 'DPMProtectedItem': 'DPMProtectedItem', 'MabFileFolderProtectedItem': 'MabFileFolderProtectedItem'} + 'protected_item_type': {'AzureFileShareProtectedItem': 'AzureFileshareProtectedItem', 'AzureIaaSVMProtectedItem': 'AzureIaaSVMProtectedItem', 'Microsoft.Sql/servers/databases': 'AzureSqlProtectedItem', 'AzureVmWorkloadSQLDatabase': 'AzureVmWorkloadSQLDatabaseProtectedItem', 'DPMProtectedItem': 'DPMProtectedItem', 'GenericProtectedItem': 'GenericProtectedItem', 'MabFileFolderProtectedItem': 'MabFileFolderProtectedItem'} } - def __init__(self, backup_management_type=None, workload_type=None, container_name=None, source_resource_id=None, policy_id=None, last_recovery_point=None): - self.backup_management_type = backup_management_type - self.workload_type = workload_type - self.container_name = container_name - self.source_resource_id = source_resource_id - self.policy_id = policy_id - self.last_recovery_point = last_recovery_point + def __init__(self, **kwargs): + super(ProtectedItem, self).__init__(**kwargs) + self.backup_management_type = kwargs.get('backup_management_type', None) + self.workload_type = kwargs.get('workload_type', None) + self.container_name = kwargs.get('container_name', None) + self.source_resource_id = kwargs.get('source_resource_id', None) + self.policy_id = kwargs.get('policy_id', None) + self.last_recovery_point = kwargs.get('last_recovery_point', None) + self.backup_set_name = kwargs.get('backup_set_name', None) self.protected_item_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protected_item_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protected_item_py3.py new file mode 100644 index 000000000000..44a04e035871 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protected_item_py3.py @@ -0,0 +1,81 @@ +# 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 ProtectedItem(Model): + """Base class for backup items. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureFileshareProtectedItem, AzureIaaSVMProtectedItem, + AzureSqlProtectedItem, AzureVmWorkloadSQLDatabaseProtectedItem, + DPMProtectedItem, GenericProtectedItem, MabFileFolderProtectedItem + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent for the backed + up item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param workload_type: Type of workload this item represents. Possible + values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', + 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + 'GenericDataSource', 'SQLDataBase', 'AzureFileShare' + :type workload_type: str or + ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :param container_name: Unique name of container + :type container_name: str + :param source_resource_id: ARM ID of the resource to be backed up. + :type source_resource_id: str + :param policy_id: ID of the backup policy with which this item is backed + up. + :type policy_id: str + :param last_recovery_point: Timestamp when the last (latest) backup copy + was created for this backup item. + :type last_recovery_point: datetime + :param backup_set_name: Name of the backup set the backup item belongs to + :type backup_set_name: str + :param protected_item_type: Required. Constant filled by server. + :type protected_item_type: str + """ + + _validation = { + 'protected_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'policy_id': {'key': 'policyId', 'type': 'str'}, + 'last_recovery_point': {'key': 'lastRecoveryPoint', 'type': 'iso-8601'}, + 'backup_set_name': {'key': 'backupSetName', 'type': 'str'}, + 'protected_item_type': {'key': 'protectedItemType', 'type': 'str'}, + } + + _subtype_map = { + 'protected_item_type': {'AzureFileShareProtectedItem': 'AzureFileshareProtectedItem', 'AzureIaaSVMProtectedItem': 'AzureIaaSVMProtectedItem', 'Microsoft.Sql/servers/databases': 'AzureSqlProtectedItem', 'AzureVmWorkloadSQLDatabase': 'AzureVmWorkloadSQLDatabaseProtectedItem', 'DPMProtectedItem': 'DPMProtectedItem', 'GenericProtectedItem': 'GenericProtectedItem', 'MabFileFolderProtectedItem': 'MabFileFolderProtectedItem'} + } + + def __init__(self, *, backup_management_type=None, workload_type=None, container_name: str=None, source_resource_id: str=None, policy_id: str=None, last_recovery_point=None, backup_set_name: str=None, **kwargs) -> None: + super(ProtectedItem, self).__init__(**kwargs) + self.backup_management_type = backup_management_type + self.workload_type = workload_type + self.container_name = container_name + self.source_resource_id = source_resource_id + self.policy_id = policy_id + self.last_recovery_point = last_recovery_point + self.backup_set_name = backup_set_name + self.protected_item_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protected_item_query_object.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protected_item_query_object.py index c9340f195a69..3d60de184520 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protected_item_query_object.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protected_item_query_object.py @@ -17,18 +17,20 @@ class ProtectedItemQueryObject(Model): :param health_state: Health State for the backed up item. Possible values include: 'Passed', 'ActionRequired', 'ActionSuggested', 'Invalid' - :type health_state: str or :class:`HealthState - ` + :type health_state: str or + ~azure.mgmt.recoveryservicesbackup.models.HealthState :param backup_management_type: Backup management type for the backed up item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', - 'AzureBackupServer', 'AzureSql' - :type backup_management_type: str or :class:`BackupManagementType - ` + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType :param item_type: Type of workload this item represents. Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', - 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', 'GenericDataSource' - :type item_type: str or :class:`DataSourceType - ` + 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', 'GenericDataSource', + 'SQLDataBase', 'AzureFileShare' + :type item_type: str or + ~azure.mgmt.recoveryservicesbackup.models.DataSourceType :param policy_name: Backup policy name associated with the backup item. :type policy_name: str :param container_name: Name of the container. @@ -37,6 +39,10 @@ class ProtectedItemQueryObject(Model): :type backup_engine_name: str :param friendly_name: Friendly name of protected item :type friendly_name: str + :param fabric_name: Name of the fabric. + :type fabric_name: str + :param backup_set_name: Name of the backup set. + :type backup_set_name: str """ _attribute_map = { @@ -47,13 +53,18 @@ class ProtectedItemQueryObject(Model): 'container_name': {'key': 'containerName', 'type': 'str'}, 'backup_engine_name': {'key': 'backupEngineName', 'type': 'str'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'fabric_name': {'key': 'fabricName', 'type': 'str'}, + 'backup_set_name': {'key': 'backupSetName', 'type': 'str'}, } - def __init__(self, health_state=None, backup_management_type=None, item_type=None, policy_name=None, container_name=None, backup_engine_name=None, friendly_name=None): - self.health_state = health_state - self.backup_management_type = backup_management_type - self.item_type = item_type - self.policy_name = policy_name - self.container_name = container_name - self.backup_engine_name = backup_engine_name - self.friendly_name = friendly_name + def __init__(self, **kwargs): + super(ProtectedItemQueryObject, self).__init__(**kwargs) + self.health_state = kwargs.get('health_state', None) + self.backup_management_type = kwargs.get('backup_management_type', None) + self.item_type = kwargs.get('item_type', None) + self.policy_name = kwargs.get('policy_name', None) + self.container_name = kwargs.get('container_name', None) + self.backup_engine_name = kwargs.get('backup_engine_name', None) + self.friendly_name = kwargs.get('friendly_name', None) + self.fabric_name = kwargs.get('fabric_name', None) + self.backup_set_name = kwargs.get('backup_set_name', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protected_item_query_object_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protected_item_query_object_py3.py new file mode 100644 index 000000000000..d34d1077699f --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protected_item_query_object_py3.py @@ -0,0 +1,70 @@ +# 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 ProtectedItemQueryObject(Model): + """Filters to list backup items. + + :param health_state: Health State for the backed up item. Possible values + include: 'Passed', 'ActionRequired', 'ActionSuggested', 'Invalid' + :type health_state: str or + ~azure.mgmt.recoveryservicesbackup.models.HealthState + :param backup_management_type: Backup management type for the backed up + item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param item_type: Type of workload this item represents. Possible values + include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', + 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', 'GenericDataSource', + 'SQLDataBase', 'AzureFileShare' + :type item_type: str or + ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :param policy_name: Backup policy name associated with the backup item. + :type policy_name: str + :param container_name: Name of the container. + :type container_name: str + :param backup_engine_name: Backup Engine name + :type backup_engine_name: str + :param friendly_name: Friendly name of protected item + :type friendly_name: str + :param fabric_name: Name of the fabric. + :type fabric_name: str + :param backup_set_name: Name of the backup set. + :type backup_set_name: str + """ + + _attribute_map = { + 'health_state': {'key': 'healthState', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'item_type': {'key': 'itemType', 'type': 'str'}, + 'policy_name': {'key': 'policyName', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'backup_engine_name': {'key': 'backupEngineName', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'fabric_name': {'key': 'fabricName', 'type': 'str'}, + 'backup_set_name': {'key': 'backupSetName', 'type': 'str'}, + } + + def __init__(self, *, health_state=None, backup_management_type=None, item_type=None, policy_name: str=None, container_name: str=None, backup_engine_name: str=None, friendly_name: str=None, fabric_name: str=None, backup_set_name: str=None, **kwargs) -> None: + super(ProtectedItemQueryObject, self).__init__(**kwargs) + self.health_state = health_state + self.backup_management_type = backup_management_type + self.item_type = item_type + self.policy_name = policy_name + self.container_name = container_name + self.backup_engine_name = backup_engine_name + self.friendly_name = friendly_name + self.fabric_name = fabric_name + self.backup_set_name = backup_set_name diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protected_item_resource.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protected_item_resource.py index 7177c53a18f2..3f7dca67b95c 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protected_item_resource.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protected_item_resource.py @@ -28,12 +28,11 @@ class ProtectedItemResource(Resource): :param location: Resource location. :type location: str :param tags: Resource tags. - :type tags: dict + :type tags: dict[str, str] :param e_tag: Optional ETag. :type e_tag: str :param properties: ProtectedItemResource properties - :type properties: :class:`ProtectedItem - ` + :type properties: ~azure.mgmt.recoveryservicesbackup.models.ProtectedItem """ _validation = { @@ -52,6 +51,6 @@ class ProtectedItemResource(Resource): 'properties': {'key': 'properties', 'type': 'ProtectedItem'}, } - def __init__(self, location=None, tags=None, e_tag=None, properties=None): - super(ProtectedItemResource, self).__init__(location=location, tags=tags, e_tag=e_tag) - self.properties = properties + def __init__(self, **kwargs): + super(ProtectedItemResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protected_item_resource_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protected_item_resource_py3.py new file mode 100644 index 000000000000..22de3391b49f --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protected_item_resource_py3.py @@ -0,0 +1,56 @@ +# 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 ProtectedItemResource(Resource): + """Base class for backup items. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param e_tag: Optional ETag. + :type e_tag: str + :param properties: ProtectedItemResource properties + :type properties: ~azure.mgmt.recoveryservicesbackup.models.ProtectedItem + """ + + _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}'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ProtectedItem'}, + } + + def __init__(self, *, location: str=None, tags=None, e_tag: str=None, properties=None, **kwargs) -> None: + super(ProtectedItemResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) + self.properties = properties diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_container.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_container.py index ca9f5b852163..1b3911fea1de 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_container.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_container.py @@ -16,38 +16,32 @@ class ProtectionContainer(Model): """Base class for container with backup items. Containers with specific workloads are derived from this class. - Variables are only populated by the server, and will be ignored when - sending a request. + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureBackupServerContainer, AzureSqlContainer, + AzureStorageContainer, AzureWorkloadContainer, DpmContainer, + GenericContainer, IaaSVMContainer, MabContainer + + All required parameters must be populated in order to send to Azure. :param friendly_name: Friendly name of the container. :type friendly_name: str :param backup_management_type: Type of backup managemenent for the container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', - 'DPM', 'AzureBackupServer', 'AzureSql' - :type backup_management_type: str or :class:`BackupManagementType - ` + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType :param registration_status: Status of registration of the container with the Recovery Services Vault. :type registration_status: str :param health_status: Status of health of the container. :type health_status: str - :ivar container_type: Type of the container. The value of this property - for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. Classic - Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows - machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is - AzureSqlContainer. Possible values include: 'Invalid', 'Unknown', - 'IaasVMContainer', 'IaasVMServiceContainer', 'DPMContainer', - 'AzureBackupServerContainer', 'MABContainer', 'Cluster', - 'AzureSqlContainer', 'Windows', 'VCenter' - :vartype container_type: str or :class:`ContainerType - ` - :param protectable_object_type: Polymorphic Discriminator - :type protectable_object_type: str + :param container_type: Required. Constant filled by server. + :type container_type: str """ _validation = { - 'container_type': {'readonly': True}, - 'protectable_object_type': {'required': True}, + 'container_type': {'required': True}, } _attribute_map = { @@ -56,17 +50,16 @@ class ProtectionContainer(Model): 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, 'health_status': {'key': 'healthStatus', 'type': 'str'}, 'container_type': {'key': 'containerType', 'type': 'str'}, - 'protectable_object_type': {'key': 'protectableObjectType', 'type': 'str'}, } _subtype_map = { - 'protectable_object_type': {'AzureBackupServerContainer': 'AzureBackupServerContainer', 'AzureSqlContainer': 'AzureSqlContainer', 'DPMContainer': 'DpmContainer', 'IaaSVMContainer': 'IaaSVMContainer', 'MABWindowsContainer': 'MabContainer'} + 'container_type': {'AzureBackupServerContainer': 'AzureBackupServerContainer', 'AzureSqlContainer': 'AzureSqlContainer', 'StorageContainer': 'AzureStorageContainer', 'AzureWorkloadContainer': 'AzureWorkloadContainer', 'DPMContainer': 'DpmContainer', 'GenericContainer': 'GenericContainer', 'IaaSVMContainer': 'IaaSVMContainer', 'MABWindowsContainer': 'MabContainer'} } - def __init__(self, friendly_name=None, backup_management_type=None, registration_status=None, health_status=None): - self.friendly_name = friendly_name - self.backup_management_type = backup_management_type - self.registration_status = registration_status - self.health_status = health_status + def __init__(self, **kwargs): + super(ProtectionContainer, self).__init__(**kwargs) + self.friendly_name = kwargs.get('friendly_name', None) + self.backup_management_type = kwargs.get('backup_management_type', None) + self.registration_status = kwargs.get('registration_status', None) + self.health_status = kwargs.get('health_status', None) self.container_type = None - self.protectable_object_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_container_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_container_py3.py new file mode 100644 index 000000000000..243490500ff6 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_container_py3.py @@ -0,0 +1,65 @@ +# 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 ProtectionContainer(Model): + """Base class for container with backup items. Containers with specific + workloads are derived from this class. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureBackupServerContainer, AzureSqlContainer, + AzureStorageContainer, AzureWorkloadContainer, DpmContainer, + GenericContainer, IaaSVMContainer, MabContainer + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name of the container. + :type friendly_name: str + :param backup_management_type: Type of backup managemenent for the + container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param registration_status: Status of registration of the container with + the Recovery Services Vault. + :type registration_status: str + :param health_status: Status of health of the container. + :type health_status: str + :param container_type: Required. Constant filled by server. + :type container_type: str + """ + + _validation = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_type': {'key': 'containerType', 'type': 'str'}, + } + + _subtype_map = { + 'container_type': {'AzureBackupServerContainer': 'AzureBackupServerContainer', 'AzureSqlContainer': 'AzureSqlContainer', 'StorageContainer': 'AzureStorageContainer', 'AzureWorkloadContainer': 'AzureWorkloadContainer', 'DPMContainer': 'DpmContainer', 'GenericContainer': 'GenericContainer', 'IaaSVMContainer': 'IaaSVMContainer', 'MABWindowsContainer': 'MabContainer'} + } + + def __init__(self, *, friendly_name: str=None, backup_management_type=None, registration_status: str=None, health_status: str=None, **kwargs) -> None: + super(ProtectionContainer, self).__init__(**kwargs) + self.friendly_name = friendly_name + self.backup_management_type = backup_management_type + self.registration_status = registration_status + self.health_status = health_status + self.container_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_container_resource.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_container_resource.py index 01742f2fb136..5029205928c2 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_container_resource.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_container_resource.py @@ -29,12 +29,12 @@ class ProtectionContainerResource(Resource): :param location: Resource location. :type location: str :param tags: Resource tags. - :type tags: dict + :type tags: dict[str, str] :param e_tag: Optional ETag. :type e_tag: str :param properties: ProtectionContainerResource properties - :type properties: :class:`ProtectionContainer - ` + :type properties: + ~azure.mgmt.recoveryservicesbackup.models.ProtectionContainer """ _validation = { @@ -53,6 +53,6 @@ class ProtectionContainerResource(Resource): 'properties': {'key': 'properties', 'type': 'ProtectionContainer'}, } - def __init__(self, location=None, tags=None, e_tag=None, properties=None): - super(ProtectionContainerResource, self).__init__(location=location, tags=tags, e_tag=e_tag) - self.properties = properties + def __init__(self, **kwargs): + super(ProtectionContainerResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_container_resource_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_container_resource_py3.py new file mode 100644 index 000000000000..e639bac8de5b --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_container_resource_py3.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class ProtectionContainerResource(Resource): + """Base class for container with backup items. Containers with specific + workloads are derived from this class. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param e_tag: Optional ETag. + :type e_tag: str + :param properties: ProtectionContainerResource properties + :type properties: + ~azure.mgmt.recoveryservicesbackup.models.ProtectionContainer + """ + + _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}'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ProtectionContainer'}, + } + + def __init__(self, *, location: str=None, tags=None, e_tag: str=None, properties=None, **kwargs) -> None: + super(ProtectionContainerResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) + self.properties = properties diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_intent.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_intent.py new file mode 100644 index 000000000000..f37c921d311b --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_intent.py @@ -0,0 +1,70 @@ +# 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 ProtectionIntent(Model): + """Base class for backup ProtectionIntent. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureResourceProtectionIntent + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent for the backed + up item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param source_resource_id: ARM ID of the resource to be backed up. + :type source_resource_id: str + :param item_id: ID of the item which is getting protected, In case of + Azure Vm , it is ProtectedItemId + :type item_id: str + :param policy_id: ID of the backup policy with which this item is backed + up. + :type policy_id: str + :param protection_state: Backup state of this backup item. Possible values + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param protection_intent_item_type: Required. Constant filled by server. + :type protection_intent_item_type: str + """ + + _validation = { + 'protection_intent_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'item_id': {'key': 'itemId', 'type': 'str'}, + 'policy_id': {'key': 'policyId', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'protection_intent_item_type': {'key': 'protectionIntentItemType', 'type': 'str'}, + } + + _subtype_map = { + 'protection_intent_item_type': {'AzureResourceItem': 'AzureResourceProtectionIntent'} + } + + def __init__(self, **kwargs): + super(ProtectionIntent, self).__init__(**kwargs) + self.backup_management_type = kwargs.get('backup_management_type', None) + self.source_resource_id = kwargs.get('source_resource_id', None) + self.item_id = kwargs.get('item_id', None) + self.policy_id = kwargs.get('policy_id', None) + self.protection_state = kwargs.get('protection_state', None) + self.protection_intent_item_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_intent_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_intent_py3.py new file mode 100644 index 000000000000..35a27f2925b3 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_intent_py3.py @@ -0,0 +1,70 @@ +# 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 ProtectionIntent(Model): + """Base class for backup ProtectionIntent. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureResourceProtectionIntent + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent for the backed + up item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param source_resource_id: ARM ID of the resource to be backed up. + :type source_resource_id: str + :param item_id: ID of the item which is getting protected, In case of + Azure Vm , it is ProtectedItemId + :type item_id: str + :param policy_id: ID of the backup policy with which this item is backed + up. + :type policy_id: str + :param protection_state: Backup state of this backup item. Possible values + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param protection_intent_item_type: Required. Constant filled by server. + :type protection_intent_item_type: str + """ + + _validation = { + 'protection_intent_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'item_id': {'key': 'itemId', 'type': 'str'}, + 'policy_id': {'key': 'policyId', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'protection_intent_item_type': {'key': 'protectionIntentItemType', 'type': 'str'}, + } + + _subtype_map = { + 'protection_intent_item_type': {'AzureResourceItem': 'AzureResourceProtectionIntent'} + } + + def __init__(self, *, backup_management_type=None, source_resource_id: str=None, item_id: str=None, policy_id: str=None, protection_state=None, **kwargs) -> None: + super(ProtectionIntent, self).__init__(**kwargs) + self.backup_management_type = backup_management_type + self.source_resource_id = source_resource_id + self.item_id = item_id + self.policy_id = policy_id + self.protection_state = protection_state + self.protection_intent_item_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_intent_resource.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_intent_resource.py new file mode 100644 index 000000000000..359e90f255e7 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_intent_resource.py @@ -0,0 +1,57 @@ +# 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 ProtectionIntentResource(Resource): + """Base class for backup ProtectionIntent. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param e_tag: Optional ETag. + :type e_tag: str + :param properties: ProtectionIntentResource properties + :type properties: + ~azure.mgmt.recoveryservicesbackup.models.ProtectionIntent + """ + + _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}'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ProtectionIntent'}, + } + + def __init__(self, **kwargs): + super(ProtectionIntentResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_intent_resource_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_intent_resource_py3.py new file mode 100644 index 000000000000..96f0f8ff1395 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_intent_resource_py3.py @@ -0,0 +1,57 @@ +# 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 ProtectionIntentResource(Resource): + """Base class for backup ProtectionIntent. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param e_tag: Optional ETag. + :type e_tag: str + :param properties: ProtectionIntentResource properties + :type properties: + ~azure.mgmt.recoveryservicesbackup.models.ProtectionIntent + """ + + _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}'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ProtectionIntent'}, + } + + def __init__(self, *, location: str=None, tags=None, e_tag: str=None, properties=None, **kwargs) -> None: + super(ProtectionIntentResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) + self.properties = properties diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_policy.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_policy.py index 68e359989c2e..cfadd161a3b2 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_policy.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_policy.py @@ -16,9 +16,17 @@ class ProtectionPolicy(Model): """Base class for backup policy. Workload-specific backup policies are derived from this class. + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureFileShareProtectionPolicy, + AzureIaaSVMProtectionPolicy, AzureSqlProtectionPolicy, + AzureVmWorkloadProtectionPolicy, GenericProtectionPolicy, + MabProtectionPolicy + + All required parameters must be populated in order to send to Azure. + :param protected_items_count: Number of items associated with this policy. :type protected_items_count: int - :param backup_management_type: Polymorphic Discriminator + :param backup_management_type: Required. Constant filled by server. :type backup_management_type: str """ @@ -32,9 +40,10 @@ class ProtectionPolicy(Model): } _subtype_map = { - 'backup_management_type': {'AzureIaasVM': 'AzureIaaSVMProtectionPolicy', 'AzureSql': 'AzureSqlProtectionPolicy', 'MAB': 'MabProtectionPolicy'} + 'backup_management_type': {'AzureStorage': 'AzureFileShareProtectionPolicy', 'AzureIaasVM': 'AzureIaaSVMProtectionPolicy', 'AzureSql': 'AzureSqlProtectionPolicy', 'AzureWorkload': 'AzureVmWorkloadProtectionPolicy', 'GenericProtectionPolicy': 'GenericProtectionPolicy', 'MAB': 'MabProtectionPolicy'} } - def __init__(self, protected_items_count=None): - self.protected_items_count = protected_items_count + def __init__(self, **kwargs): + super(ProtectionPolicy, self).__init__(**kwargs) + self.protected_items_count = kwargs.get('protected_items_count', None) self.backup_management_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_policy_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_policy_py3.py new file mode 100644 index 000000000000..961d40e9c0fb --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_policy_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ProtectionPolicy(Model): + """Base class for backup policy. Workload-specific backup policies are derived + from this class. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureFileShareProtectionPolicy, + AzureIaaSVMProtectionPolicy, AzureSqlProtectionPolicy, + AzureVmWorkloadProtectionPolicy, GenericProtectionPolicy, + MabProtectionPolicy + + All required parameters must be populated in order to send to Azure. + + :param protected_items_count: Number of items associated with this policy. + :type protected_items_count: int + :param backup_management_type: Required. Constant filled by server. + :type backup_management_type: str + """ + + _validation = { + 'backup_management_type': {'required': True}, + } + + _attribute_map = { + 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + } + + _subtype_map = { + 'backup_management_type': {'AzureStorage': 'AzureFileShareProtectionPolicy', 'AzureIaasVM': 'AzureIaaSVMProtectionPolicy', 'AzureSql': 'AzureSqlProtectionPolicy', 'AzureWorkload': 'AzureVmWorkloadProtectionPolicy', 'GenericProtectionPolicy': 'GenericProtectionPolicy', 'MAB': 'MabProtectionPolicy'} + } + + def __init__(self, *, protected_items_count: int=None, **kwargs) -> None: + super(ProtectionPolicy, self).__init__(**kwargs) + self.protected_items_count = protected_items_count + self.backup_management_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_policy_query_object.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_policy_query_object.py index b02b7605f3f6..b9714ef633c8 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_policy_query_object.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_policy_query_object.py @@ -17,14 +17,20 @@ class ProtectionPolicyQueryObject(Model): :param backup_management_type: Backup management type for the backup policy. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', - 'AzureBackupServer', 'AzureSql' - :type backup_management_type: str or :class:`BackupManagementType - ` + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param fabric_name: Fabric name for filter + :type fabric_name: str """ _attribute_map = { 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'fabric_name': {'key': 'fabricName', 'type': 'str'}, } - def __init__(self, backup_management_type=None): - self.backup_management_type = backup_management_type + def __init__(self, **kwargs): + super(ProtectionPolicyQueryObject, self).__init__(**kwargs) + self.backup_management_type = kwargs.get('backup_management_type', None) + self.fabric_name = kwargs.get('fabric_name', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_policy_query_object_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_policy_query_object_py3.py new file mode 100644 index 000000000000..08d9df201d1b --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_policy_query_object_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ProtectionPolicyQueryObject(Model): + """Filters the list backup policies API. + + :param backup_management_type: Backup management type for the backup + policy. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param fabric_name: Fabric name for filter + :type fabric_name: str + """ + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'fabric_name': {'key': 'fabricName', 'type': 'str'}, + } + + def __init__(self, *, backup_management_type=None, fabric_name: str=None, **kwargs) -> None: + super(ProtectionPolicyQueryObject, self).__init__(**kwargs) + self.backup_management_type = backup_management_type + self.fabric_name = fabric_name diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_policy_resource.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_policy_resource.py index 2dca26343699..b96d7201ed2a 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_policy_resource.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_policy_resource.py @@ -29,12 +29,12 @@ class ProtectionPolicyResource(Resource): :param location: Resource location. :type location: str :param tags: Resource tags. - :type tags: dict + :type tags: dict[str, str] :param e_tag: Optional ETag. :type e_tag: str :param properties: ProtectionPolicyResource properties - :type properties: :class:`ProtectionPolicy - ` + :type properties: + ~azure.mgmt.recoveryservicesbackup.models.ProtectionPolicy """ _validation = { @@ -53,6 +53,6 @@ class ProtectionPolicyResource(Resource): 'properties': {'key': 'properties', 'type': 'ProtectionPolicy'}, } - def __init__(self, location=None, tags=None, e_tag=None, properties=None): - super(ProtectionPolicyResource, self).__init__(location=location, tags=tags, e_tag=e_tag) - self.properties = properties + def __init__(self, **kwargs): + super(ProtectionPolicyResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_policy_resource_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_policy_resource_py3.py new file mode 100644 index 000000000000..d21d01b75ab7 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/protection_policy_resource_py3.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class ProtectionPolicyResource(Resource): + """Base class for backup policy. Workload-specific backup policies are derived + from this class. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param e_tag: Optional ETag. + :type e_tag: str + :param properties: ProtectionPolicyResource properties + :type properties: + ~azure.mgmt.recoveryservicesbackup.models.ProtectionPolicy + """ + + _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}'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ProtectionPolicy'}, + } + + def __init__(self, *, location: str=None, tags=None, e_tag: str=None, properties=None, **kwargs) -> None: + super(ProtectionPolicyResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) + self.properties = properties diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/recovery_point.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/recovery_point.py index 1c2c872739c7..514f61bbc720 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/recovery_point.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/recovery_point.py @@ -16,7 +16,13 @@ class RecoveryPoint(Model): """Base class for backup copies. Workload-specific backup copies are derived from this class. - :param object_type: Polymorphic Discriminator + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureFileShareRecoveryPoint, AzureWorkloadRecoveryPoint, + GenericRecoveryPoint, IaasVMRecoveryPoint + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. :type object_type: str """ @@ -29,8 +35,9 @@ class RecoveryPoint(Model): } _subtype_map = { - 'object_type': {'GenericRecoveryPoint': 'GenericRecoveryPoint', 'IaasVMRecoveryPoint': 'IaasVMRecoveryPoint'} + 'object_type': {'AzureFileShareRecoveryPoint': 'AzureFileShareRecoveryPoint', 'AzureWorkloadRecoveryPoint': 'AzureWorkloadRecoveryPoint', 'GenericRecoveryPoint': 'GenericRecoveryPoint', 'IaasVMRecoveryPoint': 'IaasVMRecoveryPoint'} } - def __init__(self): + def __init__(self, **kwargs): + super(RecoveryPoint, self).__init__(**kwargs) self.object_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/recovery_point_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/recovery_point_py3.py new file mode 100644 index 000000000000..e2e87c51e520 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/recovery_point_py3.py @@ -0,0 +1,43 @@ +# 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 RecoveryPoint(Model): + """Base class for backup copies. Workload-specific backup copies are derived + from this class. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureFileShareRecoveryPoint, AzureWorkloadRecoveryPoint, + GenericRecoveryPoint, IaasVMRecoveryPoint + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'AzureFileShareRecoveryPoint': 'AzureFileShareRecoveryPoint', 'AzureWorkloadRecoveryPoint': 'AzureWorkloadRecoveryPoint', 'GenericRecoveryPoint': 'GenericRecoveryPoint', 'IaasVMRecoveryPoint': 'IaasVMRecoveryPoint'} + } + + def __init__(self, **kwargs) -> None: + super(RecoveryPoint, self).__init__(**kwargs) + self.object_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/recovery_point_resource.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/recovery_point_resource.py index 9ffd786b7ff1..54a9ac18aa40 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/recovery_point_resource.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/recovery_point_resource.py @@ -29,12 +29,11 @@ class RecoveryPointResource(Resource): :param location: Resource location. :type location: str :param tags: Resource tags. - :type tags: dict + :type tags: dict[str, str] :param e_tag: Optional ETag. :type e_tag: str :param properties: RecoveryPointResource properties - :type properties: :class:`RecoveryPoint - ` + :type properties: ~azure.mgmt.recoveryservicesbackup.models.RecoveryPoint """ _validation = { @@ -53,6 +52,6 @@ class RecoveryPointResource(Resource): 'properties': {'key': 'properties', 'type': 'RecoveryPoint'}, } - def __init__(self, location=None, tags=None, e_tag=None, properties=None): - super(RecoveryPointResource, self).__init__(location=location, tags=tags, e_tag=e_tag) - self.properties = properties + def __init__(self, **kwargs): + super(RecoveryPointResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/recovery_point_resource_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/recovery_point_resource_py3.py new file mode 100644 index 000000000000..6ea4d805d721 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/recovery_point_resource_py3.py @@ -0,0 +1,57 @@ +# 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 RecoveryPointResource(Resource): + """Base class for backup copies. Workload-specific backup copies are derived + from this class. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param e_tag: Optional ETag. + :type e_tag: str + :param properties: RecoveryPointResource properties + :type properties: ~azure.mgmt.recoveryservicesbackup.models.RecoveryPoint + """ + + _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}'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'RecoveryPoint'}, + } + + def __init__(self, *, location: str=None, tags=None, e_tag: str=None, properties=None, **kwargs) -> None: + super(RecoveryPointResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) + self.properties = properties diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/recovery_point_tier_information.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/recovery_point_tier_information.py index 883e76d7b8a3..fcccab9d9b27 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/recovery_point_tier_information.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/recovery_point_tier_information.py @@ -17,12 +17,12 @@ class RecoveryPointTierInformation(Model): :param type: Recovery point tier type. Possible values include: 'Invalid', 'InstantRP', 'HardenedRP' - :type type: str or :class:`RecoveryPointTierType - ` + :type type: str or + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierType :param status: Recovery point tier status. Possible values include: 'Invalid', 'Valid', 'Disabled', 'Deleted' - :type status: str or :class:`RecoveryPointTierStatus - ` + :type status: str or + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierStatus """ _attribute_map = { @@ -30,6 +30,7 @@ class RecoveryPointTierInformation(Model): 'status': {'key': 'status', 'type': 'RecoveryPointTierStatus'}, } - def __init__(self, type=None, status=None): - self.type = type - self.status = status + def __init__(self, **kwargs): + super(RecoveryPointTierInformation, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.status = kwargs.get('status', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/recovery_point_tier_information_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/recovery_point_tier_information_py3.py new file mode 100644 index 000000000000..b7e25cb4b34e --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/recovery_point_tier_information_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RecoveryPointTierInformation(Model): + """Recovery point tier information. + + :param type: Recovery point tier type. Possible values include: 'Invalid', + 'InstantRP', 'HardenedRP' + :type type: str or + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierType + :param status: Recovery point tier status. Possible values include: + 'Invalid', 'Valid', 'Disabled', 'Deleted' + :type status: str or + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierStatus + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'RecoveryPointTierType'}, + 'status': {'key': 'status', 'type': 'RecoveryPointTierStatus'}, + } + + def __init__(self, *, type=None, status=None, **kwargs) -> None: + super(RecoveryPointTierInformation, self).__init__(**kwargs) + self.type = type + self.status = status diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/recovery_services_backup_client_enums.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/recovery_services_backup_client_enums.py index a71d068bc700..c65bb4a3066a 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/recovery_services_backup_client_enums.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/recovery_services_backup_client_enums.py @@ -12,77 +12,32 @@ from enum import Enum -class JobSupportedAction(Enum): +class ProtectionState(str, Enum): invalid = "Invalid" - cancellable = "Cancellable" - retriable = "Retriable" - - -class BackupManagementType(Enum): - - invalid = "Invalid" - azure_iaas_vm = "AzureIaasVM" - mab = "MAB" - dpm = "DPM" - azure_backup_server = "AzureBackupServer" - azure_sql = "AzureSql" - - -class JobStatus(Enum): - - invalid = "Invalid" - in_progress = "InProgress" - completed = "Completed" - failed = "Failed" - completed_with_warnings = "CompletedWithWarnings" - cancelled = "Cancelled" - cancelling = "Cancelling" - - -class JobOperationType(Enum): - - invalid = "Invalid" - register = "Register" - un_register = "UnRegister" - configure_backup = "ConfigureBackup" - backup = "Backup" - restore = "Restore" - disable_backup = "DisableBackup" - delete_backup_data = "DeleteBackupData" + ir_pending = "IRPending" + protected = "Protected" + protection_error = "ProtectionError" + protection_stopped = "ProtectionStopped" + protection_paused = "ProtectionPaused" -class MabServerType(Enum): +class HealthStatus(str, Enum): + passed = "Passed" + action_required = "ActionRequired" + action_suggested = "ActionSuggested" invalid = "Invalid" - unknown = "Unknown" - iaas_vm_container = "IaasVMContainer" - iaas_vm_service_container = "IaasVMServiceContainer" - dpm_container = "DPMContainer" - azure_backup_server_container = "AzureBackupServerContainer" - mab_container = "MABContainer" - cluster = "Cluster" - azure_sql_container = "AzureSqlContainer" - windows = "Windows" - vcenter = "VCenter" -class WorkloadType(Enum): +class JobSupportedAction(str, Enum): invalid = "Invalid" - vm = "VM" - file_folder = "FileFolder" - azure_sql_db = "AzureSqlDb" - sqldb = "SQLDB" - exchange = "Exchange" - sharepoint = "Sharepoint" - vmware_vm = "VMwareVM" - system_state = "SystemState" - client = "Client" - generic_data_source = "GenericDataSource" + cancellable = "Cancellable" + retriable = "Retriable" -class ProtectionState(Enum): +class ProtectedItemState(str, Enum): invalid = "Invalid" ir_pending = "IRPending" @@ -92,25 +47,33 @@ class ProtectionState(Enum): protection_paused = "ProtectionPaused" -class HealthStatus(Enum): +class SupportStatus(str, Enum): - passed = "Passed" - action_required = "ActionRequired" - action_suggested = "ActionSuggested" invalid = "Invalid" + supported = "Supported" + default_off = "DefaultOFF" + default_on = "DefaultON" + not_supported = "NotSupported" -class ProtectedItemState(Enum): +class LastBackupStatus(str, Enum): invalid = "Invalid" + healthy = "Healthy" + unhealthy = "Unhealthy" ir_pending = "IRPending" - protected = "Protected" - protection_error = "ProtectionError" - protection_stopped = "ProtectionStopped" - protection_paused = "ProtectionPaused" -class UsagesUnit(Enum): +class ProtectedItemHealthStatus(str, Enum): + + invalid = "Invalid" + healthy = "Healthy" + unhealthy = "Unhealthy" + not_reachable = "NotReachable" + ir_pending = "IRPending" + + +class UsagesUnit(str, Enum): count = "Count" bytes = "Bytes" @@ -120,50 +83,46 @@ class UsagesUnit(Enum): bytes_per_second = "BytesPerSecond" -class StorageType(Enum): +class DataSourceType(str, Enum): invalid = "Invalid" - geo_redundant = "GeoRedundant" - locally_redundant = "LocallyRedundant" + vm = "VM" + file_folder = "FileFolder" + azure_sql_db = "AzureSqlDb" + sqldb = "SQLDB" + exchange = "Exchange" + sharepoint = "Sharepoint" + vmware_vm = "VMwareVM" + system_state = "SystemState" + client = "Client" + generic_data_source = "GenericDataSource" + sql_data_base = "SQLDataBase" + azure_file_share = "AzureFileShare" -class StorageTypeState(Enum): +class ProtectionStatus(str, Enum): invalid = "Invalid" - locked = "Locked" - unlocked = "Unlocked" + not_protected = "NotProtected" + protecting = "Protecting" + protected = "Protected" + protection_failed = "ProtectionFailed" -class EnhancedSecurityState(Enum): +class FabricName(str, Enum): invalid = "Invalid" - enabled = "Enabled" - disabled = "Disabled" + azure = "Azure" -class Type(Enum): +class Type(str, Enum): invalid = "Invalid" backup_protected_item_count_summary = "BackupProtectedItemCountSummary" backup_protection_container_count_summary = "BackupProtectionContainerCountSummary" -class ContainerType(Enum): - - invalid = "Invalid" - unknown = "Unknown" - iaas_vm_container = "IaasVMContainer" - iaas_vm_service_container = "IaasVMServiceContainer" - dpm_container = "DPMContainer" - azure_backup_server_container = "AzureBackupServerContainer" - mab_container = "MABContainer" - cluster = "Cluster" - azure_sql_container = "AzureSqlContainer" - windows = "Windows" - vcenter = "VCenter" - - -class RetentionDurationType(Enum): +class RetentionDurationType(str, Enum): invalid = "Invalid" days = "Days" @@ -172,30 +131,43 @@ class RetentionDurationType(Enum): years = "Years" -class RecoveryPointTierType(Enum): +class BackupManagementType(str, Enum): invalid = "Invalid" - instant_rp = "InstantRP" - hardened_rp = "HardenedRP" + azure_iaas_vm = "AzureIaasVM" + mab = "MAB" + dpm = "DPM" + azure_backup_server = "AzureBackupServer" + azure_sql = "AzureSql" + azure_storage = "AzureStorage" + azure_workload = "AzureWorkload" + default_backup = "DefaultBackup" -class RecoveryPointTierStatus(Enum): +class JobStatus(str, Enum): invalid = "Invalid" - valid = "Valid" - disabled = "Disabled" - deleted = "Deleted" + in_progress = "InProgress" + completed = "Completed" + failed = "Failed" + completed_with_warnings = "CompletedWithWarnings" + cancelled = "Cancelled" + cancelling = "Cancelling" -class RecoveryType(Enum): +class JobOperationType(str, Enum): invalid = "Invalid" - original_location = "OriginalLocation" - alternate_location = "AlternateLocation" - restore_disks = "RestoreDisks" + register = "Register" + un_register = "UnRegister" + configure_backup = "ConfigureBackup" + backup = "Backup" + restore = "Restore" + disable_backup = "DisableBackup" + delete_backup_data = "DeleteBackupData" -class DayOfWeek(Enum): +class DayOfWeek(str, Enum): sunday = "Sunday" monday = "Monday" @@ -206,14 +178,14 @@ class DayOfWeek(Enum): saturday = "Saturday" -class RetentionScheduleFormat(Enum): +class RetentionScheduleFormat(str, Enum): invalid = "Invalid" daily = "Daily" weekly = "Weekly" -class WeekOfMonth(Enum): +class WeekOfMonth(str, Enum): first = "First" second = "Second" @@ -222,7 +194,7 @@ class WeekOfMonth(Enum): last = "Last" -class MonthOfYear(Enum): +class MonthOfYear(str, Enum): invalid = "Invalid" january = "January" @@ -239,7 +211,26 @@ class MonthOfYear(Enum): december = "December" -class BackupItemType(Enum): +class MabServerType(str, Enum): + + invalid = "Invalid" + unknown = "Unknown" + iaas_vm_container = "IaasVMContainer" + iaas_vm_service_container = "IaasVMServiceContainer" + dpm_container = "DPMContainer" + azure_backup_server_container = "AzureBackupServerContainer" + mab_container = "MABContainer" + cluster = "Cluster" + azure_sql_container = "AzureSqlContainer" + windows = "Windows" + vcenter = "VCenter" + vm_app_container = "VMAppContainer" + sqlag_work_load_container = "SQLAGWorkLoadContainer" + storage_container = "StorageContainer" + generic_container = "GenericContainer" + + +class WorkloadType(str, Enum): invalid = "Invalid" vm = "VM" @@ -252,18 +243,11 @@ class BackupItemType(Enum): system_state = "SystemState" client = "Client" generic_data_source = "GenericDataSource" + sql_data_base = "SQLDataBase" + azure_file_share = "AzureFileShare" -class OperationStatusValues(Enum): - - invalid = "Invalid" - in_progress = "InProgress" - succeeded = "Succeeded" - failed = "Failed" - canceled = "Canceled" - - -class HttpStatusCode(Enum): +class HttpStatusCode(str, Enum): continue_enum = "Continue" switching_protocols = "SwitchingProtocols" @@ -314,22 +298,14 @@ class HttpStatusCode(Enum): http_version_not_supported = "HttpVersionNotSupported" -class DataSourceType(Enum): +class ValidationStatus(str, Enum): invalid = "Invalid" - vm = "VM" - file_folder = "FileFolder" - azure_sql_db = "AzureSqlDb" - sqldb = "SQLDB" - exchange = "Exchange" - sharepoint = "Sharepoint" - vmware_vm = "VMwareVM" - system_state = "SystemState" - client = "Client" - generic_data_source = "GenericDataSource" + succeeded = "Succeeded" + failed = "Failed" -class HealthState(Enum): +class HealthState(str, Enum): passed = "Passed" action_required = "ActionRequired" @@ -337,16 +313,175 @@ class HealthState(Enum): invalid = "Invalid" -class ScheduleRunType(Enum): +class ScheduleRunType(str, Enum): invalid = "Invalid" daily = "Daily" weekly = "Weekly" -class ProtectionStatus(Enum): +class AzureFileShareType(str, Enum): invalid = "Invalid" - not_protected = "NotProtected" - protecting = "Protecting" - protected = "Protected" + xsmb = "XSMB" + xsync = "XSync" + + +class RecoveryType(str, Enum): + + invalid = "Invalid" + original_location = "OriginalLocation" + alternate_location = "AlternateLocation" + restore_disks = "RestoreDisks" + + +class CopyOptions(str, Enum): + + invalid = "Invalid" + create_copy = "CreateCopy" + skip = "Skip" + overwrite = "Overwrite" + fail_on_conflict = "FailOnConflict" + + +class RestoreRequestType(str, Enum): + + invalid = "Invalid" + full_share_restore = "FullShareRestore" + item_level_restore = "ItemLevelRestore" + + +class InquiryStatus(str, Enum): + + invalid = "Invalid" + success = "Success" + failed = "Failed" + + +class SQLDataDirectoryType(str, Enum): + + invalid = "Invalid" + data = "Data" + log = "Log" + + +class BackupType(str, Enum): + + invalid = "Invalid" + full = "Full" + differential = "Differential" + log = "Log" + copy_only_full = "CopyOnlyFull" + + +class RestorePointType(str, Enum): + + invalid = "Invalid" + full = "Full" + log = "Log" + differential = "Differential" + + +class OverwriteOptions(str, Enum): + + invalid = "Invalid" + fail_on_conflict = "FailOnConflict" + overwrite = "Overwrite" + + +class StorageType(str, Enum): + + invalid = "Invalid" + geo_redundant = "GeoRedundant" + locally_redundant = "LocallyRedundant" + + +class StorageTypeState(str, Enum): + + invalid = "Invalid" + locked = "Locked" + unlocked = "Unlocked" + + +class EnhancedSecurityState(str, Enum): + + invalid = "Invalid" + enabled = "Enabled" + disabled = "Disabled" + + +class ContainerType(str, Enum): + + invalid = "Invalid" + unknown = "Unknown" + iaas_vm_container = "IaasVMContainer" + iaas_vm_service_container = "IaasVMServiceContainer" + dpm_container = "DPMContainer" + azure_backup_server_container = "AzureBackupServerContainer" + mab_container = "MABContainer" + cluster = "Cluster" + azure_sql_container = "AzureSqlContainer" + windows = "Windows" + vcenter = "VCenter" + vm_app_container = "VMAppContainer" + sqlag_work_load_container = "SQLAGWorkLoadContainer" + storage_container = "StorageContainer" + generic_container = "GenericContainer" + + +class RestorePointQueryType(str, Enum): + + invalid = "Invalid" + full = "Full" + log = "Log" + differential = "Differential" + full_and_differential = "FullAndDifferential" + all = "All" + + +class WorkloadItemType(str, Enum): + + invalid = "Invalid" + sql_instance = "SQLInstance" + sql_data_base = "SQLDataBase" + + +class RecoveryPointTierType(str, Enum): + + invalid = "Invalid" + instant_rp = "InstantRP" + hardened_rp = "HardenedRP" + + +class RecoveryPointTierStatus(str, Enum): + + invalid = "Invalid" + valid = "Valid" + disabled = "Disabled" + deleted = "Deleted" + + +class BackupItemType(str, Enum): + + invalid = "Invalid" + vm = "VM" + file_folder = "FileFolder" + azure_sql_db = "AzureSqlDb" + sqldb = "SQLDB" + exchange = "Exchange" + sharepoint = "Sharepoint" + vmware_vm = "VMwareVM" + system_state = "SystemState" + client = "Client" + generic_data_source = "GenericDataSource" + sql_data_base = "SQLDataBase" + azure_file_share = "AzureFileShare" + + +class OperationStatusValues(str, Enum): + + invalid = "Invalid" + in_progress = "InProgress" + succeeded = "Succeeded" + failed = "Failed" + canceled = "Canceled" diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/resource.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/resource.py index 43478f3ea1b1..a8bb01618a5a 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/resource.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/resource.py @@ -28,7 +28,7 @@ class Resource(Model): :param location: Resource location. :type location: str :param tags: Resource tags. - :type tags: dict + :type tags: dict[str, str] :param e_tag: Optional ETag. :type e_tag: str """ @@ -48,10 +48,11 @@ class Resource(Model): 'e_tag': {'key': 'eTag', 'type': 'str'}, } - def __init__(self, location=None, tags=None, e_tag=None): + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) self.id = None self.name = None self.type = None - self.location = location - self.tags = tags - self.e_tag = e_tag + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.e_tag = kwargs.get('e_tag', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/resource_list.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/resource_list.py index cdc500e1398e..44b328e46bd6 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/resource_list.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/resource_list.py @@ -24,5 +24,6 @@ class ResourceList(Model): 'next_link': {'key': 'nextLink', 'type': 'str'}, } - def __init__(self, next_link=None): - self.next_link = next_link + def __init__(self, **kwargs): + super(ResourceList, self).__init__(**kwargs) + self.next_link = kwargs.get('next_link', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/resource_list_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/resource_list_py3.py new file mode 100644 index 000000000000..4e92209d5903 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/resource_list_py3.py @@ -0,0 +1,29 @@ +# 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 ResourceList(Model): + """Base for all lists of resources. + + :param next_link: The uri to fetch the next page of resources. Call + ListNext() fetches next page of resources. + :type next_link: str + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, next_link: str=None, **kwargs) -> None: + super(ResourceList, self).__init__(**kwargs) + self.next_link = next_link diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/resource_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/resource_py3.py new file mode 100644 index 000000000000..a45b6c84b923 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/resource_py3.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Resource(Model): + """ARM Resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param e_tag: Optional ETag. + :type e_tag: 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}'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, e_tag: str=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags + self.e_tag = e_tag diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/restore_file_specs.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/restore_file_specs.py new file mode 100644 index 000000000000..7715c324cbc6 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/restore_file_specs.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RestoreFileSpecs(Model): + """Restore file specs like file path, type and target folder path info. + + :param path: Source File/Folder path + :type path: str + :param file_spec_type: Indicates what the Path variable stands for + :type file_spec_type: str + :param target_folder_path: Destination folder path in target FileShare + :type target_folder_path: str + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'file_spec_type': {'key': 'fileSpecType', 'type': 'str'}, + 'target_folder_path': {'key': 'targetFolderPath', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RestoreFileSpecs, self).__init__(**kwargs) + self.path = kwargs.get('path', None) + self.file_spec_type = kwargs.get('file_spec_type', None) + self.target_folder_path = kwargs.get('target_folder_path', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/restore_file_specs_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/restore_file_specs_py3.py new file mode 100644 index 000000000000..3aa79fe8162a --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/restore_file_specs_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RestoreFileSpecs(Model): + """Restore file specs like file path, type and target folder path info. + + :param path: Source File/Folder path + :type path: str + :param file_spec_type: Indicates what the Path variable stands for + :type file_spec_type: str + :param target_folder_path: Destination folder path in target FileShare + :type target_folder_path: str + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'file_spec_type': {'key': 'fileSpecType', 'type': 'str'}, + 'target_folder_path': {'key': 'targetFolderPath', 'type': 'str'}, + } + + def __init__(self, *, path: str=None, file_spec_type: str=None, target_folder_path: str=None, **kwargs) -> None: + super(RestoreFileSpecs, self).__init__(**kwargs) + self.path = path + self.file_spec_type = file_spec_type + self.target_folder_path = target_folder_path diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/restore_request.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/restore_request.py index e662315f9bdf..d18be734a9ee 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/restore_request.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/restore_request.py @@ -16,7 +16,13 @@ class RestoreRequest(Model): """Base class for restore request. Workload-specific restore requests are derived from this class. - :param object_type: Polymorphic Discriminator + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureFileShareRestoreRequest, AzureWorkloadRestoreRequest, + IaasVMRestoreRequest + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. :type object_type: str """ @@ -29,8 +35,9 @@ class RestoreRequest(Model): } _subtype_map = { - 'object_type': {'IaasVMRestoreRequest': 'IaasVMRestoreRequest'} + 'object_type': {'AzureFileShareRestoreRequest': 'AzureFileShareRestoreRequest', 'AzureWorkloadRestoreRequest': 'AzureWorkloadRestoreRequest', 'IaasVMRestoreRequest': 'IaasVMRestoreRequest'} } - def __init__(self): + def __init__(self, **kwargs): + super(RestoreRequest, self).__init__(**kwargs) self.object_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/restore_request_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/restore_request_py3.py new file mode 100644 index 000000000000..659d951369f9 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/restore_request_py3.py @@ -0,0 +1,43 @@ +# 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 RestoreRequest(Model): + """Base class for restore request. Workload-specific restore requests are + derived from this class. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureFileShareRestoreRequest, AzureWorkloadRestoreRequest, + IaasVMRestoreRequest + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'AzureFileShareRestoreRequest': 'AzureFileShareRestoreRequest', 'AzureWorkloadRestoreRequest': 'AzureWorkloadRestoreRequest', 'IaasVMRestoreRequest': 'IaasVMRestoreRequest'} + } + + def __init__(self, **kwargs) -> None: + super(RestoreRequest, self).__init__(**kwargs) + self.object_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/restore_request_resource.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/restore_request_resource.py index 91bd09fc9f45..beca6e1710ca 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/restore_request_resource.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/restore_request_resource.py @@ -29,12 +29,11 @@ class RestoreRequestResource(Resource): :param location: Resource location. :type location: str :param tags: Resource tags. - :type tags: dict + :type tags: dict[str, str] :param e_tag: Optional ETag. :type e_tag: str :param properties: RestoreRequestResource properties - :type properties: :class:`RestoreRequest - ` + :type properties: ~azure.mgmt.recoveryservicesbackup.models.RestoreRequest """ _validation = { @@ -53,6 +52,6 @@ class RestoreRequestResource(Resource): 'properties': {'key': 'properties', 'type': 'RestoreRequest'}, } - def __init__(self, location=None, tags=None, e_tag=None, properties=None): - super(RestoreRequestResource, self).__init__(location=location, tags=tags, e_tag=e_tag) - self.properties = properties + def __init__(self, **kwargs): + super(RestoreRequestResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/restore_request_resource_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/restore_request_resource_py3.py new file mode 100644 index 000000000000..c488620de4f8 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/restore_request_resource_py3.py @@ -0,0 +1,57 @@ +# 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 RestoreRequestResource(Resource): + """Base class for restore request. Workload-specific restore requests are + derived from this class. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param e_tag: Optional ETag. + :type e_tag: str + :param properties: RestoreRequestResource properties + :type properties: ~azure.mgmt.recoveryservicesbackup.models.RestoreRequest + """ + + _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}'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'RestoreRequest'}, + } + + def __init__(self, *, location: str=None, tags=None, e_tag: str=None, properties=None, **kwargs) -> None: + super(RestoreRequestResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) + self.properties = properties diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/retention_duration.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/retention_duration.py index a8d6b6cc43e9..caac4911f800 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/retention_duration.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/retention_duration.py @@ -22,8 +22,8 @@ class RetentionDuration(Model): :type count: int :param duration_type: Retention duration type of retention policy. Possible values include: 'Invalid', 'Days', 'Weeks', 'Months', 'Years' - :type duration_type: str or :class:`RetentionDurationType - ` + :type duration_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RetentionDurationType """ _attribute_map = { @@ -31,6 +31,7 @@ class RetentionDuration(Model): 'duration_type': {'key': 'durationType', 'type': 'str'}, } - def __init__(self, count=None, duration_type=None): - self.count = count - self.duration_type = duration_type + def __init__(self, **kwargs): + super(RetentionDuration, self).__init__(**kwargs) + self.count = kwargs.get('count', None) + self.duration_type = kwargs.get('duration_type', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/retention_duration_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/retention_duration_py3.py new file mode 100644 index 000000000000..d2eccbffaed5 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/retention_duration_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RetentionDuration(Model): + """Retention duration. + + :param count: Count of duration types. Retention duration is obtained by + the counting the duration type Count times. + For example, when Count = 3 and DurationType = Weeks, retention duration + will be three weeks. + :type count: int + :param duration_type: Retention duration type of retention policy. + Possible values include: 'Invalid', 'Days', 'Weeks', 'Months', 'Years' + :type duration_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RetentionDurationType + """ + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'duration_type': {'key': 'durationType', 'type': 'str'}, + } + + def __init__(self, *, count: int=None, duration_type=None, **kwargs) -> None: + super(RetentionDuration, self).__init__(**kwargs) + self.count = count + self.duration_type = duration_type diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/retention_policy.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/retention_policy.py index f200b036b2cf..f8bf392172bd 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/retention_policy.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/retention_policy.py @@ -15,7 +15,12 @@ class RetentionPolicy(Model): """Base class for retention policy. - :param retention_policy_type: Polymorphic Discriminator + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: LongTermRetentionPolicy, SimpleRetentionPolicy + + All required parameters must be populated in order to send to Azure. + + :param retention_policy_type: Required. Constant filled by server. :type retention_policy_type: str """ @@ -31,5 +36,6 @@ class RetentionPolicy(Model): 'retention_policy_type': {'LongTermRetentionPolicy': 'LongTermRetentionPolicy', 'SimpleRetentionPolicy': 'SimpleRetentionPolicy'} } - def __init__(self): + def __init__(self, **kwargs): + super(RetentionPolicy, self).__init__(**kwargs) self.retention_policy_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/retention_policy_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/retention_policy_py3.py new file mode 100644 index 000000000000..7628a70dd614 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/retention_policy_py3.py @@ -0,0 +1,41 @@ +# 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 RetentionPolicy(Model): + """Base class for retention policy. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: LongTermRetentionPolicy, SimpleRetentionPolicy + + All required parameters must be populated in order to send to Azure. + + :param retention_policy_type: Required. Constant filled by server. + :type retention_policy_type: str + """ + + _validation = { + 'retention_policy_type': {'required': True}, + } + + _attribute_map = { + 'retention_policy_type': {'key': 'retentionPolicyType', 'type': 'str'}, + } + + _subtype_map = { + 'retention_policy_type': {'LongTermRetentionPolicy': 'LongTermRetentionPolicy', 'SimpleRetentionPolicy': 'SimpleRetentionPolicy'} + } + + def __init__(self, **kwargs) -> None: + super(RetentionPolicy, self).__init__(**kwargs) + self.retention_policy_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/schedule_policy.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/schedule_policy.py index 1c478921c642..87f4bb99f669 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/schedule_policy.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/schedule_policy.py @@ -15,7 +15,13 @@ class SchedulePolicy(Model): """Base class for backup schedule. - :param schedule_policy_type: Polymorphic Discriminator + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: LogSchedulePolicy, LongTermSchedulePolicy, + SimpleSchedulePolicy + + All required parameters must be populated in order to send to Azure. + + :param schedule_policy_type: Required. Constant filled by server. :type schedule_policy_type: str """ @@ -28,8 +34,9 @@ class SchedulePolicy(Model): } _subtype_map = { - 'schedule_policy_type': {'LongTermSchedulePolicy': 'LongTermSchedulePolicy', 'SimpleSchedulePolicy': 'SimpleSchedulePolicy'} + 'schedule_policy_type': {'LogSchedulePolicy': 'LogSchedulePolicy', 'LongTermSchedulePolicy': 'LongTermSchedulePolicy', 'SimpleSchedulePolicy': 'SimpleSchedulePolicy'} } - def __init__(self): + def __init__(self, **kwargs): + super(SchedulePolicy, self).__init__(**kwargs) self.schedule_policy_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/schedule_policy_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/schedule_policy_py3.py new file mode 100644 index 000000000000..a9f280e16951 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/schedule_policy_py3.py @@ -0,0 +1,42 @@ +# 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 SchedulePolicy(Model): + """Base class for backup schedule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: LogSchedulePolicy, LongTermSchedulePolicy, + SimpleSchedulePolicy + + All required parameters must be populated in order to send to Azure. + + :param schedule_policy_type: Required. Constant filled by server. + :type schedule_policy_type: str + """ + + _validation = { + 'schedule_policy_type': {'required': True}, + } + + _attribute_map = { + 'schedule_policy_type': {'key': 'schedulePolicyType', 'type': 'str'}, + } + + _subtype_map = { + 'schedule_policy_type': {'LogSchedulePolicy': 'LogSchedulePolicy', 'LongTermSchedulePolicy': 'LongTermSchedulePolicy', 'SimpleSchedulePolicy': 'SimpleSchedulePolicy'} + } + + def __init__(self, **kwargs) -> None: + super(SchedulePolicy, self).__init__(**kwargs) + self.schedule_policy_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/settings.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/settings.py new file mode 100644 index 000000000000..e7f38a6d995b --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/settings.py @@ -0,0 +1,33 @@ +# 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 Settings(Model): + """Common settings field for backup management. + + :param time_zone: TimeZone optional input as string. For example: TimeZone + = "Pacific Standard Time". + :type time_zone: str + :param issqlcompression: SQL compression flag + :type issqlcompression: bool + """ + + _attribute_map = { + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + 'issqlcompression': {'key': 'issqlcompression', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(Settings, self).__init__(**kwargs) + self.time_zone = kwargs.get('time_zone', None) + self.issqlcompression = kwargs.get('issqlcompression', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/settings_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/settings_py3.py new file mode 100644 index 000000000000..260c77d0dc13 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/settings_py3.py @@ -0,0 +1,33 @@ +# 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 Settings(Model): + """Common settings field for backup management. + + :param time_zone: TimeZone optional input as string. For example: TimeZone + = "Pacific Standard Time". + :type time_zone: str + :param issqlcompression: SQL compression flag + :type issqlcompression: bool + """ + + _attribute_map = { + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + 'issqlcompression': {'key': 'issqlcompression', 'type': 'bool'}, + } + + def __init__(self, *, time_zone: str=None, issqlcompression: bool=None, **kwargs) -> None: + super(Settings, self).__init__(**kwargs) + self.time_zone = time_zone + self.issqlcompression = issqlcompression diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/simple_retention_policy.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/simple_retention_policy.py index 7f26a5b6f93e..6e0a54f04e7a 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/simple_retention_policy.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/simple_retention_policy.py @@ -15,11 +15,13 @@ class SimpleRetentionPolicy(RetentionPolicy): """Simple policy retention. - :param retention_policy_type: Polymorphic Discriminator + All required parameters must be populated in order to send to Azure. + + :param retention_policy_type: Required. Constant filled by server. :type retention_policy_type: str :param retention_duration: Retention duration of the protection policy. - :type retention_duration: :class:`RetentionDuration - ` + :type retention_duration: + ~azure.mgmt.recoveryservicesbackup.models.RetentionDuration """ _validation = { @@ -31,7 +33,7 @@ class SimpleRetentionPolicy(RetentionPolicy): 'retention_duration': {'key': 'retentionDuration', 'type': 'RetentionDuration'}, } - def __init__(self, retention_duration=None): - super(SimpleRetentionPolicy, self).__init__() - self.retention_duration = retention_duration + def __init__(self, **kwargs): + super(SimpleRetentionPolicy, self).__init__(**kwargs) + self.retention_duration = kwargs.get('retention_duration', None) self.retention_policy_type = 'SimpleRetentionPolicy' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/simple_retention_policy_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/simple_retention_policy_py3.py new file mode 100644 index 000000000000..71416b26af7b --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/simple_retention_policy_py3.py @@ -0,0 +1,39 @@ +# 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 .retention_policy_py3 import RetentionPolicy + + +class SimpleRetentionPolicy(RetentionPolicy): + """Simple policy retention. + + All required parameters must be populated in order to send to Azure. + + :param retention_policy_type: Required. Constant filled by server. + :type retention_policy_type: str + :param retention_duration: Retention duration of the protection policy. + :type retention_duration: + ~azure.mgmt.recoveryservicesbackup.models.RetentionDuration + """ + + _validation = { + 'retention_policy_type': {'required': True}, + } + + _attribute_map = { + 'retention_policy_type': {'key': 'retentionPolicyType', 'type': 'str'}, + 'retention_duration': {'key': 'retentionDuration', 'type': 'RetentionDuration'}, + } + + def __init__(self, *, retention_duration=None, **kwargs) -> None: + super(SimpleRetentionPolicy, self).__init__(**kwargs) + self.retention_duration = retention_duration + self.retention_policy_type = 'SimpleRetentionPolicy' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/simple_schedule_policy.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/simple_schedule_policy.py index 965a5e64e6a7..bad416583e2f 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/simple_schedule_policy.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/simple_schedule_policy.py @@ -15,19 +15,21 @@ class SimpleSchedulePolicy(SchedulePolicy): """Simple policy schedule. - :param schedule_policy_type: Polymorphic Discriminator + All required parameters must be populated in order to send to Azure. + + :param schedule_policy_type: Required. Constant filled by server. :type schedule_policy_type: str :param schedule_run_frequency: Frequency of the schedule operation of this policy. Possible values include: 'Invalid', 'Daily', 'Weekly' - :type schedule_run_frequency: str or :class:`ScheduleRunType - ` + :type schedule_run_frequency: str or + ~azure.mgmt.recoveryservicesbackup.models.ScheduleRunType :param schedule_run_days: List of days of week this schedule has to be run. - :type schedule_run_days: list of str or :class:`DayOfWeek - ` + :type schedule_run_days: list[str or + ~azure.mgmt.recoveryservicesbackup.models.DayOfWeek] :param schedule_run_times: List of times of day this schedule has to be run. - :type schedule_run_times: list of datetime + :type schedule_run_times: list[datetime] :param schedule_weekly_frequency: At every number weeks this schedule has to be run. :type schedule_weekly_frequency: int @@ -45,10 +47,10 @@ class SimpleSchedulePolicy(SchedulePolicy): 'schedule_weekly_frequency': {'key': 'scheduleWeeklyFrequency', 'type': 'int'}, } - def __init__(self, schedule_run_frequency=None, schedule_run_days=None, schedule_run_times=None, schedule_weekly_frequency=None): - super(SimpleSchedulePolicy, self).__init__() - self.schedule_run_frequency = schedule_run_frequency - self.schedule_run_days = schedule_run_days - self.schedule_run_times = schedule_run_times - self.schedule_weekly_frequency = schedule_weekly_frequency + def __init__(self, **kwargs): + super(SimpleSchedulePolicy, self).__init__(**kwargs) + self.schedule_run_frequency = kwargs.get('schedule_run_frequency', None) + self.schedule_run_days = kwargs.get('schedule_run_days', None) + self.schedule_run_times = kwargs.get('schedule_run_times', None) + self.schedule_weekly_frequency = kwargs.get('schedule_weekly_frequency', None) self.schedule_policy_type = 'SimpleSchedulePolicy' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/simple_schedule_policy_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/simple_schedule_policy_py3.py new file mode 100644 index 000000000000..cdee86fd1bbf --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/simple_schedule_policy_py3.py @@ -0,0 +1,56 @@ +# 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 .schedule_policy_py3 import SchedulePolicy + + +class SimpleSchedulePolicy(SchedulePolicy): + """Simple policy schedule. + + All required parameters must be populated in order to send to Azure. + + :param schedule_policy_type: Required. Constant filled by server. + :type schedule_policy_type: str + :param schedule_run_frequency: Frequency of the schedule operation of this + policy. Possible values include: 'Invalid', 'Daily', 'Weekly' + :type schedule_run_frequency: str or + ~azure.mgmt.recoveryservicesbackup.models.ScheduleRunType + :param schedule_run_days: List of days of week this schedule has to be + run. + :type schedule_run_days: list[str or + ~azure.mgmt.recoveryservicesbackup.models.DayOfWeek] + :param schedule_run_times: List of times of day this schedule has to be + run. + :type schedule_run_times: list[datetime] + :param schedule_weekly_frequency: At every number weeks this schedule has + to be run. + :type schedule_weekly_frequency: int + """ + + _validation = { + 'schedule_policy_type': {'required': True}, + } + + _attribute_map = { + 'schedule_policy_type': {'key': 'schedulePolicyType', 'type': 'str'}, + 'schedule_run_frequency': {'key': 'scheduleRunFrequency', 'type': 'str'}, + 'schedule_run_days': {'key': 'scheduleRunDays', 'type': '[DayOfWeek]'}, + 'schedule_run_times': {'key': 'scheduleRunTimes', 'type': '[iso-8601]'}, + 'schedule_weekly_frequency': {'key': 'scheduleWeeklyFrequency', 'type': 'int'}, + } + + def __init__(self, *, schedule_run_frequency=None, schedule_run_days=None, schedule_run_times=None, schedule_weekly_frequency: int=None, **kwargs) -> None: + super(SimpleSchedulePolicy, self).__init__(**kwargs) + self.schedule_run_frequency = schedule_run_frequency + self.schedule_run_days = schedule_run_days + self.schedule_run_times = schedule_run_times + self.schedule_weekly_frequency = schedule_weekly_frequency + self.schedule_policy_type = 'SimpleSchedulePolicy' diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/sql_data_directory.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/sql_data_directory.py new file mode 100644 index 000000000000..1b2c5562aee4 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/sql_data_directory.py @@ -0,0 +1,38 @@ +# 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 SQLDataDirectory(Model): + """SQLDataDirectory info. + + :param type: Type of data directory mapping. Possible values include: + 'Invalid', 'Data', 'Log' + :type type: str or + ~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectoryType + :param path: File path + :type path: str + :param logical_name: Logical name of the file + :type logical_name: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, + 'logical_name': {'key': 'logicalName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SQLDataDirectory, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.path = kwargs.get('path', None) + self.logical_name = kwargs.get('logical_name', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/sql_data_directory_mapping.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/sql_data_directory_mapping.py new file mode 100644 index 000000000000..6eed363c64e3 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/sql_data_directory_mapping.py @@ -0,0 +1,42 @@ +# 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 SQLDataDirectoryMapping(Model): + """Encapsulates information regarding data directory. + + :param mapping_type: Type of data directory mapping. Possible values + include: 'Invalid', 'Data', 'Log' + :type mapping_type: str or + ~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectoryType + :param source_logical_name: Restore source logical name path + :type source_logical_name: str + :param source_path: Restore source path + :type source_path: str + :param target_path: Target path + :type target_path: str + """ + + _attribute_map = { + 'mapping_type': {'key': 'mappingType', 'type': 'str'}, + 'source_logical_name': {'key': 'sourceLogicalName', 'type': 'str'}, + 'source_path': {'key': 'sourcePath', 'type': 'str'}, + 'target_path': {'key': 'targetPath', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SQLDataDirectoryMapping, self).__init__(**kwargs) + self.mapping_type = kwargs.get('mapping_type', None) + self.source_logical_name = kwargs.get('source_logical_name', None) + self.source_path = kwargs.get('source_path', None) + self.target_path = kwargs.get('target_path', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/sql_data_directory_mapping_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/sql_data_directory_mapping_py3.py new file mode 100644 index 000000000000..6048d6787ca1 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/sql_data_directory_mapping_py3.py @@ -0,0 +1,42 @@ +# 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 SQLDataDirectoryMapping(Model): + """Encapsulates information regarding data directory. + + :param mapping_type: Type of data directory mapping. Possible values + include: 'Invalid', 'Data', 'Log' + :type mapping_type: str or + ~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectoryType + :param source_logical_name: Restore source logical name path + :type source_logical_name: str + :param source_path: Restore source path + :type source_path: str + :param target_path: Target path + :type target_path: str + """ + + _attribute_map = { + 'mapping_type': {'key': 'mappingType', 'type': 'str'}, + 'source_logical_name': {'key': 'sourceLogicalName', 'type': 'str'}, + 'source_path': {'key': 'sourcePath', 'type': 'str'}, + 'target_path': {'key': 'targetPath', 'type': 'str'}, + } + + def __init__(self, *, mapping_type=None, source_logical_name: str=None, source_path: str=None, target_path: str=None, **kwargs) -> None: + super(SQLDataDirectoryMapping, self).__init__(**kwargs) + self.mapping_type = mapping_type + self.source_logical_name = source_logical_name + self.source_path = source_path + self.target_path = target_path diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/sql_data_directory_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/sql_data_directory_py3.py new file mode 100644 index 000000000000..3ac31f086a93 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/sql_data_directory_py3.py @@ -0,0 +1,38 @@ +# 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 SQLDataDirectory(Model): + """SQLDataDirectory info. + + :param type: Type of data directory mapping. Possible values include: + 'Invalid', 'Data', 'Log' + :type type: str or + ~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectoryType + :param path: File path + :type path: str + :param logical_name: Logical name of the file + :type logical_name: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, + 'logical_name': {'key': 'logicalName', 'type': 'str'}, + } + + def __init__(self, *, type=None, path: str=None, logical_name: str=None, **kwargs) -> None: + super(SQLDataDirectory, self).__init__(**kwargs) + self.type = type + self.path = path + self.logical_name = logical_name diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/sub_protection_policy.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/sub_protection_policy.py new file mode 100644 index 000000000000..f7216d1ac89a --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/sub_protection_policy.py @@ -0,0 +1,40 @@ +# 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 SubProtectionPolicy(Model): + """Sub-protection policy which includes schedule and retention. + + :param policy_type: Type of backup policy type + :type policy_type: str + :param schedule_policy: Backup schedule specified as part of backup + policy. + :type schedule_policy: + ~azure.mgmt.recoveryservicesbackup.models.SchedulePolicy + :param retention_policy: Retention policy with the details on backup copy + retention ranges. + :type retention_policy: + ~azure.mgmt.recoveryservicesbackup.models.RetentionPolicy + """ + + _attribute_map = { + 'policy_type': {'key': 'policyType', 'type': 'str'}, + 'schedule_policy': {'key': 'schedulePolicy', 'type': 'SchedulePolicy'}, + 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, + } + + def __init__(self, **kwargs): + super(SubProtectionPolicy, self).__init__(**kwargs) + self.policy_type = kwargs.get('policy_type', None) + self.schedule_policy = kwargs.get('schedule_policy', None) + self.retention_policy = kwargs.get('retention_policy', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/sub_protection_policy_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/sub_protection_policy_py3.py new file mode 100644 index 000000000000..3744766dcefd --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/sub_protection_policy_py3.py @@ -0,0 +1,40 @@ +# 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 SubProtectionPolicy(Model): + """Sub-protection policy which includes schedule and retention. + + :param policy_type: Type of backup policy type + :type policy_type: str + :param schedule_policy: Backup schedule specified as part of backup + policy. + :type schedule_policy: + ~azure.mgmt.recoveryservicesbackup.models.SchedulePolicy + :param retention_policy: Retention policy with the details on backup copy + retention ranges. + :type retention_policy: + ~azure.mgmt.recoveryservicesbackup.models.RetentionPolicy + """ + + _attribute_map = { + 'policy_type': {'key': 'policyType', 'type': 'str'}, + 'schedule_policy': {'key': 'schedulePolicy', 'type': 'SchedulePolicy'}, + 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, + } + + def __init__(self, *, policy_type: str=None, schedule_policy=None, retention_policy=None, **kwargs) -> None: + super(SubProtectionPolicy, self).__init__(**kwargs) + self.policy_type = policy_type + self.schedule_policy = schedule_policy + self.retention_policy = retention_policy diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/target_afs_restore_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/target_afs_restore_info.py new file mode 100644 index 000000000000..2df823901d50 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/target_afs_restore_info.py @@ -0,0 +1,32 @@ +# 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 TargetAFSRestoreInfo(Model): + """Target Azure File Share Info. + + :param name: File share name + :type name: str + :param target_resource_id: Target file share resource ARM ID + :type target_resource_id: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TargetAFSRestoreInfo, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.target_resource_id = kwargs.get('target_resource_id', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/target_afs_restore_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/target_afs_restore_info_py3.py new file mode 100644 index 000000000000..91c8c8dc786d --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/target_afs_restore_info_py3.py @@ -0,0 +1,32 @@ +# 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 TargetAFSRestoreInfo(Model): + """Target Azure File Share Info. + + :param name: File share name + :type name: str + :param target_resource_id: Target file share resource ARM ID + :type target_resource_id: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, target_resource_id: str=None, **kwargs) -> None: + super(TargetAFSRestoreInfo, self).__init__(**kwargs) + self.name = name + self.target_resource_id = target_resource_id diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/target_restore_info.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/target_restore_info.py new file mode 100644 index 000000000000..de2d8363ff7b --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/target_restore_info.py @@ -0,0 +1,39 @@ +# 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 TargetRestoreInfo(Model): + """Details about target workload during restore operation. + + :param overwrite_option: Can Overwrite if Target DataBase already exists. + Possible values include: 'Invalid', 'FailOnConflict', 'Overwrite' + :type overwrite_option: str or + ~azure.mgmt.recoveryservicesbackup.models.OverwriteOptions + :param container_id: Resource Id name of the container in which Target + DataBase resides + :type container_id: str + :param database_name: Database name SQL InstanceName/DataBaseName + :type database_name: str + """ + + _attribute_map = { + 'overwrite_option': {'key': 'overwriteOption', 'type': 'str'}, + 'container_id': {'key': 'containerId', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TargetRestoreInfo, self).__init__(**kwargs) + self.overwrite_option = kwargs.get('overwrite_option', None) + self.container_id = kwargs.get('container_id', None) + self.database_name = kwargs.get('database_name', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/target_restore_info_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/target_restore_info_py3.py new file mode 100644 index 000000000000..717765ad36ac --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/target_restore_info_py3.py @@ -0,0 +1,39 @@ +# 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 TargetRestoreInfo(Model): + """Details about target workload during restore operation. + + :param overwrite_option: Can Overwrite if Target DataBase already exists. + Possible values include: 'Invalid', 'FailOnConflict', 'Overwrite' + :type overwrite_option: str or + ~azure.mgmt.recoveryservicesbackup.models.OverwriteOptions + :param container_id: Resource Id name of the container in which Target + DataBase resides + :type container_id: str + :param database_name: Database name SQL InstanceName/DataBaseName + :type database_name: str + """ + + _attribute_map = { + 'overwrite_option': {'key': 'overwriteOption', 'type': 'str'}, + 'container_id': {'key': 'containerId', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + } + + def __init__(self, *, overwrite_option=None, container_id: str=None, database_name: str=None, **kwargs) -> None: + super(TargetRestoreInfo, self).__init__(**kwargs) + self.overwrite_option = overwrite_option + self.container_id = container_id + self.database_name = database_name diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/token_information.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/token_information.py index 8c8c0d6349ab..d374326d5884 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/token_information.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/token_information.py @@ -29,7 +29,8 @@ class TokenInformation(Model): 'security_pin': {'key': 'securityPIN', 'type': 'str'}, } - def __init__(self, token=None, expiry_time_in_utc_ticks=None, security_pin=None): - self.token = token - self.expiry_time_in_utc_ticks = expiry_time_in_utc_ticks - self.security_pin = security_pin + def __init__(self, **kwargs): + super(TokenInformation, self).__init__(**kwargs) + self.token = kwargs.get('token', None) + self.expiry_time_in_utc_ticks = kwargs.get('expiry_time_in_utc_ticks', None) + self.security_pin = kwargs.get('security_pin', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/token_information_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/token_information_py3.py new file mode 100644 index 000000000000..566366c0b1a4 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/token_information_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class TokenInformation(Model): + """The token information details. + + :param token: Token value. + :type token: str + :param expiry_time_in_utc_ticks: Expiry time of token. + :type expiry_time_in_utc_ticks: long + :param security_pin: Security PIN + :type security_pin: str + """ + + _attribute_map = { + 'token': {'key': 'token', 'type': 'str'}, + 'expiry_time_in_utc_ticks': {'key': 'expiryTimeInUtcTicks', 'type': 'long'}, + 'security_pin': {'key': 'securityPIN', 'type': 'str'}, + } + + def __init__(self, *, token: str=None, expiry_time_in_utc_ticks: int=None, security_pin: str=None, **kwargs) -> None: + super(TokenInformation, self).__init__(**kwargs) + self.token = token + self.expiry_time_in_utc_ticks = expiry_time_in_utc_ticks + self.security_pin = security_pin diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/weekly_retention_format.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/weekly_retention_format.py index c2142f048f6b..71938a69bb68 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/weekly_retention_format.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/weekly_retention_format.py @@ -16,11 +16,11 @@ class WeeklyRetentionFormat(Model): """Weekly retention format. :param days_of_the_week: List of days of the week. - :type days_of_the_week: list of str or :class:`DayOfWeek - ` + :type days_of_the_week: list[str or + ~azure.mgmt.recoveryservicesbackup.models.DayOfWeek] :param weeks_of_the_month: List of weeks of month. - :type weeks_of_the_month: list of str or :class:`WeekOfMonth - ` + :type weeks_of_the_month: list[str or + ~azure.mgmt.recoveryservicesbackup.models.WeekOfMonth] """ _attribute_map = { @@ -28,6 +28,7 @@ class WeeklyRetentionFormat(Model): 'weeks_of_the_month': {'key': 'weeksOfTheMonth', 'type': '[WeekOfMonth]'}, } - def __init__(self, days_of_the_week=None, weeks_of_the_month=None): - self.days_of_the_week = days_of_the_week - self.weeks_of_the_month = weeks_of_the_month + def __init__(self, **kwargs): + super(WeeklyRetentionFormat, self).__init__(**kwargs) + self.days_of_the_week = kwargs.get('days_of_the_week', None) + self.weeks_of_the_month = kwargs.get('weeks_of_the_month', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/weekly_retention_format_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/weekly_retention_format_py3.py new file mode 100644 index 000000000000..5c1349e58fa5 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/weekly_retention_format_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class WeeklyRetentionFormat(Model): + """Weekly retention format. + + :param days_of_the_week: List of days of the week. + :type days_of_the_week: list[str or + ~azure.mgmt.recoveryservicesbackup.models.DayOfWeek] + :param weeks_of_the_month: List of weeks of month. + :type weeks_of_the_month: list[str or + ~azure.mgmt.recoveryservicesbackup.models.WeekOfMonth] + """ + + _attribute_map = { + 'days_of_the_week': {'key': 'daysOfTheWeek', 'type': '[DayOfWeek]'}, + 'weeks_of_the_month': {'key': 'weeksOfTheMonth', 'type': '[WeekOfMonth]'}, + } + + def __init__(self, *, days_of_the_week=None, weeks_of_the_month=None, **kwargs) -> None: + super(WeeklyRetentionFormat, self).__init__(**kwargs) + self.days_of_the_week = days_of_the_week + self.weeks_of_the_month = weeks_of_the_month diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/weekly_retention_schedule.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/weekly_retention_schedule.py index d255e1d365a4..895e178e6bf2 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/weekly_retention_schedule.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/weekly_retention_schedule.py @@ -16,13 +16,13 @@ class WeeklyRetentionSchedule(Model): """Weekly retention schedule. :param days_of_the_week: List of days of week for weekly retention policy. - :type days_of_the_week: list of str or :class:`DayOfWeek - ` + :type days_of_the_week: list[str or + ~azure.mgmt.recoveryservicesbackup.models.DayOfWeek] :param retention_times: Retention times of retention policy. - :type retention_times: list of datetime + :type retention_times: list[datetime] :param retention_duration: Retention duration of retention Policy. - :type retention_duration: :class:`RetentionDuration - ` + :type retention_duration: + ~azure.mgmt.recoveryservicesbackup.models.RetentionDuration """ _attribute_map = { @@ -31,7 +31,8 @@ class WeeklyRetentionSchedule(Model): 'retention_duration': {'key': 'retentionDuration', 'type': 'RetentionDuration'}, } - def __init__(self, days_of_the_week=None, retention_times=None, retention_duration=None): - self.days_of_the_week = days_of_the_week - self.retention_times = retention_times - self.retention_duration = retention_duration + def __init__(self, **kwargs): + super(WeeklyRetentionSchedule, self).__init__(**kwargs) + self.days_of_the_week = kwargs.get('days_of_the_week', None) + self.retention_times = kwargs.get('retention_times', None) + self.retention_duration = kwargs.get('retention_duration', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/weekly_retention_schedule_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/weekly_retention_schedule_py3.py new file mode 100644 index 000000000000..d8c8c677cc33 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/weekly_retention_schedule_py3.py @@ -0,0 +1,38 @@ +# 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 WeeklyRetentionSchedule(Model): + """Weekly retention schedule. + + :param days_of_the_week: List of days of week for weekly retention policy. + :type days_of_the_week: list[str or + ~azure.mgmt.recoveryservicesbackup.models.DayOfWeek] + :param retention_times: Retention times of retention policy. + :type retention_times: list[datetime] + :param retention_duration: Retention duration of retention Policy. + :type retention_duration: + ~azure.mgmt.recoveryservicesbackup.models.RetentionDuration + """ + + _attribute_map = { + 'days_of_the_week': {'key': 'daysOfTheWeek', 'type': '[DayOfWeek]'}, + 'retention_times': {'key': 'retentionTimes', 'type': '[iso-8601]'}, + 'retention_duration': {'key': 'retentionDuration', 'type': 'RetentionDuration'}, + } + + def __init__(self, *, days_of_the_week=None, retention_times=None, retention_duration=None, **kwargs) -> None: + super(WeeklyRetentionSchedule, self).__init__(**kwargs) + self.days_of_the_week = days_of_the_week + self.retention_times = retention_times + self.retention_duration = retention_duration diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_inquiry_details.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_inquiry_details.py new file mode 100644 index 000000000000..904d4f928d74 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_inquiry_details.py @@ -0,0 +1,39 @@ +# 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 WorkloadInquiryDetails(Model): + """Details of an inquired protectable item. + + :param type: Type of the Workload such as SQL, Oracle etc. + :type type: str + :param item_count: Contains the protectable item Count inside this + Container. + :type item_count: long + :param inquiry_validation: Inquiry validation such as permissions and + other backup validations. + :type inquiry_validation: + ~azure.mgmt.recoveryservicesbackup.models.InquiryValidation + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'item_count': {'key': 'itemCount', 'type': 'long'}, + 'inquiry_validation': {'key': 'inquiryValidation', 'type': 'InquiryValidation'}, + } + + def __init__(self, **kwargs): + super(WorkloadInquiryDetails, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.item_count = kwargs.get('item_count', None) + self.inquiry_validation = kwargs.get('inquiry_validation', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_inquiry_details_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_inquiry_details_py3.py new file mode 100644 index 000000000000..606ba73009c2 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_inquiry_details_py3.py @@ -0,0 +1,39 @@ +# 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 WorkloadInquiryDetails(Model): + """Details of an inquired protectable item. + + :param type: Type of the Workload such as SQL, Oracle etc. + :type type: str + :param item_count: Contains the protectable item Count inside this + Container. + :type item_count: long + :param inquiry_validation: Inquiry validation such as permissions and + other backup validations. + :type inquiry_validation: + ~azure.mgmt.recoveryservicesbackup.models.InquiryValidation + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'item_count': {'key': 'itemCount', 'type': 'long'}, + 'inquiry_validation': {'key': 'inquiryValidation', 'type': 'InquiryValidation'}, + } + + def __init__(self, *, type: str=None, item_count: int=None, inquiry_validation=None, **kwargs) -> None: + super(WorkloadInquiryDetails, self).__init__(**kwargs) + self.type = type + self.item_count = item_count + self.inquiry_validation = inquiry_validation diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_item.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_item.py new file mode 100644 index 000000000000..0966118947b3 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_item.py @@ -0,0 +1,62 @@ +# 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 WorkloadItem(Model): + """Base class for backup item. Workload-specific backup items are derived from + this class. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureVmWorkloadItem + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent to backup an + item. + :type backup_management_type: str + :param workload_type: Type of workload for the backup management + :type workload_type: str + :param friendly_name: Friendly name of the backup item. + :type friendly_name: str + :param protection_state: State of the back up item. Possible values + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param workload_item_type: Required. Constant filled by server. + :type workload_item_type: str + """ + + _validation = { + 'workload_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, + } + + _subtype_map = { + 'workload_item_type': {'AzureVmWorkloadItem': 'AzureVmWorkloadItem'} + } + + def __init__(self, **kwargs): + super(WorkloadItem, self).__init__(**kwargs) + self.backup_management_type = kwargs.get('backup_management_type', None) + self.workload_type = kwargs.get('workload_type', None) + self.friendly_name = kwargs.get('friendly_name', None) + self.protection_state = kwargs.get('protection_state', None) + self.workload_item_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_item_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_item_py3.py new file mode 100644 index 000000000000..9b626bb29da0 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_item_py3.py @@ -0,0 +1,62 @@ +# 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 WorkloadItem(Model): + """Base class for backup item. Workload-specific backup items are derived from + this class. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureVmWorkloadItem + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent to backup an + item. + :type backup_management_type: str + :param workload_type: Type of workload for the backup management + :type workload_type: str + :param friendly_name: Friendly name of the backup item. + :type friendly_name: str + :param protection_state: State of the back up item. Possible values + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param workload_item_type: Required. Constant filled by server. + :type workload_item_type: str + """ + + _validation = { + 'workload_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, + } + + _subtype_map = { + 'workload_item_type': {'AzureVmWorkloadItem': 'AzureVmWorkloadItem'} + } + + def __init__(self, *, backup_management_type: str=None, workload_type: str=None, friendly_name: str=None, protection_state=None, **kwargs) -> None: + super(WorkloadItem, self).__init__(**kwargs) + self.backup_management_type = backup_management_type + self.workload_type = workload_type + self.friendly_name = friendly_name + self.protection_state = protection_state + self.workload_item_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_item_resource.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_item_resource.py new file mode 100644 index 000000000000..500a60c0793d --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_item_resource.py @@ -0,0 +1,57 @@ +# 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 WorkloadItemResource(Resource): + """Base class for backup item. Workload-specific backup items are derived from + this class. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param e_tag: Optional ETag. + :type e_tag: str + :param properties: WorkloadItemResource properties + :type properties: ~azure.mgmt.recoveryservicesbackup.models.WorkloadItem + """ + + _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}'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'WorkloadItem'}, + } + + def __init__(self, **kwargs): + super(WorkloadItemResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_item_resource_paged.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_item_resource_paged.py new file mode 100644 index 000000000000..65ead95f1d13 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_item_resource_paged.py @@ -0,0 +1,27 @@ +# 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 WorkloadItemResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`WorkloadItemResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[WorkloadItemResource]'} + } + + def __init__(self, *args, **kwargs): + + super(WorkloadItemResourcePaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_item_resource_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_item_resource_py3.py new file mode 100644 index 000000000000..d0c63881cded --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_item_resource_py3.py @@ -0,0 +1,57 @@ +# 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 WorkloadItemResource(Resource): + """Base class for backup item. Workload-specific backup items are derived from + this class. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param e_tag: Optional ETag. + :type e_tag: str + :param properties: WorkloadItemResource properties + :type properties: ~azure.mgmt.recoveryservicesbackup.models.WorkloadItem + """ + + _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}'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'WorkloadItem'}, + } + + def __init__(self, *, location: str=None, tags=None, e_tag: str=None, properties=None, **kwargs) -> None: + super(WorkloadItemResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) + self.properties = properties diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_protectable_item.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_protectable_item.py index e7c85c7a89a2..52d521fffb7a 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_protectable_item.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_protectable_item.py @@ -16,16 +16,25 @@ class WorkloadProtectableItem(Model): """Base class for backup item. Workload-specific backup items are derived from this class. + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureFileShareProtectableItem, + AzureVmWorkloadProtectableItem, IaaSVMProtectableItem + + All required parameters must be populated in order to send to Azure. + :param backup_management_type: Type of backup managemenent to backup an item. :type backup_management_type: str + :param workload_type: Type of workload for the backup management + :type workload_type: str :param friendly_name: Friendly name of the backup item. :type friendly_name: str :param protection_state: State of the back up item. Possible values - include: 'Invalid', 'NotProtected', 'Protecting', 'Protected' - :type protection_state: str or :class:`ProtectionStatus - ` - :param protectable_item_type: Polymorphic Discriminator + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param protectable_item_type: Required. Constant filled by server. :type protectable_item_type: str """ @@ -35,17 +44,20 @@ class WorkloadProtectableItem(Model): _attribute_map = { 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'protection_state': {'key': 'protectionState', 'type': 'str'}, 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, } _subtype_map = { - 'protectable_item_type': {'IaaSVMProtectableItem': 'IaaSVMProtectableItem'} + 'protectable_item_type': {'AzureFileShare': 'AzureFileShareProtectableItem', 'AzureVmWorkloadProtectableItem': 'AzureVmWorkloadProtectableItem', 'IaaSVMProtectableItem': 'IaaSVMProtectableItem'} } - def __init__(self, backup_management_type=None, friendly_name=None, protection_state=None): - self.backup_management_type = backup_management_type - self.friendly_name = friendly_name - self.protection_state = protection_state + def __init__(self, **kwargs): + super(WorkloadProtectableItem, self).__init__(**kwargs) + self.backup_management_type = kwargs.get('backup_management_type', None) + self.workload_type = kwargs.get('workload_type', None) + self.friendly_name = kwargs.get('friendly_name', None) + self.protection_state = kwargs.get('protection_state', None) self.protectable_item_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_protectable_item_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_protectable_item_py3.py new file mode 100644 index 000000000000..21634dde1967 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_protectable_item_py3.py @@ -0,0 +1,63 @@ +# 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 WorkloadProtectableItem(Model): + """Base class for backup item. Workload-specific backup items are derived from + this class. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureFileShareProtectableItem, + AzureVmWorkloadProtectableItem, IaaSVMProtectableItem + + All required parameters must be populated in order to send to Azure. + + :param backup_management_type: Type of backup managemenent to backup an + item. + :type backup_management_type: str + :param workload_type: Type of workload for the backup management + :type workload_type: str + :param friendly_name: Friendly name of the backup item. + :type friendly_name: str + :param protection_state: State of the back up item. Possible values + include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', + 'ProtectionFailed' + :type protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :param protectable_item_type: Required. Constant filled by server. + :type protectable_item_type: str + """ + + _validation = { + 'protectable_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, + } + + _subtype_map = { + 'protectable_item_type': {'AzureFileShare': 'AzureFileShareProtectableItem', 'AzureVmWorkloadProtectableItem': 'AzureVmWorkloadProtectableItem', 'IaaSVMProtectableItem': 'IaaSVMProtectableItem'} + } + + def __init__(self, *, backup_management_type: str=None, workload_type: str=None, friendly_name: str=None, protection_state=None, **kwargs) -> None: + super(WorkloadProtectableItem, self).__init__(**kwargs) + self.backup_management_type = backup_management_type + self.workload_type = workload_type + self.friendly_name = friendly_name + self.protection_state = protection_state + self.protectable_item_type = None diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_protectable_item_resource.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_protectable_item_resource.py index 3f2b25637389..f9c8157cb641 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_protectable_item_resource.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_protectable_item_resource.py @@ -29,12 +29,12 @@ class WorkloadProtectableItemResource(Resource): :param location: Resource location. :type location: str :param tags: Resource tags. - :type tags: dict + :type tags: dict[str, str] :param e_tag: Optional ETag. :type e_tag: str :param properties: WorkloadProtectableItemResource properties - :type properties: :class:`WorkloadProtectableItem - ` + :type properties: + ~azure.mgmt.recoveryservicesbackup.models.WorkloadProtectableItem """ _validation = { @@ -53,6 +53,6 @@ class WorkloadProtectableItemResource(Resource): 'properties': {'key': 'properties', 'type': 'WorkloadProtectableItem'}, } - def __init__(self, location=None, tags=None, e_tag=None, properties=None): - super(WorkloadProtectableItemResource, self).__init__(location=location, tags=tags, e_tag=e_tag) - self.properties = properties + def __init__(self, **kwargs): + super(WorkloadProtectableItemResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_protectable_item_resource_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_protectable_item_resource_py3.py new file mode 100644 index 000000000000..7e85377d3499 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/workload_protectable_item_resource_py3.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class WorkloadProtectableItemResource(Resource): + """Base class for backup item. Workload-specific backup items are derived from + this class. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param e_tag: Optional ETag. + :type e_tag: str + :param properties: WorkloadProtectableItemResource properties + :type properties: + ~azure.mgmt.recoveryservicesbackup.models.WorkloadProtectableItem + """ + + _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}'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'WorkloadProtectableItem'}, + } + + def __init__(self, *, location: str=None, tags=None, e_tag: str=None, properties=None, **kwargs) -> None: + super(WorkloadProtectableItemResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) + self.properties = properties diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/yearly_retention_schedule.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/yearly_retention_schedule.py index f2bcff19392f..c099a59effe0 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/yearly_retention_schedule.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/yearly_retention_schedule.py @@ -19,24 +19,23 @@ class YearlyRetentionSchedule(Model): yearly retention policy. Possible values include: 'Invalid', 'Daily', 'Weekly' :type retention_schedule_format_type: str or - :class:`RetentionScheduleFormat - ` + ~azure.mgmt.recoveryservicesbackup.models.RetentionScheduleFormat :param months_of_year: List of months of year of yearly retention policy. - :type months_of_year: list of str or :class:`MonthOfYear - ` + :type months_of_year: list[str or + ~azure.mgmt.recoveryservicesbackup.models.MonthOfYear] :param retention_schedule_daily: Daily retention format for yearly retention policy. - :type retention_schedule_daily: :class:`DailyRetentionFormat - ` + :type retention_schedule_daily: + ~azure.mgmt.recoveryservicesbackup.models.DailyRetentionFormat :param retention_schedule_weekly: Weekly retention format for yearly retention policy. - :type retention_schedule_weekly: :class:`WeeklyRetentionFormat - ` + :type retention_schedule_weekly: + ~azure.mgmt.recoveryservicesbackup.models.WeeklyRetentionFormat :param retention_times: Retention times of retention policy. - :type retention_times: list of datetime + :type retention_times: list[datetime] :param retention_duration: Retention duration of retention Policy. - :type retention_duration: :class:`RetentionDuration - ` + :type retention_duration: + ~azure.mgmt.recoveryservicesbackup.models.RetentionDuration """ _attribute_map = { @@ -48,10 +47,11 @@ class YearlyRetentionSchedule(Model): 'retention_duration': {'key': 'retentionDuration', 'type': 'RetentionDuration'}, } - def __init__(self, retention_schedule_format_type=None, months_of_year=None, retention_schedule_daily=None, retention_schedule_weekly=None, retention_times=None, retention_duration=None): - self.retention_schedule_format_type = retention_schedule_format_type - self.months_of_year = months_of_year - self.retention_schedule_daily = retention_schedule_daily - self.retention_schedule_weekly = retention_schedule_weekly - self.retention_times = retention_times - self.retention_duration = retention_duration + def __init__(self, **kwargs): + super(YearlyRetentionSchedule, self).__init__(**kwargs) + self.retention_schedule_format_type = kwargs.get('retention_schedule_format_type', None) + self.months_of_year = kwargs.get('months_of_year', None) + self.retention_schedule_daily = kwargs.get('retention_schedule_daily', None) + self.retention_schedule_weekly = kwargs.get('retention_schedule_weekly', None) + self.retention_times = kwargs.get('retention_times', None) + self.retention_duration = kwargs.get('retention_duration', None) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/yearly_retention_schedule_py3.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/yearly_retention_schedule_py3.py new file mode 100644 index 000000000000..0e4d5e42b653 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/yearly_retention_schedule_py3.py @@ -0,0 +1,57 @@ +# 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 YearlyRetentionSchedule(Model): + """Yearly retention schedule. + + :param retention_schedule_format_type: Retention schedule format for + yearly retention policy. Possible values include: 'Invalid', 'Daily', + 'Weekly' + :type retention_schedule_format_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RetentionScheduleFormat + :param months_of_year: List of months of year of yearly retention policy. + :type months_of_year: list[str or + ~azure.mgmt.recoveryservicesbackup.models.MonthOfYear] + :param retention_schedule_daily: Daily retention format for yearly + retention policy. + :type retention_schedule_daily: + ~azure.mgmt.recoveryservicesbackup.models.DailyRetentionFormat + :param retention_schedule_weekly: Weekly retention format for yearly + retention policy. + :type retention_schedule_weekly: + ~azure.mgmt.recoveryservicesbackup.models.WeeklyRetentionFormat + :param retention_times: Retention times of retention policy. + :type retention_times: list[datetime] + :param retention_duration: Retention duration of retention Policy. + :type retention_duration: + ~azure.mgmt.recoveryservicesbackup.models.RetentionDuration + """ + + _attribute_map = { + 'retention_schedule_format_type': {'key': 'retentionScheduleFormatType', 'type': 'str'}, + 'months_of_year': {'key': 'monthsOfYear', 'type': '[MonthOfYear]'}, + 'retention_schedule_daily': {'key': 'retentionScheduleDaily', 'type': 'DailyRetentionFormat'}, + 'retention_schedule_weekly': {'key': 'retentionScheduleWeekly', 'type': 'WeeklyRetentionFormat'}, + 'retention_times': {'key': 'retentionTimes', 'type': '[iso-8601]'}, + 'retention_duration': {'key': 'retentionDuration', 'type': 'RetentionDuration'}, + } + + def __init__(self, *, retention_schedule_format_type=None, months_of_year=None, retention_schedule_daily=None, retention_schedule_weekly=None, retention_times=None, retention_duration=None, **kwargs) -> None: + super(YearlyRetentionSchedule, self).__init__(**kwargs) + self.retention_schedule_format_type = retention_schedule_format_type + self.months_of_year = months_of_year + self.retention_schedule_daily = retention_schedule_daily + self.retention_schedule_weekly = retention_schedule_weekly + self.retention_times = retention_times + self.retention_duration = retention_duration diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/__init__.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/__init__.py index 85001be77416..f7fa267b884d 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/__init__.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/__init__.py @@ -9,12 +9,22 @@ # regenerated. # -------------------------------------------------------------------------- +from .protection_intent_operations import ProtectionIntentOperations +from .backup_status_operations import BackupStatusOperations +from .feature_support_operations import FeatureSupportOperations from .backup_jobs_operations import BackupJobsOperations from .job_details_operations import JobDetailsOperations +from .export_jobs_operation_results_operations import ExportJobsOperationResultsOperations +from .jobs_operations import JobsOperations +from .backup_policies_operations import BackupPoliciesOperations +from .backup_protected_items_operations import BackupProtectedItemsOperations +from .backup_usage_summaries_operations import BackupUsageSummariesOperations from .backup_resource_vault_configs_operations import BackupResourceVaultConfigsOperations from .backup_engines_operations import BackupEnginesOperations from .protection_container_refresh_operation_results_operations import ProtectionContainerRefreshOperationResultsOperations +from .protectable_containers_operations import ProtectableContainersOperations from .protection_containers_operations import ProtectionContainersOperations +from .backup_workload_items_operations import BackupWorkloadItemsOperations from .protection_container_operation_results_operations import ProtectionContainerOperationResultsOperations from .protected_items_operations import ProtectedItemsOperations from .backups_operations import BackupsOperations @@ -25,29 +35,34 @@ from .restores_operations import RestoresOperations from .job_cancellations_operations import JobCancellationsOperations from .job_operation_results_operations import JobOperationResultsOperations -from .export_jobs_operation_results_operations import ExportJobsOperationResultsOperations -from .jobs_operations import JobsOperations from .backup_operation_results_operations import BackupOperationResultsOperations from .backup_operation_statuses_operations import BackupOperationStatusesOperations -from .backup_policies_operations import BackupPoliciesOperations from .protection_policies_operations import ProtectionPoliciesOperations from .protection_policy_operation_results_operations import ProtectionPolicyOperationResultsOperations from .protection_policy_operation_statuses_operations import ProtectionPolicyOperationStatusesOperations from .backup_protectable_items_operations import BackupProtectableItemsOperations -from .backup_protected_items_operations import BackupProtectedItemsOperations from .backup_protection_containers_operations import BackupProtectionContainersOperations from .security_pi_ns_operations import SecurityPINsOperations from .backup_resource_storage_configs_operations import BackupResourceStorageConfigsOperations -from .backup_usage_summaries_operations import BackupUsageSummariesOperations from .operations import Operations __all__ = [ + 'ProtectionIntentOperations', + 'BackupStatusOperations', + 'FeatureSupportOperations', 'BackupJobsOperations', 'JobDetailsOperations', + 'ExportJobsOperationResultsOperations', + 'JobsOperations', + 'BackupPoliciesOperations', + 'BackupProtectedItemsOperations', + 'BackupUsageSummariesOperations', 'BackupResourceVaultConfigsOperations', 'BackupEnginesOperations', 'ProtectionContainerRefreshOperationResultsOperations', + 'ProtectableContainersOperations', 'ProtectionContainersOperations', + 'BackupWorkloadItemsOperations', 'ProtectionContainerOperationResultsOperations', 'ProtectedItemsOperations', 'BackupsOperations', @@ -58,19 +73,14 @@ 'RestoresOperations', 'JobCancellationsOperations', 'JobOperationResultsOperations', - 'ExportJobsOperationResultsOperations', - 'JobsOperations', 'BackupOperationResultsOperations', 'BackupOperationStatusesOperations', - 'BackupPoliciesOperations', 'ProtectionPoliciesOperations', 'ProtectionPolicyOperationResultsOperations', 'ProtectionPolicyOperationStatusesOperations', 'BackupProtectableItemsOperations', - 'BackupProtectedItemsOperations', 'BackupProtectionContainersOperations', 'SecurityPINsOperations', 'BackupResourceStorageConfigsOperations', - 'BackupUsageSummariesOperations', 'Operations', ] diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_engines_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_engines_operations.py index 0c4b0d7a24b9..a63a7f71b0d9 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_engines_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_engines_operations.py @@ -22,10 +22,12 @@ class BackupEnginesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-12-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -54,17 +56,16 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`BackupEngineBaseResource - ` - :rtype: :class:`BackupEngineBaseResourcePaged - ` + :return: An iterator like instance of BackupEngineBaseResource + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.BackupEngineBaseResourcePaged[~azure.mgmt.recoveryservicesbackup.models.BackupEngineBaseResource] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEngines' + url = self.list.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -97,7 +98,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -115,6 +116,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEngines'} def get( self, vault_name, resource_group_name, backup_engine_name, filter=None, skip_token=None, custom_headers=None, raw=False, **operation_config): @@ -136,17 +138,14 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`BackupEngineBaseResource - ` - or :class:`ClientRawResponse` if - raw=true - :rtype: :class:`BackupEngineBaseResource - ` - or :class:`ClientRawResponse` + :return: BackupEngineBaseResource or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.BackupEngineBaseResource or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEngines/{backupEngineName}' + url = self.get.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -175,7 +174,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -192,3 +191,4 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEngines/{backupEngineName}'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_jobs_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_jobs_operations.py index 4e210638f118..8becb59e8914 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_jobs_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_jobs_operations.py @@ -22,10 +22,12 @@ class BackupJobsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2017-07-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -53,17 +55,16 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`JobResource - ` - :rtype: :class:`JobResourcePaged - ` + :return: An iterator like instance of JobResource + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.JobResourcePaged[~azure.mgmt.recoveryservicesbackup.models.JobResource] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs' + url = self.list.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -96,7 +97,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -114,3 +115,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_operation_results_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_operation_results_operations.py index cd2acf2d1f18..65b149b11607 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_operation_results_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_operation_results_operations.py @@ -22,10 +22,12 @@ class BackupOperationResultsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-12-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -56,15 +58,12 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupOperationResults/{operationId}' + url = self.get.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -89,7 +88,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 202, 204]: exp = CloudError(response) @@ -99,3 +98,4 @@ def get( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupOperationResults/{operationId}'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_operation_statuses_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_operation_statuses_operations.py index 84b722f29058..ee32c4fec0a6 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_operation_statuses_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_operation_statuses_operations.py @@ -22,10 +22,12 @@ class BackupOperationStatusesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-12-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -55,17 +57,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`OperationStatus - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`OperationStatus - ` or - :class:`ClientRawResponse` + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.recoveryservicesbackup.models.OperationStatus or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupOperations/{operationId}' + url = self.get.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -90,7 +88,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -107,3 +105,4 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupOperations/{operationId}'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_policies_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_policies_operations.py index 24f7e7a1f7d6..4130b2e7ea80 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_policies_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_policies_operations.py @@ -22,16 +22,18 @@ class BackupPoliciesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Client Api Version. Constant value: "2016-12-01". + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-07-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2016-12-01" + self.api_version = "2017-07-01" self.config = config @@ -52,17 +54,16 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`ProtectionPolicyResource - ` - :rtype: :class:`ProtectionPolicyResourcePaged - ` + :return: An iterator like instance of ProtectionPolicyResource + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.ProtectionPolicyResourcePaged[~azure.mgmt.recoveryservicesbackup.models.ProtectionPolicyResource] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies' + url = self.list.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -93,7 +94,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -111,3 +112,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_protectable_items_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_protectable_items_operations.py index 9779a51bccc5..f0a4783a523e 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_protectable_items_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_protectable_items_operations.py @@ -22,10 +22,12 @@ class BackupProtectableItemsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-12-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -55,18 +57,16 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of - :class:`WorkloadProtectableItemResource - ` - :rtype: :class:`WorkloadProtectableItemResourcePaged - ` + :return: An iterator like instance of WorkloadProtectableItemResource + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.WorkloadProtectableItemResourcePaged[~azure.mgmt.recoveryservicesbackup.models.WorkloadProtectableItemResource] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectableItems' + url = self.list.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -99,7 +99,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -117,3 +117,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectableItems'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_protected_items_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_protected_items_operations.py index 795ea6e78e38..f2b06237a06a 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_protected_items_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_protected_items_operations.py @@ -22,16 +22,18 @@ class BackupProtectedItemsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Client Api Version. Constant value: "2016-12-01". + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-07-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2016-12-01" + self.api_version = "2017-07-01" self.config = config @@ -54,17 +56,16 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`ProtectedItemResource - ` - :rtype: :class:`ProtectedItemResourcePaged - ` + :return: An iterator like instance of ProtectedItemResource + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemResourcePaged[~azure.mgmt.recoveryservicesbackup.models.ProtectedItemResource] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectedItems' + url = self.list.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -97,7 +98,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -115,3 +116,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectedItems'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_protection_containers_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_protection_containers_operations.py index 908304cbe2f1..dbc03196d434 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_protection_containers_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_protection_containers_operations.py @@ -22,10 +22,12 @@ class BackupProtectionContainersOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-12-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -51,18 +53,16 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of - :class:`ProtectionContainerResource - ` - :rtype: :class:`ProtectionContainerResourcePaged - ` + :return: An iterator like instance of ProtectionContainerResource + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.ProtectionContainerResourcePaged[~azure.mgmt.recoveryservicesbackup.models.ProtectionContainerResource] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectionContainers' + url = self.list.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -93,7 +93,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -111,3 +111,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectionContainers'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_resource_storage_configs_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_resource_storage_configs_operations.py index b4e252698b2a..435b7f4aec9d 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_resource_storage_configs_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_resource_storage_configs_operations.py @@ -22,10 +22,12 @@ class BackupResourceStorageConfigsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-12-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -49,17 +51,14 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`BackupResourceConfigResource - ` - or :class:`ClientRawResponse` if - raw=true - :rtype: :class:`BackupResourceConfigResource - ` - or :class:`ClientRawResponse` + :return: BackupResourceConfigResource or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.BackupResourceConfigResource + or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig' + url = self.get.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -83,7 +82,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -100,9 +99,10 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig'} def update( - self, vault_name, resource_group_name, custom_headers=None, raw=False, **operation_config): + self, vault_name, resource_group_name, parameters, custom_headers=None, raw=False, **operation_config): """Updates vault storage model type. :param vault_name: The name of the recovery services vault. @@ -110,20 +110,20 @@ def update( :param resource_group_name: The name of the resource group where the recovery services vault is present. :type resource_group_name: str + :param parameters: Vault storage config request + :type parameters: + ~azure.mgmt.recoveryservicesbackup.models.BackupResourceConfigResource :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 - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig' + url = self.update.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -145,9 +145,13 @@ def update( 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, 'BackupResourceConfigResource') + # Construct and send request request = self._client.patch(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [204]: exp = CloudError(response) @@ -157,3 +161,4 @@ def update( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + update.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_resource_vault_configs_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_resource_vault_configs_operations.py index c6268b88622b..da652c2678d8 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_resource_vault_configs_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_resource_vault_configs_operations.py @@ -22,10 +22,12 @@ class BackupResourceVaultConfigsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-12-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -49,17 +51,15 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`BackupResourceVaultConfigResource - ` - or :class:`ClientRawResponse` if + :return: BackupResourceVaultConfigResource or ClientRawResponse if raw=true - :rtype: :class:`BackupResourceVaultConfigResource - ` - or :class:`ClientRawResponse` + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.BackupResourceVaultConfigResource + or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig' + url = self.get.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -83,7 +83,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -100,6 +100,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig'} def update( self, vault_name, resource_group_name, parameters, custom_headers=None, raw=False, **operation_config): @@ -111,24 +112,22 @@ def update( recovery services vault is present. :type resource_group_name: str :param parameters: resource config request - :type parameters: :class:`BackupResourceVaultConfigResource - ` + :type parameters: + ~azure.mgmt.recoveryservicesbackup.models.BackupResourceVaultConfigResource :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: :class:`BackupResourceVaultConfigResource - ` - or :class:`ClientRawResponse` if + :return: BackupResourceVaultConfigResource or ClientRawResponse if raw=true - :rtype: :class:`BackupResourceVaultConfigResource - ` - or :class:`ClientRawResponse` + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.BackupResourceVaultConfigResource + or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig' + url = self.update.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -156,7 +155,7 @@ def update( # Construct and send request request = self._client.patch(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -173,3 +172,4 @@ def update( return client_raw_response return deserialized + update.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig'} diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/name_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_status_operations.py similarity index 69% rename from azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/name_operations.py rename to azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_status_operations.py index cb14a1793726..21a5688cf429 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/name_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_status_operations.py @@ -9,56 +9,57 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -import uuid from .. import models -class NameOperations(object): - """NameOperations operations. +class BackupStatusOperations(object): + """BackupStatusOperations operations. :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Client Api Version. Constant value: "2017-04-01". + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-07-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-04-01" + self.api_version = "2017-07-01" self.config = config - def check_availability( - self, name, custom_headers=None, raw=False, **operation_config): - """Checks the availability of the given service namespace across all Azure - subscriptions. This is useful because the domain name is created based - on the service namespace name. + def get( + self, azure_region, parameters, custom_headers=None, raw=False, **operation_config): + """Get the container backup status. - :param name: Resource name - :type name: str + :param azure_region: Azure region to hit Api + :type azure_region: str + :param parameters: Container Backup Status Request + :type parameters: + ~azure.mgmt.recoveryservicesbackup.models.BackupStatusRequest :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`. - :rtype: :class:`CheckNameAvailabilityResponse - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: BackupStatusResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.recoveryservicesbackup.models.BackupStatusResponse + or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - parameters = models.CheckNameAvailabilityRequestParameters(name=name) - # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.NotificationHubs/checkNameAvailability' + url = self.get.metadata['url'] path_format_arguments = { + 'azureRegion': self._serialize.url("azure_region", azure_region, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -78,12 +79,12 @@ def check_availability( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(parameters, 'CheckNameAvailabilityRequestParameters') + body_content = self._serialize.body(parameters, 'BackupStatusRequest') # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -93,10 +94,11 @@ def check_availability( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('CheckNameAvailabilityResponse', response) + deserialized = self._deserialize('BackupStatusResponse', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized + get.metadata = {'url': '/Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupStatus'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_usage_summaries_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_usage_summaries_operations.py index 75e05fe1eafe..d4425f3c9ade 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_usage_summaries_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_usage_summaries_operations.py @@ -22,16 +22,18 @@ class BackupUsageSummariesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Client Api Version. Constant value: "2016-12-01". + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-07-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2016-12-01" + self.api_version = "2017-07-01" self.config = config @@ -53,17 +55,16 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`BackupManagementUsage - ` - :rtype: :class:`BackupManagementUsagePaged - ` + :return: An iterator like instance of BackupManagementUsage + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementUsagePaged[~azure.mgmt.recoveryservicesbackup.models.BackupManagementUsage] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupUsageSummaries' + url = self.list.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -96,7 +97,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -114,3 +115,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupUsageSummaries'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_workload_items_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_workload_items_operations.py new file mode 100644 index 000000000000..1604739bf2f6 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_workload_items_operations.py @@ -0,0 +1,125 @@ +# 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 BackupWorkloadItemsOperations(object): + """BackupWorkloadItemsOperations 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: "2016-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2016-12-01" + + self.config = config + + def list( + self, vault_name, resource_group_name, fabric_name, container_name, filter=None, skip_token=None, custom_headers=None, raw=False, **operation_config): + """Provides a pageable list of workload item of a specific container + according to the query filter and the pagination parameters. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the + recovery services vault is present. + :type resource_group_name: str + :param fabric_name: Fabric name associated with the container. + :type fabric_name: str + :param container_name: Name of the container. + :type container_name: str + :param filter: OData filter options. + :type filter: str + :param skip_token: skipToken Filter. + :type skip_token: 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 WorkloadItemResource + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.WorkloadItemResourcePaged[~azure.mgmt.recoveryservicesbackup.models.WorkloadItemResource] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'fabricName': self._serialize.url("fabric_name", fabric_name, 'str'), + 'containerName': self._serialize.url("container_name", container_name, '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') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, '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.WorkloadItemResourcePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.WorkloadItemResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/items'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backups_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backups_operations.py index 9831450591f0..702c647b69e8 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backups_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backups_operations.py @@ -22,10 +22,12 @@ class BackupsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-12-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -54,22 +56,19 @@ def trigger( triggered. :type protected_item_name: str :param parameters: resource backup request - :type parameters: :class:`BackupRequestResource - ` + :type parameters: + ~azure.mgmt.recoveryservicesbackup.models.BackupRequestResource :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 - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/backup' + url = self.trigger.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -100,7 +99,7 @@ def trigger( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [202]: exp = CloudError(response) @@ -110,3 +109,4 @@ def trigger( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + trigger.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/backup'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/export_jobs_operation_results_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/export_jobs_operation_results_operations.py index 1df9463a014a..2f1818e7f6ff 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/export_jobs_operation_results_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/export_jobs_operation_results_operations.py @@ -22,16 +22,18 @@ class ExportJobsOperationResultsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Client Api Version. Constant value: "2016-12-01". + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-07-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2016-12-01" + self.api_version = "2017-07-01" self.config = config @@ -54,17 +56,15 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`OperationResultInfoBaseResource - ` - or :class:`ClientRawResponse` if + :return: OperationResultInfoBaseResource or ClientRawResponse if raw=true - :rtype: :class:`OperationResultInfoBaseResource - ` - or :class:`ClientRawResponse` + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.OperationResultInfoBaseResource + or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/operationResults/{operationId}' + url = self.get.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -89,7 +89,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 202]: exp = CloudError(response) @@ -100,9 +100,12 @@ def get( if response.status_code == 200: deserialized = self._deserialize('OperationResultInfoBaseResource', response) + if response.status_code == 202: + deserialized = self._deserialize('OperationResultInfoBaseResource', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized + get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/operationResults/{operationId}'} diff --git a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/hubs_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/feature_support_operations.py similarity index 65% rename from azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/hubs_operations.py rename to azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/feature_support_operations.py index 6653fd418b60..82dd110e4f5d 100644 --- a/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/operations/hubs_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/feature_support_operations.py @@ -9,60 +9,60 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -import uuid from .. import models -class HubsOperations(object): - """HubsOperations operations. +class FeatureSupportOperations(object): + """FeatureSupportOperations operations. :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Client Api Version. Constant value: "2017-04-01". + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-07-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-04-01" + self.api_version = "2017-07-01" self.config = config - def check_availability( - self, resource_group_name, namespace_name, name, custom_headers=None, raw=False, **operation_config): - """Checks the availability of the given notificationHub in a namespace. + def validate( + self, azure_region, parameters, custom_headers=None, raw=False, **operation_config): + """It will validate if given feature with resource properties is supported + in service. - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param namespace_name: The namespace name. - :type namespace_name: str - :param name: Resource name - :type name: str + :param azure_region: Azure region to hit Api + :type azure_region: str + :param parameters: Feature support request object + :type parameters: + ~azure.mgmt.recoveryservicesbackup.models.FeatureSupportRequest :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`. - :rtype: :class:`CheckNameAvailabilityResponse - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: AzureVMResourceFeatureSupportResponse or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.AzureVMResourceFeatureSupportResponse + or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - parameters = models.CheckNameAvailabilityRequestParameters(name=name) - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/checkHubAvailability' + url = self.validate.metadata['url'] path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), + 'azureRegion': self._serialize.url("azure_region", azure_region, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -82,12 +82,12 @@ def check_availability( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(parameters, 'CheckNameAvailabilityRequestParameters') + body_content = self._serialize.body(parameters, 'FeatureSupportRequest') # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -97,10 +97,11 @@ def check_availability( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('CheckNameAvailabilityResponse', response) + deserialized = self._deserialize('AzureVMResourceFeatureSupportResponse', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized + validate.metadata = {'url': '/Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupValidateFeatures'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/item_level_recovery_connections_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/item_level_recovery_connections_operations.py index 3d705b6b76eb..f11ed4679319 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/item_level_recovery_connections_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/item_level_recovery_connections_operations.py @@ -22,10 +22,12 @@ class ItemLevelRecoveryConnectionsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-12-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -60,22 +62,19 @@ def provision( data. iSCSI connection will be provisioned for this backed up data. :type recovery_point_id: str :param parameters: resource ILR request - :type parameters: :class:`ILRRequestResource - ` + :type parameters: + ~azure.mgmt.recoveryservicesbackup.models.ILRRequestResource :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 - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/provisionInstantItemRecovery' + url = self.provision.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -107,7 +106,7 @@ def provision( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [202]: exp = CloudError(response) @@ -117,6 +116,7 @@ def provision( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + provision.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/provisionInstantItemRecovery'} def revoke( self, vault_name, resource_group_name, fabric_name, container_name, protected_item_name, recovery_point_id, custom_headers=None, raw=False, **operation_config): @@ -145,15 +145,12 @@ def revoke( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/revokeInstantItemRecovery' + url = self.revoke.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -181,7 +178,7 @@ def revoke( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [202]: exp = CloudError(response) @@ -191,3 +188,4 @@ def revoke( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + revoke.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/revokeInstantItemRecovery'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/job_cancellations_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/job_cancellations_operations.py index 9f40475cd5c4..1418a99a9d3b 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/job_cancellations_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/job_cancellations_operations.py @@ -22,10 +22,12 @@ class JobCancellationsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-12-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -52,15 +54,12 @@ def trigger( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/{jobName}/cancel' + url = self.trigger.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -85,7 +84,7 @@ def trigger( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [202]: exp = CloudError(response) @@ -95,3 +94,4 @@ def trigger( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + trigger.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/{jobName}/cancel'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/job_details_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/job_details_operations.py index 55ca9c37f2e1..bead01dde009 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/job_details_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/job_details_operations.py @@ -22,10 +22,12 @@ class JobDetailsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2017-07-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -51,17 +53,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`JobResource - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`JobResource - ` or - :class:`ClientRawResponse` + :return: JobResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.recoveryservicesbackup.models.JobResource or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/{jobName}' + url = self.get.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -86,7 +84,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -103,3 +101,4 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/{jobName}'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/job_operation_results_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/job_operation_results_operations.py index 46a912da1344..f330e26c026d 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/job_operation_results_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/job_operation_results_operations.py @@ -22,10 +22,12 @@ class JobOperationResultsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-12-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -55,15 +57,12 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/{jobName}/operationResults/{operationId}' + url = self.get.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -89,7 +88,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 202, 204]: exp = CloudError(response) @@ -99,3 +98,4 @@ def get( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/{jobName}/operationResults/{operationId}'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/jobs_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/jobs_operations.py index 87df2e696607..d2d5d6487c42 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/jobs_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/jobs_operations.py @@ -22,16 +22,18 @@ class JobsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Client Api Version. Constant value: "2016-12-01". + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-07-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2016-12-01" + self.api_version = "2017-07-01" self.config = config @@ -52,15 +54,12 @@ def export( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobsExport' + url = self.export.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -86,7 +85,7 @@ def export( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [202]: exp = CloudError(response) @@ -96,3 +95,4 @@ def export( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + export.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobsExport'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/operations.py index d8fd6cf9eb87..a132e003a369 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/operations.py @@ -22,10 +22,12 @@ class Operations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-08-10". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -44,18 +46,16 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of - :class:`ClientDiscoveryValueForSingleApi - ` - :rtype: :class:`ClientDiscoveryValueForSingleApiPaged - ` + :return: An iterator like instance of ClientDiscoveryValueForSingleApi + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.ClientDiscoveryValueForSingleApiPaged[~azure.mgmt.recoveryservicesbackup.models.ClientDiscoveryValueForSingleApi] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/providers/Microsoft.RecoveryServices/operations' + url = self.list.metadata['url'] # Construct parameters query_parameters = {} @@ -78,7 +78,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -96,3 +96,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/providers/Microsoft.RecoveryServices/operations'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protectable_containers_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protectable_containers_operations.py new file mode 100644 index 000000000000..4185ca6b12b8 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protectable_containers_operations.py @@ -0,0 +1,117 @@ +# 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 ProtectableContainersOperations(object): + """ProtectableContainersOperations 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: "2016-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2016-12-01" + + self.config = config + + def list( + self, vault_name, resource_group_name, fabric_name, filter=None, custom_headers=None, raw=False, **operation_config): + """Lists the containers registered to Recovery Services Vault. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the + recovery services vault is present. + :type resource_group_name: str + :param fabric_name: Fabric name associated with the container. + :type fabric_name: str + :param filter: OData filter options. + :type filter: 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 ProtectableContainerResource + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.ProtectableContainerResourcePaged[~azure.mgmt.recoveryservicesbackup.models.ProtectableContainerResource] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'fabricName': self._serialize.url("fabric_name", fabric_name, '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') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, '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.ProtectableContainerResourcePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ProtectableContainerResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectableContainers'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protected_item_operation_results_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protected_item_operation_results_operations.py index 6fa733ad2977..e187c6afe2ab 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protected_item_operation_results_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protected_item_operation_results_operations.py @@ -22,10 +22,12 @@ class ProtectedItemOperationResultsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-12-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -59,17 +61,14 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`ProtectedItemResource - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`ProtectedItemResource - ` or - :class:`ClientRawResponse` + :return: ProtectedItemResource or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemResource or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/operationResults/{operationId}' + url = self.get.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -97,7 +96,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 202, 204]: exp = CloudError(response) @@ -114,3 +113,4 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/operationResults/{operationId}'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protected_item_operation_statuses_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protected_item_operation_statuses_operations.py index 1a2e57aa2492..41e3918f01d5 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protected_item_operation_statuses_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protected_item_operation_statuses_operations.py @@ -22,10 +22,12 @@ class ProtectedItemOperationStatusesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-12-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -63,17 +65,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`OperationStatus - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`OperationStatus - ` or - :class:`ClientRawResponse` + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.recoveryservicesbackup.models.OperationStatus or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/operationsStatus/{operationId}' + url = self.get.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -101,7 +99,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -118,3 +116,4 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/operationsStatus/{operationId}'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protected_items_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protected_items_operations.py index 3d7ce846724c..8ca7cea2a7a1 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protected_items_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protected_items_operations.py @@ -22,10 +22,12 @@ class ProtectedItemsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-12-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -61,17 +63,14 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`ProtectedItemResource - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`ProtectedItemResource - ` or - :class:`ClientRawResponse` + :return: ProtectedItemResource or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemResource or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}' + url = self.get.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -100,7 +99,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -117,6 +116,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}'} def create_or_update( self, vault_name, resource_group_name, fabric_name, container_name, protected_item_name, parameters, custom_headers=None, raw=False, **operation_config): @@ -136,22 +136,19 @@ def create_or_update( :param protected_item_name: Item name to be backed up. :type protected_item_name: str :param parameters: resource backed up item - :type parameters: :class:`ProtectedItemResource - ` + :type parameters: + ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemResource :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 - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -182,7 +179,7 @@ def create_or_update( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [202]: exp = CloudError(response) @@ -192,6 +189,7 @@ def create_or_update( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + create_or_update.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}'} def delete( self, vault_name, resource_group_name, fabric_name, container_name, protected_item_name, custom_headers=None, raw=False, **operation_config): @@ -216,15 +214,12 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}' + url = self.delete.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -251,7 +246,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [202, 204]: exp = CloudError(response) @@ -261,3 +256,4 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protection_container_operation_results_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protection_container_operation_results_operations.py index dc1d310649cd..78fa589157fb 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protection_container_operation_results_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protection_container_operation_results_operations.py @@ -22,10 +22,12 @@ class ProtectionContainerOperationResultsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-12-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -57,17 +59,14 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`ProtectionContainerResource - ` - or :class:`ClientRawResponse` if - raw=true - :rtype: :class:`ProtectionContainerResource - ` - or :class:`ClientRawResponse` + :return: ProtectionContainerResource or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.ProtectionContainerResource + or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/operationResults/{operationId}' + url = self.get.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -94,7 +93,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 202, 204]: exp = CloudError(response) @@ -111,3 +110,4 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/operationResults/{operationId}'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protection_container_refresh_operation_results_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protection_container_refresh_operation_results_operations.py index a6a4628e2387..bbb8db755f04 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protection_container_refresh_operation_results_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protection_container_refresh_operation_results_operations.py @@ -22,10 +22,12 @@ class ProtectionContainerRefreshOperationResultsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-12-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -55,15 +57,12 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/operationResults/{operationId}' + url = self.get.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -89,7 +88,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [202, 204]: exp = CloudError(response) @@ -99,3 +98,4 @@ def get( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/operationResults/{operationId}'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protection_containers_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protection_containers_operations.py index fb54377347d6..f73edffebe68 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protection_containers_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protection_containers_operations.py @@ -22,10 +22,12 @@ class ProtectionContainersOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-12-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -55,17 +57,14 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`ProtectionContainerResource - ` - or :class:`ClientRawResponse` if - raw=true - :rtype: :class:`ProtectionContainerResource - ` - or :class:`ClientRawResponse` + :return: ProtectionContainerResource or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.ProtectionContainerResource + or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}' + url = self.get.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -91,7 +90,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -108,9 +107,220 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}'} + + def register( + self, vault_name, resource_group_name, fabric_name, container_name, parameters, custom_headers=None, raw=False, **operation_config): + """Registers the container with Recovery Services vault. + This is an asynchronous operation. To track the operation status, use + location header to call get latest status of the operation. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the + recovery services vault is present. + :type resource_group_name: str + :param fabric_name: Fabric name associated with the container. + :type fabric_name: str + :param container_name: Name of the container to be registered. + :type container_name: str + :param parameters: Request body for operation + :type parameters: + ~azure.mgmt.recoveryservicesbackup.models.ProtectionContainerResource + :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: ProtectionContainerResource or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.ProtectionContainerResource + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.register.metadata['url'] + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'fabricName': self._serialize.url("fabric_name", fabric_name, 'str'), + 'containerName': self._serialize.url("container_name", container_name, '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, 'ProtectionContainerResource') + + # 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, 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('ProtectionContainerResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + register.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}'} + + def unregister( + self, vault_name, resource_group_name, fabric_name, container_name, custom_headers=None, raw=False, **operation_config): + """Unregisters the given container from your Recovery Services Vault. + This is an asynchronous operation. To determine whether the backend + service has finished processing the request, call Get Container + Operation Result API. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the + recovery services vault is present. + :type resource_group_name: str + :param fabric_name: Name of the fabric where the container belongs. + :type fabric_name: str + :param container_name: Name of the container which needs to be + unregistered from the Recovery Services Vault. + :type container_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.unregister.metadata['url'] + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'fabricName': self._serialize.url("fabric_name", fabric_name, 'str'), + 'containerName': self._serialize.url("container_name", container_name, '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 [202, 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 + unregister.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}'} + + def inquire( + self, vault_name, resource_group_name, fabric_name, container_name, custom_headers=None, raw=False, **operation_config): + """Inquires all the protectable item in the given container that can be + protected. + + Inquires all the protectable items that are protectable under the given + container. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the + recovery services vault is present. + :type resource_group_name: str + :param fabric_name: Fabric Name associated with the container. + :type fabric_name: str + :param container_name: Name of the container in which inquiry needs to + be triggered. + :type container_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.inquire.metadata['url'] + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'fabricName': self._serialize.url("fabric_name", fabric_name, 'str'), + 'containerName': self._serialize.url("container_name", container_name, '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.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [202]: + 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 + inquire.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/inquire'} def refresh( - self, vault_name, resource_group_name, fabric_name, custom_headers=None, raw=False, **operation_config): + self, vault_name, resource_group_name, fabric_name, filter=None, custom_headers=None, raw=False, **operation_config): """Discovers all the containers in the subscription that can be backed up to Recovery Services Vault. This is an asynchronous operation. To know the status of the operation, call GetRefreshOperationResult API. @@ -122,20 +332,19 @@ def refresh( :type resource_group_name: str :param fabric_name: Fabric name associated the container. :type fabric_name: str + :param filter: OData filter options. + :type filter: 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 - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/refreshContainers' + url = self.refresh.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -147,6 +356,8 @@ def refresh( # Construct parameters query_parameters = {} query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') # Construct headers header_parameters = {} @@ -160,7 +371,7 @@ def refresh( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [202]: exp = CloudError(response) @@ -170,3 +381,4 @@ def refresh( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + refresh.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/refreshContainers'} diff --git a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/backup_storage_configs_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protection_intent_operations.py similarity index 56% rename from azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/backup_storage_configs_operations.py rename to azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protection_intent_operations.py index c7a05b95b3cc..bb2b67f38c8e 100644 --- a/azure-mgmt-recoveryservices/azure/mgmt/recoveryservices/operations/backup_storage_configs_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protection_intent_operations.py @@ -16,54 +16,56 @@ from .. import models -class BackupStorageConfigsOperations(object): - """BackupStorageConfigsOperations operations. +class ProtectionIntentOperations(object): + """ProtectionIntentOperations operations. :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Client Api Version. Constant value: "2016-12-01". + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-07-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2016-12-01" + self.api_version = "2017-07-01" self.config = config - def get( - self, resource_group_name, vault_name, custom_headers=None, raw=False, **operation_config): - """Fetches resource storage config. - - :param resource_group_name: The name of the resource group where the - recovery services vault is present. - :type resource_group_name: str - :param vault_name: The name of the recovery services vault. - :type vault_name: str + def validate( + self, azure_region, parameters, custom_headers=None, raw=False, **operation_config): + """It will validate followings + 1. Vault capacity + 2. VM is already protected + 3. Any VM related configuration passed in properties. + + :param azure_region: Azure region to hit Api + :type azure_region: str + :param parameters: Enable backup validation request on Virtual Machine + :type parameters: + ~azure.mgmt.recoveryservicesbackup.models.PreValidateEnableBackupRequest :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: :class:`BackupStorageConfig - ` or - :class:`ClientRawResponse` if + :return: PreValidateEnableBackupResponse or ClientRawResponse if raw=true - :rtype: :class:`BackupStorageConfig - ` or - :class:`ClientRawResponse` + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.PreValidateEnableBackupResponse + or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig' + url = self.validate.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vaultName': self._serialize.url("vault_name", vault_name, 'str') + 'azureRegion': self._serialize.url("azure_region", azure_region, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -81,9 +83,13 @@ def get( 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, 'PreValidateEnableBackupRequest') + # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + 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]: exp = CloudError(response) @@ -93,44 +99,51 @@ def get( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('BackupStorageConfig', response) + deserialized = self._deserialize('PreValidateEnableBackupResponse', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized + validate.metadata = {'url': '/Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupPreValidateProtection'} - def update( - self, resource_group_name, vault_name, backup_storage_config, custom_headers=None, raw=False, **operation_config): - """Updates vault storage model type. + def create_or_update( + self, vault_name, resource_group_name, fabric_name, intent_object_name, parameters, custom_headers=None, raw=False, **operation_config): + """Create Intent for Enabling backup of an item. This is a synchronous + operation. + :param vault_name: The name of the recovery services vault. + :type vault_name: str :param resource_group_name: The name of the resource group where the recovery services vault is present. :type resource_group_name: str - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param backup_storage_config: Backup storage config. - :type backup_storage_config: :class:`BackupStorageConfig - ` + :param fabric_name: Fabric name associated with the backup item. + :type fabric_name: str + :param intent_object_name: Intent object name. + :type intent_object_name: str + :param parameters: resource backed up item + :type parameters: + ~azure.mgmt.recoveryservicesbackup.models.ProtectionIntentResource :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 - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: ProtectionIntentResource or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.ProtectionIntentResource or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig' + url = self.create_or_update.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vaultName': self._serialize.url("vault_name", vault_name, 'str') + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'fabricName': self._serialize.url("fabric_name", fabric_name, 'str'), + 'intentObjectName': self._serialize.url("intent_object_name", intent_object_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -149,18 +162,26 @@ def update( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(backup_storage_config, 'BackupStorageConfig') + body_content = self._serialize.body(parameters, 'ProtectionIntentResource') # Construct and send request - request = self._client.patch(url, query_parameters) + request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) - if response.status_code not in [204]: + 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('ProtectionIntentResource', response) + if raw: - client_raw_response = ClientRawResponse(None, response) + client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/backupProtectionIntent/{intentObjectName}'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protection_policies_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protection_policies_operations.py index dc61b90e00a7..373374d563ea 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protection_policies_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protection_policies_operations.py @@ -22,10 +22,12 @@ class ProtectionPoliciesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-12-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -53,17 +55,14 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`ProtectionPolicyResource - ` - or :class:`ClientRawResponse` if - raw=true - :rtype: :class:`ProtectionPolicyResource - ` - or :class:`ClientRawResponse` + :return: ProtectionPolicyResource or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.ProtectionPolicyResource or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}' + url = self.get.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -88,7 +87,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -105,6 +104,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}'} def create_or_update( self, vault_name, resource_group_name, policy_name, parameters, custom_headers=None, raw=False, **operation_config): @@ -120,24 +120,21 @@ def create_or_update( :param policy_name: Backup policy to be created. :type policy_name: str :param parameters: resource backup policy - :type parameters: :class:`ProtectionPolicyResource - ` + :type parameters: + ~azure.mgmt.recoveryservicesbackup.models.ProtectionPolicyResource :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: :class:`ProtectionPolicyResource - ` - or :class:`ClientRawResponse` if - raw=true - :rtype: :class:`ProtectionPolicyResource - ` - or :class:`ClientRawResponse` + :return: ProtectionPolicyResource or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.ProtectionPolicyResource or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -166,7 +163,7 @@ def create_or_update( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 202]: exp = CloudError(response) @@ -183,6 +180,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}'} def delete( self, vault_name, resource_group_name, policy_name, custom_headers=None, raw=False, **operation_config): @@ -202,15 +200,12 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}' + url = self.delete.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -235,7 +230,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -245,3 +240,4 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protection_policy_operation_results_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protection_policy_operation_results_operations.py index fe1bb58370f7..1f4a02cdd591 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protection_policy_operation_results_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protection_policy_operation_results_operations.py @@ -22,10 +22,12 @@ class ProtectionPolicyOperationResultsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-12-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -55,17 +57,14 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`ProtectionPolicyResource - ` - or :class:`ClientRawResponse` if - raw=true - :rtype: :class:`ProtectionPolicyResource - ` - or :class:`ClientRawResponse` + :return: ProtectionPolicyResource or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.ProtectionPolicyResource or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}/operationResults/{operationId}' + url = self.get.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -91,7 +90,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -108,3 +107,4 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}/operationResults/{operationId}'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protection_policy_operation_statuses_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protection_policy_operation_statuses_operations.py index 2fd99d246fe7..343cdce6fbf6 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protection_policy_operation_statuses_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protection_policy_operation_statuses_operations.py @@ -22,10 +22,12 @@ class ProtectionPolicyOperationStatusesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-12-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -59,17 +61,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`OperationStatus - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`OperationStatus - ` or - :class:`ClientRawResponse` + :return: OperationStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.recoveryservicesbackup.models.OperationStatus or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}/operations/{operationId}' + url = self.get.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -95,7 +93,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -112,3 +110,4 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}/operations/{operationId}'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/recovery_points_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/recovery_points_operations.py index 749264fc4c59..cd2043bc36d9 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/recovery_points_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/recovery_points_operations.py @@ -22,10 +22,12 @@ class RecoveryPointsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-12-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -59,17 +61,16 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`RecoveryPointResource - ` - :rtype: :class:`RecoveryPointResourcePaged - ` + :return: An iterator like instance of RecoveryPointResource + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointResourcePaged[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointResource] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints' + url = self.list.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -103,7 +104,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -121,6 +122,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints'} def get( self, vault_name, resource_group_name, fabric_name, container_name, protected_item_name, recovery_point_id, custom_headers=None, raw=False, **operation_config): @@ -148,17 +150,14 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`RecoveryPointResource - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`RecoveryPointResource - ` or - :class:`ClientRawResponse` + :return: RecoveryPointResource or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointResource or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}' + url = self.get.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -186,7 +185,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -203,3 +202,4 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/restores_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/restores_operations.py index f18eaca82514..c003b9bdf2f4 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/restores_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/restores_operations.py @@ -22,10 +22,12 @@ class RestoresOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-12-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -57,22 +59,19 @@ def trigger( backed up data to be restored. :type recovery_point_id: str :param parameters: resource restore request - :type parameters: :class:`RestoreRequestResource - ` + :type parameters: + ~azure.mgmt.recoveryservicesbackup.models.RestoreRequestResource :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 - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/restore' + url = self.trigger.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -104,7 +103,7 @@ def trigger( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [202]: exp = CloudError(response) @@ -114,3 +113,4 @@ def trigger( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + trigger.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/restore'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/security_pi_ns_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/security_pi_ns_operations.py index a619ae5c3e0d..e73066c76107 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/security_pi_ns_operations.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/security_pi_ns_operations.py @@ -22,10 +22,12 @@ class SecurityPINsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2016-12-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -49,17 +51,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`TokenInformation - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`TokenInformation - ` or - :class:`ClientRawResponse` + :return: TokenInformation or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.recoveryservicesbackup.models.TokenInformation or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupSecurityPIN' + url = self.get.metadata['url'] path_format_arguments = { 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -83,7 +81,7 @@ def get( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -100,3 +98,4 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupSecurityPIN'} diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/recovery_services_backup_client.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/recovery_services_backup_client.py index 1aaabce4718f..d2bcb730f586 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/recovery_services_backup_client.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/recovery_services_backup_client.py @@ -9,16 +9,26 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import ServiceClient +from msrest.service_client import SDKClient from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION +from .operations.protection_intent_operations import ProtectionIntentOperations +from .operations.backup_status_operations import BackupStatusOperations +from .operations.feature_support_operations import FeatureSupportOperations from .operations.backup_jobs_operations import BackupJobsOperations from .operations.job_details_operations import JobDetailsOperations +from .operations.export_jobs_operation_results_operations import ExportJobsOperationResultsOperations +from .operations.jobs_operations import JobsOperations +from .operations.backup_policies_operations import BackupPoliciesOperations +from .operations.backup_protected_items_operations import BackupProtectedItemsOperations +from .operations.backup_usage_summaries_operations import BackupUsageSummariesOperations from .operations.backup_resource_vault_configs_operations import BackupResourceVaultConfigsOperations from .operations.backup_engines_operations import BackupEnginesOperations from .operations.protection_container_refresh_operation_results_operations import ProtectionContainerRefreshOperationResultsOperations +from .operations.protectable_containers_operations import ProtectableContainersOperations from .operations.protection_containers_operations import ProtectionContainersOperations +from .operations.backup_workload_items_operations import BackupWorkloadItemsOperations from .operations.protection_container_operation_results_operations import ProtectionContainerOperationResultsOperations from .operations.protected_items_operations import ProtectedItemsOperations from .operations.backups_operations import BackupsOperations @@ -29,20 +39,15 @@ from .operations.restores_operations import RestoresOperations from .operations.job_cancellations_operations import JobCancellationsOperations from .operations.job_operation_results_operations import JobOperationResultsOperations -from .operations.export_jobs_operation_results_operations import ExportJobsOperationResultsOperations -from .operations.jobs_operations import JobsOperations from .operations.backup_operation_results_operations import BackupOperationResultsOperations from .operations.backup_operation_statuses_operations import BackupOperationStatusesOperations -from .operations.backup_policies_operations import BackupPoliciesOperations from .operations.protection_policies_operations import ProtectionPoliciesOperations from .operations.protection_policy_operation_results_operations import ProtectionPolicyOperationResultsOperations from .operations.protection_policy_operation_statuses_operations import ProtectionPolicyOperationStatusesOperations from .operations.backup_protectable_items_operations import BackupProtectableItemsOperations -from .operations.backup_protected_items_operations import BackupProtectedItemsOperations from .operations.backup_protection_containers_operations import BackupProtectionContainersOperations from .operations.security_pi_ns_operations import SecurityPINsOperations from .operations.backup_resource_storage_configs_operations import BackupResourceStorageConfigsOperations -from .operations.backup_usage_summaries_operations import BackupUsageSummariesOperations from .operations.operations import Operations from . import models @@ -67,38 +72,56 @@ def __init__( raise ValueError("Parameter 'credentials' must not be None.") if subscription_id is None: raise ValueError("Parameter 'subscription_id' must not be None.") - if not isinstance(subscription_id, str): - raise TypeError("Parameter 'subscription_id' must be str.") if not base_url: base_url = 'https://management.azure.com' super(RecoveryServicesBackupClientConfiguration, self).__init__(base_url) - self.add_user_agent('recoveryservicesbackupclient/{}'.format(VERSION)) + self.add_user_agent('azure-mgmt-recoveryservicesbackup/{}'.format(VERSION)) self.add_user_agent('Azure-SDK-For-Python') self.credentials = credentials self.subscription_id = subscription_id -class RecoveryServicesBackupClient(object): +class RecoveryServicesBackupClient(SDKClient): """Open API 2.0 Specs for Azure RecoveryServices Backup service :ivar config: Configuration for client. :vartype config: RecoveryServicesBackupClientConfiguration + :ivar protection_intent: ProtectionIntent operations + :vartype protection_intent: azure.mgmt.recoveryservicesbackup.operations.ProtectionIntentOperations + :ivar backup_status: BackupStatus operations + :vartype backup_status: azure.mgmt.recoveryservicesbackup.operations.BackupStatusOperations + :ivar feature_support: FeatureSupport operations + :vartype feature_support: azure.mgmt.recoveryservicesbackup.operations.FeatureSupportOperations :ivar backup_jobs: BackupJobs operations :vartype backup_jobs: azure.mgmt.recoveryservicesbackup.operations.BackupJobsOperations :ivar job_details: JobDetails operations :vartype job_details: azure.mgmt.recoveryservicesbackup.operations.JobDetailsOperations + :ivar export_jobs_operation_results: ExportJobsOperationResults operations + :vartype export_jobs_operation_results: azure.mgmt.recoveryservicesbackup.operations.ExportJobsOperationResultsOperations + :ivar jobs: Jobs operations + :vartype jobs: azure.mgmt.recoveryservicesbackup.operations.JobsOperations + :ivar backup_policies: BackupPolicies operations + :vartype backup_policies: azure.mgmt.recoveryservicesbackup.operations.BackupPoliciesOperations + :ivar backup_protected_items: BackupProtectedItems operations + :vartype backup_protected_items: azure.mgmt.recoveryservicesbackup.operations.BackupProtectedItemsOperations + :ivar backup_usage_summaries: BackupUsageSummaries operations + :vartype backup_usage_summaries: azure.mgmt.recoveryservicesbackup.operations.BackupUsageSummariesOperations :ivar backup_resource_vault_configs: BackupResourceVaultConfigs operations :vartype backup_resource_vault_configs: azure.mgmt.recoveryservicesbackup.operations.BackupResourceVaultConfigsOperations :ivar backup_engines: BackupEngines operations :vartype backup_engines: azure.mgmt.recoveryservicesbackup.operations.BackupEnginesOperations :ivar protection_container_refresh_operation_results: ProtectionContainerRefreshOperationResults operations :vartype protection_container_refresh_operation_results: azure.mgmt.recoveryservicesbackup.operations.ProtectionContainerRefreshOperationResultsOperations + :ivar protectable_containers: ProtectableContainers operations + :vartype protectable_containers: azure.mgmt.recoveryservicesbackup.operations.ProtectableContainersOperations :ivar protection_containers: ProtectionContainers operations :vartype protection_containers: azure.mgmt.recoveryservicesbackup.operations.ProtectionContainersOperations + :ivar backup_workload_items: BackupWorkloadItems operations + :vartype backup_workload_items: azure.mgmt.recoveryservicesbackup.operations.BackupWorkloadItemsOperations :ivar protection_container_operation_results: ProtectionContainerOperationResults operations :vartype protection_container_operation_results: azure.mgmt.recoveryservicesbackup.operations.ProtectionContainerOperationResultsOperations :ivar protected_items: ProtectedItems operations @@ -119,16 +142,10 @@ class RecoveryServicesBackupClient(object): :vartype job_cancellations: azure.mgmt.recoveryservicesbackup.operations.JobCancellationsOperations :ivar job_operation_results: JobOperationResults operations :vartype job_operation_results: azure.mgmt.recoveryservicesbackup.operations.JobOperationResultsOperations - :ivar export_jobs_operation_results: ExportJobsOperationResults operations - :vartype export_jobs_operation_results: azure.mgmt.recoveryservicesbackup.operations.ExportJobsOperationResultsOperations - :ivar jobs: Jobs operations - :vartype jobs: azure.mgmt.recoveryservicesbackup.operations.JobsOperations :ivar backup_operation_results: BackupOperationResults operations :vartype backup_operation_results: azure.mgmt.recoveryservicesbackup.operations.BackupOperationResultsOperations :ivar backup_operation_statuses: BackupOperationStatuses operations :vartype backup_operation_statuses: azure.mgmt.recoveryservicesbackup.operations.BackupOperationStatusesOperations - :ivar backup_policies: BackupPolicies operations - :vartype backup_policies: azure.mgmt.recoveryservicesbackup.operations.BackupPoliciesOperations :ivar protection_policies: ProtectionPolicies operations :vartype protection_policies: azure.mgmt.recoveryservicesbackup.operations.ProtectionPoliciesOperations :ivar protection_policy_operation_results: ProtectionPolicyOperationResults operations @@ -137,16 +154,12 @@ class RecoveryServicesBackupClient(object): :vartype protection_policy_operation_statuses: azure.mgmt.recoveryservicesbackup.operations.ProtectionPolicyOperationStatusesOperations :ivar backup_protectable_items: BackupProtectableItems operations :vartype backup_protectable_items: azure.mgmt.recoveryservicesbackup.operations.BackupProtectableItemsOperations - :ivar backup_protected_items: BackupProtectedItems operations - :vartype backup_protected_items: azure.mgmt.recoveryservicesbackup.operations.BackupProtectedItemsOperations :ivar backup_protection_containers: BackupProtectionContainers operations :vartype backup_protection_containers: azure.mgmt.recoveryservicesbackup.operations.BackupProtectionContainersOperations :ivar security_pi_ns: SecurityPINs operations :vartype security_pi_ns: azure.mgmt.recoveryservicesbackup.operations.SecurityPINsOperations :ivar backup_resource_storage_configs: BackupResourceStorageConfigs operations :vartype backup_resource_storage_configs: azure.mgmt.recoveryservicesbackup.operations.BackupResourceStorageConfigsOperations - :ivar backup_usage_summaries: BackupUsageSummaries operations - :vartype backup_usage_summaries: azure.mgmt.recoveryservicesbackup.operations.BackupUsageSummariesOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.recoveryservicesbackup.operations.Operations @@ -162,24 +175,44 @@ def __init__( self, credentials, subscription_id, base_url=None): self.config = RecoveryServicesBackupClientConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) + super(RecoveryServicesBackupClient, 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.protection_intent = ProtectionIntentOperations( + self._client, self.config, self._serialize, self._deserialize) + self.backup_status = BackupStatusOperations( + self._client, self.config, self._serialize, self._deserialize) + self.feature_support = FeatureSupportOperations( + self._client, self.config, self._serialize, self._deserialize) self.backup_jobs = BackupJobsOperations( self._client, self.config, self._serialize, self._deserialize) self.job_details = JobDetailsOperations( self._client, self.config, self._serialize, self._deserialize) + self.export_jobs_operation_results = ExportJobsOperationResultsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.jobs = JobsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.backup_policies = BackupPoliciesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.backup_protected_items = BackupProtectedItemsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.backup_usage_summaries = BackupUsageSummariesOperations( + self._client, self.config, self._serialize, self._deserialize) self.backup_resource_vault_configs = BackupResourceVaultConfigsOperations( self._client, self.config, self._serialize, self._deserialize) self.backup_engines = BackupEnginesOperations( self._client, self.config, self._serialize, self._deserialize) self.protection_container_refresh_operation_results = ProtectionContainerRefreshOperationResultsOperations( self._client, self.config, self._serialize, self._deserialize) + self.protectable_containers = ProtectableContainersOperations( + self._client, self.config, self._serialize, self._deserialize) self.protection_containers = ProtectionContainersOperations( self._client, self.config, self._serialize, self._deserialize) + self.backup_workload_items = BackupWorkloadItemsOperations( + self._client, self.config, self._serialize, self._deserialize) self.protection_container_operation_results = ProtectionContainerOperationResultsOperations( self._client, self.config, self._serialize, self._deserialize) self.protected_items = ProtectedItemsOperations( @@ -200,16 +233,10 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.job_operation_results = JobOperationResultsOperations( self._client, self.config, self._serialize, self._deserialize) - self.export_jobs_operation_results = ExportJobsOperationResultsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.jobs = JobsOperations( - self._client, self.config, self._serialize, self._deserialize) self.backup_operation_results = BackupOperationResultsOperations( self._client, self.config, self._serialize, self._deserialize) self.backup_operation_statuses = BackupOperationStatusesOperations( self._client, self.config, self._serialize, self._deserialize) - self.backup_policies = BackupPoliciesOperations( - self._client, self.config, self._serialize, self._deserialize) self.protection_policies = ProtectionPoliciesOperations( self._client, self.config, self._serialize, self._deserialize) self.protection_policy_operation_results = ProtectionPolicyOperationResultsOperations( @@ -218,15 +245,11 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.backup_protectable_items = BackupProtectableItemsOperations( self._client, self.config, self._serialize, self._deserialize) - self.backup_protected_items = BackupProtectedItemsOperations( - self._client, self.config, self._serialize, self._deserialize) self.backup_protection_containers = BackupProtectionContainersOperations( self._client, self.config, self._serialize, self._deserialize) self.security_pi_ns = SecurityPINsOperations( self._client, self.config, self._serialize, self._deserialize) self.backup_resource_storage_configs = BackupResourceStorageConfigsOperations( self._client, self.config, self._serialize, self._deserialize) - self.backup_usage_summaries = BackupUsageSummariesOperations( - self._client, self.config, self._serialize, self._deserialize) self.operations = Operations( self._client, self.config, self._serialize, self._deserialize) diff --git a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/version.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/version.py index d6acfb896eb4..9bd1dfac7ecb 100644 --- a/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/version.py +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/version.py @@ -9,4 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.1.1" +VERSION = "0.2.0" + diff --git a/azure-mgmt-recoveryservicesbackup/sdk_packaging.toml b/azure-mgmt-recoveryservicesbackup/sdk_packaging.toml new file mode 100644 index 000000000000..83158f227a95 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/sdk_packaging.toml @@ -0,0 +1,5 @@ +[packaging] +package_name = "azure-mgmt-recoveryservicesbackup" +package_pprint_name = "Recovery Services Backup Management" +package_doc_id = "recovery-services-backup" +is_stable = false diff --git a/azure-mgmt-recoveryservicesbackup/setup.py b/azure-mgmt-recoveryservicesbackup/setup.py index 4c0dc1d52ef7..e375e8a291f5 100644 --- a/azure-mgmt-recoveryservicesbackup/setup.py +++ b/azure-mgmt-recoveryservicesbackup/setup.py @@ -19,7 +19,7 @@ # Change the PACKAGE_NAME only to change folder and different name PACKAGE_NAME = "azure-mgmt-recoveryservicesbackup" -PACKAGE_PPRINT_NAME = "Recovery Services Backup" +PACKAGE_PPRINT_NAME = "Recovery Services Backup Management" # a-b-c => a/b/c package_folder_path = PACKAGE_NAME.replace('-', '/') @@ -61,7 +61,7 @@ long_description=readme + '\n\n' + history, license='MIT License', author='Microsoft Corporation', - author_email='ptvshelp@microsoft.com', + author_email='azpysdkhelp@microsoft.com', url='https://github.com/Azure/azure-sdk-for-python', classifiers=[ 'Development Status :: 4 - Beta', @@ -69,16 +69,15 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'License :: OSI Approved :: MIT License', ], zip_safe=False, - packages=find_packages(), + packages=find_packages(exclude=["tests"]), install_requires=[ - 'msrestazure~=0.4.11', + 'msrestazure>=0.4.27,<2.0.0', 'azure-common~=1.1', ], cmdclass=cmdclass diff --git a/azure-mgmt-recoveryservicesbackup/tests/recordings/test_mgmt_recoveryservices_backup.test_iaasvm_e2e.yaml b/azure-mgmt-recoveryservicesbackup/tests/recordings/test_mgmt_recoveryservices_backup.test_iaasvm_e2e.yaml index 0d9ecbedb10d..7a3599715d45 100644 --- a/azure-mgmt-recoveryservicesbackup/tests/recordings/test_mgmt_recoveryservices_backup.test_iaasvm_e2e.yaml +++ b/azure-mgmt-recoveryservicesbackup/tests/recordings/test_mgmt_recoveryservices_backup.test_iaasvm_e2e.yaml @@ -593,7 +593,7 @@ interactions: accept-language: [en-US] x-ms-client-request-id: [b5252323-b49c-11e7-9c14-f45c89acd723] method: GET - uri: https://management.azure.com/Subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PythonSDKBackupTestRg/providers/Microsoft.RecoveryServices/vaults/PySDKBackupTestRsVault/backupProtectedItems?api-version=2016-12-01 + uri: https://management.azure.com/Subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PythonSDKBackupTestRg/providers/Microsoft.RecoveryServices/vaults/PySDKBackupTestRsVault/backupProtectedItems?api-version=2017-07-01 response: body: {string: !!python/unicode '{"value":[{"id":"/Subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PythonSDKBackupTestRg/providers/Microsoft.RecoveryServices/vaults/PySDKBackupTestRsVault/backupFabrics/Azure/protectionContainers/IaasVMContainer;iaasvmcontainerv2;swaggersdktestrg;swaggersdktest/protectedItems/VM;iaasvmcontainerv2;swaggersdktestrg;swaggersdktest","name":"VM;iaasvmcontainerv2;swaggersdktestrg;swaggersdktest","type":"Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems","properties":{"friendlyName":"swaggersdktest","virtualMachineId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/swaggersdktestrg/providers/Microsoft.Compute/virtualMachines/swaggersdktest","protectionStatus":"Healthy","protectionState":"IRPending","healthStatus":"Passed","lastBackupStatus":"","lastBackupTime":"2001-01-01T00:00:00Z","protectedItemDataId":"123145452104371","protectedItemType":"Microsoft.Compute/virtualMachines","backupManagementType":"AzureIaasVM","workloadType":"VM","containerName":"iaasvmcontainerv2;swaggersdktestrg;swaggersdktest","sourceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/swaggersdktestrg/providers/Microsoft.Compute/virtualMachines/swaggersdktest","policyId":"/Subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PythonSDKBackupTestRg/providers/Microsoft.RecoveryServices/vaults/PySDKBackupTestRsVault/backupPolicies/DefaultPolicy","policyName":"DefaultPolicy"}}]}'} headers: diff --git a/azure-mgmt-recoveryservicesbackup/tests/recordings/test_mgmt_recoveryservices_backup.test_operations_api.yaml b/azure-mgmt-recoveryservicesbackup/tests/recordings/test_mgmt_recoveryservices_backup.test_operations_api.yaml index 24f0ddb4e9ae..1fa0c1243e7f 100644 --- a/azure-mgmt-recoveryservicesbackup/tests/recordings/test_mgmt_recoveryservices_backup.test_operations_api.yaml +++ b/azure-mgmt-recoveryservicesbackup/tests/recordings/test_mgmt_recoveryservices_backup.test_operations_api.yaml @@ -6,293 +6,310 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.2 (Windows-10-10.0.15063-SP0) requests/2.14.2 msrest/0.4.8 - msrest_azure/0.4.7 recoveryservicesbackupclient/0.2.0 Azure-SDK-For-Python] + User-Agent: [python/3.6.4 (Windows-10-10.0.17134-SP0) requests/2.18.4 msrest/0.4.28 + msrest_azure/0.4.31 azure-mgmt-recoveryservicesbackup/0.2.0 Azure-SDK-For-Python] accept-language: [en-US] - x-ms-client-request-id: [e7d326cc-7778-11e7-af33-480fcf586696] method: GET uri: https://management.azure.com/providers/Microsoft.RecoveryServices/operations?api-version=2016-08-10 response: - body: {string: '{"Value":[{"Name":"Microsoft.RecoveryServices/Vaults/usages/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Vault - Usage","Operation":"Recovery Services Vault usage details.","Description":"Returns - usage details for a Recovery Services Vault."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupUsageSummaries/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Backup - Usages Summaries","Operation":"Recovery Services Protected Items and Protected - Servers usage summaries details.","Description":"Returns summaries for Protected - Items and Protected Servers for a Recovery Services ."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/storageConfig/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Vault - Storage Config","Operation":"Get Resource Storage Config","Description":"Returns - Storage Configuration for Recovery Services Vault."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/storageConfig/write","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Vault - Storage Config","Operation":"Write Resource Storage Config","Description":"Updates - Storage Configuration for Recovery Services Vault."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupconfig/vaultconfig/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Vault - Config","Operation":"Get Resource Config","Description":"Returns Configuration - for Recovery Services Vault."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupconfig/vaultconfig/write","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Vault - Config","Operation":"Update Resource Config","Description":"Updates Configuration - for Recovery Services Vault."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/tokenInfo/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Token - Info","Operation":"Get Vault Token Info","Description":"Returns token information - for Recovery Services Vault."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupSecurityPIN/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"SecurityPINInfo","Operation":"Get - Security PIN Info","Description":"Returns Security PIN Information for Recovery - Services Vault."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupManagementMetaData/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Backup - Management Metadata","Operation":"Get Backup Management Metadata","Description":"Returns - Backup Management Metadata for Recovery Services Vault."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupOperationResults/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Backup - Operation Results","Operation":"Get Backup Operation Result","Description":"Returns - Backup Operation Result for Recovery Services Vault."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupOperations/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Backup - Operation Status","Operation":"Get Backup Operation Status","Description":"Returns - Backup Operation Status for Recovery Services Vault."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupJobs/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Backup - Jobs","Operation":"Get Jobs","Description":"Returns all Job Objects"},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupJobs/cancel/action","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Backup - Jobs","Operation":"Cancel Jobs","Description":"Cancel the Job"},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupJobsExport/action","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Export - Backup Jobs","Operation":"Export Jobs","Description":"Export Jobs"},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupJobs/operationResults/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Backup - Jobs Operation Results","Operation":"Get Job Operation Result","Description":"Returns - the Result of Job Operation."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupJobsExport/operationResults/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Export - Backup Jobs Operation Results","Operation":"Get Export Job Operation Result","Description":"Returns - the Result of Export Job Operation."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/recoveryPoints/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Recovery - Points","Operation":"Get Recovery Points","Description":"Get Recovery Points - for Protected Items."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/recoveryPoints/restore/action","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Recovery - Points","Operation":"Restore Recovery Points","Description":"Restore Recovery - Points for Protected Items."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/recoveryPoints/provisionInstantItemRecovery/action","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Recovery - Points","Operation":"Provision Instant Item Recovery for Protected Item","Description":"Provision - Instant Item Recovery for Protected Item"},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/recoveryPoints/revokeInstantItemRecovery/action","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Recovery - Points","Operation":"Revoke Instant Item Recovery for Protected Item","Description":"Revoke - Instant Item Recovery for Protected Item"},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupPolicies/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Backup - Policies","Operation":"Get Protection Policy","Description":"Returns all Protection - Policies"},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupPolicies/write","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Backup - Policies","Operation":"Create Protection Policy","Description":"Creates Protection - Policy"},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupPolicies/delete","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Backup - Policies","Operation":"Delete Protection Policy","Description":"Delete a Protection - Policy"},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupPolicies/operationResults/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Backup - Policy Operation Results","Operation":"Get Policy Operation Results","Description":"Get - Results of Policy Operation."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupPolicies/operationStatus/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Backup - Policy Operation Status","Operation":"Get Policy Operation Status","Description":"Get - Status of Policy Operation."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Protected - Items","Operation":"Get Protected Item Details","Description":"Returns object - details of the Protected Item"},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupProtectedItems/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Protected - Items","Operation":"Get All Protected Items","Description":"Returns the list - of all Protected Items."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/write","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Protected - Items","Operation":"Create Backup Protected Item","Description":"Create a - backup Protected Item"},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/delete","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Protected - Items","Operation":"Delete Protected Items","Description":"Deletes Protected - Item"},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/operationResults/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Protected - Item Operation Results","Operation":"Get Protected Items Operation Results","Description":"Gets - Result of Operation Performed on Protected Items."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/operationStatus/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Protected - Item Operation Status","Operation":"Get Protected Items operation status","Description":"Returns - the status of Operation performed on Protected Items."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/backup/action","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Protected - Items","Operation":"Backup Protected Item","Description":"Performs Backup - for Protected Item."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupProtectableItems/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Backup - Protectable Items","Operation":"Get Protectable Items","Description":"Returns - list of all Protectable Items."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/refreshContainers/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Refresh - Containers","Operation":"Refresh container","Description":"Refreshes the container - list"},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupFabrics/operationResults/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Refresh - Containers Operation Results","Operation":"Get Operation Results","Description":"Returns - status of the operation"},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupProtectionContainers/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Backup - Protection Containers","Operation":"Get Containers In Subscription","Description":"Returns - all containers belonging to the subscription"},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Protection - Containers","Operation":"Get Registered Container","Description":"Returns - all registered containers"},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/operationResults/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Protection - Containers Operation Results","Operation":"Get Container Operation Results","Description":"Gets - result of Operation performed on Protection Container."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupEngines","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Backup - Engines","Operation":"List of backup management servers.","Description":"Returns - all the backup management servers registered with vault."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/backupStatus","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Backup - Status","Operation":"Check Backup Status for Vault","Description":"Check Backup - Status for Recovery Services Vaults"},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/vaults/replicationAlertSettings/read","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Alerts Settings","Operation":"Read Alerts Settings","Description":"Read - Any Alerts Settings"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationAlertSettings/write","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Alerts Settings","Operation":"Create or Update - Alerts Settings","Description":"Create or Update Any Alerts Settings"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationEvents/read","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Events","Operation":"Read Events","Description":"Read - Any Events"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationNetworks/read","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Networks","Operation":"Read Networks","Description":"Read - Any Networks"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationNetworks/replicationNetworkMappings/read","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Network Mappings","Operation":"Read Network - Mappings","Description":"Read Any Network Mappings"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationNetworks/replicationNetworkMappings/write","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Network Mappings","Operation":"Create or Update - Network Mappings","Description":"Create or Update Any Network Mappings"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationNetworks/replicationNetworkMappings/delete","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Network Mappings","Operation":"Delete Network - Mappings","Description":"Delete Any Network Mappings"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectableItems/read","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Protectable Items","Operation":"Read Protectable - Items","Description":"Read Any Protectable Items"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectionContainerMappings/read","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Protection Container Mappings","Operation":"Read - Protection Container Mappings","Description":"Read Any Protection Container - Mappings"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectionContainerMappings/write","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Protection Container Mappings","Operation":"Create - or Update Protection Container Mappings","Description":"Create or Update Any - Protection Container Mappings"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectionContainerMappings/remove/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Protection Container Mappings","Operation":"Remove - Protection Container Mapping","Description":"Remove Protection Container Mapping"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectionContainerMappings/delete","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Protection Container Mappings","Operation":"Delete - Protection Container Mappings","Description":"Delete Any Protection Container - Mappings"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints/read","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Replication Recovery Points","Operation":"Read - Replication Recovery Points","Description":"Read Any Replication Recovery - Points"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/read","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Protected Items","Operation":"Read Protected - Items","Description":"Read Any Protected Items"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/write","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Protected Items","Operation":"Create or Update - Protected Items","Description":"Create or Update Any Protected Items"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/delete","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Protected Items","Operation":"Delete Protected - Items","Description":"Delete Any Protected Items"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/remove/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Protected Items","Operation":"Remove Protected - Item","Description":"Remove Protected Item"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/plannedFailover/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Protected Items","Operation":"Planned Failover","Description":"Planned - Failover"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/unplannedFailover/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Protected Items","Operation":"Failover","Description":"Failover"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/testFailover/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Protected Items","Operation":"Test Failover","Description":"Test - Failover"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/testFailoverCleanup/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Protected Items","Operation":"Test Failover - Cleanup","Description":"Test Failover Cleanup"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/failoverCommit/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Protected Items","Operation":"Failover Commit","Description":"Failover - Commit"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/reProtect/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Protected Items","Operation":"ReProtect Protected - Item","Description":"ReProtect Protected Item"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/updateMobilityService/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Protected Items","Operation":"Update Mobility - Service","Description":"Update Mobility Service"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/repairReplication/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Protected Items","Operation":"Repair replication","Description":"Repair - replication"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/applyRecoveryPoint/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Protected Items","Operation":"Apply Recovery - Point","Description":"Apply Recovery Point"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationJobs/read","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Jobs","Operation":"Read Jobs","Description":"Read - Any Jobs"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationJobs/cancel/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Jobs","Operation":"Cancel Job","Description":"Cancel - Job"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationJobs/restart/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Jobs","Operation":"Restart job","Description":"Restart - job"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationJobs/resume/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Jobs","Operation":"Resume Job","Description":"Resume - Job"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/read","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Protection Containers","Operation":"Read Protection - Containers","Description":"Read Any Protection Containers"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/discoverProtectableItem/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Protection Containers","Operation":"Discover - Protectable Item","Description":"Discover Protectable Item"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/write","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Protection Containers","Operation":"Create - or Update Protection Containers","Description":"Create or Update Any Protection - Containers"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/remove/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Protection Containers","Operation":"Remove - Protection Container","Description":"Remove Protection Container"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/switchprotection/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Protection Containers","Operation":"Switch - Protection Container","Description":"Switch Protection Container"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationPolicies/read","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Policies","Operation":"Read Policies","Description":"Read - Any Policies"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationPolicies/write","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Policies","Operation":"Create or Update Policies","Description":"Create - or Update Any Policies"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationPolicies/delete","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Policies","Operation":"Delete Policies","Description":"Delete - Any Policies"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationRecoveryPlans/read","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Recovery Plans","Operation":"Read Recovery - Plans","Description":"Read Any Recovery Plans"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationRecoveryPlans/write","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Recovery Plans","Operation":"Create or Update - Recovery Plans","Description":"Create or Update Any Recovery Plans"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationRecoveryPlans/delete","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Recovery Plans","Operation":"Delete Recovery - Plans","Description":"Delete Any Recovery Plans"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationRecoveryPlans/plannedFailover/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Recovery Plans","Operation":"Planned Failover - Recovery Plan","Description":"Planned Failover Recovery Plan"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationRecoveryPlans/unplannedFailover/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Recovery Plans","Operation":"Failover Recovery - Plan","Description":"Failover Recovery Plan"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationRecoveryPlans/testFailover/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Recovery Plans","Operation":"Test Failover - Recovery Plan","Description":"Test Failover Recovery Plan"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationRecoveryPlans/testFailoverCleanup/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Recovery Plans","Operation":"Test Failover - Cleanup Recovery Plan","Description":"Test Failover Cleanup Recovery Plan"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationRecoveryPlans/failoverCommit/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Recovery Plans","Operation":"Failover Commit - Recovery Plan","Description":"Failover Commit Recovery Plan"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationRecoveryPlans/reProtect/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Recovery Plans","Operation":"ReProtect Recovery - Plan","Description":"ReProtect Recovery Plan"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationRecoveryServicesProviders/read","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Recovery Services Providers","Operation":"Read - Recovery Services Providers","Description":"Read Any Recovery Services Providers"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationRecoveryServicesProviders/remove/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Recovery Services Providers","Operation":"Remove - Recovery Services Provider","Description":"Remove Recovery Services Provider"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationRecoveryServicesProviders/delete","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Recovery Services Providers","Operation":"Delete - Recovery Services Providers","Description":"Delete Any Recovery Services Providers"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationRecoveryServicesProviders/refreshProvider/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Recovery Services Providers","Operation":"Refresh - Provider","Description":"Refresh Provider"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/read","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Fabrics","Operation":"Read Fabrics","Description":"Read - Any Fabrics"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/write","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Fabrics","Operation":"Create or Update Fabrics","Description":"Create - or Update Any Fabrics"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/remove/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Fabrics","Operation":"Remove Fabric","Description":"Remove - Fabric"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/checkConsistency/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Fabrics","Operation":"Checks Consistency of - the Fabric","Description":"Checks Consistency of the Fabric"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/delete","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Fabrics","Operation":"Delete Fabrics","Description":"Delete - Any Fabrics"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/renewcertificate/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Fabrics","Operation":"Renew Certificate for - Fabric","Description":"Renew Certificate for Fabric"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/deployProcessServerImage/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Fabrics","Operation":"Deploy Process Server - Image","Description":"Deploy Process Server Image"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/reassociateGateway/action","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Fabrics","Operation":"Reassociate Gateway","Description":"Reassociate - Gateway"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationStorageClassifications/read","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Storage Classifications","Operation":"Read - Storage Classifications","Description":"Read Any Storage Classifications"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationStorageClassifications/replicationStorageClassificationMappings/read","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Storage Classification Mappings","Operation":"Read - Storage Classification Mappings","Description":"Read Any Storage Classification - Mappings"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationStorageClassifications/replicationStorageClassificationMappings/write","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Storage Classification Mappings","Operation":"Create - or Update Storage Classification Mappings","Description":"Create or Update - Any Storage Classification Mappings"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationStorageClassifications/replicationStorageClassificationMappings/delete","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Storage Classification Mappings","Operation":"Delete - Storage Classification Mappings","Description":"Delete Any Storage Classification - Mappings"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/usages/read","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Vault Usages","Operation":"Read Vault Usages","Description":"Read - Any Vault Usages"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationvCenters/read","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Jobs","Operation":"Read Jobs","Description":"Read - Any Jobs"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationvCenters/write","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Jobs","Operation":"Create or Update Jobs","Description":"Create - or Update Any Jobs"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationvCenters/delete","Display":{"Provider":"Microsoft - Recovery Services","Resource":"Jobs","Operation":"Delete Jobs","Description":"Delete - Any Jobs"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/Vaults/vaultTokens/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Vaults","Operation":"Vault - Token","Description":"The Vault Token operation can be used to get Vault Token - for vault level backend operations."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/registeredIdentities/write","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Vaults","Operation":"Register - Service Container","Description":"The Register Service Container operation - can be used to register a container with Recovery Service."},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/Vaults/registeredIdentities/operationResults/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Vaults","Operation":"Get - Operation Results","Description":"The Get Operation Results operation can + body: {string: '{"value":[{"name":"Microsoft.RecoveryServices/Vaults/usages/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Vault + Usage","operation":"Recovery Services Vault usage details.","description":"Returns + usage details for a Recovery Services Vault."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupUsageSummaries/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Backup + Usages Summaries","operation":"Recovery Services Protected Items and Protected + Servers usage summaries details.","description":"Returns summaries for Protected + Items and Protected Servers for a Recovery Services ."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupstorageconfig/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Vault + Storage Config","operation":"Get Resource Storage Config","description":"Returns + Storage Configuration for Recovery Services Vault."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupstorageconfig/write","display":{"provider":"Microsoft.RecoveryServices","resource":"Vault + Storage Config","operation":"Write Resource Storage Config","description":"Updates + Storage Configuration for Recovery Services Vault."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupconfig/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Vault + Config","operation":"Get Resource Config","description":"Returns Configuration + for Recovery Services Vault."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupconfig/write","display":{"provider":"Microsoft.RecoveryServices","resource":"Vault + Config","operation":"Update Resource Config","description":"Updates Configuration + for Recovery Services Vault."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/tokenInfo/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Token + Info","operation":"Get Vault Token Info","description":"Returns token information + for Recovery Services Vault."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupSecurityPIN/action","display":{"provider":"Microsoft.RecoveryServices","resource":"SecurityPINInfo","operation":"Get + Security PIN Info","description":"Returns Security PIN Information for Recovery + Services Vault."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupManagementMetaData/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Backup + Management Metadata","operation":"Get Backup Management Metadata","description":"Returns + Backup Management Metadata for Recovery Services Vault."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupOperationResults/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Backup + Operation Results","operation":"Get Backup Operation Result","description":"Returns + Backup Operation Result for Recovery Services Vault."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupOperations/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Backup + Operation Status","operation":"Get Backup Operation Status","description":"Returns + Backup Operation Status for Recovery Services Vault."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupJobs/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Backup + Jobs","operation":"Get Jobs","description":"Returns all Job Objects"},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupJobs/cancel/action","display":{"provider":"Microsoft.RecoveryServices","resource":"Backup + Jobs","operation":"Cancel Jobs","description":"Cancel the Job"},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupJobsExport/action","display":{"provider":"Microsoft.RecoveryServices","resource":"Export + Backup Jobs","operation":"Export Jobs","description":"Export Jobs"},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupJobs/operationResults/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Backup + Jobs Operation Results","operation":"Get Job Operation Result","description":"Returns + the Result of Job Operation."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupJobsExport/operationResults/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Export + Backup Jobs Operation Results","operation":"Get Export Job Operation Result","description":"Returns + the Result of Export Job Operation."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/recoveryPoints/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Recovery + Points","operation":"Get Recovery Points","description":"Get Recovery Points + for Protected Items."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/recoveryPoints/restore/action","display":{"provider":"Microsoft.RecoveryServices","resource":"Recovery + Points","operation":"Restore Recovery Points","description":"Restore Recovery + Points for Protected Items."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/recoveryPoints/provisionInstantItemRecovery/action","display":{"provider":"Microsoft.RecoveryServices","resource":"Recovery + Points","operation":"Provision Instant Item Recovery for Protected Item","description":"Provision + Instant Item Recovery for Protected Item"},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/recoveryPoints/revokeInstantItemRecovery/action","display":{"provider":"Microsoft.RecoveryServices","resource":"Recovery + Points","operation":"Revoke Instant Item Recovery for Protected Item","description":"Revoke + Instant Item Recovery for Protected Item"},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupPolicies/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Backup + Policies","operation":"Get Protection Policy","description":"Returns all Protection + Policies"},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupPolicies/write","display":{"provider":"Microsoft.RecoveryServices","resource":"Backup + Policies","operation":"Create Protection Policy","description":"Creates Protection + Policy"},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupPolicies/delete","display":{"provider":"Microsoft.RecoveryServices","resource":"Backup + Policies","operation":"Delete Protection Policy","description":"Delete a Protection + Policy"},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupPolicies/operationResults/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Backup + Policy Operation Results","operation":"Get Policy Operation Results","description":"Get + Results of Policy Operation."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupPolicies/operations/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Backup + Policy Operation Status","operation":"Get Policy Operation Status","description":"Get + Status of Policy Operation."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Protected + Items","operation":"Get Protected Item Details","description":"Returns object + details of the Protected Item"},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupProtectedItems/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Protected + Items","operation":"Get All Protected Items","description":"Returns the list + of all Protected Items."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/write","display":{"provider":"Microsoft.RecoveryServices","resource":"Protected + Items","operation":"Create Backup Protected Item","description":"Create a + backup Protected Item"},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/delete","display":{"provider":"Microsoft.RecoveryServices","resource":"Protected + Items","operation":"Delete Protected Items","description":"Deletes Protected + Item"},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/operationResults/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Protected + Item Operation Results","operation":"Get Protected Items Operation Results","description":"Gets + Result of Operation Performed on Protected Items."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/operationsStatus/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Protected + Item Operation Status","operation":"Get Protected Items operation status","description":"Returns + the status of Operation performed on Protected Items."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/backup/action","display":{"provider":"Microsoft.RecoveryServices","resource":"Protected + Items","operation":"Backup Protected Item","description":"Performs Backup + for Protected Item."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupProtectableItems/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Backup + Protectable Items","operation":"Get Protectable Items","description":"Returns + list of all Protectable Items."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupFabrics/refreshContainers/action","display":{"provider":"Microsoft.RecoveryServices","resource":"Refresh + Containers","operation":"Refresh container","description":"Refreshes the container + list"},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupFabrics/operationResults/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Refresh + Containers Operation Results","operation":"Get Operation Results","description":"Returns + status of the operation"},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupProtectionContainers/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Backup + Protection Containers","operation":"Get Containers In Subscription","description":"Returns + all containers belonging to the subscription"},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Protection + Containers","operation":"Get Registered Container","description":"Returns + all registered containers"},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/write","display":{"provider":"Microsoft.RecoveryServices","resource":"Protection + Containers","operation":"Create Registered Container","description":"Creates + a registered container"},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/delete","display":{"provider":"Microsoft.RecoveryServices","resource":"Protection + Containers","operation":"Delete Registered Container","description":"Deletes + the registered Container"},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/operationResults/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Protection + Containers Operation Results","operation":"Get Container Operation Results","description":"Gets + result of Operation performed on Protection Container."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupEngines/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Backup + Engines","operation":"List of backup management servers.","description":"Returns + all the backup management servers registered with vault."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupFabrics/backupProtectionIntent/write","display":{"provider":"Microsoft.RecoveryServices","resource":"Protection + Intent","operation":"Create backup Protection Intent","description":"Create + a backup Protection Intent"},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupFabrics/protectableContainers/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Protectable + Containers","operation":"Get all protectable containers","description":"Get + all protectable containers"},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/items/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Workload + Items","operation":"Get all items in a container","description":"Get all items + in a container"},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/inquire/action","display":{"provider":"Microsoft.RecoveryServices","resource":"Protection + Containers Inquire","operation":"Do inquiry for workloads within a container","description":"Do + inquiry for workloads within a container"},"origin":"user"},{"name":"Microsoft.RecoveryServices/locations/backupStatus/action","display":{"provider":"Microsoft.RecoveryServices","resource":"Backup + Status","operation":"Check Backup Status for Vault","description":"Check Backup + Status for Recovery Services Vaults"},"origin":"user"},{"name":"Microsoft.RecoveryServices/locations/backupPreValidateProtection/action","display":{"provider":"Microsoft.RecoveryServices","resource":"PreValidate + Protection","operation":"Pre Validate Enable Protection","description":""},"origin":"user"},{"name":"Microsoft.RecoveryServices/locations/backupValidateFeatures/action","display":{"provider":"Microsoft.RecoveryServices","resource":"Validate + Features","operation":"Validate Features","description":"Validate Features"},"origin":"user"},{"name":"Microsoft.RecoveryServices/vaults/replicationAlertSettings/read","display":{"provider":"Microsoft + Recovery Services","resource":"Alerts Settings","operation":"Read Alerts Settings","description":"Read + Any Alerts Settings"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationAlertSettings/write","display":{"provider":"Microsoft + Recovery Services","resource":"Alerts Settings","operation":"Create or Update + Alerts Settings","description":"Create or Update Any Alerts Settings"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationEvents/read","display":{"provider":"Microsoft + Recovery Services","resource":"Events","operation":"Read Events","description":"Read + Any Events"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationNetworks/read","display":{"provider":"Microsoft + Recovery Services","resource":"Networks","operation":"Read Networks","description":"Read + Any Networks"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationNetworks/replicationNetworkMappings/read","display":{"provider":"Microsoft + Recovery Services","resource":"Network Mappings","operation":"Read Network + Mappings","description":"Read Any Network Mappings"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationNetworks/replicationNetworkMappings/write","display":{"provider":"Microsoft + Recovery Services","resource":"Network Mappings","operation":"Create or Update + Network Mappings","description":"Create or Update Any Network Mappings"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationNetworks/replicationNetworkMappings/delete","display":{"provider":"Microsoft + Recovery Services","resource":"Network Mappings","operation":"Delete Network + Mappings","description":"Delete Any Network Mappings"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectableItems/read","display":{"provider":"Microsoft + Recovery Services","resource":"Protectable Items","operation":"Read Protectable + Items","description":"Read Any Protectable Items"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectionContainerMappings/read","display":{"provider":"Microsoft + Recovery Services","resource":"Protection Container Mappings","operation":"Read + Protection Container Mappings","description":"Read Any Protection Container + Mappings"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectionContainerMappings/write","display":{"provider":"Microsoft + Recovery Services","resource":"Protection Container Mappings","operation":"Create + or Update Protection Container Mappings","description":"Create or Update Any + Protection Container Mappings"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectionContainerMappings/remove/action","display":{"provider":"Microsoft + Recovery Services","resource":"Protection Container Mappings","operation":"Remove + Protection Container Mapping","description":"Remove Protection Container Mapping"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectionContainerMappings/delete","display":{"provider":"Microsoft + Recovery Services","resource":"Protection Container Mappings","operation":"Delete + Protection Container Mappings","description":"Delete Any Protection Container + Mappings"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints/read","display":{"provider":"Microsoft + Recovery Services","resource":"Replication Recovery Points","operation":"Read + Replication Recovery Points","description":"Read Any Replication Recovery + Points"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/read","display":{"provider":"Microsoft + Recovery Services","resource":"Protected Items","operation":"Read Protected + Items","description":"Read Any Protected Items"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/write","display":{"provider":"Microsoft + Recovery Services","resource":"Protected Items","operation":"Create or Update + Protected Items","description":"Create or Update Any Protected Items"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/delete","display":{"provider":"Microsoft + Recovery Services","resource":"Protected Items","operation":"Delete Protected + Items","description":"Delete Any Protected Items"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/remove/action","display":{"provider":"Microsoft + Recovery Services","resource":"Protected Items","operation":"Remove Protected + Item","description":"Remove Protected Item"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/plannedFailover/action","display":{"provider":"Microsoft + Recovery Services","resource":"Protected Items","operation":"Planned Failover","description":"Planned + Failover"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/unplannedFailover/action","display":{"provider":"Microsoft + Recovery Services","resource":"Protected Items","operation":"Failover","description":"Failover"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/testFailover/action","display":{"provider":"Microsoft + Recovery Services","resource":"Protected Items","operation":"Test Failover","description":"Test + Failover"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/testFailoverCleanup/action","display":{"provider":"Microsoft + Recovery Services","resource":"Protected Items","operation":"Test Failover + Cleanup","description":"Test Failover Cleanup"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/failoverCommit/action","display":{"provider":"Microsoft + Recovery Services","resource":"Protected Items","operation":"Failover Commit","description":"Failover + Commit"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/reProtect/action","display":{"provider":"Microsoft + Recovery Services","resource":"Protected Items","operation":"ReProtect Protected + Item","description":"ReProtect Protected Item"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/updateMobilityService/action","display":{"provider":"Microsoft + Recovery Services","resource":"Protected Items","operation":"Update Mobility + Service","description":"Update Mobility Service"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/repairReplication/action","display":{"provider":"Microsoft + Recovery Services","resource":"Protected Items","operation":"Repair replication","description":"Repair + replication"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/applyRecoveryPoint/action","display":{"provider":"Microsoft + Recovery Services","resource":"Protected Items","operation":"Apply Recovery + Point","description":"Apply Recovery Point"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationJobs/read","display":{"provider":"Microsoft + Recovery Services","resource":"Jobs","operation":"Read Jobs","description":"Read + Any Jobs"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationJobs/cancel/action","display":{"provider":"Microsoft + Recovery Services","resource":"Jobs","operation":"Cancel Job","description":"Cancel + Job"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationJobs/restart/action","display":{"provider":"Microsoft + Recovery Services","resource":"Jobs","operation":"Restart job","description":"Restart + job"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationJobs/resume/action","display":{"provider":"Microsoft + Recovery Services","resource":"Jobs","operation":"Resume Job","description":"Resume + Job"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/read","display":{"provider":"Microsoft + Recovery Services","resource":"Protection Containers","operation":"Read Protection + Containers","description":"Read Any Protection Containers"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/discoverProtectableItem/action","display":{"provider":"Microsoft + Recovery Services","resource":"Protection Containers","operation":"Discover + Protectable Item","description":"Discover Protectable Item"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/write","display":{"provider":"Microsoft + Recovery Services","resource":"Protection Containers","operation":"Create + or Update Protection Containers","description":"Create or Update Any Protection + Containers"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/remove/action","display":{"provider":"Microsoft + Recovery Services","resource":"Protection Containers","operation":"Remove + Protection Container","description":"Remove Protection Container"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/switchprotection/action","display":{"provider":"Microsoft + Recovery Services","resource":"Protection Containers","operation":"Switch + Protection Container","description":"Switch Protection Container"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationPolicies/read","display":{"provider":"Microsoft + Recovery Services","resource":"Policies","operation":"Read Policies","description":"Read + Any Policies"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationPolicies/write","display":{"provider":"Microsoft + Recovery Services","resource":"Policies","operation":"Create or Update Policies","description":"Create + or Update Any Policies"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationPolicies/delete","display":{"provider":"Microsoft + Recovery Services","resource":"Policies","operation":"Delete Policies","description":"Delete + Any Policies"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationRecoveryPlans/read","display":{"provider":"Microsoft + Recovery Services","resource":"Recovery Plans","operation":"Read Recovery + Plans","description":"Read Any Recovery Plans"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationRecoveryPlans/write","display":{"provider":"Microsoft + Recovery Services","resource":"Recovery Plans","operation":"Create or Update + Recovery Plans","description":"Create or Update Any Recovery Plans"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationRecoveryPlans/delete","display":{"provider":"Microsoft + Recovery Services","resource":"Recovery Plans","operation":"Delete Recovery + Plans","description":"Delete Any Recovery Plans"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationRecoveryPlans/plannedFailover/action","display":{"provider":"Microsoft + Recovery Services","resource":"Recovery Plans","operation":"Planned Failover + Recovery Plan","description":"Planned Failover Recovery Plan"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationRecoveryPlans/unplannedFailover/action","display":{"provider":"Microsoft + Recovery Services","resource":"Recovery Plans","operation":"Failover Recovery + Plan","description":"Failover Recovery Plan"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationRecoveryPlans/testFailover/action","display":{"provider":"Microsoft + Recovery Services","resource":"Recovery Plans","operation":"Test Failover + Recovery Plan","description":"Test Failover Recovery Plan"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationRecoveryPlans/testFailoverCleanup/action","display":{"provider":"Microsoft + Recovery Services","resource":"Recovery Plans","operation":"Test Failover + Cleanup Recovery Plan","description":"Test Failover Cleanup Recovery Plan"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationRecoveryPlans/failoverCommit/action","display":{"provider":"Microsoft + Recovery Services","resource":"Recovery Plans","operation":"Failover Commit + Recovery Plan","description":"Failover Commit Recovery Plan"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationRecoveryPlans/reProtect/action","display":{"provider":"Microsoft + Recovery Services","resource":"Recovery Plans","operation":"ReProtect Recovery + Plan","description":"ReProtect Recovery Plan"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationRecoveryServicesProviders/read","display":{"provider":"Microsoft + Recovery Services","resource":"Recovery Services Providers","operation":"Read + Recovery Services Providers","description":"Read Any Recovery Services Providers"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationRecoveryServicesProviders/write","display":{"provider":"Microsoft + Recovery Services","resource":"Recovery Services Providers","operation":"Create + or Update Recovery Services Providers","description":"Create or Update Any + Recovery Services Providers"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationRecoveryServicesProviders/remove/action","display":{"provider":"Microsoft + Recovery Services","resource":"Recovery Services Providers","operation":"Remove + Recovery Services Provider","description":"Remove Recovery Services Provider"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationRecoveryServicesProviders/delete","display":{"provider":"Microsoft + Recovery Services","resource":"Recovery Services Providers","operation":"Delete + Recovery Services Providers","description":"Delete Any Recovery Services Providers"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationRecoveryServicesProviders/refreshProvider/action","display":{"provider":"Microsoft + Recovery Services","resource":"Recovery Services Providers","operation":"Refresh + Provider","description":"Refresh Provider"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/read","display":{"provider":"Microsoft + Recovery Services","resource":"Fabrics","operation":"Read Fabrics","description":"Read + Any Fabrics"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/write","display":{"provider":"Microsoft + Recovery Services","resource":"Fabrics","operation":"Create or Update Fabrics","description":"Create + or Update Any Fabrics"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/remove/action","display":{"provider":"Microsoft + Recovery Services","resource":"Fabrics","operation":"Remove Fabric","description":"Remove + Fabric"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/checkConsistency/action","display":{"provider":"Microsoft + Recovery Services","resource":"Fabrics","operation":"Checks Consistency of + the Fabric","description":"Checks Consistency of the Fabric"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/delete","display":{"provider":"Microsoft + Recovery Services","resource":"Fabrics","operation":"Delete Fabrics","description":"Delete + Any Fabrics"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/renewcertificate/action","display":{"provider":"Microsoft + Recovery Services","resource":"Fabrics","operation":"Renew Certificate for + Fabric","description":"Renew Certificate for Fabric"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/deployProcessServerImage/action","display":{"provider":"Microsoft + Recovery Services","resource":"Fabrics","operation":"Deploy Process Server + Image","description":"Deploy Process Server Image"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/reassociateGateway/action","display":{"provider":"Microsoft + Recovery Services","resource":"Fabrics","operation":"Reassociate Gateway","description":"Reassociate + Gateway"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationStorageClassifications/read","display":{"provider":"Microsoft + Recovery Services","resource":"Storage Classifications","operation":"Read + Storage Classifications","description":"Read Any Storage Classifications"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationStorageClassifications/replicationStorageClassificationMappings/read","display":{"provider":"Microsoft + Recovery Services","resource":"Storage Classification Mappings","operation":"Read + Storage Classification Mappings","description":"Read Any Storage Classification + Mappings"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationStorageClassifications/replicationStorageClassificationMappings/write","display":{"provider":"Microsoft + Recovery Services","resource":"Storage Classification Mappings","operation":"Create + or Update Storage Classification Mappings","description":"Create or Update + Any Storage Classification Mappings"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationStorageClassifications/replicationStorageClassificationMappings/delete","display":{"provider":"Microsoft + Recovery Services","resource":"Storage Classification Mappings","operation":"Delete + Storage Classification Mappings","description":"Delete Any Storage Classification + Mappings"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/usages/read","display":{"provider":"Microsoft + Recovery Services","resource":"Vault Usages","operation":"Read Vault Usages","description":"Read + Any Vault Usages"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationvCenters/read","display":{"provider":"Microsoft + Recovery Services","resource":"Jobs","operation":"Read Jobs","description":"Read + Any Jobs"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationvCenters/write","display":{"provider":"Microsoft + Recovery Services","resource":"Jobs","operation":"Create or Update Jobs","description":"Create + or Update Any Jobs"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationvCenters/delete","display":{"provider":"Microsoft + Recovery Services","resource":"Jobs","operation":"Delete Jobs","description":"Delete + Any Jobs"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/Vaults/vaultTokens/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Vaults","operation":"Vault + Token","description":"The Vault Token operation can be used to get Vault Token + for vault level backend operations."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/registeredIdentities/write","display":{"provider":"Microsoft.RecoveryServices","resource":"Vaults","operation":"Register + Service Container","description":"The Register Service Container operation + can be used to register a container with Recovery Service."},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/Vaults/registeredIdentities/operationResults/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Vaults","operation":"Get + Operation Results","description":"The Get Operation Results operation can be used get the operation status and result for the asynchronously submitted - operation"},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/Vaults/registeredIdentities/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Vaults","Operation":"Get - Containers","Description":"The Get Containers operation can be used get the - containers registered for a resource."},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/Vaults/registeredIdentities/delete","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Vaults","Operation":"Unregister - Service Container","Description":"The UnRegister Container operation can be - used to unregister a container."},"Origin":"user,system"},{"Name":"Microsoft.RecoveryServices/Vaults/certificates/write","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Vaults","Operation":"Update - Resource Certificate","Description":"The Update Resource Certificate operation - updates the resource/vault credential certificate."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/monitoringAlerts/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Vaults","Operation":"Get - alerts","Description":"Gets the alerts for the Recovery services vault."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/monitoringAlerts/{uniqueAlertId}/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Vaults","Operation":"Get - alert details","Description":"Gets the details of the alert."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/monitoringAlerts/{uniqueAlertId}/patch","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Vaults","Operation":"Resolve - alert","Description":"Resolves the alert."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/monitoringConfigurations/notificationConfiguration/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Vaults","Operation":"Get - configuration","Description":"Gets the Recovery services vault notification - configuration."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/monitoringConfigurations/notificationConfiguration/patch","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Vaults","Operation":"Configure - e-mail notification","Description":"Configures e-mail notifications to Recovery - services vault."},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/providers/Microsoft.Insights/logDefinitions/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Vaults","Operation":"Azure - Backup Logs","Description":"Azure Backup Logs"},"Origin":"system","Properties":{"serviceSpecification":{"logSpecifications":[{"name":"AzureBackupReport","displayName":"Azure + operation"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/Vaults/registeredIdentities/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Vaults","operation":"Get + Containers","description":"The Get Containers operation can be used get the + containers registered for a resource."},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/Vaults/registeredIdentities/delete","display":{"provider":"Microsoft.RecoveryServices","resource":"Vaults","operation":"Unregister + Service Container","description":"The UnRegister Container operation can be + used to unregister a container."},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/Vaults/certificates/write","display":{"provider":"Microsoft.RecoveryServices","resource":"Vaults","operation":"Update + Resource Certificate","description":"The Update Resource Certificate operation + updates the resource/vault credential certificate."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/monitoringAlerts/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Vaults","operation":"Get + alerts","description":"Gets the alerts for the Recovery services vault."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/monitoringAlerts/write","display":{"provider":"Microsoft.RecoveryServices","resource":"Vaults","operation":"Resolve + alert","description":"Resolves the alert."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/monitoringConfigurations/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Vaults","operation":"Get + configuration","description":"Gets the Recovery services vault notification + configuration."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/monitoringConfigurations/write","display":{"provider":"Microsoft.RecoveryServices","resource":"Vaults","operation":"Configure + e-mail notification","description":"Configures e-mail notifications to Recovery + services vault."},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/providers/Microsoft.Insights/logDefinitions/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Vaults","operation":"Azure + Backup Logs","description":"Azure Backup Logs"},"origin":"system","properties":{"serviceSpecification":{"logSpecifications":[{"name":"AzureBackupReport","displayName":"Azure Backup Reporting Data","blobDuration":"PT1H"},{"name":"AzureSiteRecoveryJobs","displayName":"Azure Site Recovery Jobs","blobDuration":"PT1H"},{"name":"AzureSiteRecoveryEvents","displayName":"Azure Site Recovery Events","blobDuration":"PT1H"},{"name":"AzureSiteRecoveryReplicatedItems","displayName":"Azure Site Recovery Replicated Items","blobDuration":"PT1H"},{"name":"AzureSiteRecoveryReplicationStats","displayName":"Azure Site Recovery Replication Stats","blobDuration":"PT1H"},{"name":"AzureSiteRecoveryRecoveryPoints","displayName":"Azure - Site Recovery Recovery Points","blobDuration":"PT1H"}]}}},{"Name":"Microsoft.RecoveryServices/Vaults/providers/Microsoft.Insights/metricDefinitions/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Vaults","Operation":"Azure - Backup Metrics","Description":"Azure Backup Metrics"},"Origin":"system"},{"Name":"Microsoft.RecoveryServices/Vaults/providers/Microsoft.Insights/diagnosticSettings/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Vaults","Operation":"Azure - Backup Diagnostics","Description":"Azure Backup Diagnostics"},"Origin":"system"},{"Name":"Microsoft.RecoveryServices/Vaults/providers/Microsoft.Insights/diagnosticSettings/write","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Vaults","Operation":"Azure - Backup Diagnostics","Description":"Azure Backup Diagnostics"},"Origin":"system"},{"Name":"Microsoft.RecoveryServices/Vaults/write","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Vaults","Operation":"Create - Vault","Description":"Create Vault operation creates an Azure resource of - type ''vault''"},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Vaults","Operation":"Get - Vault","Description":"The Get Vault operation gets an object representing - the Azure resource of type ''vault''"},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/delete","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Vaults","Operation":"Delete - Vault","Description":"The Delete Vault operation deletes the specified Azure - resource of type ''vault''"},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/extendedInformation/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Vaults","Operation":"Get - Extended Info","Description":"The Get Extended Info operation gets an object''s - Extended Info representing the Azure resource of type ?vault?"},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/extendedInformation/write","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Vaults","Operation":"Get - Extended Info","Description":"The Get Extended Info operation gets an object''s - Extended Info representing the Azure resource of type ?vault?"},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/Vaults/extendedInformation/delete","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"Vaults","Operation":"Get - Extended Info","Description":"The Get Extended Info operation gets an object''s - Extended Info representing the Azure resource of type ?vault?"},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/locations/allocatedStamp/read","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"locations/allocatedStamp","Operation":"Get - Allocated Stamp","Description":"GetAllocatedStamp is internal operation used - by service"},"Origin":"user"},{"Name":"Microsoft.RecoveryServices/locations/allocateStamp/action","Display":{"Provider":"Microsoft.RecoveryServices","Resource":"locations/allocateStamp","Operation":"Allocated - Stamp Action","Description":"AllocateStamp is internal operation used by service"},"Origin":"user"}]}'} + Site Recovery Recovery Points","blobDuration":"PT1H"},{"name":"AzureSiteRecoveryReplicationDataUploadRate","displayName":"Azure + Site Recovery Replication Data Upload Rate","blobDuration":"PT1H"},{"name":"AzureSiteRecoveryProtectedDiskDataChurn","displayName":"Azure + Site Recovery Protected Disk Data Churn","blobDuration":"PT1H"}]}}},{"name":"Microsoft.RecoveryServices/Vaults/providers/Microsoft.Insights/metricDefinitions/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Vaults","operation":"Azure + Backup Metrics","description":"Azure Backup Metrics"},"origin":"system"},{"name":"Microsoft.RecoveryServices/Vaults/providers/Microsoft.Insights/diagnosticSettings/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Vaults","operation":"Azure + Backup Diagnostics","description":"Azure Backup Diagnostics"},"origin":"system"},{"name":"Microsoft.RecoveryServices/Vaults/providers/Microsoft.Insights/diagnosticSettings/write","display":{"provider":"Microsoft.RecoveryServices","resource":"Vaults","operation":"Azure + Backup Diagnostics","description":"Azure Backup Diagnostics"},"origin":"system"},{"name":"Microsoft.RecoveryServices/Vaults/write","display":{"provider":"Microsoft.RecoveryServices","resource":"Vaults","operation":"Create + Vault","description":"Create Vault operation creates an Azure resource of + type ''vault''"},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Vaults","operation":"Get + Vault","description":"The Get Vault operation gets an object representing + the Azure resource of type ''vault''"},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/delete","display":{"provider":"Microsoft.RecoveryServices","resource":"Vaults","operation":"Delete + Vault","description":"The Delete Vault operation deletes the specified Azure + resource of type ''vault''"},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/extendedInformation/read","display":{"provider":"Microsoft.RecoveryServices","resource":"Vaults","operation":"Get + Extended Info","description":"The Get Extended Info operation gets an object''s + Extended Info representing the Azure resource of type ?vault?"},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/extendedInformation/write","display":{"provider":"Microsoft.RecoveryServices","resource":"Vaults","operation":"Get + Extended Info","description":"The Get Extended Info operation gets an object''s + Extended Info representing the Azure resource of type ?vault?"},"origin":"user"},{"name":"Microsoft.RecoveryServices/Vaults/extendedInformation/delete","display":{"provider":"Microsoft.RecoveryServices","resource":"Vaults","operation":"Get + Extended Info","description":"The Get Extended Info operation gets an object''s + Extended Info representing the Azure resource of type ?vault?"},"origin":"user"},{"name":"Microsoft.RecoveryServices/locations/allocatedStamp/read","display":{"provider":"Microsoft.RecoveryServices","resource":"locations/allocatedStamp","operation":"Get + Allocated Stamp","description":"GetAllocatedStamp is internal operation used + by service"},"origin":"user"},{"name":"Microsoft.RecoveryServices/locations/allocateStamp/action","display":{"provider":"Microsoft.RecoveryServices","resource":"locations/allocateStamp","operation":"Allocated + Stamp Action","description":"AllocateStamp is internal operation used by service"},"origin":"user"},{"name":"Microsoft.RecoveryServices/register/action","display":{"provider":"Microsoft.RecoveryServices","resource":"Microsoft.RecoveryServices","operation":"Register + Resource Provider","description":"Registers subscription for given Resource + Provider"},"origin":"user"},{"name":"Microsoft.RecoveryServices/operations/read","display":{"provider":"Microsoft.RecoveryServices","resource":"operations","operation":"List + of Operations","description":"Operation returns the list of Operations for + a Resource Provider"},"origin":"user,system"}]}'} headers: - Cache-Control: [no-cache] - Content-Type: [application/json] - Date: ['Wed, 02 Aug 2017 11:51:23 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Server: [Microsoft-IIS/8.0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: [Accept-Encoding] - content-length: ['38423'] - x-ms-client-request-id: [e7d326cc-7778-11e7-af33-480fcf586696] - x-ms-correlation-request-id: [219317ba-bc16-423a-ac29-34a70907f291] - x-ms-ratelimit-remaining-tenant-reads: ['14999'] - x-ms-request-id: [219317ba-bc16-423a-ac29-34a70907f291] - x-ms-routing-request-id: ['CENTRALINDIA:20170802T115124Z:219317ba-bc16-423a-ac29-34a70907f291'] + cache-control: [no-cache] + content-length: ['41498'] + content-type: [application/json] + date: ['Fri, 25 May 2018 17:52:31 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/8.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] status: {code: 200, message: OK} version: 1 diff --git a/azure-mgmt-recoveryservicesbackup/tests/test_mgmt_recoveryservices_backup.py b/azure-mgmt-recoveryservicesbackup/tests/test_mgmt_recoveryservices_backup.py index fb7e1706304f..52e4063799d6 100644 --- a/azure-mgmt-recoveryservicesbackup/tests/test_mgmt_recoveryservices_backup.py +++ b/azure-mgmt-recoveryservicesbackup/tests/test_mgmt_recoveryservices_backup.py @@ -5,10 +5,10 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- +import time from contextlib import contextmanager import azure.mgmt.recoveryservicesbackup -from testutils.common_recordingtestcase import record from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer from recoveryservicesbackup_testcase import MgmtRecoveryServicesBackupTestDefinition, MgmtRecoveryServicesBackupTestHelper diff --git a/azure-mgmt-scheduler/HISTORY.rst b/azure-mgmt-scheduler/HISTORY.rst index 5ed55b5c8d8a..6f5fe1a79992 100644 --- a/azure-mgmt-scheduler/HISTORY.rst +++ b/azure-mgmt-scheduler/HISTORY.rst @@ -3,6 +3,43 @@ Release History =============== +2.0.0 (2018-05-23) +++++++++++++++++++ + +**General Breaking changes** + +This version uses a next-generation code generator that *might* introduce breaking changes. + +- Model signatures now use only keyword-argument syntax. All positional arguments must be re-written as keyword-arguments. + To keep auto-completion in most cases, models are now generated for Python 2 and Python 3. Python 3 uses the "*" syntax for keyword-only arguments. +- Enum types now use the "str" mixin (class AzureEnum(str, Enum)) to improve the behavior when unrecognized enum values are encountered. + While this is not a breaking change, the distinctions are important, and are documented here: + https://docs.python.org/3/library/enum.html#others + At a glance: + + - "is" should not be used at all. + - "format" will return the string value, where "%s" string formatting will return `NameOfEnum.stringvalue`. Format syntax should be prefered. + +- New Long Running Operation: + + - Return type changes from `msrestazure.azure_operation.AzureOperationPoller` to `msrest.polling.LROPoller`. External API is the same. + - Return type is now **always** a `msrest.polling.LROPoller`, regardless of the optional parameters used. + - The behavior has changed when using `raw=True`. Instead of returning the initial call result as `ClientRawResponse`, + without polling, now this returns an LROPoller. After polling, the final resource will be returned as a `ClientRawResponse`. + - New `polling` parameter. The default behavior is `Polling=True` which will poll using ARM algorithm. When `Polling=False`, + the response of the initial call will be returned without polling. + - `polling` parameter accepts instances of subclasses of `msrest.polling.PollingMethod`. + - `add_done_callback` will no longer raise if called after polling is finished, but will instead execute the callback right away. + +**Features** + +- Client class can be used as a context manager to keep the underlying HTTP session open for performance + +**Bugfixes** + +- Scheduler jobs with basic authentication cannot be created (https://github.com/Azure/azure-sdk-for-node/issues/2347 for details) +- Compatibility of the sdist with wheel 0.31.0 + 1.1.3 (2017-09-07) ++++++++++++++++++ diff --git a/azure-mgmt-scheduler/README.rst b/azure-mgmt-scheduler/README.rst index 0b376b091edd..af814a002139 100644 --- a/azure-mgmt-scheduler/README.rst +++ b/azure-mgmt-scheduler/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Scheduler Management Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. +This package has been tested with Python 2.7, 3.4, 3.5 and 3.6. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. @@ -36,9 +36,9 @@ If you see azure==0.11.0 (or any version below 1.0), uninstall it first: Usage ===== -For code examples, see `Scheduler Resource Management -`__ -on readthedocs.org. +For code examples, see `Scheduler Management +`__ +on docs.microsoft.com. Provide Feedback diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/__init__.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/__init__.py index 40ea60b62c55..8c1d83bea4f8 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/__init__.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/__init__.py @@ -9,35 +9,66 @@ # regenerated. # -------------------------------------------------------------------------- -from .sku import Sku -from .job_max_recurrence import JobMaxRecurrence -from .job_collection_quota import JobCollectionQuota -from .job_collection_properties import JobCollectionProperties -from .job_collection_definition import JobCollectionDefinition -from .http_authentication import HttpAuthentication -from .http_request import HttpRequest -from .storage_queue_message import StorageQueueMessage -from .service_bus_queue_message import ServiceBusQueueMessage -from .service_bus_topic_message import ServiceBusTopicMessage -from .retry_policy import RetryPolicy -from .job_error_action import JobErrorAction -from .job_action import JobAction -from .job_recurrence_schedule_monthly_occurrence import JobRecurrenceScheduleMonthlyOccurrence -from .job_recurrence_schedule import JobRecurrenceSchedule -from .job_recurrence import JobRecurrence -from .job_status import JobStatus -from .job_properties import JobProperties -from .job_definition import JobDefinition -from .job_history_definition_properties import JobHistoryDefinitionProperties -from .job_history_definition import JobHistoryDefinition -from .client_cert_authentication import ClientCertAuthentication -from .basic_authentication import BasicAuthentication -from .oauth_authentication import OAuthAuthentication -from .service_bus_authentication import ServiceBusAuthentication -from .service_bus_brokered_message_properties import ServiceBusBrokeredMessageProperties -from .service_bus_message import ServiceBusMessage -from .job_state_filter import JobStateFilter -from .job_history_filter import JobHistoryFilter +try: + from .sku_py3 import Sku + from .job_max_recurrence_py3 import JobMaxRecurrence + from .job_collection_quota_py3 import JobCollectionQuota + from .job_collection_properties_py3 import JobCollectionProperties + from .job_collection_definition_py3 import JobCollectionDefinition + from .http_authentication_py3 import HttpAuthentication + from .http_request_py3 import HttpRequest + from .storage_queue_message_py3 import StorageQueueMessage + from .service_bus_queue_message_py3 import ServiceBusQueueMessage + from .service_bus_topic_message_py3 import ServiceBusTopicMessage + from .retry_policy_py3 import RetryPolicy + from .job_error_action_py3 import JobErrorAction + from .job_action_py3 import JobAction + from .job_recurrence_schedule_monthly_occurrence_py3 import JobRecurrenceScheduleMonthlyOccurrence + from .job_recurrence_schedule_py3 import JobRecurrenceSchedule + from .job_recurrence_py3 import JobRecurrence + from .job_status_py3 import JobStatus + from .job_properties_py3 import JobProperties + from .job_definition_py3 import JobDefinition + from .job_history_definition_properties_py3 import JobHistoryDefinitionProperties + from .job_history_definition_py3 import JobHistoryDefinition + from .client_cert_authentication_py3 import ClientCertAuthentication + from .basic_authentication_py3 import BasicAuthentication + from .oauth_authentication_py3 import OAuthAuthentication + from .service_bus_authentication_py3 import ServiceBusAuthentication + from .service_bus_brokered_message_properties_py3 import ServiceBusBrokeredMessageProperties + from .service_bus_message_py3 import ServiceBusMessage + from .job_state_filter_py3 import JobStateFilter + from .job_history_filter_py3 import JobHistoryFilter +except (SyntaxError, ImportError): + from .sku import Sku + from .job_max_recurrence import JobMaxRecurrence + from .job_collection_quota import JobCollectionQuota + from .job_collection_properties import JobCollectionProperties + from .job_collection_definition import JobCollectionDefinition + from .http_authentication import HttpAuthentication + from .http_request import HttpRequest + from .storage_queue_message import StorageQueueMessage + from .service_bus_queue_message import ServiceBusQueueMessage + from .service_bus_topic_message import ServiceBusTopicMessage + from .retry_policy import RetryPolicy + from .job_error_action import JobErrorAction + from .job_action import JobAction + from .job_recurrence_schedule_monthly_occurrence import JobRecurrenceScheduleMonthlyOccurrence + from .job_recurrence_schedule import JobRecurrenceSchedule + from .job_recurrence import JobRecurrence + from .job_status import JobStatus + from .job_properties import JobProperties + from .job_definition import JobDefinition + from .job_history_definition_properties import JobHistoryDefinitionProperties + from .job_history_definition import JobHistoryDefinition + from .client_cert_authentication import ClientCertAuthentication + from .basic_authentication import BasicAuthentication + from .oauth_authentication import OAuthAuthentication + from .service_bus_authentication import ServiceBusAuthentication + from .service_bus_brokered_message_properties import ServiceBusBrokeredMessageProperties + from .service_bus_message import ServiceBusMessage + from .job_state_filter import JobStateFilter + from .job_history_filter import JobHistoryFilter from .job_collection_definition_paged import JobCollectionDefinitionPaged from .job_definition_paged import JobDefinitionPaged from .job_history_definition_paged import JobHistoryDefinitionPaged @@ -46,7 +77,6 @@ JobCollectionState, RecurrenceFrequency, JobActionType, - HttpAuthenticationType, RetryType, DayOfWeek, JobScheduleDay, @@ -94,7 +124,6 @@ 'JobCollectionState', 'RecurrenceFrequency', 'JobActionType', - 'HttpAuthenticationType', 'RetryType', 'DayOfWeek', 'JobScheduleDay', diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/basic_authentication.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/basic_authentication.py index bac148cf4e57..942882fa03e0 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/basic_authentication.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/basic_authentication.py @@ -15,11 +15,10 @@ class BasicAuthentication(HttpAuthentication): """BasicAuthentication. - :param type: Gets or sets the HTTP authentication type. Possible values - include: 'NotSpecified', 'ClientCertificate', 'ActiveDirectoryOAuth', - 'Basic' - :type type: str or :class:`HttpAuthenticationType - ` + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str :param username: Gets or sets the username. :type username: str :param password: Gets or sets the password, return value will always be @@ -27,13 +26,18 @@ class BasicAuthentication(HttpAuthentication): :type password: str """ + _validation = { + 'type': {'required': True}, + } + _attribute_map = { - 'type': {'key': 'type', 'type': 'HttpAuthenticationType'}, + 'type': {'key': 'type', 'type': 'str'}, 'username': {'key': 'username', 'type': 'str'}, 'password': {'key': 'password', 'type': 'str'}, } - def __init__(self, type=None, username=None, password=None): - super(BasicAuthentication, self).__init__(type=type) - self.username = username - self.password = password + def __init__(self, **kwargs): + super(BasicAuthentication, self).__init__(**kwargs) + self.username = kwargs.get('username', None) + self.password = kwargs.get('password', None) + self.type = 'Basic' diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/basic_authentication_py3.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/basic_authentication_py3.py new file mode 100644 index 000000000000..92e8b5feee62 --- /dev/null +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/basic_authentication_py3.py @@ -0,0 +1,43 @@ +# 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 .http_authentication_py3 import HttpAuthentication + + +class BasicAuthentication(HttpAuthentication): + """BasicAuthentication. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param username: Gets or sets the username. + :type username: str + :param password: Gets or sets the password, return value will always be + empty. + :type password: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'username': {'key': 'username', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + } + + def __init__(self, *, username: str=None, password: str=None, **kwargs) -> None: + super(BasicAuthentication, self).__init__(**kwargs) + self.username = username + self.password = password + self.type = 'Basic' diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/client_cert_authentication.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/client_cert_authentication.py index a5e01d8d45cd..e4324d0a5293 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/client_cert_authentication.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/client_cert_authentication.py @@ -15,11 +15,10 @@ class ClientCertAuthentication(HttpAuthentication): """ClientCertAuthentication. - :param type: Gets or sets the HTTP authentication type. Possible values - include: 'NotSpecified', 'ClientCertificate', 'ActiveDirectoryOAuth', - 'Basic' - :type type: str or :class:`HttpAuthenticationType - ` + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str :param password: Gets or sets the certificate password, return value will always be empty. :type password: str @@ -36,8 +35,12 @@ class ClientCertAuthentication(HttpAuthentication): :type certificate_subject_name: str """ + _validation = { + 'type': {'required': True}, + } + _attribute_map = { - 'type': {'key': 'type', 'type': 'HttpAuthenticationType'}, + 'type': {'key': 'type', 'type': 'str'}, 'password': {'key': 'password', 'type': 'str'}, 'pfx': {'key': 'pfx', 'type': 'str'}, 'certificate_thumbprint': {'key': 'certificateThumbprint', 'type': 'str'}, @@ -45,10 +48,11 @@ class ClientCertAuthentication(HttpAuthentication): 'certificate_subject_name': {'key': 'certificateSubjectName', 'type': 'str'}, } - def __init__(self, type=None, password=None, pfx=None, certificate_thumbprint=None, certificate_expiration_date=None, certificate_subject_name=None): - super(ClientCertAuthentication, self).__init__(type=type) - self.password = password - self.pfx = pfx - self.certificate_thumbprint = certificate_thumbprint - self.certificate_expiration_date = certificate_expiration_date - self.certificate_subject_name = certificate_subject_name + def __init__(self, **kwargs): + super(ClientCertAuthentication, self).__init__(**kwargs) + self.password = kwargs.get('password', None) + self.pfx = kwargs.get('pfx', None) + self.certificate_thumbprint = kwargs.get('certificate_thumbprint', None) + self.certificate_expiration_date = kwargs.get('certificate_expiration_date', None) + self.certificate_subject_name = kwargs.get('certificate_subject_name', None) + self.type = 'ClientCertificate' diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/client_cert_authentication_py3.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/client_cert_authentication_py3.py new file mode 100644 index 000000000000..17d2aad55eaf --- /dev/null +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/client_cert_authentication_py3.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .http_authentication_py3 import HttpAuthentication + + +class ClientCertAuthentication(HttpAuthentication): + """ClientCertAuthentication. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param password: Gets or sets the certificate password, return value will + always be empty. + :type password: str + :param pfx: Gets or sets the pfx certificate. Accepts certification in + base64 encoding, return value will always be empty. + :type pfx: str + :param certificate_thumbprint: Gets or sets the certificate thumbprint. + :type certificate_thumbprint: str + :param certificate_expiration_date: Gets or sets the certificate + expiration date. + :type certificate_expiration_date: datetime + :param certificate_subject_name: Gets or sets the certificate subject + name. + :type certificate_subject_name: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'pfx': {'key': 'pfx', 'type': 'str'}, + 'certificate_thumbprint': {'key': 'certificateThumbprint', 'type': 'str'}, + 'certificate_expiration_date': {'key': 'certificateExpirationDate', 'type': 'iso-8601'}, + 'certificate_subject_name': {'key': 'certificateSubjectName', 'type': 'str'}, + } + + def __init__(self, *, password: str=None, pfx: str=None, certificate_thumbprint: str=None, certificate_expiration_date=None, certificate_subject_name: str=None, **kwargs) -> None: + super(ClientCertAuthentication, self).__init__(**kwargs) + self.password = password + self.pfx = pfx + self.certificate_thumbprint = certificate_thumbprint + self.certificate_expiration_date = certificate_expiration_date + self.certificate_subject_name = certificate_subject_name + self.type = 'ClientCertificate' diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/http_authentication.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/http_authentication.py index a1a213b8b9cd..052f1f9bcf68 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/http_authentication.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/http_authentication.py @@ -15,16 +15,28 @@ class HttpAuthentication(Model): """HttpAuthentication. - :param type: Gets or sets the HTTP authentication type. Possible values - include: 'NotSpecified', 'ClientCertificate', 'ActiveDirectoryOAuth', - 'Basic' - :type type: str or :class:`HttpAuthenticationType - ` + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ClientCertAuthentication, BasicAuthentication, + OAuthAuthentication + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str """ + _validation = { + 'type': {'required': True}, + } + _attribute_map = { - 'type': {'key': 'type', 'type': 'HttpAuthenticationType'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'ClientCertificate': 'ClientCertAuthentication', 'Basic': 'BasicAuthentication', 'ActiveDirectoryOAuth': 'OAuthAuthentication'} } - def __init__(self, type=None): - self.type = type + def __init__(self, **kwargs): + super(HttpAuthentication, self).__init__(**kwargs) + self.type = None diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/http_authentication_py3.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/http_authentication_py3.py new file mode 100644 index 000000000000..f3972592501f --- /dev/null +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/http_authentication_py3.py @@ -0,0 +1,42 @@ +# 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 HttpAuthentication(Model): + """HttpAuthentication. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ClientCertAuthentication, BasicAuthentication, + OAuthAuthentication + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'ClientCertificate': 'ClientCertAuthentication', 'Basic': 'BasicAuthentication', 'ActiveDirectoryOAuth': 'OAuthAuthentication'} + } + + def __init__(self, **kwargs) -> None: + super(HttpAuthentication, self).__init__(**kwargs) + self.type = None diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/http_request.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/http_request.py index a0e49a791ae5..700d582f2c1f 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/http_request.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/http_request.py @@ -17,8 +17,7 @@ class HttpRequest(Model): :param authentication: Gets or sets the authentication method of the request. - :type authentication: :class:`HttpAuthentication - ` + :type authentication: ~azure.mgmt.scheduler.models.HttpAuthentication :param uri: Gets or sets the URI of the request. :type uri: str :param method: Gets or sets the method of the request. @@ -26,7 +25,7 @@ class HttpRequest(Model): :param body: Gets or sets the request body. :type body: str :param headers: Gets or sets the headers. - :type headers: dict + :type headers: dict[str, str] """ _attribute_map = { @@ -37,9 +36,10 @@ class HttpRequest(Model): 'headers': {'key': 'headers', 'type': '{str}'}, } - def __init__(self, authentication=None, uri=None, method=None, body=None, headers=None): - self.authentication = authentication - self.uri = uri - self.method = method - self.body = body - self.headers = headers + def __init__(self, **kwargs): + super(HttpRequest, self).__init__(**kwargs) + self.authentication = kwargs.get('authentication', None) + self.uri = kwargs.get('uri', None) + self.method = kwargs.get('method', None) + self.body = kwargs.get('body', None) + self.headers = kwargs.get('headers', None) diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/http_request_py3.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/http_request_py3.py new file mode 100644 index 000000000000..482ca14b30e9 --- /dev/null +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/http_request_py3.py @@ -0,0 +1,45 @@ +# 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 HttpRequest(Model): + """HttpRequest. + + :param authentication: Gets or sets the authentication method of the + request. + :type authentication: ~azure.mgmt.scheduler.models.HttpAuthentication + :param uri: Gets or sets the URI of the request. + :type uri: str + :param method: Gets or sets the method of the request. + :type method: str + :param body: Gets or sets the request body. + :type body: str + :param headers: Gets or sets the headers. + :type headers: dict[str, str] + """ + + _attribute_map = { + 'authentication': {'key': 'authentication', 'type': 'HttpAuthentication'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'method': {'key': 'method', 'type': 'str'}, + 'body': {'key': 'body', 'type': 'str'}, + 'headers': {'key': 'headers', 'type': '{str}'}, + } + + def __init__(self, *, authentication=None, uri: str=None, method: str=None, body: str=None, headers=None, **kwargs) -> None: + super(HttpRequest, self).__init__(**kwargs) + self.authentication = authentication + self.uri = uri + self.method = method + self.body = body + self.headers = headers diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_action.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_action.py index 6dcf9f3aaef2..0a50a73ab6b5 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_action.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_action.py @@ -17,28 +17,23 @@ class JobAction(Model): :param type: Gets or sets the job action type. Possible values include: 'Http', 'Https', 'StorageQueue', 'ServiceBusQueue', 'ServiceBusTopic' - :type type: str or :class:`JobActionType - ` + :type type: str or ~azure.mgmt.scheduler.models.JobActionType :param request: Gets or sets the http requests. - :type request: :class:`HttpRequest - ` + :type request: ~azure.mgmt.scheduler.models.HttpRequest :param queue_message: Gets or sets the storage queue message. - :type queue_message: :class:`StorageQueueMessage - ` + :type queue_message: ~azure.mgmt.scheduler.models.StorageQueueMessage :param service_bus_queue_message: Gets or sets the service bus queue message. - :type service_bus_queue_message: :class:`ServiceBusQueueMessage - ` + :type service_bus_queue_message: + ~azure.mgmt.scheduler.models.ServiceBusQueueMessage :param service_bus_topic_message: Gets or sets the service bus topic message. - :type service_bus_topic_message: :class:`ServiceBusTopicMessage - ` + :type service_bus_topic_message: + ~azure.mgmt.scheduler.models.ServiceBusTopicMessage :param retry_policy: Gets or sets the retry policy. - :type retry_policy: :class:`RetryPolicy - ` + :type retry_policy: ~azure.mgmt.scheduler.models.RetryPolicy :param error_action: Gets or sets the error action. - :type error_action: :class:`JobErrorAction - ` + :type error_action: ~azure.mgmt.scheduler.models.JobErrorAction """ _attribute_map = { @@ -51,11 +46,12 @@ class JobAction(Model): 'error_action': {'key': 'errorAction', 'type': 'JobErrorAction'}, } - def __init__(self, type=None, request=None, queue_message=None, service_bus_queue_message=None, service_bus_topic_message=None, retry_policy=None, error_action=None): - self.type = type - self.request = request - self.queue_message = queue_message - self.service_bus_queue_message = service_bus_queue_message - self.service_bus_topic_message = service_bus_topic_message - self.retry_policy = retry_policy - self.error_action = error_action + def __init__(self, **kwargs): + super(JobAction, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.request = kwargs.get('request', None) + self.queue_message = kwargs.get('queue_message', None) + self.service_bus_queue_message = kwargs.get('service_bus_queue_message', None) + self.service_bus_topic_message = kwargs.get('service_bus_topic_message', None) + self.retry_policy = kwargs.get('retry_policy', None) + self.error_action = kwargs.get('error_action', None) diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_action_py3.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_action_py3.py new file mode 100644 index 000000000000..6f8f5c7ffb2c --- /dev/null +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_action_py3.py @@ -0,0 +1,57 @@ +# 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 JobAction(Model): + """JobAction. + + :param type: Gets or sets the job action type. Possible values include: + 'Http', 'Https', 'StorageQueue', 'ServiceBusQueue', 'ServiceBusTopic' + :type type: str or ~azure.mgmt.scheduler.models.JobActionType + :param request: Gets or sets the http requests. + :type request: ~azure.mgmt.scheduler.models.HttpRequest + :param queue_message: Gets or sets the storage queue message. + :type queue_message: ~azure.mgmt.scheduler.models.StorageQueueMessage + :param service_bus_queue_message: Gets or sets the service bus queue + message. + :type service_bus_queue_message: + ~azure.mgmt.scheduler.models.ServiceBusQueueMessage + :param service_bus_topic_message: Gets or sets the service bus topic + message. + :type service_bus_topic_message: + ~azure.mgmt.scheduler.models.ServiceBusTopicMessage + :param retry_policy: Gets or sets the retry policy. + :type retry_policy: ~azure.mgmt.scheduler.models.RetryPolicy + :param error_action: Gets or sets the error action. + :type error_action: ~azure.mgmt.scheduler.models.JobErrorAction + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'JobActionType'}, + 'request': {'key': 'request', 'type': 'HttpRequest'}, + 'queue_message': {'key': 'queueMessage', 'type': 'StorageQueueMessage'}, + 'service_bus_queue_message': {'key': 'serviceBusQueueMessage', 'type': 'ServiceBusQueueMessage'}, + 'service_bus_topic_message': {'key': 'serviceBusTopicMessage', 'type': 'ServiceBusTopicMessage'}, + 'retry_policy': {'key': 'retryPolicy', 'type': 'RetryPolicy'}, + 'error_action': {'key': 'errorAction', 'type': 'JobErrorAction'}, + } + + def __init__(self, *, type=None, request=None, queue_message=None, service_bus_queue_message=None, service_bus_topic_message=None, retry_policy=None, error_action=None, **kwargs) -> None: + super(JobAction, self).__init__(**kwargs) + self.type = type + self.request = request + self.queue_message = queue_message + self.service_bus_queue_message = service_bus_queue_message + self.service_bus_topic_message = service_bus_topic_message + self.retry_policy = retry_policy + self.error_action = error_action diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_definition.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_definition.py index aef3eaffec85..be05e83bbab8 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_definition.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_definition.py @@ -27,10 +27,9 @@ class JobCollectionDefinition(Model): :param location: Gets or sets the storage account location. :type location: str :param tags: Gets or sets the tags. - :type tags: dict + :type tags: dict[str, str] :param properties: Gets or sets the job collection properties. - :type properties: :class:`JobCollectionProperties - ` + :type properties: ~azure.mgmt.scheduler.models.JobCollectionProperties """ _validation = { @@ -47,10 +46,11 @@ class JobCollectionDefinition(Model): 'properties': {'key': 'properties', 'type': 'JobCollectionProperties'}, } - def __init__(self, name=None, location=None, tags=None, properties=None): + def __init__(self, **kwargs): + super(JobCollectionDefinition, self).__init__(**kwargs) self.id = None self.type = None - self.name = name - self.location = location - self.tags = tags - self.properties = properties + self.name = kwargs.get('name', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_definition_paged.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_definition_paged.py index c14768483eb3..4830c059bb71 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_definition_paged.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_definition_paged.py @@ -14,7 +14,7 @@ class JobCollectionDefinitionPaged(Paged): """ - A paging container for iterating over a list of JobCollectionDefinition object + A paging container for iterating over a list of :class:`JobCollectionDefinition ` object """ _attribute_map = { diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_definition_py3.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_definition_py3.py new file mode 100644 index 000000000000..583f7ed6679b --- /dev/null +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_definition_py3.py @@ -0,0 +1,56 @@ +# 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 JobCollectionDefinition(Model): + """JobCollectionDefinition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Gets the job collection resource identifier. + :vartype id: str + :ivar type: Gets the job collection resource type. + :vartype type: str + :param name: Gets or sets the job collection resource name. + :type name: str + :param location: Gets or sets the storage account location. + :type location: str + :param tags: Gets or sets the tags. + :type tags: dict[str, str] + :param properties: Gets or sets the job collection properties. + :type properties: ~azure.mgmt.scheduler.models.JobCollectionProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'JobCollectionProperties'}, + } + + def __init__(self, *, name: str=None, location: str=None, tags=None, properties=None, **kwargs) -> None: + super(JobCollectionDefinition, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = name + self.location = location + self.tags = tags + self.properties = properties diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_properties.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_properties.py index a8031e81b2aa..51be15d9547d 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_properties.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_properties.py @@ -16,14 +16,12 @@ class JobCollectionProperties(Model): """JobCollectionProperties. :param sku: Gets or sets the SKU. - :type sku: :class:`Sku ` + :type sku: ~azure.mgmt.scheduler.models.Sku :param state: Gets or sets the state. Possible values include: 'Enabled', 'Disabled', 'Suspended', 'Deleted' - :type state: str or :class:`JobCollectionState - ` + :type state: str or ~azure.mgmt.scheduler.models.JobCollectionState :param quota: Gets or sets the job collection quota. - :type quota: :class:`JobCollectionQuota - ` + :type quota: ~azure.mgmt.scheduler.models.JobCollectionQuota """ _attribute_map = { @@ -32,7 +30,8 @@ class JobCollectionProperties(Model): 'quota': {'key': 'quota', 'type': 'JobCollectionQuota'}, } - def __init__(self, sku=None, state=None, quota=None): - self.sku = sku - self.state = state - self.quota = quota + def __init__(self, **kwargs): + super(JobCollectionProperties, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.state = kwargs.get('state', None) + self.quota = kwargs.get('quota', None) diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_properties_py3.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_properties_py3.py new file mode 100644 index 000000000000..c38d012ac714 --- /dev/null +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_properties_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class JobCollectionProperties(Model): + """JobCollectionProperties. + + :param sku: Gets or sets the SKU. + :type sku: ~azure.mgmt.scheduler.models.Sku + :param state: Gets or sets the state. Possible values include: 'Enabled', + 'Disabled', 'Suspended', 'Deleted' + :type state: str or ~azure.mgmt.scheduler.models.JobCollectionState + :param quota: Gets or sets the job collection quota. + :type quota: ~azure.mgmt.scheduler.models.JobCollectionQuota + """ + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'state': {'key': 'state', 'type': 'JobCollectionState'}, + 'quota': {'key': 'quota', 'type': 'JobCollectionQuota'}, + } + + def __init__(self, *, sku=None, state=None, quota=None, **kwargs) -> None: + super(JobCollectionProperties, self).__init__(**kwargs) + self.sku = sku + self.state = state + self.quota = quota diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_quota.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_quota.py index 9d1be6c1f489..468793f2066f 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_quota.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_quota.py @@ -20,8 +20,7 @@ class JobCollectionQuota(Model): :param max_job_occurrence: Gets or sets the maximum job occurrence. :type max_job_occurrence: int :param max_recurrence: Gets or set the maximum recurrence. - :type max_recurrence: :class:`JobMaxRecurrence - ` + :type max_recurrence: ~azure.mgmt.scheduler.models.JobMaxRecurrence """ _attribute_map = { @@ -30,7 +29,8 @@ class JobCollectionQuota(Model): 'max_recurrence': {'key': 'maxRecurrence', 'type': 'JobMaxRecurrence'}, } - def __init__(self, max_job_count=None, max_job_occurrence=None, max_recurrence=None): - self.max_job_count = max_job_count - self.max_job_occurrence = max_job_occurrence - self.max_recurrence = max_recurrence + def __init__(self, **kwargs): + super(JobCollectionQuota, self).__init__(**kwargs) + self.max_job_count = kwargs.get('max_job_count', None) + self.max_job_occurrence = kwargs.get('max_job_occurrence', None) + self.max_recurrence = kwargs.get('max_recurrence', None) diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_quota_py3.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_quota_py3.py new file mode 100644 index 000000000000..996d3c9cd72d --- /dev/null +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_quota_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class JobCollectionQuota(Model): + """JobCollectionQuota. + + :param max_job_count: Gets or set the maximum job count. + :type max_job_count: int + :param max_job_occurrence: Gets or sets the maximum job occurrence. + :type max_job_occurrence: int + :param max_recurrence: Gets or set the maximum recurrence. + :type max_recurrence: ~azure.mgmt.scheduler.models.JobMaxRecurrence + """ + + _attribute_map = { + 'max_job_count': {'key': 'maxJobCount', 'type': 'int'}, + 'max_job_occurrence': {'key': 'maxJobOccurrence', 'type': 'int'}, + 'max_recurrence': {'key': 'maxRecurrence', 'type': 'JobMaxRecurrence'}, + } + + def __init__(self, *, max_job_count: int=None, max_job_occurrence: int=None, max_recurrence=None, **kwargs) -> None: + super(JobCollectionQuota, self).__init__(**kwargs) + self.max_job_count = max_job_count + self.max_job_occurrence = max_job_occurrence + self.max_recurrence = max_recurrence diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_definition.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_definition.py index 2a17177feabf..43aa06dd41a0 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_definition.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_definition.py @@ -25,8 +25,7 @@ class JobDefinition(Model): :ivar name: Gets the job resource name. :vartype name: str :param properties: Gets or sets the job properties. - :type properties: :class:`JobProperties - ` + :type properties: ~azure.mgmt.scheduler.models.JobProperties """ _validation = { @@ -42,8 +41,9 @@ class JobDefinition(Model): 'properties': {'key': 'properties', 'type': 'JobProperties'}, } - def __init__(self, properties=None): + def __init__(self, **kwargs): + super(JobDefinition, self).__init__(**kwargs) self.id = None self.type = None self.name = None - self.properties = properties + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_definition_paged.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_definition_paged.py index 49be62a84990..e783c67a39dc 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_definition_paged.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_definition_paged.py @@ -14,7 +14,7 @@ class JobDefinitionPaged(Paged): """ - A paging container for iterating over a list of JobDefinition object + A paging container for iterating over a list of :class:`JobDefinition ` object """ _attribute_map = { diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_definition_py3.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_definition_py3.py new file mode 100644 index 000000000000..615e8d334fd9 --- /dev/null +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_definition_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class JobDefinition(Model): + """JobDefinition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Gets the job resource identifier. + :vartype id: str + :ivar type: Gets the job resource type. + :vartype type: str + :ivar name: Gets the job resource name. + :vartype name: str + :param properties: Gets or sets the job properties. + :type properties: ~azure.mgmt.scheduler.models.JobProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'JobProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(JobDefinition, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.properties = properties diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_error_action.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_error_action.py index fb17bac70aba..694d7f7dd1c6 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_error_action.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_error_action.py @@ -18,25 +18,21 @@ class JobErrorAction(Model): :param type: Gets or sets the job error action type. Possible values include: 'Http', 'Https', 'StorageQueue', 'ServiceBusQueue', 'ServiceBusTopic' - :type type: str or :class:`JobActionType - ` + :type type: str or ~azure.mgmt.scheduler.models.JobActionType :param request: Gets or sets the http requests. - :type request: :class:`HttpRequest - ` + :type request: ~azure.mgmt.scheduler.models.HttpRequest :param queue_message: Gets or sets the storage queue message. - :type queue_message: :class:`StorageQueueMessage - ` + :type queue_message: ~azure.mgmt.scheduler.models.StorageQueueMessage :param service_bus_queue_message: Gets or sets the service bus queue message. - :type service_bus_queue_message: :class:`ServiceBusQueueMessage - ` + :type service_bus_queue_message: + ~azure.mgmt.scheduler.models.ServiceBusQueueMessage :param service_bus_topic_message: Gets or sets the service bus topic message. - :type service_bus_topic_message: :class:`ServiceBusTopicMessage - ` + :type service_bus_topic_message: + ~azure.mgmt.scheduler.models.ServiceBusTopicMessage :param retry_policy: Gets or sets the retry policy. - :type retry_policy: :class:`RetryPolicy - ` + :type retry_policy: ~azure.mgmt.scheduler.models.RetryPolicy """ _attribute_map = { @@ -48,10 +44,11 @@ class JobErrorAction(Model): 'retry_policy': {'key': 'retryPolicy', 'type': 'RetryPolicy'}, } - def __init__(self, type=None, request=None, queue_message=None, service_bus_queue_message=None, service_bus_topic_message=None, retry_policy=None): - self.type = type - self.request = request - self.queue_message = queue_message - self.service_bus_queue_message = service_bus_queue_message - self.service_bus_topic_message = service_bus_topic_message - self.retry_policy = retry_policy + def __init__(self, **kwargs): + super(JobErrorAction, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.request = kwargs.get('request', None) + self.queue_message = kwargs.get('queue_message', None) + self.service_bus_queue_message = kwargs.get('service_bus_queue_message', None) + self.service_bus_topic_message = kwargs.get('service_bus_topic_message', None) + self.retry_policy = kwargs.get('retry_policy', None) diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_error_action_py3.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_error_action_py3.py new file mode 100644 index 000000000000..1366ceeda294 --- /dev/null +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_error_action_py3.py @@ -0,0 +1,54 @@ +# 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 JobErrorAction(Model): + """JobErrorAction. + + :param type: Gets or sets the job error action type. Possible values + include: 'Http', 'Https', 'StorageQueue', 'ServiceBusQueue', + 'ServiceBusTopic' + :type type: str or ~azure.mgmt.scheduler.models.JobActionType + :param request: Gets or sets the http requests. + :type request: ~azure.mgmt.scheduler.models.HttpRequest + :param queue_message: Gets or sets the storage queue message. + :type queue_message: ~azure.mgmt.scheduler.models.StorageQueueMessage + :param service_bus_queue_message: Gets or sets the service bus queue + message. + :type service_bus_queue_message: + ~azure.mgmt.scheduler.models.ServiceBusQueueMessage + :param service_bus_topic_message: Gets or sets the service bus topic + message. + :type service_bus_topic_message: + ~azure.mgmt.scheduler.models.ServiceBusTopicMessage + :param retry_policy: Gets or sets the retry policy. + :type retry_policy: ~azure.mgmt.scheduler.models.RetryPolicy + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'JobActionType'}, + 'request': {'key': 'request', 'type': 'HttpRequest'}, + 'queue_message': {'key': 'queueMessage', 'type': 'StorageQueueMessage'}, + 'service_bus_queue_message': {'key': 'serviceBusQueueMessage', 'type': 'ServiceBusQueueMessage'}, + 'service_bus_topic_message': {'key': 'serviceBusTopicMessage', 'type': 'ServiceBusTopicMessage'}, + 'retry_policy': {'key': 'retryPolicy', 'type': 'RetryPolicy'}, + } + + def __init__(self, *, type=None, request=None, queue_message=None, service_bus_queue_message=None, service_bus_topic_message=None, retry_policy=None, **kwargs) -> None: + super(JobErrorAction, self).__init__(**kwargs) + self.type = type + self.request = request + self.queue_message = queue_message + self.service_bus_queue_message = service_bus_queue_message + self.service_bus_topic_message = service_bus_topic_message + self.retry_policy = retry_policy diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition.py index cfb2438e619e..ddfbf24033fd 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition.py @@ -25,8 +25,8 @@ class JobHistoryDefinition(Model): :ivar name: Gets the job history name. :vartype name: str :ivar properties: Gets or sets the job history properties. - :vartype properties: :class:`JobHistoryDefinitionProperties - ` + :vartype properties: + ~azure.mgmt.scheduler.models.JobHistoryDefinitionProperties """ _validation = { @@ -43,7 +43,8 @@ class JobHistoryDefinition(Model): 'properties': {'key': 'properties', 'type': 'JobHistoryDefinitionProperties'}, } - def __init__(self): + def __init__(self, **kwargs): + super(JobHistoryDefinition, self).__init__(**kwargs) self.id = None self.type = None self.name = None diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition_paged.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition_paged.py index ef40ea946ce0..8b9ba23980bb 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition_paged.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition_paged.py @@ -14,7 +14,7 @@ class JobHistoryDefinitionPaged(Paged): """ - A paging container for iterating over a list of JobHistoryDefinition object + A paging container for iterating over a list of :class:`JobHistoryDefinition ` object """ _attribute_map = { diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition_properties.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition_properties.py index 021b542d6ee8..2407b6ba4959 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition_properties.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition_properties.py @@ -27,12 +27,11 @@ class JobHistoryDefinitionProperties(Model): :vartype expected_execution_time: datetime :ivar action_name: Gets the job history action name. Possible values include: 'MainAction', 'ErrorAction' - :vartype action_name: str or :class:`JobHistoryActionName - ` + :vartype action_name: str or + ~azure.mgmt.scheduler.models.JobHistoryActionName :ivar status: Gets the job history status. Possible values include: 'Completed', 'Failed', 'Postponed' - :vartype status: str or :class:`JobExecutionStatus - ` + :vartype status: str or ~azure.mgmt.scheduler.models.JobExecutionStatus :ivar message: Gets the message for the job history. :vartype message: str :ivar retry_count: Gets the retry count for job. @@ -63,7 +62,8 @@ class JobHistoryDefinitionProperties(Model): 'repeat_count': {'key': 'repeatCount', 'type': 'int'}, } - def __init__(self): + def __init__(self, **kwargs): + super(JobHistoryDefinitionProperties, self).__init__(**kwargs) self.start_time = None self.end_time = None self.expected_execution_time = None diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition_properties_py3.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition_properties_py3.py new file mode 100644 index 000000000000..16bf8c9ab82f --- /dev/null +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition_properties_py3.py @@ -0,0 +1,74 @@ +# 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 JobHistoryDefinitionProperties(Model): + """JobHistoryDefinitionProperties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar start_time: Gets the start time for this job. + :vartype start_time: datetime + :ivar end_time: Gets the end time for this job. + :vartype end_time: datetime + :ivar expected_execution_time: Gets the expected execution time for this + job. + :vartype expected_execution_time: datetime + :ivar action_name: Gets the job history action name. Possible values + include: 'MainAction', 'ErrorAction' + :vartype action_name: str or + ~azure.mgmt.scheduler.models.JobHistoryActionName + :ivar status: Gets the job history status. Possible values include: + 'Completed', 'Failed', 'Postponed' + :vartype status: str or ~azure.mgmt.scheduler.models.JobExecutionStatus + :ivar message: Gets the message for the job history. + :vartype message: str + :ivar retry_count: Gets the retry count for job. + :vartype retry_count: int + :ivar repeat_count: Gets the repeat count for the job. + :vartype repeat_count: int + """ + + _validation = { + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'expected_execution_time': {'readonly': True}, + 'action_name': {'readonly': True}, + 'status': {'readonly': True}, + 'message': {'readonly': True}, + 'retry_count': {'readonly': True}, + 'repeat_count': {'readonly': True}, + } + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'expected_execution_time': {'key': 'expectedExecutionTime', 'type': 'iso-8601'}, + 'action_name': {'key': 'actionName', 'type': 'JobHistoryActionName'}, + 'status': {'key': 'status', 'type': 'JobExecutionStatus'}, + 'message': {'key': 'message', 'type': 'str'}, + 'retry_count': {'key': 'retryCount', 'type': 'int'}, + 'repeat_count': {'key': 'repeatCount', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(JobHistoryDefinitionProperties, self).__init__(**kwargs) + self.start_time = None + self.end_time = None + self.expected_execution_time = None + self.action_name = None + self.status = None + self.message = None + self.retry_count = None + self.repeat_count = None diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition_py3.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition_py3.py new file mode 100644 index 000000000000..a817c1564d9f --- /dev/null +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition_py3.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class JobHistoryDefinition(Model): + """JobHistoryDefinition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Gets the job history identifier. + :vartype id: str + :ivar type: Gets the job history resource type. + :vartype type: str + :ivar name: Gets the job history name. + :vartype name: str + :ivar properties: Gets or sets the job history properties. + :vartype properties: + ~azure.mgmt.scheduler.models.JobHistoryDefinitionProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'JobHistoryDefinitionProperties'}, + } + + def __init__(self, **kwargs) -> None: + super(JobHistoryDefinition, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.properties = None diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_filter.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_filter.py index 82e1f8117b46..639744652f8b 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_filter.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_filter.py @@ -17,13 +17,13 @@ class JobHistoryFilter(Model): :param status: Gets or sets the job execution status. Possible values include: 'Completed', 'Failed', 'Postponed' - :type status: str or :class:`JobExecutionStatus - ` + :type status: str or ~azure.mgmt.scheduler.models.JobExecutionStatus """ _attribute_map = { 'status': {'key': 'status', 'type': 'JobExecutionStatus'}, } - def __init__(self, status=None): - self.status = status + def __init__(self, **kwargs): + super(JobHistoryFilter, self).__init__(**kwargs) + self.status = kwargs.get('status', None) diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_filter_py3.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_filter_py3.py new file mode 100644 index 000000000000..11405033790b --- /dev/null +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_filter_py3.py @@ -0,0 +1,29 @@ +# 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 JobHistoryFilter(Model): + """JobHistoryFilter. + + :param status: Gets or sets the job execution status. Possible values + include: 'Completed', 'Failed', 'Postponed' + :type status: str or ~azure.mgmt.scheduler.models.JobExecutionStatus + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'JobExecutionStatus'}, + } + + def __init__(self, *, status=None, **kwargs) -> None: + super(JobHistoryFilter, self).__init__(**kwargs) + self.status = status diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_max_recurrence.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_max_recurrence.py index de4df60d8070..6ef23f562526 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_max_recurrence.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_max_recurrence.py @@ -18,8 +18,7 @@ class JobMaxRecurrence(Model): :param frequency: Gets or sets the frequency of recurrence (second, minute, hour, day, week, month). Possible values include: 'Minute', 'Hour', 'Day', 'Week', 'Month' - :type frequency: str or :class:`RecurrenceFrequency - ` + :type frequency: str or ~azure.mgmt.scheduler.models.RecurrenceFrequency :param interval: Gets or sets the interval between retries. :type interval: int """ @@ -29,6 +28,7 @@ class JobMaxRecurrence(Model): 'interval': {'key': 'interval', 'type': 'int'}, } - def __init__(self, frequency=None, interval=None): - self.frequency = frequency - self.interval = interval + def __init__(self, **kwargs): + super(JobMaxRecurrence, self).__init__(**kwargs) + self.frequency = kwargs.get('frequency', None) + self.interval = kwargs.get('interval', None) diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_max_recurrence_py3.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_max_recurrence_py3.py new file mode 100644 index 000000000000..99610d36f731 --- /dev/null +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_max_recurrence_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class JobMaxRecurrence(Model): + """JobMaxRecurrence. + + :param frequency: Gets or sets the frequency of recurrence (second, + minute, hour, day, week, month). Possible values include: 'Minute', + 'Hour', 'Day', 'Week', 'Month' + :type frequency: str or ~azure.mgmt.scheduler.models.RecurrenceFrequency + :param interval: Gets or sets the interval between retries. + :type interval: int + """ + + _attribute_map = { + 'frequency': {'key': 'frequency', 'type': 'RecurrenceFrequency'}, + 'interval': {'key': 'interval', 'type': 'int'}, + } + + def __init__(self, *, frequency=None, interval: int=None, **kwargs) -> None: + super(JobMaxRecurrence, self).__init__(**kwargs) + self.frequency = frequency + self.interval = interval diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_properties.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_properties.py index 857d3bd1cc2d..e391027f2b83 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_properties.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_properties.py @@ -21,17 +21,14 @@ class JobProperties(Model): :param start_time: Gets or sets the job start time. :type start_time: datetime :param action: Gets or sets the job action. - :type action: :class:`JobAction ` + :type action: ~azure.mgmt.scheduler.models.JobAction :param recurrence: Gets or sets the job recurrence. - :type recurrence: :class:`JobRecurrence - ` + :type recurrence: ~azure.mgmt.scheduler.models.JobRecurrence :param state: Gets or set the job state. Possible values include: 'Enabled', 'Disabled', 'Faulted', 'Completed' - :type state: str or :class:`JobState - ` + :type state: str or ~azure.mgmt.scheduler.models.JobState :ivar status: Gets the job status. - :vartype status: :class:`JobStatus - ` + :vartype status: ~azure.mgmt.scheduler.models.JobStatus """ _validation = { @@ -46,9 +43,10 @@ class JobProperties(Model): 'status': {'key': 'status', 'type': 'JobStatus'}, } - def __init__(self, start_time=None, action=None, recurrence=None, state=None): - self.start_time = start_time - self.action = action - self.recurrence = recurrence - self.state = state + def __init__(self, **kwargs): + super(JobProperties, self).__init__(**kwargs) + self.start_time = kwargs.get('start_time', None) + self.action = kwargs.get('action', None) + self.recurrence = kwargs.get('recurrence', None) + self.state = kwargs.get('state', None) self.status = None diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_properties_py3.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_properties_py3.py new file mode 100644 index 000000000000..2ba86cf5e7e7 --- /dev/null +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_properties_py3.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class JobProperties(Model): + """JobProperties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param start_time: Gets or sets the job start time. + :type start_time: datetime + :param action: Gets or sets the job action. + :type action: ~azure.mgmt.scheduler.models.JobAction + :param recurrence: Gets or sets the job recurrence. + :type recurrence: ~azure.mgmt.scheduler.models.JobRecurrence + :param state: Gets or set the job state. Possible values include: + 'Enabled', 'Disabled', 'Faulted', 'Completed' + :type state: str or ~azure.mgmt.scheduler.models.JobState + :ivar status: Gets the job status. + :vartype status: ~azure.mgmt.scheduler.models.JobStatus + """ + + _validation = { + 'status': {'readonly': True}, + } + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'action': {'key': 'action', 'type': 'JobAction'}, + 'recurrence': {'key': 'recurrence', 'type': 'JobRecurrence'}, + 'state': {'key': 'state', 'type': 'JobState'}, + 'status': {'key': 'status', 'type': 'JobStatus'}, + } + + def __init__(self, *, start_time=None, action=None, recurrence=None, state=None, **kwargs) -> None: + super(JobProperties, self).__init__(**kwargs) + self.start_time = start_time + self.action = action + self.recurrence = recurrence + self.state = state + self.status = None diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence.py index 0e86ef2cb99c..18ee514fd9db 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence.py @@ -18,8 +18,7 @@ class JobRecurrence(Model): :param frequency: Gets or sets the frequency of recurrence (second, minute, hour, day, week, month). Possible values include: 'Minute', 'Hour', 'Day', 'Week', 'Month' - :type frequency: str or :class:`RecurrenceFrequency - ` + :type frequency: str or ~azure.mgmt.scheduler.models.RecurrenceFrequency :param interval: Gets or sets the interval between retries. :type interval: int :param count: Gets or sets the maximum number of times that the job should @@ -28,8 +27,7 @@ class JobRecurrence(Model): :param end_time: Gets or sets the time at which the job will complete. :type end_time: datetime :param schedule: - :type schedule: :class:`JobRecurrenceSchedule - ` + :type schedule: ~azure.mgmt.scheduler.models.JobRecurrenceSchedule """ _attribute_map = { @@ -40,9 +38,10 @@ class JobRecurrence(Model): 'schedule': {'key': 'schedule', 'type': 'JobRecurrenceSchedule'}, } - def __init__(self, frequency=None, interval=None, count=None, end_time=None, schedule=None): - self.frequency = frequency - self.interval = interval - self.count = count - self.end_time = end_time - self.schedule = schedule + def __init__(self, **kwargs): + super(JobRecurrence, self).__init__(**kwargs) + self.frequency = kwargs.get('frequency', None) + self.interval = kwargs.get('interval', None) + self.count = kwargs.get('count', None) + self.end_time = kwargs.get('end_time', None) + self.schedule = kwargs.get('schedule', None) diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence_py3.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence_py3.py new file mode 100644 index 000000000000..3c31d7532d31 --- /dev/null +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence_py3.py @@ -0,0 +1,47 @@ +# 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 JobRecurrence(Model): + """JobRecurrence. + + :param frequency: Gets or sets the frequency of recurrence (second, + minute, hour, day, week, month). Possible values include: 'Minute', + 'Hour', 'Day', 'Week', 'Month' + :type frequency: str or ~azure.mgmt.scheduler.models.RecurrenceFrequency + :param interval: Gets or sets the interval between retries. + :type interval: int + :param count: Gets or sets the maximum number of times that the job should + run. + :type count: int + :param end_time: Gets or sets the time at which the job will complete. + :type end_time: datetime + :param schedule: + :type schedule: ~azure.mgmt.scheduler.models.JobRecurrenceSchedule + """ + + _attribute_map = { + 'frequency': {'key': 'frequency', 'type': 'RecurrenceFrequency'}, + 'interval': {'key': 'interval', 'type': 'int'}, + 'count': {'key': 'count', 'type': 'int'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'schedule': {'key': 'schedule', 'type': 'JobRecurrenceSchedule'}, + } + + def __init__(self, *, frequency=None, interval: int=None, count: int=None, end_time=None, schedule=None, **kwargs) -> None: + super(JobRecurrence, self).__init__(**kwargs) + self.frequency = frequency + self.interval = interval + self.count = count + self.end_time = end_time + self.schedule = schedule diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence_schedule.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence_schedule.py index 7eca2cbdf7b8..65f649ba0ab7 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence_schedule.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence_schedule.py @@ -17,22 +17,20 @@ class JobRecurrenceSchedule(Model): :param week_days: Gets or sets the days of the week that the job should execute on. - :type week_days: list of str or :class:`DayOfWeek - ` + :type week_days: list[str or ~azure.mgmt.scheduler.models.DayOfWeek] :param hours: Gets or sets the hours of the day that the job should execute at. - :type hours: list of int + :type hours: list[int] :param minutes: Gets or sets the minutes of the hour that the job should execute at. - :type minutes: list of int + :type minutes: list[int] :param month_days: Gets or sets the days of the month that the job should execute on. Must be between 1 and 31. - :type month_days: list of int + :type month_days: list[int] :param monthly_occurrences: Gets or sets the occurrences of days within a month. - :type monthly_occurrences: list of - :class:`JobRecurrenceScheduleMonthlyOccurrence - ` + :type monthly_occurrences: + list[~azure.mgmt.scheduler.models.JobRecurrenceScheduleMonthlyOccurrence] """ _attribute_map = { @@ -43,9 +41,10 @@ class JobRecurrenceSchedule(Model): 'monthly_occurrences': {'key': 'monthlyOccurrences', 'type': '[JobRecurrenceScheduleMonthlyOccurrence]'}, } - def __init__(self, week_days=None, hours=None, minutes=None, month_days=None, monthly_occurrences=None): - self.week_days = week_days - self.hours = hours - self.minutes = minutes - self.month_days = month_days - self.monthly_occurrences = monthly_occurrences + def __init__(self, **kwargs): + super(JobRecurrenceSchedule, self).__init__(**kwargs) + self.week_days = kwargs.get('week_days', None) + self.hours = kwargs.get('hours', None) + self.minutes = kwargs.get('minutes', None) + self.month_days = kwargs.get('month_days', None) + self.monthly_occurrences = kwargs.get('monthly_occurrences', None) diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence_schedule_monthly_occurrence.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence_schedule_monthly_occurrence.py index 7ae07cd7388f..83aff7b198fa 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence_schedule_monthly_occurrence.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence_schedule_monthly_occurrence.py @@ -19,8 +19,7 @@ class JobRecurrenceScheduleMonthlyOccurrence(Model): wednesday, thursday, friday, saturday, sunday. Possible values include: 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday' - :type day: str or :class:`JobScheduleDay - ` + :type day: str or ~azure.mgmt.scheduler.models.JobScheduleDay :param occurrence: Gets or sets the occurrence. Must be between -5 and 5. :type occurrence: int """ @@ -30,6 +29,7 @@ class JobRecurrenceScheduleMonthlyOccurrence(Model): 'occurrence': {'key': 'Occurrence', 'type': 'int'}, } - def __init__(self, day=None, occurrence=None): - self.day = day - self.occurrence = occurrence + def __init__(self, **kwargs): + super(JobRecurrenceScheduleMonthlyOccurrence, self).__init__(**kwargs) + self.day = kwargs.get('day', None) + self.occurrence = kwargs.get('occurrence', None) diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence_schedule_monthly_occurrence_py3.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence_schedule_monthly_occurrence_py3.py new file mode 100644 index 000000000000..10d21464a9f5 --- /dev/null +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence_schedule_monthly_occurrence_py3.py @@ -0,0 +1,35 @@ +# 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 JobRecurrenceScheduleMonthlyOccurrence(Model): + """JobRecurrenceScheduleMonthlyOccurrence. + + :param day: Gets or sets the day. Must be one of monday, tuesday, + wednesday, thursday, friday, saturday, sunday. Possible values include: + 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', + 'Sunday' + :type day: str or ~azure.mgmt.scheduler.models.JobScheduleDay + :param occurrence: Gets or sets the occurrence. Must be between -5 and 5. + :type occurrence: int + """ + + _attribute_map = { + 'day': {'key': 'day', 'type': 'JobScheduleDay'}, + 'occurrence': {'key': 'Occurrence', 'type': 'int'}, + } + + def __init__(self, *, day=None, occurrence: int=None, **kwargs) -> None: + super(JobRecurrenceScheduleMonthlyOccurrence, self).__init__(**kwargs) + self.day = day + self.occurrence = occurrence diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence_schedule_py3.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence_schedule_py3.py new file mode 100644 index 000000000000..c8c5db61c26f --- /dev/null +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence_schedule_py3.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 msrest.serialization import Model + + +class JobRecurrenceSchedule(Model): + """JobRecurrenceSchedule. + + :param week_days: Gets or sets the days of the week that the job should + execute on. + :type week_days: list[str or ~azure.mgmt.scheduler.models.DayOfWeek] + :param hours: Gets or sets the hours of the day that the job should + execute at. + :type hours: list[int] + :param minutes: Gets or sets the minutes of the hour that the job should + execute at. + :type minutes: list[int] + :param month_days: Gets or sets the days of the month that the job should + execute on. Must be between 1 and 31. + :type month_days: list[int] + :param monthly_occurrences: Gets or sets the occurrences of days within a + month. + :type monthly_occurrences: + list[~azure.mgmt.scheduler.models.JobRecurrenceScheduleMonthlyOccurrence] + """ + + _attribute_map = { + 'week_days': {'key': 'weekDays', 'type': '[DayOfWeek]'}, + 'hours': {'key': 'hours', 'type': '[int]'}, + 'minutes': {'key': 'minutes', 'type': '[int]'}, + 'month_days': {'key': 'monthDays', 'type': '[int]'}, + 'monthly_occurrences': {'key': 'monthlyOccurrences', 'type': '[JobRecurrenceScheduleMonthlyOccurrence]'}, + } + + def __init__(self, *, week_days=None, hours=None, minutes=None, month_days=None, monthly_occurrences=None, **kwargs) -> None: + super(JobRecurrenceSchedule, self).__init__(**kwargs) + self.week_days = week_days + self.hours = hours + self.minutes = minutes + self.month_days = month_days + self.monthly_occurrences = monthly_occurrences diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_state_filter.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_state_filter.py index 692c1d68bb11..bd8ef19f362a 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_state_filter.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_state_filter.py @@ -17,13 +17,13 @@ class JobStateFilter(Model): :param state: Gets or sets the job state. Possible values include: 'Enabled', 'Disabled', 'Faulted', 'Completed' - :type state: str or :class:`JobState - ` + :type state: str or ~azure.mgmt.scheduler.models.JobState """ _attribute_map = { 'state': {'key': 'state', 'type': 'JobState'}, } - def __init__(self, state=None): - self.state = state + def __init__(self, **kwargs): + super(JobStateFilter, self).__init__(**kwargs) + self.state = kwargs.get('state', None) diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_state_filter_py3.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_state_filter_py3.py new file mode 100644 index 000000000000..fb20c11bf6db --- /dev/null +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_state_filter_py3.py @@ -0,0 +1,29 @@ +# 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 JobStateFilter(Model): + """JobStateFilter. + + :param state: Gets or sets the job state. Possible values include: + 'Enabled', 'Disabled', 'Faulted', 'Completed' + :type state: str or ~azure.mgmt.scheduler.models.JobState + """ + + _attribute_map = { + 'state': {'key': 'state', 'type': 'JobState'}, + } + + def __init__(self, *, state=None, **kwargs) -> None: + super(JobStateFilter, self).__init__(**kwargs) + self.state = state diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_status.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_status.py index 7c0b8ab49f0e..a7fc4b64e49d 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_status.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_status.py @@ -49,7 +49,8 @@ class JobStatus(Model): 'next_execution_time': {'key': 'nextExecutionTime', 'type': 'iso-8601'}, } - def __init__(self): + def __init__(self, **kwargs): + super(JobStatus, self).__init__(**kwargs) self.execution_count = None self.failure_count = None self.faulted_count = None diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_status_py3.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_status_py3.py new file mode 100644 index 000000000000..8b1711b8a203 --- /dev/null +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_status_py3.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class JobStatus(Model): + """JobStatus. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar execution_count: Gets the number of times this job has executed. + :vartype execution_count: int + :ivar failure_count: Gets the number of times this job has failed. + :vartype failure_count: int + :ivar faulted_count: Gets the number of faulted occurrences (occurrences + that were retried and failed as many times as the retry policy states). + :vartype faulted_count: int + :ivar last_execution_time: Gets the time the last occurrence executed in + ISO-8601 format. Could be empty if job has not run yet. + :vartype last_execution_time: datetime + :ivar next_execution_time: Gets the time of the next occurrence in + ISO-8601 format. Could be empty if the job is completed. + :vartype next_execution_time: datetime + """ + + _validation = { + 'execution_count': {'readonly': True}, + 'failure_count': {'readonly': True}, + 'faulted_count': {'readonly': True}, + 'last_execution_time': {'readonly': True}, + 'next_execution_time': {'readonly': True}, + } + + _attribute_map = { + 'execution_count': {'key': 'executionCount', 'type': 'int'}, + 'failure_count': {'key': 'failureCount', 'type': 'int'}, + 'faulted_count': {'key': 'faultedCount', 'type': 'int'}, + 'last_execution_time': {'key': 'lastExecutionTime', 'type': 'iso-8601'}, + 'next_execution_time': {'key': 'nextExecutionTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(JobStatus, self).__init__(**kwargs) + self.execution_count = None + self.failure_count = None + self.faulted_count = None + self.last_execution_time = None + self.next_execution_time = None diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/oauth_authentication.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/oauth_authentication.py index 777ac4bdb310..3e7bda06cbb1 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/oauth_authentication.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/oauth_authentication.py @@ -15,11 +15,10 @@ class OAuthAuthentication(HttpAuthentication): """OAuthAuthentication. - :param type: Gets or sets the HTTP authentication type. Possible values - include: 'NotSpecified', 'ClientCertificate', 'ActiveDirectoryOAuth', - 'Basic' - :type type: str or :class:`HttpAuthenticationType - ` + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str :param secret: Gets or sets the secret, return value will always be empty. :type secret: str :param tenant: Gets or sets the tenant. @@ -30,17 +29,22 @@ class OAuthAuthentication(HttpAuthentication): :type client_id: str """ + _validation = { + 'type': {'required': True}, + } + _attribute_map = { - 'type': {'key': 'type', 'type': 'HttpAuthenticationType'}, + 'type': {'key': 'type', 'type': 'str'}, 'secret': {'key': 'secret', 'type': 'str'}, 'tenant': {'key': 'tenant', 'type': 'str'}, 'audience': {'key': 'audience', 'type': 'str'}, 'client_id': {'key': 'clientId', 'type': 'str'}, } - def __init__(self, type=None, secret=None, tenant=None, audience=None, client_id=None): - super(OAuthAuthentication, self).__init__(type=type) - self.secret = secret - self.tenant = tenant - self.audience = audience - self.client_id = client_id + def __init__(self, **kwargs): + super(OAuthAuthentication, self).__init__(**kwargs) + self.secret = kwargs.get('secret', None) + self.tenant = kwargs.get('tenant', None) + self.audience = kwargs.get('audience', None) + self.client_id = kwargs.get('client_id', None) + self.type = 'ActiveDirectoryOAuth' diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/oauth_authentication_py3.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/oauth_authentication_py3.py new file mode 100644 index 000000000000..98780009a542 --- /dev/null +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/oauth_authentication_py3.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 .http_authentication_py3 import HttpAuthentication + + +class OAuthAuthentication(HttpAuthentication): + """OAuthAuthentication. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param secret: Gets or sets the secret, return value will always be empty. + :type secret: str + :param tenant: Gets or sets the tenant. + :type tenant: str + :param audience: Gets or sets the audience. + :type audience: str + :param client_id: Gets or sets the client identifier. + :type client_id: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'secret': {'key': 'secret', 'type': 'str'}, + 'tenant': {'key': 'tenant', 'type': 'str'}, + 'audience': {'key': 'audience', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__(self, *, secret: str=None, tenant: str=None, audience: str=None, client_id: str=None, **kwargs) -> None: + super(OAuthAuthentication, self).__init__(**kwargs) + self.secret = secret + self.tenant = tenant + self.audience = audience + self.client_id = client_id + self.type = 'ActiveDirectoryOAuth' diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/retry_policy.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/retry_policy.py index 1a9cd22db149..d3f82083878a 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/retry_policy.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/retry_policy.py @@ -17,8 +17,7 @@ class RetryPolicy(Model): :param retry_type: Gets or sets the retry strategy to be used. Possible values include: 'None', 'Fixed' - :type retry_type: str or :class:`RetryType - ` + :type retry_type: str or ~azure.mgmt.scheduler.models.RetryType :param retry_interval: Gets or sets the retry interval between retries, specify duration in ISO 8601 format. :type retry_interval: timedelta @@ -33,7 +32,8 @@ class RetryPolicy(Model): 'retry_count': {'key': 'retryCount', 'type': 'int'}, } - def __init__(self, retry_type=None, retry_interval=None, retry_count=None): - self.retry_type = retry_type - self.retry_interval = retry_interval - self.retry_count = retry_count + def __init__(self, **kwargs): + super(RetryPolicy, self).__init__(**kwargs) + self.retry_type = kwargs.get('retry_type', None) + self.retry_interval = kwargs.get('retry_interval', None) + self.retry_count = kwargs.get('retry_count', None) diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/retry_policy_py3.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/retry_policy_py3.py new file mode 100644 index 000000000000..a68534d382a6 --- /dev/null +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/retry_policy_py3.py @@ -0,0 +1,39 @@ +# 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 RetryPolicy(Model): + """RetryPolicy. + + :param retry_type: Gets or sets the retry strategy to be used. Possible + values include: 'None', 'Fixed' + :type retry_type: str or ~azure.mgmt.scheduler.models.RetryType + :param retry_interval: Gets or sets the retry interval between retries, + specify duration in ISO 8601 format. + :type retry_interval: timedelta + :param retry_count: Gets or sets the number of times a retry should be + attempted. + :type retry_count: int + """ + + _attribute_map = { + 'retry_type': {'key': 'retryType', 'type': 'RetryType'}, + 'retry_interval': {'key': 'retryInterval', 'type': 'duration'}, + 'retry_count': {'key': 'retryCount', 'type': 'int'}, + } + + def __init__(self, *, retry_type=None, retry_interval=None, retry_count: int=None, **kwargs) -> None: + super(RetryPolicy, self).__init__(**kwargs) + self.retry_type = retry_type + self.retry_interval = retry_interval + self.retry_count = retry_count diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/scheduler_management_client_enums.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/scheduler_management_client_enums.py index de93816e54cd..82ace50befd5 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/scheduler_management_client_enums.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/scheduler_management_client_enums.py @@ -12,7 +12,7 @@ from enum import Enum -class SkuDefinition(Enum): +class SkuDefinition(str, Enum): standard = "Standard" free = "Free" @@ -20,7 +20,7 @@ class SkuDefinition(Enum): p20_premium = "P20Premium" -class JobCollectionState(Enum): +class JobCollectionState(str, Enum): enabled = "Enabled" disabled = "Disabled" @@ -28,7 +28,7 @@ class JobCollectionState(Enum): deleted = "Deleted" -class RecurrenceFrequency(Enum): +class RecurrenceFrequency(str, Enum): minute = "Minute" hour = "Hour" @@ -37,7 +37,7 @@ class RecurrenceFrequency(Enum): month = "Month" -class JobActionType(Enum): +class JobActionType(str, Enum): http = "Http" https = "Https" @@ -46,21 +46,13 @@ class JobActionType(Enum): service_bus_topic = "ServiceBusTopic" -class HttpAuthenticationType(Enum): - - not_specified = "NotSpecified" - client_certificate = "ClientCertificate" - active_directory_oauth = "ActiveDirectoryOAuth" - basic = "Basic" - - -class RetryType(Enum): +class RetryType(str, Enum): none = "None" fixed = "Fixed" -class DayOfWeek(Enum): +class DayOfWeek(str, Enum): sunday = "Sunday" monday = "Monday" @@ -71,7 +63,7 @@ class DayOfWeek(Enum): saturday = "Saturday" -class JobScheduleDay(Enum): +class JobScheduleDay(str, Enum): monday = "Monday" tuesday = "Tuesday" @@ -82,7 +74,7 @@ class JobScheduleDay(Enum): sunday = "Sunday" -class JobState(Enum): +class JobState(str, Enum): enabled = "Enabled" disabled = "Disabled" @@ -90,26 +82,26 @@ class JobState(Enum): completed = "Completed" -class JobHistoryActionName(Enum): +class JobHistoryActionName(str, Enum): main_action = "MainAction" error_action = "ErrorAction" -class JobExecutionStatus(Enum): +class JobExecutionStatus(str, Enum): completed = "Completed" failed = "Failed" postponed = "Postponed" -class ServiceBusAuthenticationType(Enum): +class ServiceBusAuthenticationType(str, Enum): not_specified = "NotSpecified" shared_access_key = "SharedAccessKey" -class ServiceBusTransportType(Enum): +class ServiceBusTransportType(str, Enum): not_specified = "NotSpecified" net_messaging = "NetMessaging" diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_authentication.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_authentication.py index 08a424a6565f..bb524a8c1114 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_authentication.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_authentication.py @@ -21,8 +21,8 @@ class ServiceBusAuthentication(Model): :type sas_key_name: str :param type: Gets or sets the authentication type. Possible values include: 'NotSpecified', 'SharedAccessKey' - :type type: str or :class:`ServiceBusAuthenticationType - ` + :type type: str or + ~azure.mgmt.scheduler.models.ServiceBusAuthenticationType """ _attribute_map = { @@ -31,7 +31,8 @@ class ServiceBusAuthentication(Model): 'type': {'key': 'type', 'type': 'ServiceBusAuthenticationType'}, } - def __init__(self, sas_key=None, sas_key_name=None, type=None): - self.sas_key = sas_key - self.sas_key_name = sas_key_name - self.type = type + def __init__(self, **kwargs): + super(ServiceBusAuthentication, self).__init__(**kwargs) + self.sas_key = kwargs.get('sas_key', None) + self.sas_key_name = kwargs.get('sas_key_name', None) + self.type = kwargs.get('type', None) diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_authentication_py3.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_authentication_py3.py new file mode 100644 index 000000000000..3cd3c85d3ed9 --- /dev/null +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_authentication_py3.py @@ -0,0 +1,38 @@ +# 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 ServiceBusAuthentication(Model): + """ServiceBusAuthentication. + + :param sas_key: Gets or sets the SAS key. + :type sas_key: str + :param sas_key_name: Gets or sets the SAS key name. + :type sas_key_name: str + :param type: Gets or sets the authentication type. Possible values + include: 'NotSpecified', 'SharedAccessKey' + :type type: str or + ~azure.mgmt.scheduler.models.ServiceBusAuthenticationType + """ + + _attribute_map = { + 'sas_key': {'key': 'sasKey', 'type': 'str'}, + 'sas_key_name': {'key': 'sasKeyName', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ServiceBusAuthenticationType'}, + } + + def __init__(self, *, sas_key: str=None, sas_key_name: str=None, type=None, **kwargs) -> None: + super(ServiceBusAuthentication, self).__init__(**kwargs) + self.sas_key = sas_key + self.sas_key_name = sas_key_name + self.type = type diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_brokered_message_properties.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_brokered_message_properties.py index 06eacf05b930..dc6b3f5eb539 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_brokered_message_properties.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_brokered_message_properties.py @@ -60,17 +60,18 @@ class ServiceBusBrokeredMessageProperties(Model): 'via_partition_key': {'key': 'viaPartitionKey', 'type': 'str'}, } - def __init__(self, content_type=None, correlation_id=None, force_persistence=None, label=None, message_id=None, partition_key=None, reply_to=None, reply_to_session_id=None, scheduled_enqueue_time_utc=None, session_id=None, time_to_live=None, to=None, via_partition_key=None): - self.content_type = content_type - self.correlation_id = correlation_id - self.force_persistence = force_persistence - self.label = label - self.message_id = message_id - self.partition_key = partition_key - self.reply_to = reply_to - self.reply_to_session_id = reply_to_session_id - self.scheduled_enqueue_time_utc = scheduled_enqueue_time_utc - self.session_id = session_id - self.time_to_live = time_to_live - self.to = to - self.via_partition_key = via_partition_key + def __init__(self, **kwargs): + super(ServiceBusBrokeredMessageProperties, self).__init__(**kwargs) + self.content_type = kwargs.get('content_type', None) + self.correlation_id = kwargs.get('correlation_id', None) + self.force_persistence = kwargs.get('force_persistence', None) + self.label = kwargs.get('label', None) + self.message_id = kwargs.get('message_id', None) + self.partition_key = kwargs.get('partition_key', None) + self.reply_to = kwargs.get('reply_to', None) + self.reply_to_session_id = kwargs.get('reply_to_session_id', None) + self.scheduled_enqueue_time_utc = kwargs.get('scheduled_enqueue_time_utc', None) + self.session_id = kwargs.get('session_id', None) + self.time_to_live = kwargs.get('time_to_live', None) + self.to = kwargs.get('to', None) + self.via_partition_key = kwargs.get('via_partition_key', None) diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_brokered_message_properties_py3.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_brokered_message_properties_py3.py new file mode 100644 index 000000000000..70311750ff46 --- /dev/null +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_brokered_message_properties_py3.py @@ -0,0 +1,77 @@ +# 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 ServiceBusBrokeredMessageProperties(Model): + """ServiceBusBrokeredMessageProperties. + + :param content_type: Gets or sets the content type. + :type content_type: str + :param correlation_id: Gets or sets the correlation ID. + :type correlation_id: str + :param force_persistence: Gets or sets the force persistence. + :type force_persistence: bool + :param label: Gets or sets the label. + :type label: str + :param message_id: Gets or sets the message ID. + :type message_id: str + :param partition_key: Gets or sets the partition key. + :type partition_key: str + :param reply_to: Gets or sets the reply to. + :type reply_to: str + :param reply_to_session_id: Gets or sets the reply to session ID. + :type reply_to_session_id: str + :param scheduled_enqueue_time_utc: Gets or sets the scheduled enqueue time + UTC. + :type scheduled_enqueue_time_utc: datetime + :param session_id: Gets or sets the session ID. + :type session_id: str + :param time_to_live: Gets or sets the time to live. + :type time_to_live: timedelta + :param to: Gets or sets the to. + :type to: str + :param via_partition_key: Gets or sets the via partition key. + :type via_partition_key: str + """ + + _attribute_map = { + 'content_type': {'key': 'contentType', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'force_persistence': {'key': 'forcePersistence', 'type': 'bool'}, + 'label': {'key': 'label', 'type': 'str'}, + 'message_id': {'key': 'messageId', 'type': 'str'}, + 'partition_key': {'key': 'partitionKey', 'type': 'str'}, + 'reply_to': {'key': 'replyTo', 'type': 'str'}, + 'reply_to_session_id': {'key': 'replyToSessionId', 'type': 'str'}, + 'scheduled_enqueue_time_utc': {'key': 'scheduledEnqueueTimeUtc', 'type': 'iso-8601'}, + 'session_id': {'key': 'sessionId', 'type': 'str'}, + 'time_to_live': {'key': 'timeToLive', 'type': 'duration'}, + 'to': {'key': 'to', 'type': 'str'}, + 'via_partition_key': {'key': 'viaPartitionKey', 'type': 'str'}, + } + + def __init__(self, *, content_type: str=None, correlation_id: str=None, force_persistence: bool=None, label: str=None, message_id: str=None, partition_key: str=None, reply_to: str=None, reply_to_session_id: str=None, scheduled_enqueue_time_utc=None, session_id: str=None, time_to_live=None, to: str=None, via_partition_key: str=None, **kwargs) -> None: + super(ServiceBusBrokeredMessageProperties, self).__init__(**kwargs) + self.content_type = content_type + self.correlation_id = correlation_id + self.force_persistence = force_persistence + self.label = label + self.message_id = message_id + self.partition_key = partition_key + self.reply_to = reply_to + self.reply_to_session_id = reply_to_session_id + self.scheduled_enqueue_time_utc = scheduled_enqueue_time_utc + self.session_id = session_id + self.time_to_live = time_to_live + self.to = to + self.via_partition_key = via_partition_key diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_message.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_message.py index b459c4db2c82..bb257dea5565 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_message.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_message.py @@ -16,24 +16,23 @@ class ServiceBusMessage(Model): """ServiceBusMessage. :param authentication: Gets or sets the Service Bus authentication. - :type authentication: :class:`ServiceBusAuthentication - ` + :type authentication: + ~azure.mgmt.scheduler.models.ServiceBusAuthentication :param brokered_message_properties: Gets or sets the brokered message properties. :type brokered_message_properties: - :class:`ServiceBusBrokeredMessageProperties - ` + ~azure.mgmt.scheduler.models.ServiceBusBrokeredMessageProperties :param custom_message_properties: Gets or sets the custom message properties. - :type custom_message_properties: dict + :type custom_message_properties: dict[str, str] :param message: Gets or sets the message. :type message: str :param namespace: Gets or sets the namespace. :type namespace: str :param transport_type: Gets or sets the transport type. Possible values include: 'NotSpecified', 'NetMessaging', 'AMQP' - :type transport_type: str or :class:`ServiceBusTransportType - ` + :type transport_type: str or + ~azure.mgmt.scheduler.models.ServiceBusTransportType """ _attribute_map = { @@ -45,10 +44,11 @@ class ServiceBusMessage(Model): 'transport_type': {'key': 'transportType', 'type': 'ServiceBusTransportType'}, } - def __init__(self, authentication=None, brokered_message_properties=None, custom_message_properties=None, message=None, namespace=None, transport_type=None): - self.authentication = authentication - self.brokered_message_properties = brokered_message_properties - self.custom_message_properties = custom_message_properties - self.message = message - self.namespace = namespace - self.transport_type = transport_type + def __init__(self, **kwargs): + super(ServiceBusMessage, self).__init__(**kwargs) + self.authentication = kwargs.get('authentication', None) + self.brokered_message_properties = kwargs.get('brokered_message_properties', None) + self.custom_message_properties = kwargs.get('custom_message_properties', None) + self.message = kwargs.get('message', None) + self.namespace = kwargs.get('namespace', None) + self.transport_type = kwargs.get('transport_type', None) diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_message_py3.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_message_py3.py new file mode 100644 index 000000000000..09e8d477dd17 --- /dev/null +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_message_py3.py @@ -0,0 +1,54 @@ +# 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 ServiceBusMessage(Model): + """ServiceBusMessage. + + :param authentication: Gets or sets the Service Bus authentication. + :type authentication: + ~azure.mgmt.scheduler.models.ServiceBusAuthentication + :param brokered_message_properties: Gets or sets the brokered message + properties. + :type brokered_message_properties: + ~azure.mgmt.scheduler.models.ServiceBusBrokeredMessageProperties + :param custom_message_properties: Gets or sets the custom message + properties. + :type custom_message_properties: dict[str, str] + :param message: Gets or sets the message. + :type message: str + :param namespace: Gets or sets the namespace. + :type namespace: str + :param transport_type: Gets or sets the transport type. Possible values + include: 'NotSpecified', 'NetMessaging', 'AMQP' + :type transport_type: str or + ~azure.mgmt.scheduler.models.ServiceBusTransportType + """ + + _attribute_map = { + 'authentication': {'key': 'authentication', 'type': 'ServiceBusAuthentication'}, + 'brokered_message_properties': {'key': 'brokeredMessageProperties', 'type': 'ServiceBusBrokeredMessageProperties'}, + 'custom_message_properties': {'key': 'customMessageProperties', 'type': '{str}'}, + 'message': {'key': 'message', 'type': 'str'}, + 'namespace': {'key': 'namespace', 'type': 'str'}, + 'transport_type': {'key': 'transportType', 'type': 'ServiceBusTransportType'}, + } + + def __init__(self, *, authentication=None, brokered_message_properties=None, custom_message_properties=None, message: str=None, namespace: str=None, transport_type=None, **kwargs) -> None: + super(ServiceBusMessage, self).__init__(**kwargs) + self.authentication = authentication + self.brokered_message_properties = brokered_message_properties + self.custom_message_properties = custom_message_properties + self.message = message + self.namespace = namespace + self.transport_type = transport_type diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_queue_message.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_queue_message.py index 3ad865a294e5..7650cffd2caa 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_queue_message.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_queue_message.py @@ -16,24 +16,23 @@ class ServiceBusQueueMessage(ServiceBusMessage): """ServiceBusQueueMessage. :param authentication: Gets or sets the Service Bus authentication. - :type authentication: :class:`ServiceBusAuthentication - ` + :type authentication: + ~azure.mgmt.scheduler.models.ServiceBusAuthentication :param brokered_message_properties: Gets or sets the brokered message properties. :type brokered_message_properties: - :class:`ServiceBusBrokeredMessageProperties - ` + ~azure.mgmt.scheduler.models.ServiceBusBrokeredMessageProperties :param custom_message_properties: Gets or sets the custom message properties. - :type custom_message_properties: dict + :type custom_message_properties: dict[str, str] :param message: Gets or sets the message. :type message: str :param namespace: Gets or sets the namespace. :type namespace: str :param transport_type: Gets or sets the transport type. Possible values include: 'NotSpecified', 'NetMessaging', 'AMQP' - :type transport_type: str or :class:`ServiceBusTransportType - ` + :type transport_type: str or + ~azure.mgmt.scheduler.models.ServiceBusTransportType :param queue_name: Gets or sets the queue name. :type queue_name: str """ @@ -48,6 +47,6 @@ class ServiceBusQueueMessage(ServiceBusMessage): 'queue_name': {'key': 'queueName', 'type': 'str'}, } - def __init__(self, authentication=None, brokered_message_properties=None, custom_message_properties=None, message=None, namespace=None, transport_type=None, queue_name=None): - super(ServiceBusQueueMessage, self).__init__(authentication=authentication, brokered_message_properties=brokered_message_properties, custom_message_properties=custom_message_properties, message=message, namespace=namespace, transport_type=transport_type) - self.queue_name = queue_name + def __init__(self, **kwargs): + super(ServiceBusQueueMessage, self).__init__(**kwargs) + self.queue_name = kwargs.get('queue_name', None) diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_queue_message_py3.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_queue_message_py3.py new file mode 100644 index 000000000000..1ecd14fb7d6a --- /dev/null +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_queue_message_py3.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .service_bus_message_py3 import ServiceBusMessage + + +class ServiceBusQueueMessage(ServiceBusMessage): + """ServiceBusQueueMessage. + + :param authentication: Gets or sets the Service Bus authentication. + :type authentication: + ~azure.mgmt.scheduler.models.ServiceBusAuthentication + :param brokered_message_properties: Gets or sets the brokered message + properties. + :type brokered_message_properties: + ~azure.mgmt.scheduler.models.ServiceBusBrokeredMessageProperties + :param custom_message_properties: Gets or sets the custom message + properties. + :type custom_message_properties: dict[str, str] + :param message: Gets or sets the message. + :type message: str + :param namespace: Gets or sets the namespace. + :type namespace: str + :param transport_type: Gets or sets the transport type. Possible values + include: 'NotSpecified', 'NetMessaging', 'AMQP' + :type transport_type: str or + ~azure.mgmt.scheduler.models.ServiceBusTransportType + :param queue_name: Gets or sets the queue name. + :type queue_name: str + """ + + _attribute_map = { + 'authentication': {'key': 'authentication', 'type': 'ServiceBusAuthentication'}, + 'brokered_message_properties': {'key': 'brokeredMessageProperties', 'type': 'ServiceBusBrokeredMessageProperties'}, + 'custom_message_properties': {'key': 'customMessageProperties', 'type': '{str}'}, + 'message': {'key': 'message', 'type': 'str'}, + 'namespace': {'key': 'namespace', 'type': 'str'}, + 'transport_type': {'key': 'transportType', 'type': 'ServiceBusTransportType'}, + 'queue_name': {'key': 'queueName', 'type': 'str'}, + } + + def __init__(self, *, authentication=None, brokered_message_properties=None, custom_message_properties=None, message: str=None, namespace: str=None, transport_type=None, queue_name: str=None, **kwargs) -> None: + super(ServiceBusQueueMessage, self).__init__(authentication=authentication, brokered_message_properties=brokered_message_properties, custom_message_properties=custom_message_properties, message=message, namespace=namespace, transport_type=transport_type, **kwargs) + self.queue_name = queue_name diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_topic_message.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_topic_message.py index 8c7509524414..429f98cc0bea 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_topic_message.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_topic_message.py @@ -16,24 +16,23 @@ class ServiceBusTopicMessage(ServiceBusMessage): """ServiceBusTopicMessage. :param authentication: Gets or sets the Service Bus authentication. - :type authentication: :class:`ServiceBusAuthentication - ` + :type authentication: + ~azure.mgmt.scheduler.models.ServiceBusAuthentication :param brokered_message_properties: Gets or sets the brokered message properties. :type brokered_message_properties: - :class:`ServiceBusBrokeredMessageProperties - ` + ~azure.mgmt.scheduler.models.ServiceBusBrokeredMessageProperties :param custom_message_properties: Gets or sets the custom message properties. - :type custom_message_properties: dict + :type custom_message_properties: dict[str, str] :param message: Gets or sets the message. :type message: str :param namespace: Gets or sets the namespace. :type namespace: str :param transport_type: Gets or sets the transport type. Possible values include: 'NotSpecified', 'NetMessaging', 'AMQP' - :type transport_type: str or :class:`ServiceBusTransportType - ` + :type transport_type: str or + ~azure.mgmt.scheduler.models.ServiceBusTransportType :param topic_path: Gets or sets the topic path. :type topic_path: str """ @@ -48,6 +47,6 @@ class ServiceBusTopicMessage(ServiceBusMessage): 'topic_path': {'key': 'topicPath', 'type': 'str'}, } - def __init__(self, authentication=None, brokered_message_properties=None, custom_message_properties=None, message=None, namespace=None, transport_type=None, topic_path=None): - super(ServiceBusTopicMessage, self).__init__(authentication=authentication, brokered_message_properties=brokered_message_properties, custom_message_properties=custom_message_properties, message=message, namespace=namespace, transport_type=transport_type) - self.topic_path = topic_path + def __init__(self, **kwargs): + super(ServiceBusTopicMessage, self).__init__(**kwargs) + self.topic_path = kwargs.get('topic_path', None) diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_topic_message_py3.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_topic_message_py3.py new file mode 100644 index 000000000000..16a3862cb8f5 --- /dev/null +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_topic_message_py3.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .service_bus_message_py3 import ServiceBusMessage + + +class ServiceBusTopicMessage(ServiceBusMessage): + """ServiceBusTopicMessage. + + :param authentication: Gets or sets the Service Bus authentication. + :type authentication: + ~azure.mgmt.scheduler.models.ServiceBusAuthentication + :param brokered_message_properties: Gets or sets the brokered message + properties. + :type brokered_message_properties: + ~azure.mgmt.scheduler.models.ServiceBusBrokeredMessageProperties + :param custom_message_properties: Gets or sets the custom message + properties. + :type custom_message_properties: dict[str, str] + :param message: Gets or sets the message. + :type message: str + :param namespace: Gets or sets the namespace. + :type namespace: str + :param transport_type: Gets or sets the transport type. Possible values + include: 'NotSpecified', 'NetMessaging', 'AMQP' + :type transport_type: str or + ~azure.mgmt.scheduler.models.ServiceBusTransportType + :param topic_path: Gets or sets the topic path. + :type topic_path: str + """ + + _attribute_map = { + 'authentication': {'key': 'authentication', 'type': 'ServiceBusAuthentication'}, + 'brokered_message_properties': {'key': 'brokeredMessageProperties', 'type': 'ServiceBusBrokeredMessageProperties'}, + 'custom_message_properties': {'key': 'customMessageProperties', 'type': '{str}'}, + 'message': {'key': 'message', 'type': 'str'}, + 'namespace': {'key': 'namespace', 'type': 'str'}, + 'transport_type': {'key': 'transportType', 'type': 'ServiceBusTransportType'}, + 'topic_path': {'key': 'topicPath', 'type': 'str'}, + } + + def __init__(self, *, authentication=None, brokered_message_properties=None, custom_message_properties=None, message: str=None, namespace: str=None, transport_type=None, topic_path: str=None, **kwargs) -> None: + super(ServiceBusTopicMessage, self).__init__(authentication=authentication, brokered_message_properties=brokered_message_properties, custom_message_properties=custom_message_properties, message=message, namespace=namespace, transport_type=transport_type, **kwargs) + self.topic_path = topic_path diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/sku.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/sku.py index 3adba9eb4478..a0f85333a6a3 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/sku.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/sku.py @@ -17,13 +17,13 @@ class Sku(Model): :param name: Gets or set the SKU. Possible values include: 'Standard', 'Free', 'P10Premium', 'P20Premium' - :type name: str or :class:`SkuDefinition - ` + :type name: str or ~azure.mgmt.scheduler.models.SkuDefinition """ _attribute_map = { 'name': {'key': 'name', 'type': 'SkuDefinition'}, } - def __init__(self, name=None): - self.name = name + def __init__(self, **kwargs): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/sku_py3.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/sku_py3.py new file mode 100644 index 000000000000..ad04e60dbaf5 --- /dev/null +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/sku_py3.py @@ -0,0 +1,29 @@ +# 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): + """Sku. + + :param name: Gets or set the SKU. Possible values include: 'Standard', + 'Free', 'P10Premium', 'P20Premium' + :type name: str or ~azure.mgmt.scheduler.models.SkuDefinition + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'SkuDefinition'}, + } + + def __init__(self, *, name=None, **kwargs) -> None: + super(Sku, self).__init__(**kwargs) + self.name = name diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/storage_queue_message.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/storage_queue_message.py index 04d7b5c323f4..46e6906f48d1 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/storage_queue_message.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/storage_queue_message.py @@ -32,8 +32,9 @@ class StorageQueueMessage(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self, storage_account=None, queue_name=None, sas_token=None, message=None): - self.storage_account = storage_account - self.queue_name = queue_name - self.sas_token = sas_token - self.message = message + def __init__(self, **kwargs): + super(StorageQueueMessage, self).__init__(**kwargs) + self.storage_account = kwargs.get('storage_account', None) + self.queue_name = kwargs.get('queue_name', None) + self.sas_token = kwargs.get('sas_token', None) + self.message = kwargs.get('message', None) diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/storage_queue_message_py3.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/storage_queue_message_py3.py new file mode 100644 index 000000000000..f88c7a0add57 --- /dev/null +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/storage_queue_message_py3.py @@ -0,0 +1,40 @@ +# 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 StorageQueueMessage(Model): + """StorageQueueMessage. + + :param storage_account: Gets or sets the storage account name. + :type storage_account: str + :param queue_name: Gets or sets the queue name. + :type queue_name: str + :param sas_token: Gets or sets the SAS key. + :type sas_token: str + :param message: Gets or sets the message. + :type message: str + """ + + _attribute_map = { + 'storage_account': {'key': 'storageAccount', 'type': 'str'}, + 'queue_name': {'key': 'queueName', 'type': 'str'}, + 'sas_token': {'key': 'sasToken', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, storage_account: str=None, queue_name: str=None, sas_token: str=None, message: str=None, **kwargs) -> None: + super(StorageQueueMessage, self).__init__(**kwargs) + self.storage_account = storage_account + self.queue_name = queue_name + self.sas_token = sas_token + self.message = message diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/operations/job_collections_operations.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/operations/job_collections_operations.py index 3528d5090fc1..ae105960fdea 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/operations/job_collections_operations.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/operations/job_collections_operations.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -from msrestazure.azure_operation import AzureOperationPoller -import uuid +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -23,10 +24,12 @@ class JobCollectionsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version. Constant value: "2016-03-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -45,15 +48,16 @@ def list_by_subscription( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`JobCollectionDefinitionPaged - ` + :return: An iterator like instance of JobCollectionDefinition + :rtype: + ~azure.mgmt.scheduler.models.JobCollectionDefinitionPaged[~azure.mgmt.scheduler.models.JobCollectionDefinition] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.Scheduler/jobCollections' + url = self.list_by_subscription.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -80,7 +84,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -98,6 +102,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Scheduler/jobCollections'} def list_by_resource_group( self, resource_group_name, custom_headers=None, raw=False, **operation_config): @@ -110,15 +115,16 @@ def list_by_resource_group( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`JobCollectionDefinitionPaged - ` + :return: An iterator like instance of JobCollectionDefinition + :rtype: + ~azure.mgmt.scheduler.models.JobCollectionDefinitionPaged[~azure.mgmt.scheduler.models.JobCollectionDefinition] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections' + url = self.list_by_resource_group.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') @@ -146,7 +152,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -164,6 +170,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections'} def get( self, resource_group_name, job_collection_name, custom_headers=None, raw=False, **operation_config): @@ -178,14 +185,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`JobCollectionDefinition - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: JobCollectionDefinition or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.scheduler.models.JobCollectionDefinition or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -209,7 +215,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -226,6 +232,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}'} def create_or_update( self, resource_group_name, job_collection_name, job_collection, custom_headers=None, raw=False, **operation_config): @@ -236,21 +243,20 @@ def create_or_update( :param job_collection_name: The job collection name. :type job_collection_name: str :param job_collection: The job collection definition. - :type job_collection: :class:`JobCollectionDefinition - ` + :type job_collection: + ~azure.mgmt.scheduler.models.JobCollectionDefinition :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`. - :rtype: :class:`JobCollectionDefinition - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: JobCollectionDefinition or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.scheduler.models.JobCollectionDefinition or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -278,7 +284,7 @@ def create_or_update( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -297,6 +303,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}'} def patch( self, resource_group_name, job_collection_name, job_collection, custom_headers=None, raw=False, **operation_config): @@ -307,21 +314,20 @@ def patch( :param job_collection_name: The job collection name. :type job_collection_name: str :param job_collection: The job collection definition. - :type job_collection: :class:`JobCollectionDefinition - ` + :type job_collection: + ~azure.mgmt.scheduler.models.JobCollectionDefinition :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`. - :rtype: :class:`JobCollectionDefinition - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: JobCollectionDefinition or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.scheduler.models.JobCollectionDefinition or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}' + url = self.patch.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -349,7 +355,7 @@ def patch( # Construct and send request request = self._client.patch(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -366,27 +372,13 @@ def patch( return client_raw_response return deserialized + patch.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}'} - def delete( - self, resource_group_name, job_collection_name, custom_headers=None, raw=False, **operation_config): - """Deletes a job collection. - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param job_collection_name: The job collection name. - :type job_collection_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 - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ + def _delete_initial( + self, resource_group_name, job_collection_name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}' + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -409,61 +401,64 @@ def delete( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - def long_running_send(): + 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) - return self._client.send(request, header_parameters, **operation_config) - - def get_long_running_status(status_link, headers=None): + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response - def get_long_running_output(response): + def delete( + self, resource_group_name, job_collection_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a job collection. - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param job_collection_name: The job collection name. + :type job_collection_name: str + :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 None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + job_collection_name=job_collection_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + def get_long_running_output(response): if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, 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) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}'} - def enable( - self, resource_group_name, job_collection_name, custom_headers=None, raw=False, **operation_config): - """Enables all of the jobs in the job collection. - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param job_collection_name: The job collection name. - :type job_collection_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 - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ + def _enable_initial( + self, resource_group_name, job_collection_name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/enable' + url = self.enable.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -486,61 +481,64 @@ def enable( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - def long_running_send(): - - request = self._client.post(url, query_parameters) - return self._client.send(request, header_parameters, **operation_config) + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) - def get_long_running_status(status_link, headers=None): + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response - def get_long_running_output(response): + def enable( + self, resource_group_name, job_collection_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Enables all of the jobs in the job collection. - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param job_collection_name: The job collection name. + :type job_collection_name: str + :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 None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._enable_initial( + resource_group_name=resource_group_name, + job_collection_name=job_collection_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + def get_long_running_output(response): if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, 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) + enable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/enable'} - def disable( - self, resource_group_name, job_collection_name, custom_headers=None, raw=False, **operation_config): - """Disables all of the jobs in the job collection. - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param job_collection_name: The job collection name. - :type job_collection_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 - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ + def _disable_initial( + self, resource_group_name, job_collection_name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/disable' + url = self.disable.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -563,37 +561,55 @@ def disable( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - def long_running_send(): - - request = self._client.post(url, query_parameters) - return self._client.send(request, header_parameters, **operation_config) + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) - def get_long_running_status(status_link, headers=None): + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response - def get_long_running_output(response): + def disable( + self, resource_group_name, job_collection_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Disables all of the jobs in the job collection. - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param job_collection_name: The job collection name. + :type job_collection_name: str + :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 None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._disable_initial( + resource_group_name=resource_group_name, + job_collection_name=job_collection_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + def get_long_running_output(response): if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, 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) + disable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/disable'} diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/operations/jobs_operations.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/operations/jobs_operations.py index a8a6aae1ae4a..9a25fdbae7a2 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/operations/jobs_operations.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/operations/jobs_operations.py @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -import uuid from .. import models @@ -22,10 +22,12 @@ class JobsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version. Constant value: "2016-03-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -50,14 +52,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`JobDefinition - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: JobDefinition or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.scheduler.models.JobDefinition or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/jobs/{jobName}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -82,7 +83,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -99,6 +100,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/jobs/{jobName}'} def create_or_update( self, resource_group_name, job_collection_name, job_name, properties=None, custom_headers=None, raw=False, **operation_config): @@ -111,23 +113,21 @@ def create_or_update( :param job_name: The job name. :type job_name: str :param properties: Gets or sets the job properties. - :type properties: :class:`JobProperties - ` + :type properties: ~azure.mgmt.scheduler.models.JobProperties :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`. - :rtype: :class:`JobDefinition - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: JobDefinition or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.scheduler.models.JobDefinition or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ job = models.JobDefinition(properties=properties) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/jobs/{jobName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -156,7 +156,7 @@ def create_or_update( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -175,6 +175,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/jobs/{jobName}'} def patch( self, resource_group_name, job_collection_name, job_name, properties=None, custom_headers=None, raw=False, **operation_config): @@ -187,23 +188,21 @@ def patch( :param job_name: The job name. :type job_name: str :param properties: Gets or sets the job properties. - :type properties: :class:`JobProperties - ` + :type properties: ~azure.mgmt.scheduler.models.JobProperties :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`. - :rtype: :class:`JobDefinition - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: JobDefinition or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.scheduler.models.JobDefinition or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ job = models.JobDefinition(properties=properties) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/jobs/{jobName}' + url = self.patch.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -232,7 +231,7 @@ def patch( # Construct and send request request = self._client.patch(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -249,6 +248,7 @@ def patch( return client_raw_response return deserialized + patch.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/jobs/{jobName}'} def delete( self, resource_group_name, job_collection_name, job_name, custom_headers=None, raw=False, **operation_config): @@ -265,13 +265,12 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/jobs/{jobName}' + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -296,7 +295,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -306,6 +305,7 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/jobs/{jobName}'} def run( self, resource_group_name, job_collection_name, job_name, custom_headers=None, raw=False, **operation_config): @@ -322,13 +322,12 @@ def run( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/jobs/{jobName}/run' + url = self.run.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -353,7 +352,7 @@ def run( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -363,6 +362,7 @@ def run( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + run.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/jobs/{jobName}/run'} def list( self, resource_group_name, job_collection_name, top=None, skip=None, filter=None, custom_headers=None, raw=False, **operation_config): @@ -385,15 +385,16 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`JobDefinitionPaged - ` + :return: An iterator like instance of JobDefinition + :rtype: + ~azure.mgmt.scheduler.models.JobDefinitionPaged[~azure.mgmt.scheduler.models.JobDefinition] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/jobs' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -428,7 +429,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -446,6 +447,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/jobs'} def list_job_history( self, resource_group_name, job_collection_name, job_name, top=None, skip=None, filter=None, custom_headers=None, raw=False, **operation_config): @@ -470,15 +472,16 @@ def list_job_history( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`JobHistoryDefinitionPaged - ` + :return: An iterator like instance of JobHistoryDefinition + :rtype: + ~azure.mgmt.scheduler.models.JobHistoryDefinitionPaged[~azure.mgmt.scheduler.models.JobHistoryDefinition] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/jobs/{jobName}/history' + url = self.list_job_history.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -514,7 +517,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -532,3 +535,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/jobs/{jobName}/history'} diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/scheduler_management_client.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/scheduler_management_client.py index e78a1c6cabea..d2b479f5e98b 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/scheduler_management_client.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/scheduler_management_client.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import ServiceClient +from msrest.service_client import SDKClient from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION @@ -39,30 +39,28 @@ def __init__( raise ValueError("Parameter 'credentials' must not be None.") if subscription_id is None: raise ValueError("Parameter 'subscription_id' must not be None.") - if not isinstance(subscription_id, str): - raise TypeError("Parameter 'subscription_id' must be str.") if not base_url: base_url = 'https://management.azure.com' super(SchedulerManagementClientConfiguration, self).__init__(base_url) - self.add_user_agent('schedulermanagementclient/{}'.format(VERSION)) + self.add_user_agent('azure-mgmt-scheduler/{}'.format(VERSION)) self.add_user_agent('Azure-SDK-For-Python') self.credentials = credentials self.subscription_id = subscription_id -class SchedulerManagementClient(object): +class SchedulerManagementClient(SDKClient): """SchedulerManagementClient :ivar config: Configuration for client. :vartype config: SchedulerManagementClientConfiguration :ivar job_collections: JobCollections operations - :vartype job_collections: .operations.JobCollectionsOperations + :vartype job_collections: azure.mgmt.scheduler.operations.JobCollectionsOperations :ivar jobs: Jobs operations - :vartype jobs: .operations.JobsOperations + :vartype jobs: azure.mgmt.scheduler.operations.JobsOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -76,7 +74,7 @@ def __init__( self, credentials, subscription_id, base_url=None): self.config = SchedulerManagementClientConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) + super(SchedulerManagementClient, 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 = '2016-03-01' diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/version.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/version.py index ba555a9074f2..53c4c7ea05e8 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/version.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "1.1.3" +VERSION = "2.0.0" diff --git a/azure-mgmt-scheduler/sdk_packaging.toml b/azure-mgmt-scheduler/sdk_packaging.toml new file mode 100644 index 000000000000..67fca4a18ae9 --- /dev/null +++ b/azure-mgmt-scheduler/sdk_packaging.toml @@ -0,0 +1,6 @@ +[packaging] +package_name = "azure-mgmt-scheduler" +package_pprint_name = "Scheduler Management" +package_doc_id = "scheduler" +is_stable = true + diff --git a/azure-mgmt-scheduler/setup.py b/azure-mgmt-scheduler/setup.py index d4c39e3e7653..da4e8c3223d3 100644 --- a/azure-mgmt-scheduler/setup.py +++ b/azure-mgmt-scheduler/setup.py @@ -69,7 +69,6 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', @@ -78,7 +77,7 @@ zip_safe=False, packages=find_packages(exclude=["tests"]), install_requires=[ - 'msrestazure~=0.4.11', + 'msrestazure>=0.4.27,<2.0.0', 'azure-common~=1.1', ], cmdclass=cmdclass diff --git a/azure-mgmt-search/HISTORY.rst b/azure-mgmt-search/HISTORY.rst index c89571fdc7ab..c143af0d63ad 100644 --- a/azure-mgmt-search/HISTORY.rst +++ b/azure-mgmt-search/HISTORY.rst @@ -3,6 +3,45 @@ Release History =============== +2.0.0 (2018-05-21) +++++++++++++++++++ + +**General Breaking changes** + +This version uses a next-generation code generator that *might* introduce breaking changes. + +- Model signatures now use only keyword-argument syntax. All positional arguments must be re-written as keyword-arguments. + To keep auto-completion in most cases, models are now generated for Python 2 and Python 3. Python 3 uses the "*" syntax for keyword-only arguments. +- Enum types now use the "str" mixin (class AzureEnum(str, Enum)) to improve the behavior when unrecognized enum values are encountered. + While this is not a breaking change, the distinctions are important, and are documented here: + https://docs.python.org/3/library/enum.html#others + At a glance: + + - "is" should not be used at all. + - "format" will return the string value, where "%s" string formatting will return `NameOfEnum.stringvalue`. Format syntax should be prefered. + +- New Long Running Operation: + + - Return type changes from `msrestazure.azure_operation.AzureOperationPoller` to `msrest.polling.LROPoller`. External API is the same. + - Return type is now **always** a `msrest.polling.LROPoller`, regardless of the optional parameters used. + - The behavior has changed when using `raw=True`. Instead of returning the initial call result as `ClientRawResponse`, + without polling, now this returns an LROPoller. After polling, the final resource will be returned as a `ClientRawResponse`. + - New `polling` parameter. The default behavior is `Polling=True` which will poll using ARM algorithm. When `Polling=False`, + the response of the initial call will be returned without polling. + - `polling` parameter accepts instances of subclasses of `msrest.polling.PollingMethod`. + - `add_done_callback` will no longer raise if called after polling is finished, but will instead execute the callback right away. + +**Features** + +- Add "operations" operation group +- Add services.update +- Client class can be used as a context manager to keep the underlying HTTP session open for performance + +**Bugfixes** + +- services.create_or_update is now correctly a Long Running Operation +- Compatibility of the sdist with wheel 0.31.0 + 1.0.0 (2016-06-23) ++++++++++++++++++ diff --git a/azure-mgmt-search/README.rst b/azure-mgmt-search/README.rst index 5bdab387294d..20f634c32590 100644 --- a/azure-mgmt-search/README.rst +++ b/azure-mgmt-search/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Search Management Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. +This package has been tested with Python 2.7, 3.4, 3.5 and 3.6. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. @@ -37,8 +37,8 @@ Usage ===== For code examples, see `Search Management -`__ -on readthedocs.org. +`__ +on docs.microsoft.com. Provide Feedback diff --git a/azure-mgmt-search/azure/mgmt/search/models/__init__.py b/azure-mgmt-search/azure/mgmt/search/models/__init__.py index 1340fcd9c62f..1fa43c85e74e 100644 --- a/azure-mgmt-search/azure/mgmt/search/models/__init__.py +++ b/azure-mgmt-search/azure/mgmt/search/models/__init__.py @@ -9,14 +9,29 @@ # regenerated. # -------------------------------------------------------------------------- -from .check_name_availability_input import CheckNameAvailabilityInput -from .check_name_availability_output import CheckNameAvailabilityOutput -from .admin_key_result import AdminKeyResult -from .query_key import QueryKey -from .sku import Sku -from .search_service import SearchService -from .resource import Resource -from .search_management_request_options import SearchManagementRequestOptions +try: + from .check_name_availability_input_py3 import CheckNameAvailabilityInput + from .check_name_availability_output_py3 import CheckNameAvailabilityOutput + from .admin_key_result_py3 import AdminKeyResult + from .query_key_py3 import QueryKey + from .sku_py3 import Sku + from .search_service_py3 import SearchService + from .resource_py3 import Resource + from .operation_display_py3 import OperationDisplay + from .operation_py3 import Operation + from .search_management_request_options_py3 import SearchManagementRequestOptions +except (SyntaxError, ImportError): + from .check_name_availability_input import CheckNameAvailabilityInput + from .check_name_availability_output import CheckNameAvailabilityOutput + from .admin_key_result import AdminKeyResult + from .query_key import QueryKey + from .sku import Sku + from .search_service import SearchService + from .resource import Resource + from .operation_display import OperationDisplay + from .operation import Operation + from .search_management_request_options import SearchManagementRequestOptions +from .operation_paged import OperationPaged from .query_key_paged import QueryKeyPaged from .search_service_paged import SearchServicePaged from .search_management_client_enums import ( @@ -36,7 +51,10 @@ 'Sku', 'SearchService', 'Resource', + 'OperationDisplay', + 'Operation', 'SearchManagementRequestOptions', + 'OperationPaged', 'QueryKeyPaged', 'SearchServicePaged', 'UnavailableNameReason', diff --git a/azure-mgmt-search/azure/mgmt/search/models/admin_key_result.py b/azure-mgmt-search/azure/mgmt/search/models/admin_key_result.py index 95bb2f4fabae..bfeabe50e70e 100644 --- a/azure-mgmt-search/azure/mgmt/search/models/admin_key_result.py +++ b/azure-mgmt-search/azure/mgmt/search/models/admin_key_result.py @@ -35,6 +35,7 @@ class AdminKeyResult(Model): 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, } - def __init__(self): + def __init__(self, **kwargs): + super(AdminKeyResult, self).__init__(**kwargs) self.primary_key = None self.secondary_key = None diff --git a/azure-mgmt-search/azure/mgmt/search/models/admin_key_result_py3.py b/azure-mgmt-search/azure/mgmt/search/models/admin_key_result_py3.py new file mode 100644 index 000000000000..29217db297ce --- /dev/null +++ b/azure-mgmt-search/azure/mgmt/search/models/admin_key_result_py3.py @@ -0,0 +1,41 @@ +# 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 AdminKeyResult(Model): + """Response containing the primary and secondary admin API keys for a given + Azure Search service. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar primary_key: The primary admin API key of the Search service. + :vartype primary_key: str + :ivar secondary_key: The secondary admin API key of the Search service. + :vartype secondary_key: str + """ + + _validation = { + 'primary_key': {'readonly': True}, + 'secondary_key': {'readonly': True}, + } + + _attribute_map = { + 'primary_key': {'key': 'primaryKey', 'type': 'str'}, + 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(AdminKeyResult, self).__init__(**kwargs) + self.primary_key = None + self.secondary_key = None diff --git a/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_input.py b/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_input.py index 71cfa509b513..053e06fd8f43 100644 --- a/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_input.py +++ b/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_input.py @@ -18,13 +18,16 @@ class CheckNameAvailabilityInput(Model): Variables are only populated by the server, and will be ignored when sending a request. - :param name: The Search service name to validate. Search service names - must only contain lowercase letters, digits or dashes, cannot use dash as - the first two or last one characters, cannot contain consecutive dashes, - and must be between 2 and 60 characters in length. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The Search service name to validate. Search service + names must only contain lowercase letters, digits or dashes, cannot use + dash as the first two or last one characters, cannot contain consecutive + dashes, and must be between 2 and 60 characters in length. :type name: str - :ivar type: The type of the resource whose name is to be validated. This - value must always be 'searchServices'. Default value: "searchServices" . + :ivar type: Required. The type of the resource whose name is to be + validated. This value must always be 'searchServices'. Default value: + "searchServices" . :vartype type: str """ @@ -40,5 +43,6 @@ class CheckNameAvailabilityInput(Model): type = "searchServices" - def __init__(self, name): - self.name = name + def __init__(self, **kwargs): + super(CheckNameAvailabilityInput, self).__init__(**kwargs) + self.name = kwargs.get('name', None) diff --git a/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_input_py3.py b/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_input_py3.py new file mode 100644 index 000000000000..012969c50154 --- /dev/null +++ b/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_input_py3.py @@ -0,0 +1,48 @@ +# 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 CheckNameAvailabilityInput(Model): + """Input of check name availability API. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The Search service name to validate. Search service + names must only contain lowercase letters, digits or dashes, cannot use + dash as the first two or last one characters, cannot contain consecutive + dashes, and must be between 2 and 60 characters in length. + :type name: str + :ivar type: Required. The type of the resource whose name is to be + validated. This value must always be 'searchServices'. Default value: + "searchServices" . + :vartype type: str + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + type = "searchServices" + + def __init__(self, *, name: str, **kwargs) -> None: + super(CheckNameAvailabilityInput, self).__init__(**kwargs) + self.name = name diff --git a/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_output.py b/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_output.py index 925a5790b122..12b592e51574 100644 --- a/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_output.py +++ b/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_output.py @@ -25,8 +25,7 @@ class CheckNameAvailabilityOutput(Model): (incorrect length, unsupported characters, etc.). 'AlreadyExists' indicates that the name is already in use and is therefore unavailable. Possible values include: 'Invalid', 'AlreadyExists' - :vartype reason: str or :class:`UnavailableNameReason - ` + :vartype reason: str or ~azure.mgmt.search.models.UnavailableNameReason :ivar message: A message that explains why the name is invalid and provides resource naming requirements. Available only if 'Invalid' is returned in the 'reason' property. @@ -45,7 +44,8 @@ class CheckNameAvailabilityOutput(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self): + def __init__(self, **kwargs): + super(CheckNameAvailabilityOutput, self).__init__(**kwargs) self.is_name_available = None self.reason = None self.message = None diff --git a/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_output_py3.py b/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_output_py3.py new file mode 100644 index 000000000000..bbffe7f214e1 --- /dev/null +++ b/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_output_py3.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CheckNameAvailabilityOutput(Model): + """Output of check name availability API. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar is_name_available: A value indicating whether the name is available. + :vartype is_name_available: bool + :ivar reason: The reason why the name is not available. 'Invalid' + indicates the name provided does not match the naming requirements + (incorrect length, unsupported characters, etc.). 'AlreadyExists' + indicates that the name is already in use and is therefore unavailable. + Possible values include: 'Invalid', 'AlreadyExists' + :vartype reason: str or ~azure.mgmt.search.models.UnavailableNameReason + :ivar message: A message that explains why the name is invalid and + provides resource naming requirements. Available only if 'Invalid' is + returned in the 'reason' property. + :vartype message: str + """ + + _validation = { + 'is_name_available': {'readonly': True}, + 'reason': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'is_name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CheckNameAvailabilityOutput, self).__init__(**kwargs) + self.is_name_available = None + self.reason = None + self.message = None diff --git a/azure-mgmt-search/azure/mgmt/search/models/operation.py b/azure-mgmt-search/azure/mgmt/search/models/operation.py new file mode 100644 index 000000000000..7269ad98e425 --- /dev/null +++ b/azure-mgmt-search/azure/mgmt/search/models/operation.py @@ -0,0 +1,41 @@ +# 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): + """Describes a REST API operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the operation. This name is of the form + {provider}/{resource}/{operation}. + :vartype name: str + :ivar display: The object that describes the operation. + :vartype display: ~azure.mgmt.search.models.OperationDisplay + """ + + _validation = { + 'name': {'readonly': True}, + 'display': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = None diff --git a/azure-mgmt-search/azure/mgmt/search/models/operation_display.py b/azure-mgmt-search/azure/mgmt/search/models/operation_display.py new file mode 100644 index 000000000000..0c4d5975dc8d --- /dev/null +++ b/azure-mgmt-search/azure/mgmt/search/models/operation_display.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationDisplay(Model): + """The object that describes the operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: The friendly name of the resource provider. + :vartype provider: str + :ivar operation: The operation type: read, write, delete, listKeys/action, + etc. + :vartype operation: str + :ivar resource: The resource type on which the operation is performed. + :vartype resource: str + :ivar description: The friendly name of the operation. + :vartype description: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'operation': {'readonly': True}, + 'resource': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.operation = None + self.resource = None + self.description = None diff --git a/azure-mgmt-search/azure/mgmt/search/models/operation_display_py3.py b/azure-mgmt-search/azure/mgmt/search/models/operation_display_py3.py new file mode 100644 index 000000000000..a1e6e6bfc353 --- /dev/null +++ b/azure-mgmt-search/azure/mgmt/search/models/operation_display_py3.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationDisplay(Model): + """The object that describes the operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: The friendly name of the resource provider. + :vartype provider: str + :ivar operation: The operation type: read, write, delete, listKeys/action, + etc. + :vartype operation: str + :ivar resource: The resource type on which the operation is performed. + :vartype resource: str + :ivar description: The friendly name of the operation. + :vartype description: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'operation': {'readonly': True}, + 'resource': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.operation = None + self.resource = None + self.description = None diff --git a/azure-mgmt-search/azure/mgmt/search/models/operation_paged.py b/azure-mgmt-search/azure/mgmt/search/models/operation_paged.py new file mode 100644 index 000000000000..6aaeff67cdb2 --- /dev/null +++ b/azure-mgmt-search/azure/mgmt/search/models/operation_paged.py @@ -0,0 +1,27 @@ +# 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/azure-mgmt-search/azure/mgmt/search/models/operation_py3.py b/azure-mgmt-search/azure/mgmt/search/models/operation_py3.py new file mode 100644 index 000000000000..1b4dbae10d28 --- /dev/null +++ b/azure-mgmt-search/azure/mgmt/search/models/operation_py3.py @@ -0,0 +1,41 @@ +# 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): + """Describes a REST API operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the operation. This name is of the form + {provider}/{resource}/{operation}. + :vartype name: str + :ivar display: The object that describes the operation. + :vartype display: ~azure.mgmt.search.models.OperationDisplay + """ + + _validation = { + 'name': {'readonly': True}, + 'display': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = None diff --git a/azure-mgmt-search/azure/mgmt/search/models/query_key.py b/azure-mgmt-search/azure/mgmt/search/models/query_key.py index ff7ebbe082ec..4b4f282ed5eb 100644 --- a/azure-mgmt-search/azure/mgmt/search/models/query_key.py +++ b/azure-mgmt-search/azure/mgmt/search/models/query_key.py @@ -35,6 +35,7 @@ class QueryKey(Model): 'key': {'key': 'key', 'type': 'str'}, } - def __init__(self): + def __init__(self, **kwargs): + super(QueryKey, self).__init__(**kwargs) self.name = None self.key = None diff --git a/azure-mgmt-search/azure/mgmt/search/models/query_key_paged.py b/azure-mgmt-search/azure/mgmt/search/models/query_key_paged.py index fda4495f43ce..f1fc2d9aade8 100644 --- a/azure-mgmt-search/azure/mgmt/search/models/query_key_paged.py +++ b/azure-mgmt-search/azure/mgmt/search/models/query_key_paged.py @@ -14,7 +14,7 @@ class QueryKeyPaged(Paged): """ - A paging container for iterating over a list of QueryKey object + A paging container for iterating over a list of :class:`QueryKey ` object """ _attribute_map = { diff --git a/azure-mgmt-search/azure/mgmt/search/models/query_key_py3.py b/azure-mgmt-search/azure/mgmt/search/models/query_key_py3.py new file mode 100644 index 000000000000..e02c33495eed --- /dev/null +++ b/azure-mgmt-search/azure/mgmt/search/models/query_key_py3.py @@ -0,0 +1,41 @@ +# 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 QueryKey(Model): + """Describes an API key for a given Azure Search service that has permissions + for query operations only. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the query API key; may be empty. + :vartype name: str + :ivar key: The value of the query API key. + :vartype key: str + """ + + _validation = { + 'name': {'readonly': True}, + 'key': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'key': {'key': 'key', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(QueryKey, self).__init__(**kwargs) + self.name = None + self.key = None diff --git a/azure-mgmt-search/azure/mgmt/search/models/resource.py b/azure-mgmt-search/azure/mgmt/search/models/resource.py index e61399919a21..718a54f2e59b 100644 --- a/azure-mgmt-search/azure/mgmt/search/models/resource.py +++ b/azure-mgmt-search/azure/mgmt/search/models/resource.py @@ -27,17 +27,17 @@ class Resource(Model): :vartype type: str :param location: The geographic location of the resource. This must be one of the supported and registered Azure Geo Regions (for example, West US, - East US, Southeast Asia, and so forth). + East US, Southeast Asia, and so forth). This property is required when + creating a new resource. :type location: str :param tags: Tags to help categorize the resource in the Azure portal. - :type tags: dict + :type tags: dict[str, str] """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'location': {'required': True}, } _attribute_map = { @@ -48,9 +48,10 @@ class Resource(Model): 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, location, tags=None): + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) self.id = None self.name = None self.type = None - self.location = location - self.tags = tags + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-search/azure/mgmt/search/models/resource_py3.py b/azure-mgmt-search/azure/mgmt/search/models/resource_py3.py new file mode 100644 index 000000000000..0f2e04e0d9cc --- /dev/null +++ b/azure-mgmt-search/azure/mgmt/search/models/resource_py3.py @@ -0,0 +1,57 @@ +# 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): + """Base type for all Azure resources. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource. This can be used with the Azure Resource + Manager to link resources together. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :param location: The geographic location of the resource. This must be one + of the supported and registered Azure Geo Regions (for example, West US, + East US, Southeast Asia, and so forth). This property is required when + creating a new resource. + :type location: str + :param tags: Tags to help categorize the resource in the Azure portal. + :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/azure-mgmt-search/azure/mgmt/search/models/search_management_client_enums.py b/azure-mgmt-search/azure/mgmt/search/models/search_management_client_enums.py index f313148ff012..8622b25c4ffb 100644 --- a/azure-mgmt-search/azure/mgmt/search/models/search_management_client_enums.py +++ b/azure-mgmt-search/azure/mgmt/search/models/search_management_client_enums.py @@ -12,13 +12,13 @@ from enum import Enum -class UnavailableNameReason(Enum): +class UnavailableNameReason(str, Enum): invalid = "Invalid" already_exists = "AlreadyExists" -class SkuName(Enum): +class SkuName(str, Enum): free = "free" basic = "basic" @@ -27,13 +27,13 @@ class SkuName(Enum): standard3 = "standard3" -class HostingMode(Enum): +class HostingMode(str, Enum): default = "default" high_density = "highDensity" -class SearchServiceStatus(Enum): +class SearchServiceStatus(str, Enum): running = "running" provisioning = "provisioning" @@ -43,14 +43,14 @@ class SearchServiceStatus(Enum): error = "error" -class ProvisioningState(Enum): +class ProvisioningState(str, Enum): succeeded = "succeeded" provisioning = "provisioning" failed = "failed" -class AdminKeyKind(Enum): +class AdminKeyKind(str, Enum): primary = "primary" secondary = "secondary" diff --git a/azure-mgmt-search/azure/mgmt/search/models/search_management_request_options.py b/azure-mgmt-search/azure/mgmt/search/models/search_management_request_options.py index 2c7f3cc90871..96e0dc7df52e 100644 --- a/azure-mgmt-search/azure/mgmt/search/models/search_management_request_options.py +++ b/azure-mgmt-search/azure/mgmt/search/models/search_management_request_options.py @@ -21,5 +21,10 @@ class SearchManagementRequestOptions(Model): :type client_request_id: str """ - def __init__(self, client_request_id=None): - self.client_request_id = client_request_id + _attribute_map = { + 'client_request_id': {'key': '', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SearchManagementRequestOptions, self).__init__(**kwargs) + self.client_request_id = kwargs.get('client_request_id', None) diff --git a/azure-mgmt-search/azure/mgmt/search/models/search_management_request_options_py3.py b/azure-mgmt-search/azure/mgmt/search/models/search_management_request_options_py3.py new file mode 100644 index 000000000000..3e36e9a15800 --- /dev/null +++ b/azure-mgmt-search/azure/mgmt/search/models/search_management_request_options_py3.py @@ -0,0 +1,30 @@ +# 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 SearchManagementRequestOptions(Model): + """Additional parameters for a set of operations. + + :param client_request_id: A client-generated GUID value that identifies + this request. If specified, this will be included in response information + as a way to track the request. + :type client_request_id: str + """ + + _attribute_map = { + 'client_request_id': {'key': '', 'type': 'str'}, + } + + def __init__(self, *, client_request_id: str=None, **kwargs) -> None: + super(SearchManagementRequestOptions, self).__init__(**kwargs) + self.client_request_id = client_request_id diff --git a/azure-mgmt-search/azure/mgmt/search/models/search_service.py b/azure-mgmt-search/azure/mgmt/search/models/search_service.py index eae4bf6192b7..077847e78c05 100644 --- a/azure-mgmt-search/azure/mgmt/search/models/search_service.py +++ b/azure-mgmt-search/azure/mgmt/search/models/search_service.py @@ -27,10 +27,11 @@ class SearchService(Resource): :vartype type: str :param location: The geographic location of the resource. This must be one of the supported and registered Azure Geo Regions (for example, West US, - East US, Southeast Asia, and so forth). + East US, Southeast Asia, and so forth). This property is required when + creating a new resource. :type location: str :param tags: Tags to help categorize the resource in the Azure portal. - :type tags: dict + :type tags: dict[str, str] :param replica_count: The number of replicas in the Search service. If specified, it must be a value between 1 and 12 inclusive for standard SKUs or between 1 and 3 inclusive for basic SKU. Default value: 1 . @@ -46,8 +47,7 @@ class SearchService(Resource): any other SKU. For the standard3 SKU, the value is either 'default' or 'highDensity'. For all other SKUs, this value must be 'default'. Possible values include: 'default', 'highDensity'. Default value: "default" . - :type hosting_mode: str or :class:`HostingMode - ` + :type hosting_mode: str or ~azure.mgmt.search.models.HostingMode :ivar status: The status of the Search service. Possible values include: 'running': The Search service is running and no provisioning operations are underway. 'provisioning': The Search service is being provisioned or @@ -62,8 +62,7 @@ class SearchService(Resource): underlying issue. Dedicated services in these states are still chargeable based on the number of search units provisioned. Possible values include: 'running', 'provisioning', 'deleting', 'degraded', 'disabled', 'error' - :vartype status: str or :class:`SearchServiceStatus - ` + :vartype status: str or ~azure.mgmt.search.models.SearchServiceStatus :ivar status_details: The details of the Search service status. :vartype status_details: str :ivar provisioning_state: The state of the last provisioning operation @@ -77,24 +76,23 @@ class SearchService(Resource): to Create Search service. This is because the free service uses capacity that is already set up. Possible values include: 'succeeded', 'provisioning', 'failed' - :vartype provisioning_state: str or :class:`ProvisioningState - ` + :vartype provisioning_state: str or + ~azure.mgmt.search.models.ProvisioningState :param sku: The SKU of the Search Service, which determines price tier and - capacity limits. - :type sku: :class:`Sku ` + capacity limits. This property is required when creating a new Search + Service. + :type sku: ~azure.mgmt.search.models.Sku """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'location': {'required': True}, 'replica_count': {'maximum': 12, 'minimum': 1}, 'partition_count': {'maximum': 12, 'minimum': 1}, 'status': {'readonly': True}, 'status_details': {'readonly': True}, 'provisioning_state': {'readonly': True}, - 'sku': {'required': True}, } _attribute_map = { @@ -112,12 +110,12 @@ class SearchService(Resource): 'sku': {'key': 'sku', 'type': 'Sku'}, } - def __init__(self, location, sku, tags=None, replica_count=1, partition_count=1, hosting_mode="default"): - super(SearchService, self).__init__(location=location, tags=tags) - self.replica_count = replica_count - self.partition_count = partition_count - self.hosting_mode = hosting_mode + def __init__(self, **kwargs): + super(SearchService, self).__init__(**kwargs) + self.replica_count = kwargs.get('replica_count', 1) + self.partition_count = kwargs.get('partition_count', 1) + self.hosting_mode = kwargs.get('hosting_mode', "default") self.status = None self.status_details = None self.provisioning_state = None - self.sku = sku + self.sku = kwargs.get('sku', None) diff --git a/azure-mgmt-search/azure/mgmt/search/models/search_service_paged.py b/azure-mgmt-search/azure/mgmt/search/models/search_service_paged.py index 140360c97f51..dbb3236affea 100644 --- a/azure-mgmt-search/azure/mgmt/search/models/search_service_paged.py +++ b/azure-mgmt-search/azure/mgmt/search/models/search_service_paged.py @@ -14,7 +14,7 @@ class SearchServicePaged(Paged): """ - A paging container for iterating over a list of SearchService object + A paging container for iterating over a list of :class:`SearchService ` object """ _attribute_map = { diff --git a/azure-mgmt-search/azure/mgmt/search/models/search_service_py3.py b/azure-mgmt-search/azure/mgmt/search/models/search_service_py3.py new file mode 100644 index 000000000000..a0e3dd69d375 --- /dev/null +++ b/azure-mgmt-search/azure/mgmt/search/models/search_service_py3.py @@ -0,0 +1,121 @@ +# 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 SearchService(Resource): + """Describes an Azure Search service and its current state. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ID of the resource. This can be used with the Azure Resource + Manager to link resources together. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :param location: The geographic location of the resource. This must be one + of the supported and registered Azure Geo Regions (for example, West US, + East US, Southeast Asia, and so forth). This property is required when + creating a new resource. + :type location: str + :param tags: Tags to help categorize the resource in the Azure portal. + :type tags: dict[str, str] + :param replica_count: The number of replicas in the Search service. If + specified, it must be a value between 1 and 12 inclusive for standard SKUs + or between 1 and 3 inclusive for basic SKU. Default value: 1 . + :type replica_count: int + :param partition_count: The number of partitions in the Search service; if + specified, it can be 1, 2, 3, 4, 6, or 12. Values greater than 1 are only + valid for standard SKUs. For 'standard3' services with hostingMode set to + 'highDensity', the allowed values are between 1 and 3. Default value: 1 . + :type partition_count: int + :param hosting_mode: Applicable only for the standard3 SKU. You can set + this property to enable up to 3 high density partitions that allow up to + 1000 indexes, which is much higher than the maximum indexes allowed for + any other SKU. For the standard3 SKU, the value is either 'default' or + 'highDensity'. For all other SKUs, this value must be 'default'. Possible + values include: 'default', 'highDensity'. Default value: "default" . + :type hosting_mode: str or ~azure.mgmt.search.models.HostingMode + :ivar status: The status of the Search service. Possible values include: + 'running': The Search service is running and no provisioning operations + are underway. 'provisioning': The Search service is being provisioned or + scaled up or down. 'deleting': The Search service is being deleted. + 'degraded': The Search service is degraded. This can occur when the + underlying search units are not healthy. The Search service is most likely + operational, but performance might be slow and some requests might be + dropped. 'disabled': The Search service is disabled. In this state, the + service will reject all API requests. 'error': The Search service is in an + error state. If your service is in the degraded, disabled, or error + states, it means the Azure Search team is actively investigating the + underlying issue. Dedicated services in these states are still chargeable + based on the number of search units provisioned. Possible values include: + 'running', 'provisioning', 'deleting', 'degraded', 'disabled', 'error' + :vartype status: str or ~azure.mgmt.search.models.SearchServiceStatus + :ivar status_details: The details of the Search service status. + :vartype status_details: str + :ivar provisioning_state: The state of the last provisioning operation + performed on the Search service. Provisioning is an intermediate state + that occurs while service capacity is being established. After capacity is + set up, provisioningState changes to either 'succeeded' or 'failed'. + Client applications can poll provisioning status (the recommended polling + interval is from 30 seconds to one minute) by using the Get Search Service + operation to see when an operation is completed. If you are using the free + service, this value tends to come back as 'succeeded' directly in the call + to Create Search service. This is because the free service uses capacity + that is already set up. Possible values include: 'succeeded', + 'provisioning', 'failed' + :vartype provisioning_state: str or + ~azure.mgmt.search.models.ProvisioningState + :param sku: The SKU of the Search Service, which determines price tier and + capacity limits. This property is required when creating a new Search + Service. + :type sku: ~azure.mgmt.search.models.Sku + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'replica_count': {'maximum': 12, 'minimum': 1}, + 'partition_count': {'maximum': 12, 'minimum': 1}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + 'provisioning_state': {'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}'}, + 'replica_count': {'key': 'properties.replicaCount', 'type': 'int'}, + 'partition_count': {'key': 'properties.partitionCount', 'type': 'int'}, + 'hosting_mode': {'key': 'properties.hostingMode', 'type': 'HostingMode'}, + 'status': {'key': 'properties.status', 'type': 'SearchServiceStatus'}, + 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, *, location: str=None, tags=None, replica_count: int=1, partition_count: int=1, hosting_mode="default", sku=None, **kwargs) -> None: + super(SearchService, self).__init__(location=location, tags=tags, **kwargs) + self.replica_count = replica_count + self.partition_count = partition_count + self.hosting_mode = hosting_mode + self.status = None + self.status_details = None + self.provisioning_state = None + self.sku = sku diff --git a/azure-mgmt-search/azure/mgmt/search/models/sku.py b/azure-mgmt-search/azure/mgmt/search/models/sku.py index 4ba0d067f2f4..66cdf99871d3 100644 --- a/azure-mgmt-search/azure/mgmt/search/models/sku.py +++ b/azure-mgmt-search/azure/mgmt/search/models/sku.py @@ -24,12 +24,13 @@ class Sku(Model): partitions and 12 replicas (or up to 3 partitions with more indexes if you also set the hostingMode property to 'highDensity'). Possible values include: 'free', 'basic', 'standard', 'standard2', 'standard3' - :type name: str or :class:`SkuName ` + :type name: str or ~azure.mgmt.search.models.SkuName """ _attribute_map = { 'name': {'key': 'name', 'type': 'SkuName'}, } - def __init__(self, name=None): - self.name = name + def __init__(self, **kwargs): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) diff --git a/azure-mgmt-search/azure/mgmt/search/models/sku_py3.py b/azure-mgmt-search/azure/mgmt/search/models/sku_py3.py new file mode 100644 index 000000000000..4701cb2ad17b --- /dev/null +++ b/azure-mgmt-search/azure/mgmt/search/models/sku_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Sku(Model): + """Defines the SKU of an Azure Search Service, which determines price tier and + capacity limits. + + :param name: The SKU of the Search service. Valid values include: 'free': + Shared service. 'basic': Dedicated service with up to 3 replicas. + 'standard': Dedicated service with up to 12 partitions and 12 replicas. + 'standard2': Similar to standard, but with more capacity per search unit. + 'standard3': Offers maximum capacity per search unit with up to 12 + partitions and 12 replicas (or up to 3 partitions with more indexes if you + also set the hostingMode property to 'highDensity'). Possible values + include: 'free', 'basic', 'standard', 'standard2', 'standard3' + :type name: str or ~azure.mgmt.search.models.SkuName + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'SkuName'}, + } + + def __init__(self, *, name=None, **kwargs) -> None: + super(Sku, self).__init__(**kwargs) + self.name = name diff --git a/azure-mgmt-search/azure/mgmt/search/operations/__init__.py b/azure-mgmt-search/azure/mgmt/search/operations/__init__.py index f8564e9cbfcb..4b49a00e8eb1 100644 --- a/azure-mgmt-search/azure/mgmt/search/operations/__init__.py +++ b/azure-mgmt-search/azure/mgmt/search/operations/__init__.py @@ -9,11 +9,13 @@ # regenerated. # -------------------------------------------------------------------------- +from .operations import Operations from .admin_keys_operations import AdminKeysOperations from .query_keys_operations import QueryKeysOperations from .services_operations import ServicesOperations __all__ = [ + 'Operations', 'AdminKeysOperations', 'QueryKeysOperations', 'ServicesOperations', diff --git a/azure-mgmt-search/azure/mgmt/search/operations/admin_keys_operations.py b/azure-mgmt-search/azure/mgmt/search/operations/admin_keys_operations.py index 239d66fd717d..da5e9acb21bc 100644 --- a/azure-mgmt-search/azure/mgmt/search/operations/admin_keys_operations.py +++ b/azure-mgmt-search/azure/mgmt/search/operations/admin_keys_operations.py @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -import uuid from .. import models @@ -22,10 +22,12 @@ class AdminKeysOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version to use for each request. The current version is 2015-08-19. Constant value: "2015-08-19". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -50,17 +52,15 @@ def get( :param search_management_request_options: Additional parameters for the operation :type search_management_request_options: - :class:`SearchManagementRequestOptions - ` + ~azure.mgmt.search.models.SearchManagementRequestOptions :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`. - :rtype: :class:`AdminKeyResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: AdminKeyResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.search.models.AdminKeyResult or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ client_request_id = None @@ -68,7 +68,7 @@ def get( client_request_id = search_management_request_options.client_request_id # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/listAdminKeys' + url = self.get.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'searchServiceName': self._serialize.url("search_service_name", search_service_name, 'str'), @@ -94,7 +94,7 @@ def get( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -111,6 +111,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/listAdminKeys'} def regenerate( self, resource_group_name, search_service_name, key_kind, search_management_request_options=None, custom_headers=None, raw=False, **operation_config): @@ -127,22 +128,19 @@ def regenerate( :param key_kind: Specifies which key to regenerate. Valid values include 'primary' and 'secondary'. Possible values include: 'primary', 'secondary' - :type key_kind: str or :class:`AdminKeyKind - ` + :type key_kind: str or ~azure.mgmt.search.models.AdminKeyKind :param search_management_request_options: Additional parameters for the operation :type search_management_request_options: - :class:`SearchManagementRequestOptions - ` + ~azure.mgmt.search.models.SearchManagementRequestOptions :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`. - :rtype: :class:`AdminKeyResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: AdminKeyResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.search.models.AdminKeyResult or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ client_request_id = None @@ -150,7 +148,7 @@ def regenerate( client_request_id = search_management_request_options.client_request_id # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/regenerateAdminKey/{keyKind}' + url = self.regenerate.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'searchServiceName': self._serialize.url("search_service_name", search_service_name, 'str'), @@ -177,7 +175,7 @@ def regenerate( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -194,3 +192,4 @@ def regenerate( return client_raw_response return deserialized + regenerate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/regenerateAdminKey/{keyKind}'} diff --git a/azure-mgmt-search/azure/mgmt/search/operations/operations.py b/azure-mgmt-search/azure/mgmt/search/operations/operations.py new file mode 100644 index 000000000000..5a35bf95f5d8 --- /dev/null +++ b/azure-mgmt-search/azure/mgmt/search/operations/operations.py @@ -0,0 +1,100 @@ +# 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 Operations(object): + """Operations 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: The API version to use for each request. The current version is 2015-08-19. Constant value: "2015-08-19". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-08-19" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all of the available REST API operations of the Microsoft.Search + provider. + + :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 Operation + :rtype: + ~azure.mgmt.search.models.OperationPaged[~azure.mgmt.search.models.Operation] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # 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.OperationPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/providers/Microsoft.Search/operations'} diff --git a/azure-mgmt-search/azure/mgmt/search/operations/query_keys_operations.py b/azure-mgmt-search/azure/mgmt/search/operations/query_keys_operations.py index 4ca5330d65e1..e0ce209493e1 100644 --- a/azure-mgmt-search/azure/mgmt/search/operations/query_keys_operations.py +++ b/azure-mgmt-search/azure/mgmt/search/operations/query_keys_operations.py @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -import uuid from .. import models @@ -22,10 +22,12 @@ class QueryKeysOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version to use for each request. The current version is 2015-08-19. Constant value: "2015-08-19". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -52,16 +54,15 @@ def create( :param search_management_request_options: Additional parameters for the operation :type search_management_request_options: - :class:`SearchManagementRequestOptions - ` + ~azure.mgmt.search.models.SearchManagementRequestOptions :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`. - :rtype: :class:`QueryKey ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: QueryKey or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.search.models.QueryKey or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ client_request_id = None @@ -69,7 +70,7 @@ def create( client_request_id = search_management_request_options.client_request_id # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/createQueryKey/{name}' + url = self.create.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'searchServiceName': self._serialize.url("search_service_name", search_service_name, 'str'), @@ -96,7 +97,7 @@ def create( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -113,6 +114,7 @@ def create( return client_raw_response return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/createQueryKey/{name}'} def list_by_search_service( self, resource_group_name, search_service_name, search_management_request_options=None, custom_headers=None, raw=False, **operation_config): @@ -128,15 +130,15 @@ def list_by_search_service( :param search_management_request_options: Additional parameters for the operation :type search_management_request_options: - :class:`SearchManagementRequestOptions - ` + ~azure.mgmt.search.models.SearchManagementRequestOptions :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`. - :rtype: :class:`QueryKeyPaged - ` + :return: An iterator like instance of QueryKey + :rtype: + ~azure.mgmt.search.models.QueryKeyPaged[~azure.mgmt.search.models.QueryKey] :raises: :class:`CloudError` """ client_request_id = None @@ -147,7 +149,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/listQueryKeys' + url = self.list_by_search_service.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'searchServiceName': self._serialize.url("search_service_name", search_service_name, 'str'), @@ -178,7 +180,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -196,6 +198,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_search_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/listQueryKeys'} def delete( self, resource_group_name, search_service_name, key, search_management_request_options=None, custom_headers=None, raw=False, **operation_config): @@ -216,16 +219,14 @@ def delete( :param search_management_request_options: Additional parameters for the operation :type search_management_request_options: - :class:`SearchManagementRequestOptions - ` + ~azure.mgmt.search.models.SearchManagementRequestOptions :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`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ client_request_id = None @@ -233,7 +234,7 @@ def delete( client_request_id = search_management_request_options.client_request_id # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/deleteQueryKey/{key}' + url = self.delete.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'searchServiceName': self._serialize.url("search_service_name", search_service_name, 'str'), @@ -260,7 +261,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204, 404]: exp = CloudError(response) @@ -270,3 +271,4 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/deleteQueryKey/{key}'} diff --git a/azure-mgmt-search/azure/mgmt/search/operations/services_operations.py b/azure-mgmt-search/azure/mgmt/search/operations/services_operations.py index 2cfb420d99cb..9a372a7c9c16 100644 --- a/azure-mgmt-search/azure/mgmt/search/operations/services_operations.py +++ b/azure-mgmt-search/azure/mgmt/search/operations/services_operations.py @@ -9,9 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -import uuid +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -22,10 +24,12 @@ class ServicesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version to use for each request. The current version is 2015-08-19. Constant value: "2015-08-19". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -35,8 +39,66 @@ def __init__(self, client, config, serializer, deserializer): self.config = config - def create_or_update( + + def _create_or_update_initial( self, resource_group_name, search_service_name, service, search_management_request_options=None, custom_headers=None, raw=False, **operation_config): + client_request_id = None + if search_management_request_options is not None: + client_request_id = search_management_request_options.client_request_id + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'searchServiceName': self._serialize.url("search_service_name", search_service_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') + if client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("client_request_id", client_request_id, 'str') + + # Construct body + body_content = self._serialize.body(service, 'SearchService') + + # 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('SearchService', response) + if response.status_code == 201: + deserialized = self._deserialize('SearchService', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, search_service_name, service, search_management_request_options=None, custom_headers=None, raw=False, polling=True, **operation_config): """Creates or updates a Search service in the given resource group. If the Search service already exists, all properties will be updated with the given values. @@ -56,22 +118,77 @@ def create_or_update( :type search_service_name: str :param service: The definition of the Search service to create or update. - :type service: :class:`SearchService - ` + :type service: ~azure.mgmt.search.models.SearchService + :param search_management_request_options: Additional parameters for + the operation + :type search_management_request_options: + ~azure.mgmt.search.models.SearchManagementRequestOptions + :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 SearchService or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.search.models.SearchService] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.search.models.SearchService]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + search_service_name=search_service_name, + service=service, + search_management_request_options=search_management_request_options, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('SearchService', 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) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}'} + + def update( + self, resource_group_name, search_service_name, service, search_management_request_options=None, custom_headers=None, raw=False, **operation_config): + """Updates an existing Search service in the given resource group. + + :param resource_group_name: The name of the resource group within the + current subscription. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param search_service_name: The name of the Azure Search service to + update. + :type search_service_name: str + :param service: The definition of the Search service to update. + :type service: ~azure.mgmt.search.models.SearchService :param search_management_request_options: Additional parameters for the operation :type search_management_request_options: - :class:`SearchManagementRequestOptions - ` + ~azure.mgmt.search.models.SearchManagementRequestOptions :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`. - :rtype: :class:`SearchService - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: SearchService or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.search.models.SearchService or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ client_request_id = None @@ -79,7 +196,7 @@ def create_or_update( client_request_id = search_management_request_options.client_request_id # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}' + url = self.update.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'searchServiceName': self._serialize.url("search_service_name", search_service_name, 'str'), @@ -107,11 +224,11 @@ def create_or_update( body_content = self._serialize.body(service, 'SearchService') # Construct and send request - request = self._client.put(url, query_parameters) + request = self._client.patch(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) - if response.status_code not in [200, 201]: + if response.status_code not in [200]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -120,14 +237,13 @@ def create_or_update( if response.status_code == 200: deserialized = self._deserialize('SearchService', response) - if response.status_code == 201: - deserialized = self._deserialize('SearchService', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}'} def get( self, resource_group_name, search_service_name, search_management_request_options=None, custom_headers=None, raw=False, **operation_config): @@ -144,17 +260,15 @@ def get( :param search_management_request_options: Additional parameters for the operation :type search_management_request_options: - :class:`SearchManagementRequestOptions - ` + ~azure.mgmt.search.models.SearchManagementRequestOptions :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`. - :rtype: :class:`SearchService - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: SearchService or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.search.models.SearchService or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ client_request_id = None @@ -162,7 +276,7 @@ def get( client_request_id = search_management_request_options.client_request_id # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}' + url = self.get.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'searchServiceName': self._serialize.url("search_service_name", search_service_name, 'str'), @@ -188,7 +302,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -205,6 +319,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}'} def delete( self, resource_group_name, search_service_name, search_management_request_options=None, custom_headers=None, raw=False, **operation_config): @@ -221,16 +336,14 @@ def delete( :param search_management_request_options: Additional parameters for the operation :type search_management_request_options: - :class:`SearchManagementRequestOptions - ` + ~azure.mgmt.search.models.SearchManagementRequestOptions :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`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ client_request_id = None @@ -238,7 +351,7 @@ def delete( client_request_id = search_management_request_options.client_request_id # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}' + url = self.delete.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'searchServiceName': self._serialize.url("search_service_name", search_service_name, 'str'), @@ -264,7 +377,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204, 404]: exp = CloudError(response) @@ -274,6 +387,7 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}'} def list_by_resource_group( self, resource_group_name, search_management_request_options=None, custom_headers=None, raw=False, **operation_config): @@ -286,15 +400,15 @@ def list_by_resource_group( :param search_management_request_options: Additional parameters for the operation :type search_management_request_options: - :class:`SearchManagementRequestOptions - ` + ~azure.mgmt.search.models.SearchManagementRequestOptions :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`. - :rtype: :class:`SearchServicePaged - ` + :return: An iterator like instance of SearchService + :rtype: + ~azure.mgmt.search.models.SearchServicePaged[~azure.mgmt.search.models.SearchService] :raises: :class:`CloudError` """ client_request_id = None @@ -305,7 +419,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices' + url = self.list_by_resource_group.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -335,7 +449,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -353,6 +467,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices'} def check_name_availability( self, name, search_management_request_options=None, custom_headers=None, raw=False, **operation_config): @@ -368,17 +483,15 @@ def check_name_availability( :param search_management_request_options: Additional parameters for the operation :type search_management_request_options: - :class:`SearchManagementRequestOptions - ` + ~azure.mgmt.search.models.SearchManagementRequestOptions :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`. - :rtype: :class:`CheckNameAvailabilityOutput - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: CheckNameAvailabilityOutput or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.search.models.CheckNameAvailabilityOutput or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ client_request_id = None @@ -387,7 +500,7 @@ def check_name_availability( check_name_availability_input = models.CheckNameAvailabilityInput(name=name) # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.Search/checkNameAvailability' + url = self.check_name_availability.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -415,7 +528,7 @@ def check_name_availability( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -432,3 +545,4 @@ def check_name_availability( return client_raw_response return deserialized + check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Search/checkNameAvailability'} diff --git a/azure-mgmt-search/azure/mgmt/search/search_management_client.py b/azure-mgmt-search/azure/mgmt/search/search_management_client.py index 8ac0fc5d16f5..9c86581dc538 100644 --- a/azure-mgmt-search/azure/mgmt/search/search_management_client.py +++ b/azure-mgmt-search/azure/mgmt/search/search_management_client.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import ServiceClient +from msrest.service_client import SDKClient from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION +from .operations.operations import Operations from .operations.admin_keys_operations import AdminKeysOperations from .operations.query_keys_operations import QueryKeysOperations from .operations.services_operations import ServicesOperations @@ -41,26 +42,26 @@ def __init__( raise ValueError("Parameter 'credentials' must not be None.") if subscription_id is None: raise ValueError("Parameter 'subscription_id' must not be None.") - if not isinstance(subscription_id, str): - raise TypeError("Parameter 'subscription_id' must be str.") if not base_url: base_url = 'https://management.azure.com' super(SearchManagementClientConfiguration, self).__init__(base_url) - self.add_user_agent('searchmanagementclient/{}'.format(VERSION)) + self.add_user_agent('azure-mgmt-search/{}'.format(VERSION)) self.add_user_agent('Azure-SDK-For-Python') self.credentials = credentials self.subscription_id = subscription_id -class SearchManagementClient(object): +class SearchManagementClient(SDKClient): """Client that can be used to manage Azure Search services and API keys. :ivar config: Configuration for client. :vartype config: SearchManagementClientConfiguration + :ivar operations: Operations operations + :vartype operations: azure.mgmt.search.operations.Operations :ivar admin_keys: AdminKeys operations :vartype admin_keys: azure.mgmt.search.operations.AdminKeysOperations :ivar query_keys: QueryKeys operations @@ -82,13 +83,15 @@ def __init__( self, credentials, subscription_id, base_url=None): self.config = SearchManagementClientConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) + super(SearchManagementClient, 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-08-19' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) self.admin_keys = AdminKeysOperations( self._client, self.config, self._serialize, self._deserialize) self.query_keys = QueryKeysOperations( diff --git a/azure-mgmt-search/azure/mgmt/search/version.py b/azure-mgmt-search/azure/mgmt/search/version.py index a39916c162ce..53c4c7ea05e8 100644 --- a/azure-mgmt-search/azure/mgmt/search/version.py +++ b/azure-mgmt-search/azure/mgmt/search/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0" +VERSION = "2.0.0" diff --git a/azure-mgmt-search/build.json b/azure-mgmt-search/build.json index 6d32f4ae1ecd..881bbd415daa 100644 --- a/azure-mgmt-search/build.json +++ b/azure-mgmt-search/build.json @@ -1 +1,746 @@ -{"autorest": "1.1.0", "date": "2017-06-23T21:55:05Z", "version": ""} \ No newline at end of file +{ + "autorest": [ + { + "resolvedInfo": null, + "packageMetadata": { + "name": "@microsoft.azure/autorest-core", + "version": "2.0.4228", + "engines": { + "node": ">=7.10.0" + }, + "dependencies": {}, + "optionalDependencies": {}, + "devDependencies": { + "@types/commonmark": "^0.27.0", + "@types/js-yaml": "^3.10.0", + "@types/jsonpath": "^0.1.29", + "@types/node": "^8.0.53", + "@types/source-map": "^0.5.0", + "@types/yargs": "^8.0.2", + "@types/z-schema": "^3.16.31", + "dts-generator": "^2.1.0", + "mocha": "^4.0.1", + "mocha-typescript": "^1.1.7", + "shx": "0.2.2", + "static-link": "^0.2.3", + "vscode-jsonrpc": "^3.3.1" + }, + "bundleDependencies": false, + "peerDependencies": {}, + "deprecated": false, + "_resolved": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4228/node_modules/@microsoft.azure/autorest-core", + "_shasum": "b3897b8615417aa07cf9113d4bd18862b32f82f8", + "_shrinkwrap": null, + "bin": { + "autorest-core": "./dist/app.js", + "autorest-language-service": "dist/language-service/language-service.js" + }, + "_id": "@microsoft.azure/autorest-core@2.0.4228", + "_from": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4228/node_modules/@microsoft.azure/autorest-core", + "_requested": { + "type": "directory", + "where": "/git-restapi", + "raw": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4228/node_modules/@microsoft.azure/autorest-core", + "rawSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4228/node_modules/@microsoft.azure/autorest-core", + "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4228/node_modules/@microsoft.azure/autorest-core", + "fetchSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4228/node_modules/@microsoft.azure/autorest-core" + }, + "_spec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4228/node_modules/@microsoft.azure/autorest-core", + "_where": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4228/node_modules/@microsoft.azure/autorest-core" + }, + "extensionManager": { + "installationPath": "/root/.autorest", + "sharedLock": { + "name": "/root/.autorest", + "exclusiveLock": { + "name": "_root_.autorest.exclusive-lock", + "options": { + "port": 45234, + "host": "2130706813", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" + }, + "busyLock": { + "name": "_root_.autorest.busy-lock", + "options": { + "port": 37199, + "host": "2130756895", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" + }, + "personalLock": { + "name": "_root_.autorest.3265.555181728095.personal-lock", + "options": { + "port": 38712, + "host": "2130756016", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.3265.555181728095.personal-lock:38712" + }, + "file": "/tmp/_root_.autorest.lock" + }, + "dotnetPath": "/root/.dotnet" + }, + "installationPath": "/root/.autorest" + }, + { + "resolvedInfo": null, + "packageMetadata": { + "name": "@microsoft.azure/autorest-core", + "version": "2.0.4229", + "engines": { + "node": ">=7.10.0" + }, + "dependencies": {}, + "optionalDependencies": {}, + "devDependencies": { + "@types/commonmark": "^0.27.0", + "@types/js-yaml": "^3.10.0", + "@types/jsonpath": "^0.1.29", + "@types/node": "^8.0.53", + "@types/source-map": "^0.5.0", + "@types/yargs": "^8.0.2", + "@types/z-schema": "^3.16.31", + "dts-generator": "^2.1.0", + "mocha": "^4.0.1", + "mocha-typescript": "^1.1.7", + "shx": "0.2.2", + "static-link": "^0.2.3", + "vscode-jsonrpc": "^3.3.1" + }, + "bundleDependencies": false, + "peerDependencies": {}, + "deprecated": false, + "_resolved": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4229/node_modules/@microsoft.azure/autorest-core", + "_shasum": "c19c0ee74fe38c5197be2e965cd729a633166ae0", + "_shrinkwrap": null, + "bin": { + "autorest-core": "./dist/app.js", + "autorest-language-service": "dist/language-service/language-service.js" + }, + "_id": "@microsoft.azure/autorest-core@2.0.4229", + "_from": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4229/node_modules/@microsoft.azure/autorest-core", + "_requested": { + "type": "directory", + "where": "/git-restapi", + "raw": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4229/node_modules/@microsoft.azure/autorest-core", + "rawSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4229/node_modules/@microsoft.azure/autorest-core", + "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4229/node_modules/@microsoft.azure/autorest-core", + "fetchSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4229/node_modules/@microsoft.azure/autorest-core" + }, + "_spec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4229/node_modules/@microsoft.azure/autorest-core", + "_where": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4229/node_modules/@microsoft.azure/autorest-core" + }, + "extensionManager": { + "installationPath": "/root/.autorest", + "sharedLock": { + "name": "/root/.autorest", + "exclusiveLock": { + "name": "_root_.autorest.exclusive-lock", + "options": { + "port": 45234, + "host": "2130706813", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" + }, + "busyLock": { + "name": "_root_.autorest.busy-lock", + "options": { + "port": 37199, + "host": "2130756895", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" + }, + "personalLock": { + "name": "_root_.autorest.3265.555181728095.personal-lock", + "options": { + "port": 38712, + "host": "2130756016", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.3265.555181728095.personal-lock:38712" + }, + "file": "/tmp/_root_.autorest.lock" + }, + "dotnetPath": "/root/.dotnet" + }, + "installationPath": "/root/.autorest" + }, + { + "resolvedInfo": null, + "packageMetadata": { + "name": "@microsoft.azure/autorest-core", + "version": "2.0.4230", + "engines": { + "node": ">=7.10.0" + }, + "dependencies": {}, + "optionalDependencies": {}, + "devDependencies": { + "@types/commonmark": "^0.27.0", + "@types/js-yaml": "^3.10.0", + "@types/jsonpath": "^0.1.29", + "@types/node": "^8.0.53", + "@types/source-map": "0.5.0", + "@types/yargs": "^8.0.2", + "@types/z-schema": "^3.16.31", + "dts-generator": "^2.1.0", + "mocha": "^4.0.1", + "mocha-typescript": "^1.1.7", + "shx": "0.2.2", + "static-link": "^0.2.3", + "vscode-jsonrpc": "^3.3.1" + }, + "bundleDependencies": false, + "peerDependencies": {}, + "deprecated": false, + "_resolved": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4230/node_modules/@microsoft.azure/autorest-core", + "_shasum": "3c9b387fbe18ce3a54b68bc0c24ddb0a4c850f25", + "_shrinkwrap": null, + "bin": { + "autorest-core": "./dist/app.js", + "autorest-language-service": "dist/language-service/language-service.js" + }, + "_id": "@microsoft.azure/autorest-core@2.0.4230", + "_from": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4230/node_modules/@microsoft.azure/autorest-core", + "_requested": { + "type": "directory", + "where": "/git-restapi", + "raw": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4230/node_modules/@microsoft.azure/autorest-core", + "rawSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4230/node_modules/@microsoft.azure/autorest-core", + "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4230/node_modules/@microsoft.azure/autorest-core", + "fetchSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4230/node_modules/@microsoft.azure/autorest-core" + }, + "_spec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4230/node_modules/@microsoft.azure/autorest-core", + "_where": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4230/node_modules/@microsoft.azure/autorest-core" + }, + "extensionManager": { + "installationPath": "/root/.autorest", + "sharedLock": { + "name": "/root/.autorest", + "exclusiveLock": { + "name": "_root_.autorest.exclusive-lock", + "options": { + "port": 45234, + "host": "2130706813", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" + }, + "busyLock": { + "name": "_root_.autorest.busy-lock", + "options": { + "port": 37199, + "host": "2130756895", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" + }, + "personalLock": { + "name": "_root_.autorest.3265.555181728095.personal-lock", + "options": { + "port": 38712, + "host": "2130756016", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.3265.555181728095.personal-lock:38712" + }, + "file": "/tmp/_root_.autorest.lock" + }, + "dotnetPath": "/root/.dotnet" + }, + "installationPath": "/root/.autorest" + }, + { + "resolvedInfo": null, + "packageMetadata": { + "name": "@microsoft.azure/autorest-core", + "version": "2.0.4231", + "engines": { + "node": ">=7.10.0" + }, + "dependencies": {}, + "optionalDependencies": {}, + "devDependencies": { + "@types/commonmark": "^0.27.0", + "@types/js-yaml": "^3.10.0", + "@types/jsonpath": "^0.1.29", + "@types/node": "^8.0.53", + "@types/source-map": "0.5.0", + "@types/yargs": "^8.0.2", + "@types/z-schema": "^3.16.31", + "dts-generator": "^2.1.0", + "mocha": "^4.0.1", + "mocha-typescript": "^1.1.7", + "shx": "0.2.2", + "static-link": "^0.2.3", + "vscode-jsonrpc": "^3.3.1" + }, + "bundleDependencies": false, + "peerDependencies": {}, + "deprecated": false, + "_resolved": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4231/node_modules/@microsoft.azure/autorest-core", + "_shasum": "fa1b2b50cdd91bec9f04542420c3056eda202b87", + "_shrinkwrap": null, + "bin": { + "autorest-core": "./dist/app.js", + "autorest-language-service": "dist/language-service/language-service.js" + }, + "_id": "@microsoft.azure/autorest-core@2.0.4231", + "_from": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4231/node_modules/@microsoft.azure/autorest-core", + "_requested": { + "type": "directory", + "where": "/git-restapi", + "raw": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4231/node_modules/@microsoft.azure/autorest-core", + "rawSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4231/node_modules/@microsoft.azure/autorest-core", + "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4231/node_modules/@microsoft.azure/autorest-core", + "fetchSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4231/node_modules/@microsoft.azure/autorest-core" + }, + "_spec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4231/node_modules/@microsoft.azure/autorest-core", + "_where": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4231/node_modules/@microsoft.azure/autorest-core" + }, + "extensionManager": { + "installationPath": "/root/.autorest", + "sharedLock": { + "name": "/root/.autorest", + "exclusiveLock": { + "name": "_root_.autorest.exclusive-lock", + "options": { + "port": 45234, + "host": "2130706813", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" + }, + "busyLock": { + "name": "_root_.autorest.busy-lock", + "options": { + "port": 37199, + "host": "2130756895", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" + }, + "personalLock": { + "name": "_root_.autorest.3265.555181728095.personal-lock", + "options": { + "port": 38712, + "host": "2130756016", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.3265.555181728095.personal-lock:38712" + }, + "file": "/tmp/_root_.autorest.lock" + }, + "dotnetPath": "/root/.dotnet" + }, + "installationPath": "/root/.autorest" + }, + { + "resolvedInfo": null, + "packageMetadata": { + "name": "@microsoft.azure/autorest.modeler", + "version": "2.0.21", + "dependencies": { + "dotnet-2.0.0": "^1.3.2" + }, + "optionalDependencies": {}, + "devDependencies": { + "coffee-script": "^1.11.1", + "dotnet-sdk-2.0.0": "^1.1.1", + "gulp": "^3.9.1", + "gulp-filter": "^5.0.0", + "gulp-line-ending-corrector": "^1.0.1", + "iced-coffee-script": "^108.0.11", + "marked": "^0.3.6", + "marked-terminal": "^2.0.0", + "moment": "^2.17.1", + "run-sequence": "*", + "shx": "^0.2.2", + "through2-parallel": "^0.1.3", + "yargs": "^8.0.2", + "yarn": "^1.0.2" + }, + "bundleDependencies": false, + "peerDependencies": {}, + "deprecated": false, + "_resolved": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "_shasum": "3ce7d3939124b31830be15e5de99b9b7768afb90", + "_shrinkwrap": null, + "bin": null, + "_id": "@microsoft.azure/autorest.modeler@2.0.21", + "_from": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "_requested": { + "type": "directory", + "where": "/git-restapi", + "raw": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "rawSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler" + }, + "_spec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "_where": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler" + }, + "extensionManager": { + "installationPath": "/root/.autorest", + "sharedLock": { + "name": "/root/.autorest", + "exclusiveLock": { + "name": "_root_.autorest.exclusive-lock", + "options": { + "port": 45234, + "host": "2130706813", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" + }, + "busyLock": { + "name": "_root_.autorest.busy-lock", + "options": { + "port": 37199, + "host": "2130756895", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" + }, + "personalLock": { + "name": "_root_.autorest.3265.555181728095.personal-lock", + "options": { + "port": 38712, + "host": "2130756016", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.3265.555181728095.personal-lock:38712" + }, + "file": "/tmp/_root_.autorest.lock" + }, + "dotnetPath": "/root/.dotnet" + }, + "installationPath": "/root/.autorest" + }, + { + "resolvedInfo": null, + "packageMetadata": { + "name": "@microsoft.azure/autorest.modeler", + "version": "2.3.38", + "dependencies": { + "dotnet-2.0.0": "^1.4.4" + }, + "optionalDependencies": {}, + "devDependencies": { + "@microsoft.azure/autorest.testserver": "2.3.1", + "autorest": "^2.0.4201", + "coffee-script": "^1.11.1", + "dotnet-sdk-2.0.0": "^1.4.4", + "gulp": "^3.9.1", + "gulp-filter": "^5.0.0", + "gulp-line-ending-corrector": "^1.0.1", + "iced-coffee-script": "^108.0.11", + "marked": "^0.3.6", + "marked-terminal": "^2.0.0", + "moment": "^2.17.1", + "run-sequence": "*", + "shx": "^0.2.2", + "through2-parallel": "^0.1.3", + "yargs": "^8.0.2", + "yarn": "^1.0.2" + }, + "bundleDependencies": false, + "peerDependencies": {}, + "deprecated": false, + "_resolved": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", + "_shasum": "903bb77932e4ed1b8bc3b25cc39b167143494f6c", + "_shrinkwrap": null, + "bin": null, + "_id": "@microsoft.azure/autorest.modeler@2.3.38", + "_from": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", + "_requested": { + "type": "directory", + "where": "/git-restapi", + "raw": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", + "rawSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", + "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", + "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler" + }, + "_spec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", + "_where": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler" + }, + "extensionManager": { + "installationPath": "/root/.autorest", + "sharedLock": { + "name": "/root/.autorest", + "exclusiveLock": { + "name": "_root_.autorest.exclusive-lock", + "options": { + "port": 45234, + "host": "2130706813", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" + }, + "busyLock": { + "name": "_root_.autorest.busy-lock", + "options": { + "port": 37199, + "host": "2130756895", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" + }, + "personalLock": { + "name": "_root_.autorest.3265.555181728095.personal-lock", + "options": { + "port": 38712, + "host": "2130756016", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.3265.555181728095.personal-lock:38712" + }, + "file": "/tmp/_root_.autorest.lock" + }, + "dotnetPath": "/root/.dotnet" + }, + "installationPath": "/root/.autorest" + }, + { + "resolvedInfo": null, + "packageMetadata": { + "name": "@microsoft.azure/autorest.python", + "version": "2.1.34", + "dependencies": { + "dotnet-2.0.0": "^1.4.4" + }, + "optionalDependencies": {}, + "devDependencies": { + "@microsoft.azure/autorest.testserver": "^2.3.13", + "autorest": "^2.0.4203", + "coffee-script": "^1.11.1", + "dotnet-sdk-2.0.0": "^1.4.4", + "gulp": "^3.9.1", + "gulp-filter": "^5.0.0", + "gulp-line-ending-corrector": "^1.0.1", + "iced-coffee-script": "^108.0.11", + "marked": "^0.3.6", + "marked-terminal": "^2.0.0", + "moment": "^2.17.1", + "run-sequence": "*", + "shx": "^0.2.2", + "through2-parallel": "^0.1.3", + "yargs": "^8.0.2", + "yarn": "^1.0.2" + }, + "bundleDependencies": false, + "peerDependencies": {}, + "deprecated": false, + "_resolved": "/root/.autorest/@microsoft.azure_autorest.python@2.1.34/node_modules/@microsoft.azure/autorest.python", + "_shasum": "b58d7e0542e081cf410fdbcdf8c14acf9cee16a7", + "_shrinkwrap": null, + "bin": null, + "_id": "@microsoft.azure/autorest.python@2.1.34", + "_from": "file:/root/.autorest/@microsoft.azure_autorest.python@2.1.34/node_modules/@microsoft.azure/autorest.python", + "_requested": { + "type": "directory", + "where": "/git-restapi", + "raw": "/root/.autorest/@microsoft.azure_autorest.python@2.1.34/node_modules/@microsoft.azure/autorest.python", + "rawSpec": "/root/.autorest/@microsoft.azure_autorest.python@2.1.34/node_modules/@microsoft.azure/autorest.python", + "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.python@2.1.34/node_modules/@microsoft.azure/autorest.python", + "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.python@2.1.34/node_modules/@microsoft.azure/autorest.python" + }, + "_spec": "/root/.autorest/@microsoft.azure_autorest.python@2.1.34/node_modules/@microsoft.azure/autorest.python", + "_where": "/root/.autorest/@microsoft.azure_autorest.python@2.1.34/node_modules/@microsoft.azure/autorest.python" + }, + "extensionManager": { + "installationPath": "/root/.autorest", + "sharedLock": { + "name": "/root/.autorest", + "exclusiveLock": { + "name": "_root_.autorest.exclusive-lock", + "options": { + "port": 45234, + "host": "2130706813", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" + }, + "busyLock": { + "name": "_root_.autorest.busy-lock", + "options": { + "port": 37199, + "host": "2130756895", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" + }, + "personalLock": { + "name": "_root_.autorest.3265.555181728095.personal-lock", + "options": { + "port": 38712, + "host": "2130756016", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.3265.555181728095.personal-lock:38712" + }, + "file": "/tmp/_root_.autorest.lock" + }, + "dotnetPath": "/root/.dotnet" + }, + "installationPath": "/root/.autorest" + }, + { + "resolvedInfo": null, + "packageMetadata": { + "name": "@microsoft.azure/classic-openapi-validator", + "version": "1.0.9", + "dependencies": { + "dotnet-2.0.0": "^1.1.0" + }, + "optionalDependencies": {}, + "devDependencies": { + "dotnet-sdk-2.0.0": "^1.1.1" + }, + "bundleDependencies": false, + "peerDependencies": {}, + "deprecated": false, + "_resolved": "/root/.autorest/@microsoft.azure_classic-openapi-validator@1.0.9/node_modules/@microsoft.azure/classic-openapi-validator", + "_shasum": "554be1db3e054b0a0e4e51c842ff5b7c6a60784c", + "_shrinkwrap": null, + "bin": null, + "_id": "@microsoft.azure/classic-openapi-validator@1.0.9", + "_from": "file:/root/.autorest/@microsoft.azure_classic-openapi-validator@1.0.9/node_modules/@microsoft.azure/classic-openapi-validator", + "_requested": { + "type": "directory", + "where": "/git-restapi", + "raw": "/root/.autorest/@microsoft.azure_classic-openapi-validator@1.0.9/node_modules/@microsoft.azure/classic-openapi-validator", + "rawSpec": "/root/.autorest/@microsoft.azure_classic-openapi-validator@1.0.9/node_modules/@microsoft.azure/classic-openapi-validator", + "saveSpec": "file:/root/.autorest/@microsoft.azure_classic-openapi-validator@1.0.9/node_modules/@microsoft.azure/classic-openapi-validator", + "fetchSpec": "/root/.autorest/@microsoft.azure_classic-openapi-validator@1.0.9/node_modules/@microsoft.azure/classic-openapi-validator" + }, + "_spec": "/root/.autorest/@microsoft.azure_classic-openapi-validator@1.0.9/node_modules/@microsoft.azure/classic-openapi-validator", + "_where": "/root/.autorest/@microsoft.azure_classic-openapi-validator@1.0.9/node_modules/@microsoft.azure/classic-openapi-validator" + }, + "extensionManager": { + "installationPath": "/root/.autorest", + "sharedLock": { + "name": "/root/.autorest", + "exclusiveLock": { + "name": "_root_.autorest.exclusive-lock", + "options": { + "port": 45234, + "host": "2130706813", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" + }, + "busyLock": { + "name": "_root_.autorest.busy-lock", + "options": { + "port": 37199, + "host": "2130756895", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" + }, + "personalLock": { + "name": "_root_.autorest.3265.555181728095.personal-lock", + "options": { + "port": 38712, + "host": "2130756016", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.3265.555181728095.personal-lock:38712" + }, + "file": "/tmp/_root_.autorest.lock" + }, + "dotnetPath": "/root/.dotnet" + }, + "installationPath": "/root/.autorest" + }, + { + "resolvedInfo": null, + "packageMetadata": { + "name": "@microsoft.azure/openapi-validator", + "version": "1.0.2", + "dependencies": { + "fs": "^0.0.1-security", + "js-yaml": "^3.8.4", + "jsonpath": "^0.2.11", + "vscode-jsonrpc": "^3.2.0" + }, + "optionalDependencies": {}, + "devDependencies": { + "@types/js-yaml": "^3.5.30", + "@types/jsonpath": "^0.1.29", + "@types/node": "^7.0.18", + "gulp": "3.9.1", + "gulp-clean": "0.3.2", + "gulp-dotnet-cli": "0.4.0", + "gulp-mocha": "4.3.1", + "gulp-run": "1.7.1", + "mocha": "3.2.0", + "mocha-typescript": "1.0.22", + "typescript": "2.3.3" + }, + "bundleDependencies": false, + "peerDependencies": {}, + "deprecated": false, + "_resolved": "/root/.autorest/@microsoft.azure_openapi-validator@1.0.2/node_modules/@microsoft.azure/openapi-validator", + "_shasum": "352190e6dbb4a1d16587b39e589b9615d6e4aaaf", + "_shrinkwrap": null, + "bin": null, + "_id": "@microsoft.azure/openapi-validator@1.0.2", + "_from": "file:/root/.autorest/@microsoft.azure_openapi-validator@1.0.2/node_modules/@microsoft.azure/openapi-validator", + "_requested": { + "type": "directory", + "where": "/git-restapi", + "raw": "/root/.autorest/@microsoft.azure_openapi-validator@1.0.2/node_modules/@microsoft.azure/openapi-validator", + "rawSpec": "/root/.autorest/@microsoft.azure_openapi-validator@1.0.2/node_modules/@microsoft.azure/openapi-validator", + "saveSpec": "file:/root/.autorest/@microsoft.azure_openapi-validator@1.0.2/node_modules/@microsoft.azure/openapi-validator", + "fetchSpec": "/root/.autorest/@microsoft.azure_openapi-validator@1.0.2/node_modules/@microsoft.azure/openapi-validator" + }, + "_spec": "/root/.autorest/@microsoft.azure_openapi-validator@1.0.2/node_modules/@microsoft.azure/openapi-validator", + "_where": "/root/.autorest/@microsoft.azure_openapi-validator@1.0.2/node_modules/@microsoft.azure/openapi-validator" + }, + "extensionManager": { + "installationPath": "/root/.autorest", + "sharedLock": { + "name": "/root/.autorest", + "exclusiveLock": { + "name": "_root_.autorest.exclusive-lock", + "options": { + "port": 45234, + "host": "2130706813", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" + }, + "busyLock": { + "name": "_root_.autorest.busy-lock", + "options": { + "port": 37199, + "host": "2130756895", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" + }, + "personalLock": { + "name": "_root_.autorest.3265.555181728095.personal-lock", + "options": { + "port": 38712, + "host": "2130756016", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.3265.555181728095.personal-lock:38712" + }, + "file": "/tmp/_root_.autorest.lock" + }, + "dotnetPath": "/root/.dotnet" + }, + "installationPath": "/root/.autorest" + } + ], + "autorest_bootstrap": {} +} \ No newline at end of file diff --git a/azure-mgmt-search/setup.py b/azure-mgmt-search/setup.py index eae6a5683b05..d9147216639b 100644 --- a/azure-mgmt-search/setup.py +++ b/azure-mgmt-search/setup.py @@ -61,7 +61,7 @@ long_description=readme + '\n\n' + history, license='MIT License', author='Microsoft Corporation', - author_email='ptvshelp@microsoft.com', + author_email='azpysdkhelp@microsoft.com', url='https://github.com/Azure/azure-sdk-for-python', classifiers=[ 'Development Status :: 4 - Beta', @@ -69,17 +69,16 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'License :: OSI Approved :: MIT License', ], zip_safe=False, - packages=find_packages(), + packages=find_packages(exclude=["tests"]), install_requires=[ - 'msrestazure~=0.4.8', - 'azure-common~=1.1.6', + 'msrestazure>=0.4.27,<2.0.0', + 'azure-common~=1.1', ], cmdclass=cmdclass ) diff --git a/azure-mgmt-search/tests/test_mgmt_search.py b/azure-mgmt-search/tests/test_mgmt_search.py index 3ccbc4a35f2f..f957df08dccf 100644 --- a/azure-mgmt-search/tests/test_mgmt_search.py +++ b/azure-mgmt-search/tests/test_mgmt_search.py @@ -38,7 +38,7 @@ def test_search_services(self, resource_group, location): 'name': 'free' } } - ) + ).result() availability = self.client.services.check_name_availability(account_name) self.assertFalse(availability.is_name_available) diff --git a/azure-mgmt-sql/HISTORY.rst b/azure-mgmt-sql/HISTORY.rst index c23c06ff4b8a..c29eec3d663b 100644 --- a/azure-mgmt-sql/HISTORY.rst +++ b/azure-mgmt-sql/HISTORY.rst @@ -3,6 +3,16 @@ Release History =============== +0.9.1 (2018-05-24) +++++++++++++++++++ + +**Features** + +- Managed instances, databases, and failover groups +- Vulnerability assessments +- Backup short term retention policies +- Elastic Jobs + 0.9.0 (2018-04-25) ++++++++++++++++++ @@ -24,7 +34,7 @@ This version uses a next-generation code generator that *might* introduce breaki - Return type changes from `msrestazure.azure_operation.AzureOperationPoller` to `msrest.polling.LROPoller`. External API is the same. - Return type is now **always** a `msrest.polling.LROPoller`, regardless of the optional parameters used. - - The behavior has changed when using `raw=True`. Instead of returning the initial call result as `ClientRawResponse`, + - The behavior has changed when using `raw=True`. Instead of returning the initial call result as `ClientRawResponse`, without polling, now this returns an LROPoller. After polling, the final resource will be returned as a `ClientRawResponse`. - New `polling` parameter. The default behavior is `Polling=True` which will poll using ARM algorithm. When `Polling=False`, the response of the initial call will be returned without polling. @@ -40,7 +50,7 @@ This version uses a next-generation code generator that *might* introduce breaki * ElasticPool.sku has replaced ElasticPool.dtu. Elastic pool scale can be set by setting Sku.name to the requested sku name (e.g. StandardPool, PremiumPool, or GP_Gen4) and setting Sku.capacity to the scale measured in DTU or vCores. * ElasticPool.per_database_settings has replaced ElasticPool.database_dtu_min and ElasticPool.database_dtu_max. - Database.max_size_bytes is now an integer instead of string. -- LocationCapabilities tree has been changed in order to support capabilities of new vCore-based database and elastic pool editions. +- LocationCapabilities tree has been changed in order to support capabilities of new vCore-based database and elastic pool editions. **Features** @@ -49,7 +59,7 @@ This version uses a next-generation code generator that *might* introduce breaki * Removed support for managing Vaults used for Long Term Retention V1 * Changed BackupLongTermRetentionPolicy class, removing the Long Term Retention V1 properties and adding the Long Term Retention V2 properties - * Removed BackupLongTermRetentionPolicyState + * Removed BackupLongTermRetentionPolicyState 0.8.6 (2018-03-22) ++++++++++++++++++ @@ -103,16 +113,16 @@ This version uses a next-generation code generator that *might* introduce breaki **Disclaimer** -We were using a slightly unorthodox convention for some operation ids. -Some resource operations were "nested" inside others, e.g. blob auditing policies was nested inside databases as in client.databases.get_blob_auditing_policies(..) +We were using a slightly unorthodox convention for some operation ids. +Some resource operations were "nested" inside others, e.g. blob auditing policies was nested inside databases as in client.databases.get_blob_auditing_policies(..) instead of the flattened ARM standard client.database_blob_auditing_policies.get(...). -This convention has lead to some inconsistencies, makes some APIs difficult to find, and is at odds with future APIs. -For example if we wanted to implement listing db audit policies by server, continuing the current convention would be +This convention has lead to some inconsistencies, makes some APIs difficult to find, and is at odds with future APIs. +For example if we wanted to implement listing db audit policies by server, continuing the current convention would be client.databases.list_blob_auditing_policies_by_server(..) which makes much less sense than the ARM standard which would beclient.database_blob_auditing_policies.list_by_server(...)`. -In order to resolve this and provide a good path moving forward, -we have renamed the inconsistent operations to follow the ARM standard. +In order to resolve this and provide a good path moving forward, +we have renamed the inconsistent operations to follow the ARM standard. This is an unfortunate breaking change, but it's best to do now while the SDK is still in preview and since most of these operations were only recently added. **Breaking changes** diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py b/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py index 5423a4320c1c..fb3533b20adf 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py @@ -10,11 +10,11 @@ # -------------------------------------------------------------------------- try: - from .resource_py3 import Resource - from .tracked_resource_py3 import TrackedResource - from .proxy_resource_py3 import ProxyResource from .recoverable_database_py3 import RecoverableDatabase from .restorable_dropped_database_py3 import RestorableDroppedDatabase + from .tracked_resource_py3 import TrackedResource + from .resource_py3 import Resource + from .proxy_resource_py3 import ProxyResource from .check_name_availability_request_py3 import CheckNameAvailabilityRequest from .check_name_availability_response_py3 import CheckNameAvailabilityResponse from .server_connection_policy_py3 import ServerConnectionPolicy @@ -57,10 +57,13 @@ from .partner_info_py3 import PartnerInfo from .failover_group_py3 import FailoverGroup from .failover_group_update_py3 import FailoverGroupUpdate + from .resource_identity_py3 import ResourceIdentity + from .sku_py3 import Sku + from .managed_instance_py3 import ManagedInstance + from .managed_instance_update_py3 import ManagedInstanceUpdate from .operation_display_py3 import OperationDisplay from .operation_py3 import Operation from .server_key_py3 import ServerKey - from .resource_identity_py3 import ResourceIdentity from .server_py3 import Server from .server_update_py3 import ServerUpdate from .sync_agent_py3 import SyncAgent @@ -78,8 +81,29 @@ from .sync_member_py3 import SyncMember from .subscription_usage_py3 import SubscriptionUsage from .virtual_network_rule_py3 import VirtualNetworkRule + from .database_vulnerability_assessment_rule_baseline_item_py3 import DatabaseVulnerabilityAssessmentRuleBaselineItem + from .database_vulnerability_assessment_rule_baseline_py3 import DatabaseVulnerabilityAssessmentRuleBaseline + from .vulnerability_assessment_recurring_scans_properties_py3 import VulnerabilityAssessmentRecurringScansProperties + from .database_vulnerability_assessment_py3 import DatabaseVulnerabilityAssessment + from .job_agent_py3 import JobAgent + from .job_agent_update_py3 import JobAgentUpdate + from .job_credential_py3 import JobCredential + from .job_execution_target_py3 import JobExecutionTarget + from .job_execution_py3 import JobExecution + from .job_schedule_py3 import JobSchedule + from .job_py3 import Job + from .job_step_action_py3 import JobStepAction + from .job_step_output_py3 import JobStepOutput + from .job_step_execution_options_py3 import JobStepExecutionOptions + from .job_step_py3 import JobStep + from .job_target_py3 import JobTarget + from .job_target_group_py3 import JobTargetGroup + from .job_version_py3 import JobVersion from .long_term_retention_backup_py3 import LongTermRetentionBackup from .backup_long_term_retention_policy_py3 import BackupLongTermRetentionPolicy + from .complete_database_restore_definition_py3 import CompleteDatabaseRestoreDefinition + from .managed_database_py3 import ManagedDatabase + from .managed_database_update_py3 import ManagedDatabaseUpdate from .automatic_tuning_server_options_py3 import AutomaticTuningServerOptions from .server_automatic_tuning_py3 import ServerAutomaticTuning from .server_dns_alias_py3 import ServerDnsAlias @@ -92,7 +116,6 @@ from .log_size_capability_py3 import LogSizeCapability from .max_size_range_capability_py3 import MaxSizeRangeCapability from .performance_level_capability_py3 import PerformanceLevelCapability - from .sku_py3 import Sku from .license_type_capability_py3 import LicenseTypeCapability from .service_objective_capability_py3 import ServiceObjectiveCapability from .edition_capability_py3 import EditionCapability @@ -112,12 +135,21 @@ from .elastic_pool_per_database_settings_py3 import ElasticPoolPerDatabaseSettings from .elastic_pool_py3 import ElasticPool from .elastic_pool_update_py3 import ElasticPoolUpdate + from .vulnerability_assessment_scan_error_py3 import VulnerabilityAssessmentScanError + from .vulnerability_assessment_scan_record_py3 import VulnerabilityAssessmentScanRecord + from .database_vulnerability_assessment_scans_export_py3 import DatabaseVulnerabilityAssessmentScansExport + from .instance_failover_group_read_write_endpoint_py3 import InstanceFailoverGroupReadWriteEndpoint + from .instance_failover_group_read_only_endpoint_py3 import InstanceFailoverGroupReadOnlyEndpoint + from .partner_region_info_py3 import PartnerRegionInfo + from .managed_instance_pair_info_py3 import ManagedInstancePairInfo + from .instance_failover_group_py3 import InstanceFailoverGroup + from .backup_short_term_retention_policy_py3 import BackupShortTermRetentionPolicy except (SyntaxError, ImportError): - from .resource import Resource - from .tracked_resource import TrackedResource - from .proxy_resource import ProxyResource from .recoverable_database import RecoverableDatabase from .restorable_dropped_database import RestorableDroppedDatabase + from .tracked_resource import TrackedResource + from .resource import Resource + from .proxy_resource import ProxyResource from .check_name_availability_request import CheckNameAvailabilityRequest from .check_name_availability_response import CheckNameAvailabilityResponse from .server_connection_policy import ServerConnectionPolicy @@ -160,10 +192,13 @@ from .partner_info import PartnerInfo from .failover_group import FailoverGroup from .failover_group_update import FailoverGroupUpdate + from .resource_identity import ResourceIdentity + from .sku import Sku + from .managed_instance import ManagedInstance + from .managed_instance_update import ManagedInstanceUpdate from .operation_display import OperationDisplay from .operation import Operation from .server_key import ServerKey - from .resource_identity import ResourceIdentity from .server import Server from .server_update import ServerUpdate from .sync_agent import SyncAgent @@ -181,8 +216,29 @@ from .sync_member import SyncMember from .subscription_usage import SubscriptionUsage from .virtual_network_rule import VirtualNetworkRule + from .database_vulnerability_assessment_rule_baseline_item import DatabaseVulnerabilityAssessmentRuleBaselineItem + from .database_vulnerability_assessment_rule_baseline import DatabaseVulnerabilityAssessmentRuleBaseline + from .vulnerability_assessment_recurring_scans_properties import VulnerabilityAssessmentRecurringScansProperties + from .database_vulnerability_assessment import DatabaseVulnerabilityAssessment + from .job_agent import JobAgent + from .job_agent_update import JobAgentUpdate + from .job_credential import JobCredential + from .job_execution_target import JobExecutionTarget + from .job_execution import JobExecution + from .job_schedule import JobSchedule + from .job import Job + from .job_step_action import JobStepAction + from .job_step_output import JobStepOutput + from .job_step_execution_options import JobStepExecutionOptions + from .job_step import JobStep + from .job_target import JobTarget + from .job_target_group import JobTargetGroup + from .job_version import JobVersion from .long_term_retention_backup import LongTermRetentionBackup from .backup_long_term_retention_policy import BackupLongTermRetentionPolicy + from .complete_database_restore_definition import CompleteDatabaseRestoreDefinition + from .managed_database import ManagedDatabase + from .managed_database_update import ManagedDatabaseUpdate from .automatic_tuning_server_options import AutomaticTuningServerOptions from .server_automatic_tuning import ServerAutomaticTuning from .server_dns_alias import ServerDnsAlias @@ -195,7 +251,6 @@ from .log_size_capability import LogSizeCapability from .max_size_range_capability import MaxSizeRangeCapability from .performance_level_capability import PerformanceLevelCapability - from .sku import Sku from .license_type_capability import LicenseTypeCapability from .service_objective_capability import ServiceObjectiveCapability from .edition_capability import EditionCapability @@ -215,6 +270,15 @@ from .elastic_pool_per_database_settings import ElasticPoolPerDatabaseSettings from .elastic_pool import ElasticPool from .elastic_pool_update import ElasticPoolUpdate + from .vulnerability_assessment_scan_error import VulnerabilityAssessmentScanError + from .vulnerability_assessment_scan_record import VulnerabilityAssessmentScanRecord + from .database_vulnerability_assessment_scans_export import DatabaseVulnerabilityAssessmentScansExport + from .instance_failover_group_read_write_endpoint import InstanceFailoverGroupReadWriteEndpoint + from .instance_failover_group_read_only_endpoint import InstanceFailoverGroupReadOnlyEndpoint + from .partner_region_info import PartnerRegionInfo + from .managed_instance_pair_info import ManagedInstancePairInfo + from .instance_failover_group import InstanceFailoverGroup + from .backup_short_term_retention_policy import BackupShortTermRetentionPolicy from .recoverable_database_paged import RecoverableDatabasePaged from .restorable_dropped_database_paged import RestorableDroppedDatabasePaged from .server_paged import ServerPaged @@ -239,6 +303,7 @@ from .database_usage_paged import DatabaseUsagePaged from .encryption_protector_paged import EncryptionProtectorPaged from .failover_group_paged import FailoverGroupPaged +from .managed_instance_paged import ManagedInstancePaged from .operation_paged import OperationPaged from .server_key_paged import ServerKeyPaged from .sync_agent_paged import SyncAgentPaged @@ -250,11 +315,21 @@ from .sync_member_paged import SyncMemberPaged from .subscription_usage_paged import SubscriptionUsagePaged from .virtual_network_rule_paged import VirtualNetworkRulePaged +from .job_agent_paged import JobAgentPaged +from .job_credential_paged import JobCredentialPaged +from .job_execution_paged import JobExecutionPaged +from .job_paged import JobPaged +from .job_step_paged import JobStepPaged +from .job_target_group_paged import JobTargetGroupPaged +from .job_version_paged import JobVersionPaged from .long_term_retention_backup_paged import LongTermRetentionBackupPaged +from .managed_database_paged import ManagedDatabasePaged from .server_dns_alias_paged import ServerDnsAliasPaged from .restore_point_paged import RestorePointPaged from .database_operation_paged import DatabaseOperationPaged from .elastic_pool_operation_paged import ElasticPoolOperationPaged +from .vulnerability_assessment_scan_record_paged import VulnerabilityAssessmentScanRecordPaged +from .instance_failover_group_paged import InstanceFailoverGroupPaged from .sql_management_client_enums import ( CheckNameAvailabilityReason, ServerConnectionType, @@ -289,8 +364,8 @@ ReadWriteEndpointFailoverPolicy, ReadOnlyEndpointFailoverPolicy, FailoverGroupReplicationRole, - OperationOrigin, IdentityType, + OperationOrigin, SyncAgentState, SyncMemberDbType, SyncGroupLogType, @@ -299,6 +374,18 @@ SyncDirection, SyncMemberState, VirtualNetworkRuleState, + JobAgentState, + JobExecutionLifecycle, + ProvisioningState, + JobTargetType, + JobScheduleType, + JobStepActionType, + JobStepActionSource, + JobStepOutputType, + JobTargetGroupMembershipType, + ManagedDatabaseStatus, + CatalogCollationType, + ManagedDatabaseCreateMode, AutomaticTuningServerMode, AutomaticTuningServerReason, RestorePointType, @@ -310,21 +397,23 @@ CreateMode, SampleName, DatabaseStatus, - CatalogCollationType, DatabaseLicenseType, DatabaseReadScale, ElasticPoolState, ElasticPoolLicenseType, + VulnerabilityAssessmentScanTriggerType, + VulnerabilityAssessmentScanState, + InstanceFailoverGroupReplicationRole, LongTermRetentionDatabaseState, CapabilityGroup, ) __all__ = [ - 'Resource', - 'TrackedResource', - 'ProxyResource', 'RecoverableDatabase', 'RestorableDroppedDatabase', + 'TrackedResource', + 'Resource', + 'ProxyResource', 'CheckNameAvailabilityRequest', 'CheckNameAvailabilityResponse', 'ServerConnectionPolicy', @@ -367,10 +456,13 @@ 'PartnerInfo', 'FailoverGroup', 'FailoverGroupUpdate', + 'ResourceIdentity', + 'Sku', + 'ManagedInstance', + 'ManagedInstanceUpdate', 'OperationDisplay', 'Operation', 'ServerKey', - 'ResourceIdentity', 'Server', 'ServerUpdate', 'SyncAgent', @@ -388,8 +480,29 @@ 'SyncMember', 'SubscriptionUsage', 'VirtualNetworkRule', + 'DatabaseVulnerabilityAssessmentRuleBaselineItem', + 'DatabaseVulnerabilityAssessmentRuleBaseline', + 'VulnerabilityAssessmentRecurringScansProperties', + 'DatabaseVulnerabilityAssessment', + 'JobAgent', + 'JobAgentUpdate', + 'JobCredential', + 'JobExecutionTarget', + 'JobExecution', + 'JobSchedule', + 'Job', + 'JobStepAction', + 'JobStepOutput', + 'JobStepExecutionOptions', + 'JobStep', + 'JobTarget', + 'JobTargetGroup', + 'JobVersion', 'LongTermRetentionBackup', 'BackupLongTermRetentionPolicy', + 'CompleteDatabaseRestoreDefinition', + 'ManagedDatabase', + 'ManagedDatabaseUpdate', 'AutomaticTuningServerOptions', 'ServerAutomaticTuning', 'ServerDnsAlias', @@ -402,7 +515,6 @@ 'LogSizeCapability', 'MaxSizeRangeCapability', 'PerformanceLevelCapability', - 'Sku', 'LicenseTypeCapability', 'ServiceObjectiveCapability', 'EditionCapability', @@ -422,6 +534,15 @@ 'ElasticPoolPerDatabaseSettings', 'ElasticPool', 'ElasticPoolUpdate', + 'VulnerabilityAssessmentScanError', + 'VulnerabilityAssessmentScanRecord', + 'DatabaseVulnerabilityAssessmentScansExport', + 'InstanceFailoverGroupReadWriteEndpoint', + 'InstanceFailoverGroupReadOnlyEndpoint', + 'PartnerRegionInfo', + 'ManagedInstancePairInfo', + 'InstanceFailoverGroup', + 'BackupShortTermRetentionPolicy', 'RecoverableDatabasePaged', 'RestorableDroppedDatabasePaged', 'ServerPaged', @@ -446,6 +567,7 @@ 'DatabaseUsagePaged', 'EncryptionProtectorPaged', 'FailoverGroupPaged', + 'ManagedInstancePaged', 'OperationPaged', 'ServerKeyPaged', 'SyncAgentPaged', @@ -457,11 +579,21 @@ 'SyncMemberPaged', 'SubscriptionUsagePaged', 'VirtualNetworkRulePaged', + 'JobAgentPaged', + 'JobCredentialPaged', + 'JobExecutionPaged', + 'JobPaged', + 'JobStepPaged', + 'JobTargetGroupPaged', + 'JobVersionPaged', 'LongTermRetentionBackupPaged', + 'ManagedDatabasePaged', 'ServerDnsAliasPaged', 'RestorePointPaged', 'DatabaseOperationPaged', 'ElasticPoolOperationPaged', + 'VulnerabilityAssessmentScanRecordPaged', + 'InstanceFailoverGroupPaged', 'CheckNameAvailabilityReason', 'ServerConnectionType', 'SecurityAlertPolicyState', @@ -495,8 +627,8 @@ 'ReadWriteEndpointFailoverPolicy', 'ReadOnlyEndpointFailoverPolicy', 'FailoverGroupReplicationRole', - 'OperationOrigin', 'IdentityType', + 'OperationOrigin', 'SyncAgentState', 'SyncMemberDbType', 'SyncGroupLogType', @@ -505,6 +637,18 @@ 'SyncDirection', 'SyncMemberState', 'VirtualNetworkRuleState', + 'JobAgentState', + 'JobExecutionLifecycle', + 'ProvisioningState', + 'JobTargetType', + 'JobScheduleType', + 'JobStepActionType', + 'JobStepActionSource', + 'JobStepOutputType', + 'JobTargetGroupMembershipType', + 'ManagedDatabaseStatus', + 'CatalogCollationType', + 'ManagedDatabaseCreateMode', 'AutomaticTuningServerMode', 'AutomaticTuningServerReason', 'RestorePointType', @@ -516,11 +660,13 @@ 'CreateMode', 'SampleName', 'DatabaseStatus', - 'CatalogCollationType', 'DatabaseLicenseType', 'DatabaseReadScale', 'ElasticPoolState', 'ElasticPoolLicenseType', + 'VulnerabilityAssessmentScanTriggerType', + 'VulnerabilityAssessmentScanState', + 'InstanceFailoverGroupReplicationRole', 'LongTermRetentionDatabaseState', 'CapabilityGroup', ] diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/backup_long_term_retention_policy_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/backup_long_term_retention_policy_py3.py index 1e740145e464..b075dac8562d 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/backup_long_term_retention_policy_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/backup_long_term_retention_policy_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class BackupLongTermRetentionPolicy(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy.py b/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy.py new file mode 100644 index 000000000000..1d4fba2cfff4 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy.py @@ -0,0 +1,47 @@ +# 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 BackupShortTermRetentionPolicy(ProxyResource): + """A short term retention policy. + + 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 retention_days: The backup retention period in days. This is how + many days Point-in-Time Restore will be supported. + :type retention_days: int + """ + + _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'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(BackupShortTermRetentionPolicy, self).__init__(**kwargs) + self.retention_days = kwargs.get('retention_days', None) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy_py3.py new file mode 100644 index 000000000000..9df25577baf3 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/backup_short_term_retention_policy_py3.py @@ -0,0 +1,47 @@ +# 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 BackupShortTermRetentionPolicy(ProxyResource): + """A short term retention policy. + + 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 retention_days: The backup retention period in days. This is how + many days Point-in-Time Restore will be supported. + :type retention_days: int + """ + + _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'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + } + + def __init__(self, *, retention_days: int=None, **kwargs) -> None: + super(BackupShortTermRetentionPolicy, self).__init__(**kwargs) + self.retention_days = retention_days diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/complete_database_restore_definition.py b/azure-mgmt-sql/azure/mgmt/sql/models/complete_database_restore_definition.py new file mode 100644 index 000000000000..926012a21f09 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/complete_database_restore_definition.py @@ -0,0 +1,35 @@ +# 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 CompleteDatabaseRestoreDefinition(Model): + """Contains the information necessary to perform a complete database restore + operation. + + All required parameters must be populated in order to send to Azure. + + :param last_backup_name: Required. The last backup name to apply + :type last_backup_name: str + """ + + _validation = { + 'last_backup_name': {'required': True}, + } + + _attribute_map = { + 'last_backup_name': {'key': 'lastBackupName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CompleteDatabaseRestoreDefinition, self).__init__(**kwargs) + self.last_backup_name = kwargs.get('last_backup_name', None) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/complete_database_restore_definition_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/complete_database_restore_definition_py3.py new file mode 100644 index 000000000000..8b3c7f3da1f8 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/complete_database_restore_definition_py3.py @@ -0,0 +1,35 @@ +# 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 CompleteDatabaseRestoreDefinition(Model): + """Contains the information necessary to perform a complete database restore + operation. + + All required parameters must be populated in order to send to Azure. + + :param last_backup_name: Required. The last backup name to apply + :type last_backup_name: str + """ + + _validation = { + 'last_backup_name': {'required': True}, + } + + _attribute_map = { + 'last_backup_name': {'key': 'lastBackupName', 'type': 'str'}, + } + + def __init__(self, *, last_backup_name: str, **kwargs) -> None: + super(CompleteDatabaseRestoreDefinition, self).__init__(**kwargs) + self.last_backup_name = last_backup_name diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_policy_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_policy_py3.py index 6c601254aa8b..c2227aeb60da 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_policy_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_policy_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class DataMaskingPolicy(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule_py3.py index e576d5643c02..775fd78a2d6b 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/data_masking_rule_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class DataMaskingRule(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/database.py b/azure-mgmt-sql/azure/mgmt/sql/models/database.py index 01a91639b523..f3f66d024a7a 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/database.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/database.py @@ -26,10 +26,10 @@ class Database(TrackedResource): :vartype name: str :ivar type: Resource type. :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] :param location: Required. Resource location. :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] :param sku: The name and tier of the SKU. :type sku: ~azure.mgmt.sql.models.Sku :ivar kind: Kind of database. This is metadata used for the Azure portal @@ -171,8 +171,8 @@ class Database(TrackedResource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, 'sku': {'key': 'sku', 'type': 'Sku'}, 'kind': {'key': 'kind', 'type': 'str'}, 'managed_by': {'key': 'managedBy', 'type': 'str'}, diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/database_automatic_tuning_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/database_automatic_tuning_py3.py index ff274ebc8969..86bb068ce54f 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/database_automatic_tuning_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/database_automatic_tuning_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class DatabaseAutomaticTuning(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/database_blob_auditing_policy_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/database_blob_auditing_policy_py3.py index d2dccefb38d9..bfc95370f0fc 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/database_blob_auditing_policy_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/database_blob_auditing_policy_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class DatabaseBlobAuditingPolicy(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/database_operation_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/database_operation_py3.py index 51f5690a2308..66fb0bb0c602 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/database_operation_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/database_operation_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class DatabaseOperation(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/database_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/database_py3.py index 29a2f6613d41..9cfb4d07a7e6 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/database_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/database_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .tracked_resource import TrackedResource +from .tracked_resource_py3 import TrackedResource class Database(TrackedResource): @@ -26,10 +26,10 @@ class Database(TrackedResource): :vartype name: str :ivar type: Resource type. :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] :param location: Required. Resource location. :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] :param sku: The name and tier of the SKU. :type sku: ~azure.mgmt.sql.models.Sku :ivar kind: Kind of database. This is metadata used for the Azure portal @@ -171,8 +171,8 @@ class Database(TrackedResource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, 'sku': {'key': 'sku', 'type': 'Sku'}, 'kind': {'key': 'kind', 'type': 'str'}, 'managed_by': {'key': 'managedBy', 'type': 'str'}, @@ -205,7 +205,7 @@ class Database(TrackedResource): } def __init__(self, *, location: str, tags=None, sku=None, create_mode=None, collation: str=None, max_size_bytes: int=None, sample_name=None, elastic_pool_id: str=None, source_database_id: str=None, restore_point_in_time=None, source_database_deletion_date=None, recovery_services_recovery_point_id: str=None, long_term_retention_backup_resource_id: str=None, recoverable_database_id: str=None, restorable_dropped_database_id: str=None, catalog_collation=None, zone_redundant: bool=None, license_type=None, read_scale=None, **kwargs) -> None: - super(Database, self).__init__(tags=tags, location=location, **kwargs) + super(Database, self).__init__(location=location, tags=tags, **kwargs) self.sku = sku self.kind = None self.managed_by = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/database_security_alert_policy_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/database_security_alert_policy_py3.py index 85b31a408282..8967d6a6e0f1 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/database_security_alert_policy_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/database_security_alert_policy_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class DatabaseSecurityAlertPolicy(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment.py b/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment.py new file mode 100644 index 000000000000..a7e5921902ad --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment.py @@ -0,0 +1,63 @@ +# 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 DatabaseVulnerabilityAssessment(ProxyResource): + """A database vulnerability assessment. + + 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 storage_container_path: Required. A blob storage container path to + hold the scan results (e.g. + https://myStorage.blob.core.windows.net/VaScans/). + :type storage_container_path: str + :param storage_container_sas_key: Required. A shared access signature (SAS + Key) that has write access to the blob container specified in + 'storageContainerPath' parameter. + :type storage_container_sas_key: str + :param recurring_scans: The recurring scans settings + :type recurring_scans: + ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'storage_container_path': {'required': True}, + 'storage_container_sas_key': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, + 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, + 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, + } + + def __init__(self, **kwargs): + super(DatabaseVulnerabilityAssessment, self).__init__(**kwargs) + self.storage_container_path = kwargs.get('storage_container_path', None) + self.storage_container_sas_key = kwargs.get('storage_container_sas_key', None) + self.recurring_scans = kwargs.get('recurring_scans', None) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_py3.py new file mode 100644 index 000000000000..2dff8336ef3f --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_py3.py @@ -0,0 +1,63 @@ +# 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 DatabaseVulnerabilityAssessment(ProxyResource): + """A database vulnerability assessment. + + 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 storage_container_path: Required. A blob storage container path to + hold the scan results (e.g. + https://myStorage.blob.core.windows.net/VaScans/). + :type storage_container_path: str + :param storage_container_sas_key: Required. A shared access signature (SAS + Key) that has write access to the blob container specified in + 'storageContainerPath' parameter. + :type storage_container_sas_key: str + :param recurring_scans: The recurring scans settings + :type recurring_scans: + ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'storage_container_path': {'required': True}, + 'storage_container_sas_key': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, + 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, + 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, + } + + def __init__(self, *, storage_container_path: str, storage_container_sas_key: str, recurring_scans=None, **kwargs) -> None: + super(DatabaseVulnerabilityAssessment, self).__init__(**kwargs) + self.storage_container_path = storage_container_path + self.storage_container_sas_key = storage_container_sas_key + self.recurring_scans = recurring_scans diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline.py b/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline.py new file mode 100644 index 000000000000..66881dfb9b5c --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline.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 .proxy_resource import ProxyResource + + +class DatabaseVulnerabilityAssessmentRuleBaseline(ProxyResource): + """A database vulnerability assessment rule baseline. + + 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 baseline_results: Required. The rule baseline result + :type baseline_results: + list[~azure.mgmt.sql.models.DatabaseVulnerabilityAssessmentRuleBaselineItem] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'baseline_results': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'baseline_results': {'key': 'properties.baselineResults', 'type': '[DatabaseVulnerabilityAssessmentRuleBaselineItem]'}, + } + + def __init__(self, **kwargs): + super(DatabaseVulnerabilityAssessmentRuleBaseline, self).__init__(**kwargs) + self.baseline_results = kwargs.get('baseline_results', None) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_item.py b/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_item.py new file mode 100644 index 000000000000..4bd7d0e16f52 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_item.py @@ -0,0 +1,35 @@ +# 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 DatabaseVulnerabilityAssessmentRuleBaselineItem(Model): + """Properties for an Azure SQL Database Vulnerability Assessment rule + baseline's result. + + All required parameters must be populated in order to send to Azure. + + :param result: Required. The rule baseline result + :type result: list[str] + """ + + _validation = { + 'result': {'required': True}, + } + + _attribute_map = { + 'result': {'key': 'result', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(DatabaseVulnerabilityAssessmentRuleBaselineItem, self).__init__(**kwargs) + self.result = kwargs.get('result', None) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_item_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_item_py3.py new file mode 100644 index 000000000000..9378a89cc0f0 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_item_py3.py @@ -0,0 +1,35 @@ +# 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 DatabaseVulnerabilityAssessmentRuleBaselineItem(Model): + """Properties for an Azure SQL Database Vulnerability Assessment rule + baseline's result. + + All required parameters must be populated in order to send to Azure. + + :param result: Required. The rule baseline result + :type result: list[str] + """ + + _validation = { + 'result': {'required': True}, + } + + _attribute_map = { + 'result': {'key': 'result', 'type': '[str]'}, + } + + def __init__(self, *, result, **kwargs) -> None: + super(DatabaseVulnerabilityAssessmentRuleBaselineItem, self).__init__(**kwargs) + self.result = result diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_py3.py new file mode 100644 index 000000000000..4997c258c475 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_rule_baseline_py3.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 .proxy_resource_py3 import ProxyResource + + +class DatabaseVulnerabilityAssessmentRuleBaseline(ProxyResource): + """A database vulnerability assessment rule baseline. + + 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 baseline_results: Required. The rule baseline result + :type baseline_results: + list[~azure.mgmt.sql.models.DatabaseVulnerabilityAssessmentRuleBaselineItem] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'baseline_results': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'baseline_results': {'key': 'properties.baselineResults', 'type': '[DatabaseVulnerabilityAssessmentRuleBaselineItem]'}, + } + + def __init__(self, *, baseline_results, **kwargs) -> None: + super(DatabaseVulnerabilityAssessmentRuleBaseline, self).__init__(**kwargs) + self.baseline_results = baseline_results diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_scans_export.py b/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_scans_export.py new file mode 100644 index 000000000000..4d088fd265c0 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_scans_export.py @@ -0,0 +1,48 @@ +# 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 DatabaseVulnerabilityAssessmentScansExport(ProxyResource): + """A database Vulnerability Assessment scan export 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 + :ivar exported_report_location: Location of the exported report (e.g. + https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx). + :vartype exported_report_location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'exported_report_location': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'exported_report_location': {'key': 'properties.exportedReportLocation', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DatabaseVulnerabilityAssessmentScansExport, self).__init__(**kwargs) + self.exported_report_location = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_scans_export_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_scans_export_py3.py new file mode 100644 index 000000000000..7e925fb428ce --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/database_vulnerability_assessment_scans_export_py3.py @@ -0,0 +1,48 @@ +# 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 DatabaseVulnerabilityAssessmentScansExport(ProxyResource): + """A database Vulnerability Assessment scan export 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 + :ivar exported_report_location: Location of the exported report (e.g. + https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx). + :vartype exported_report_location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'exported_report_location': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'exported_report_location': {'key': 'properties.exportedReportLocation', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DatabaseVulnerabilityAssessmentScansExport, self).__init__(**kwargs) + self.exported_report_location = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool.py b/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool.py index fa076856c7de..10a28ea0f6e3 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool.py @@ -26,10 +26,10 @@ class ElasticPool(TrackedResource): :vartype name: str :ivar type: Resource type. :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] :param location: Required. Resource location. :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] :param sku: :type sku: ~azure.mgmt.sql.models.Sku :ivar kind: Kind of elastic pool. This is metadata used for the Azure @@ -71,8 +71,8 @@ class ElasticPool(TrackedResource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, 'sku': {'key': 'sku', 'type': 'Sku'}, 'kind': {'key': 'kind', 'type': 'str'}, 'state': {'key': 'properties.state', 'type': 'str'}, diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity_py3.py index 71f4b850d657..5d8d4f61727a 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_activity_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class ElasticPoolActivity(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity_py3.py index d650605d6e4c..2e2818eee69a 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_database_activity_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class ElasticPoolDatabaseActivity(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation_py3.py index 13add58062c7..c214b66532a5 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class ElasticPoolOperation(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_py3.py index 48fb5ad5412c..eb092529ac3b 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .tracked_resource import TrackedResource +from .tracked_resource_py3 import TrackedResource class ElasticPool(TrackedResource): @@ -26,10 +26,10 @@ class ElasticPool(TrackedResource): :vartype name: str :ivar type: Resource type. :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] :param location: Required. Resource location. :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] :param sku: :type sku: ~azure.mgmt.sql.models.Sku :ivar kind: Kind of elastic pool. This is metadata used for the Azure @@ -71,8 +71,8 @@ class ElasticPool(TrackedResource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, 'sku': {'key': 'sku', 'type': 'Sku'}, 'kind': {'key': 'kind', 'type': 'str'}, 'state': {'key': 'properties.state', 'type': 'str'}, @@ -84,7 +84,7 @@ class ElasticPool(TrackedResource): } def __init__(self, *, location: str, tags=None, sku=None, max_size_bytes: int=None, per_database_settings=None, zone_redundant: bool=None, license_type=None, **kwargs) -> None: - super(ElasticPool, self).__init__(tags=tags, location=location, **kwargs) + super(ElasticPool, self).__init__(location=location, tags=tags, **kwargs) self.sku = sku self.kind = None self.state = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector_py3.py index 33e6c18db636..6dd4bad3cfbe 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/encryption_protector_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class EncryptionProtector(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_py3.py index fdc42b2246c3..4b179cf5b45f 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class FailoverGroup(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule_py3.py index c218f1eaebae..c292730d9653 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/firewall_rule_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class FirewallRule(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy_py3.py index 12c801a92091..23941df5ee47 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/geo_backup_policy_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class GeoBackupPolicy(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/import_export_response_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/import_export_response_py3.py index 8603208ee044..a344fc99266b 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/import_export_response_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/import_export_response_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class ImportExportResponse(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/import_request_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/import_request_py3.py index 55f29f4735d0..68b97ae814a3 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/import_request_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/import_request_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .export_request import ExportRequest +from .export_request_py3 import ExportRequest class ImportRequest(ExportRequest): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group.py b/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group.py new file mode 100644 index 000000000000..f360ffbfed57 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group.py @@ -0,0 +1,82 @@ +# 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 InstanceFailoverGroup(ProxyResource): + """An instance failover group. + + 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 read_write_endpoint: Required. Read-write endpoint of the failover + group instance. + :type read_write_endpoint: + ~azure.mgmt.sql.models.InstanceFailoverGroupReadWriteEndpoint + :param read_only_endpoint: Read-only endpoint of the failover group + instance. + :type read_only_endpoint: + ~azure.mgmt.sql.models.InstanceFailoverGroupReadOnlyEndpoint + :ivar replication_role: Local replication role of the failover group + instance. Possible values include: 'Primary', 'Secondary' + :vartype replication_role: str or + ~azure.mgmt.sql.models.InstanceFailoverGroupReplicationRole + :ivar replication_state: Replication state of the failover group instance. + :vartype replication_state: str + :param partner_regions: Required. Partner region information for the + failover group. + :type partner_regions: list[~azure.mgmt.sql.models.PartnerRegionInfo] + :param managed_instance_pairs: Required. List of managed instance pairs in + the failover group. + :type managed_instance_pairs: + list[~azure.mgmt.sql.models.ManagedInstancePairInfo] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'read_write_endpoint': {'required': True}, + 'replication_role': {'readonly': True}, + 'replication_state': {'readonly': True}, + 'partner_regions': {'required': True}, + 'managed_instance_pairs': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'InstanceFailoverGroupReadWriteEndpoint'}, + 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'InstanceFailoverGroupReadOnlyEndpoint'}, + 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, + 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, + 'partner_regions': {'key': 'properties.partnerRegions', 'type': '[PartnerRegionInfo]'}, + 'managed_instance_pairs': {'key': 'properties.managedInstancePairs', 'type': '[ManagedInstancePairInfo]'}, + } + + def __init__(self, **kwargs): + super(InstanceFailoverGroup, self).__init__(**kwargs) + self.read_write_endpoint = kwargs.get('read_write_endpoint', None) + self.read_only_endpoint = kwargs.get('read_only_endpoint', None) + self.replication_role = None + self.replication_state = None + self.partner_regions = kwargs.get('partner_regions', None) + self.managed_instance_pairs = kwargs.get('managed_instance_pairs', None) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_paged.py b/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_paged.py new file mode 100644 index 000000000000..c67eaf2ef670 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_paged.py @@ -0,0 +1,27 @@ +# 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 InstanceFailoverGroupPaged(Paged): + """ + A paging container for iterating over a list of :class:`InstanceFailoverGroup ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[InstanceFailoverGroup]'} + } + + def __init__(self, *args, **kwargs): + + super(InstanceFailoverGroupPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_py3.py new file mode 100644 index 000000000000..8959f26c9f69 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_py3.py @@ -0,0 +1,82 @@ +# 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 InstanceFailoverGroup(ProxyResource): + """An instance failover group. + + 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 read_write_endpoint: Required. Read-write endpoint of the failover + group instance. + :type read_write_endpoint: + ~azure.mgmt.sql.models.InstanceFailoverGroupReadWriteEndpoint + :param read_only_endpoint: Read-only endpoint of the failover group + instance. + :type read_only_endpoint: + ~azure.mgmt.sql.models.InstanceFailoverGroupReadOnlyEndpoint + :ivar replication_role: Local replication role of the failover group + instance. Possible values include: 'Primary', 'Secondary' + :vartype replication_role: str or + ~azure.mgmt.sql.models.InstanceFailoverGroupReplicationRole + :ivar replication_state: Replication state of the failover group instance. + :vartype replication_state: str + :param partner_regions: Required. Partner region information for the + failover group. + :type partner_regions: list[~azure.mgmt.sql.models.PartnerRegionInfo] + :param managed_instance_pairs: Required. List of managed instance pairs in + the failover group. + :type managed_instance_pairs: + list[~azure.mgmt.sql.models.ManagedInstancePairInfo] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'read_write_endpoint': {'required': True}, + 'replication_role': {'readonly': True}, + 'replication_state': {'readonly': True}, + 'partner_regions': {'required': True}, + 'managed_instance_pairs': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'InstanceFailoverGroupReadWriteEndpoint'}, + 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'InstanceFailoverGroupReadOnlyEndpoint'}, + 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, + 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, + 'partner_regions': {'key': 'properties.partnerRegions', 'type': '[PartnerRegionInfo]'}, + 'managed_instance_pairs': {'key': 'properties.managedInstancePairs', 'type': '[ManagedInstancePairInfo]'}, + } + + def __init__(self, *, read_write_endpoint, partner_regions, managed_instance_pairs, read_only_endpoint=None, **kwargs) -> None: + super(InstanceFailoverGroup, self).__init__(**kwargs) + self.read_write_endpoint = read_write_endpoint + self.read_only_endpoint = read_only_endpoint + self.replication_role = None + self.replication_state = None + self.partner_regions = partner_regions + self.managed_instance_pairs = managed_instance_pairs diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_only_endpoint.py b/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_only_endpoint.py new file mode 100644 index 000000000000..2a9857817ae4 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_only_endpoint.py @@ -0,0 +1,30 @@ +# 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 InstanceFailoverGroupReadOnlyEndpoint(Model): + """Read-only endpoint of the failover group instance. + + :param failover_policy: Failover policy of the read-only endpoint for the + failover group. Possible values include: 'Disabled', 'Enabled' + :type failover_policy: str or + ~azure.mgmt.sql.models.ReadOnlyEndpointFailoverPolicy + """ + + _attribute_map = { + 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(InstanceFailoverGroupReadOnlyEndpoint, self).__init__(**kwargs) + self.failover_policy = kwargs.get('failover_policy', None) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_only_endpoint_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_only_endpoint_py3.py new file mode 100644 index 000000000000..71c9f180cdf7 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_only_endpoint_py3.py @@ -0,0 +1,30 @@ +# 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 InstanceFailoverGroupReadOnlyEndpoint(Model): + """Read-only endpoint of the failover group instance. + + :param failover_policy: Failover policy of the read-only endpoint for the + failover group. Possible values include: 'Disabled', 'Enabled' + :type failover_policy: str or + ~azure.mgmt.sql.models.ReadOnlyEndpointFailoverPolicy + """ + + _attribute_map = { + 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, + } + + def __init__(self, *, failover_policy=None, **kwargs) -> None: + super(InstanceFailoverGroupReadOnlyEndpoint, self).__init__(**kwargs) + self.failover_policy = failover_policy diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_write_endpoint.py b/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_write_endpoint.py new file mode 100644 index 000000000000..89a86899e503 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_write_endpoint.py @@ -0,0 +1,45 @@ +# 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 InstanceFailoverGroupReadWriteEndpoint(Model): + """Read-write endpoint of the failover group instance. + + All required parameters must be populated in order to send to Azure. + + :param failover_policy: Required. Failover policy of the read-write + endpoint for the failover group. If failoverPolicy is Automatic then + failoverWithDataLossGracePeriodMinutes is required. Possible values + include: 'Manual', 'Automatic' + :type failover_policy: str or + ~azure.mgmt.sql.models.ReadWriteEndpointFailoverPolicy + :param failover_with_data_loss_grace_period_minutes: Grace period before + failover with data loss is attempted for the read-write endpoint. If + failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is + required. + :type failover_with_data_loss_grace_period_minutes: int + """ + + _validation = { + 'failover_policy': {'required': True}, + } + + _attribute_map = { + 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, + 'failover_with_data_loss_grace_period_minutes': {'key': 'failoverWithDataLossGracePeriodMinutes', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(InstanceFailoverGroupReadWriteEndpoint, self).__init__(**kwargs) + self.failover_policy = kwargs.get('failover_policy', None) + self.failover_with_data_loss_grace_period_minutes = kwargs.get('failover_with_data_loss_grace_period_minutes', None) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_write_endpoint_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_write_endpoint_py3.py new file mode 100644 index 000000000000..7fdc047ba37c --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/instance_failover_group_read_write_endpoint_py3.py @@ -0,0 +1,45 @@ +# 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 InstanceFailoverGroupReadWriteEndpoint(Model): + """Read-write endpoint of the failover group instance. + + All required parameters must be populated in order to send to Azure. + + :param failover_policy: Required. Failover policy of the read-write + endpoint for the failover group. If failoverPolicy is Automatic then + failoverWithDataLossGracePeriodMinutes is required. Possible values + include: 'Manual', 'Automatic' + :type failover_policy: str or + ~azure.mgmt.sql.models.ReadWriteEndpointFailoverPolicy + :param failover_with_data_loss_grace_period_minutes: Grace period before + failover with data loss is attempted for the read-write endpoint. If + failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is + required. + :type failover_with_data_loss_grace_period_minutes: int + """ + + _validation = { + 'failover_policy': {'required': True}, + } + + _attribute_map = { + 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, + 'failover_with_data_loss_grace_period_minutes': {'key': 'failoverWithDataLossGracePeriodMinutes', 'type': 'int'}, + } + + def __init__(self, *, failover_policy, failover_with_data_loss_grace_period_minutes: int=None, **kwargs) -> None: + super(InstanceFailoverGroupReadWriteEndpoint, self).__init__(**kwargs) + self.failover_policy = failover_policy + self.failover_with_data_loss_grace_period_minutes = failover_with_data_loss_grace_period_minutes diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job.py b/azure-mgmt-sql/azure/mgmt/sql/models/job.py new file mode 100644 index 000000000000..6b2c60fd1d4b --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job.py @@ -0,0 +1,56 @@ +# 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 Job(ProxyResource): + """A job. + + 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 description: User-defined description of the job. Default value: "" + . + :type description: str + :ivar version: The job version number. + :vartype version: int + :param schedule: Schedule properties of the job. + :type schedule: ~azure.mgmt.sql.models.JobSchedule + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'version': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'int'}, + 'schedule': {'key': 'properties.schedule', 'type': 'JobSchedule'}, + } + + def __init__(self, **kwargs): + super(Job, self).__init__(**kwargs) + self.description = kwargs.get('description', "") + self.version = None + self.schedule = kwargs.get('schedule', None) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_agent.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_agent.py new file mode 100644 index 000000000000..48d42c28260c --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_agent.py @@ -0,0 +1,67 @@ +# 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 .tracked_resource import TrackedResource + + +class JobAgent(TrackedResource): + """An Azure SQL job agent. + + 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 location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param sku: The name and tier of the SKU. + :type sku: ~azure.mgmt.sql.models.Sku + :param database_id: Required. Resource ID of the database to store job + metadata in. + :type database_id: str + :ivar state: The state of the job agent. Possible values include: + 'Creating', 'Ready', 'Updating', 'Deleting', 'Disabled' + :vartype state: str or ~azure.mgmt.sql.models.JobAgentState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'database_id': {'required': True}, + 'state': {'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}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobAgent, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.database_id = kwargs.get('database_id', None) + self.state = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_paged.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_paged.py new file mode 100644 index 000000000000..25dd750b9d1f --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_paged.py @@ -0,0 +1,27 @@ +# 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 JobAgentPaged(Paged): + """ + A paging container for iterating over a list of :class:`JobAgent ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[JobAgent]'} + } + + def __init__(self, *args, **kwargs): + + super(JobAgentPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_py3.py new file mode 100644 index 000000000000..936d87932ebc --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_py3.py @@ -0,0 +1,67 @@ +# 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 .tracked_resource_py3 import TrackedResource + + +class JobAgent(TrackedResource): + """An Azure SQL job agent. + + 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 location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param sku: The name and tier of the SKU. + :type sku: ~azure.mgmt.sql.models.Sku + :param database_id: Required. Resource ID of the database to store job + metadata in. + :type database_id: str + :ivar state: The state of the job agent. Possible values include: + 'Creating', 'Ready', 'Updating', 'Deleting', 'Disabled' + :vartype state: str or ~azure.mgmt.sql.models.JobAgentState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'database_id': {'required': True}, + 'state': {'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}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + } + + def __init__(self, *, location: str, database_id: str, tags=None, sku=None, **kwargs) -> None: + super(JobAgent, self).__init__(location=location, tags=tags, **kwargs) + self.sku = sku + self.database_id = database_id + self.state = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_update.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_update.py new file mode 100644 index 000000000000..af781de91cbf --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_update.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class JobAgentUpdate(Model): + """An update to an Azure SQL job agent. + + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(JobAgentUpdate, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_update_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_update_py3.py new file mode 100644 index 000000000000..ab5e71f7b1d1 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_agent_update_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class JobAgentUpdate(Model): + """An update to an Azure SQL job agent. + + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(JobAgentUpdate, self).__init__(**kwargs) + self.tags = tags diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_credential.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_credential.py new file mode 100644 index 000000000000..807d34975114 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_credential.py @@ -0,0 +1,55 @@ +# 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 JobCredential(ProxyResource): + """A stored credential that can be used by a job to connect to target + databases. + + 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 username: Required. The credential user name. + :type username: str + :param password: Required. The credential password. + :type password: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'username': {'required': True}, + 'password': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'username': {'key': 'properties.username', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobCredential, self).__init__(**kwargs) + self.username = kwargs.get('username', None) + self.password = kwargs.get('password', None) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_credential_paged.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_credential_paged.py new file mode 100644 index 000000000000..550108e41c93 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_credential_paged.py @@ -0,0 +1,27 @@ +# 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 JobCredentialPaged(Paged): + """ + A paging container for iterating over a list of :class:`JobCredential ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[JobCredential]'} + } + + def __init__(self, *args, **kwargs): + + super(JobCredentialPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_credential_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_credential_py3.py new file mode 100644 index 000000000000..5158010b9c74 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_credential_py3.py @@ -0,0 +1,55 @@ +# 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 JobCredential(ProxyResource): + """A stored credential that can be used by a job to connect to target + databases. + + 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 username: Required. The credential user name. + :type username: str + :param password: Required. The credential password. + :type password: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'username': {'required': True}, + 'password': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'username': {'key': 'properties.username', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + } + + def __init__(self, *, username: str, password: str, **kwargs) -> None: + super(JobCredential, self).__init__(**kwargs) + self.username = username + self.password = password diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_execution.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_execution.py new file mode 100644 index 000000000000..92744fb7c75b --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_execution.py @@ -0,0 +1,113 @@ +# 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 JobExecution(ProxyResource): + """An execution of a job. + + 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 + :ivar job_version: The job version number. + :vartype job_version: int + :ivar step_name: The job step name. + :vartype step_name: str + :ivar step_id: The job step id. + :vartype step_id: int + :ivar job_execution_id: The unique identifier of the job execution. + :vartype job_execution_id: str + :ivar lifecycle: The detailed state of the job execution. Possible values + include: 'Created', 'InProgress', 'WaitingForChildJobExecutions', + 'WaitingForRetry', 'Succeeded', 'SucceededWithSkipped', 'Failed', + 'TimedOut', 'Canceled', 'Skipped' + :vartype lifecycle: str or ~azure.mgmt.sql.models.JobExecutionLifecycle + :ivar provisioning_state: The ARM provisioning state of the job execution. + Possible values include: 'Created', 'InProgress', 'Succeeded', 'Failed', + 'Canceled' + :vartype provisioning_state: str or + ~azure.mgmt.sql.models.ProvisioningState + :ivar create_time: The time that the job execution was created. + :vartype create_time: datetime + :ivar start_time: The time that the job execution started. + :vartype start_time: datetime + :ivar end_time: The time that the job execution completed. + :vartype end_time: datetime + :param current_attempts: Number of times the job execution has been + attempted. + :type current_attempts: int + :ivar current_attempt_start_time: Start time of the current attempt. + :vartype current_attempt_start_time: datetime + :ivar last_message: The last status or error message. + :vartype last_message: str + :ivar target: The target that this execution is executed on. + :vartype target: ~azure.mgmt.sql.models.JobExecutionTarget + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'job_version': {'readonly': True}, + 'step_name': {'readonly': True}, + 'step_id': {'readonly': True}, + 'job_execution_id': {'readonly': True}, + 'lifecycle': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'create_time': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'current_attempt_start_time': {'readonly': True}, + 'last_message': {'readonly': True}, + 'target': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'job_version': {'key': 'properties.jobVersion', 'type': 'int'}, + 'step_name': {'key': 'properties.stepName', 'type': 'str'}, + 'step_id': {'key': 'properties.stepId', 'type': 'int'}, + 'job_execution_id': {'key': 'properties.jobExecutionId', 'type': 'str'}, + 'lifecycle': {'key': 'properties.lifecycle', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'create_time': {'key': 'properties.createTime', 'type': 'iso-8601'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'current_attempts': {'key': 'properties.currentAttempts', 'type': 'int'}, + 'current_attempt_start_time': {'key': 'properties.currentAttemptStartTime', 'type': 'iso-8601'}, + 'last_message': {'key': 'properties.lastMessage', 'type': 'str'}, + 'target': {'key': 'properties.target', 'type': 'JobExecutionTarget'}, + } + + def __init__(self, **kwargs): + super(JobExecution, self).__init__(**kwargs) + self.job_version = None + self.step_name = None + self.step_id = None + self.job_execution_id = None + self.lifecycle = None + self.provisioning_state = None + self.create_time = None + self.start_time = None + self.end_time = None + self.current_attempts = kwargs.get('current_attempts', None) + self.current_attempt_start_time = None + self.last_message = None + self.target = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_paged.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_paged.py new file mode 100644 index 000000000000..bfcdb03ea9aa --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_paged.py @@ -0,0 +1,27 @@ +# 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 JobExecutionPaged(Paged): + """ + A paging container for iterating over a list of :class:`JobExecution ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[JobExecution]'} + } + + def __init__(self, *args, **kwargs): + + super(JobExecutionPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_py3.py new file mode 100644 index 000000000000..b7fdaba7c147 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_py3.py @@ -0,0 +1,113 @@ +# 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 JobExecution(ProxyResource): + """An execution of a job. + + 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 + :ivar job_version: The job version number. + :vartype job_version: int + :ivar step_name: The job step name. + :vartype step_name: str + :ivar step_id: The job step id. + :vartype step_id: int + :ivar job_execution_id: The unique identifier of the job execution. + :vartype job_execution_id: str + :ivar lifecycle: The detailed state of the job execution. Possible values + include: 'Created', 'InProgress', 'WaitingForChildJobExecutions', + 'WaitingForRetry', 'Succeeded', 'SucceededWithSkipped', 'Failed', + 'TimedOut', 'Canceled', 'Skipped' + :vartype lifecycle: str or ~azure.mgmt.sql.models.JobExecutionLifecycle + :ivar provisioning_state: The ARM provisioning state of the job execution. + Possible values include: 'Created', 'InProgress', 'Succeeded', 'Failed', + 'Canceled' + :vartype provisioning_state: str or + ~azure.mgmt.sql.models.ProvisioningState + :ivar create_time: The time that the job execution was created. + :vartype create_time: datetime + :ivar start_time: The time that the job execution started. + :vartype start_time: datetime + :ivar end_time: The time that the job execution completed. + :vartype end_time: datetime + :param current_attempts: Number of times the job execution has been + attempted. + :type current_attempts: int + :ivar current_attempt_start_time: Start time of the current attempt. + :vartype current_attempt_start_time: datetime + :ivar last_message: The last status or error message. + :vartype last_message: str + :ivar target: The target that this execution is executed on. + :vartype target: ~azure.mgmt.sql.models.JobExecutionTarget + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'job_version': {'readonly': True}, + 'step_name': {'readonly': True}, + 'step_id': {'readonly': True}, + 'job_execution_id': {'readonly': True}, + 'lifecycle': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'create_time': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'current_attempt_start_time': {'readonly': True}, + 'last_message': {'readonly': True}, + 'target': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'job_version': {'key': 'properties.jobVersion', 'type': 'int'}, + 'step_name': {'key': 'properties.stepName', 'type': 'str'}, + 'step_id': {'key': 'properties.stepId', 'type': 'int'}, + 'job_execution_id': {'key': 'properties.jobExecutionId', 'type': 'str'}, + 'lifecycle': {'key': 'properties.lifecycle', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'create_time': {'key': 'properties.createTime', 'type': 'iso-8601'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'current_attempts': {'key': 'properties.currentAttempts', 'type': 'int'}, + 'current_attempt_start_time': {'key': 'properties.currentAttemptStartTime', 'type': 'iso-8601'}, + 'last_message': {'key': 'properties.lastMessage', 'type': 'str'}, + 'target': {'key': 'properties.target', 'type': 'JobExecutionTarget'}, + } + + def __init__(self, *, current_attempts: int=None, **kwargs) -> None: + super(JobExecution, self).__init__(**kwargs) + self.job_version = None + self.step_name = None + self.step_id = None + self.job_execution_id = None + self.lifecycle = None + self.provisioning_state = None + self.create_time = None + self.start_time = None + self.end_time = None + self.current_attempts = current_attempts + self.current_attempt_start_time = None + self.last_message = None + self.target = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_target.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_target.py new file mode 100644 index 000000000000..50557aaf96d0 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_target.py @@ -0,0 +1,46 @@ +# 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 JobExecutionTarget(Model): + """The target that a job execution is executed on. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: The type of the target. Possible values include: + 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', 'SqlServer' + :vartype type: str or ~azure.mgmt.sql.models.JobTargetType + :ivar server_name: The server name. + :vartype server_name: str + :ivar database_name: The database name. + :vartype database_name: str + """ + + _validation = { + 'type': {'readonly': True}, + 'server_name': {'readonly': True}, + 'database_name': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobExecutionTarget, self).__init__(**kwargs) + self.type = None + self.server_name = None + self.database_name = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_target_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_target_py3.py new file mode 100644 index 000000000000..551716c3cd31 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_execution_target_py3.py @@ -0,0 +1,46 @@ +# 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 JobExecutionTarget(Model): + """The target that a job execution is executed on. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: The type of the target. Possible values include: + 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', 'SqlServer' + :vartype type: str or ~azure.mgmt.sql.models.JobTargetType + :ivar server_name: The server name. + :vartype server_name: str + :ivar database_name: The database name. + :vartype database_name: str + """ + + _validation = { + 'type': {'readonly': True}, + 'server_name': {'readonly': True}, + 'database_name': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(JobExecutionTarget, self).__init__(**kwargs) + self.type = None + self.server_name = None + self.database_name = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_paged.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_paged.py new file mode 100644 index 000000000000..3b85770570f2 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_paged.py @@ -0,0 +1,27 @@ +# 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 JobPaged(Paged): + """ + A paging container for iterating over a list of :class:`Job ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Job]'} + } + + def __init__(self, *args, **kwargs): + + super(JobPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_py3.py new file mode 100644 index 000000000000..5bfb9b53f03f --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_py3.py @@ -0,0 +1,56 @@ +# 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 Job(ProxyResource): + """A job. + + 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 description: User-defined description of the job. Default value: "" + . + :type description: str + :ivar version: The job version number. + :vartype version: int + :param schedule: Schedule properties of the job. + :type schedule: ~azure.mgmt.sql.models.JobSchedule + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'version': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'int'}, + 'schedule': {'key': 'properties.schedule', 'type': 'JobSchedule'}, + } + + def __init__(self, *, description: str="", schedule=None, **kwargs) -> None: + super(Job, self).__init__(**kwargs) + self.description = description + self.version = None + self.schedule = schedule diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_schedule.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_schedule.py new file mode 100644 index 000000000000..7fab31ef7b8c --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_schedule.py @@ -0,0 +1,48 @@ +# 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 JobSchedule(Model): + """Scheduling properties of a job. + + :param start_time: Schedule start time. Default value: + "0001-01-01T00:00:00Z" . + :type start_time: datetime + :param end_time: Schedule end time. Default value: "9999-12-31T11:59:59Z" + . + :type end_time: datetime + :param type: Schedule interval type. Possible values include: 'Once', + 'Recurring'. Default value: "Once" . + :type type: str or ~azure.mgmt.sql.models.JobScheduleType + :param enabled: Whether or not the schedule is enabled. + :type enabled: bool + :param interval: Value of the schedule's recurring interval, if the + scheduletype is recurring. ISO8601 duration format. + :type interval: str + """ + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'type': {'key': 'type', 'type': 'JobScheduleType'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'interval': {'key': 'interval', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobSchedule, self).__init__(**kwargs) + self.start_time = kwargs.get('start_time', "0001-01-01T00:00:00Z") + self.end_time = kwargs.get('end_time', "9999-12-31T11:59:59Z") + self.type = kwargs.get('type', "Once") + self.enabled = kwargs.get('enabled', None) + self.interval = kwargs.get('interval', None) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_schedule_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_schedule_py3.py new file mode 100644 index 000000000000..8c0cd37ebefe --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_schedule_py3.py @@ -0,0 +1,48 @@ +# 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 JobSchedule(Model): + """Scheduling properties of a job. + + :param start_time: Schedule start time. Default value: + "0001-01-01T00:00:00Z" . + :type start_time: datetime + :param end_time: Schedule end time. Default value: "9999-12-31T11:59:59Z" + . + :type end_time: datetime + :param type: Schedule interval type. Possible values include: 'Once', + 'Recurring'. Default value: "Once" . + :type type: str or ~azure.mgmt.sql.models.JobScheduleType + :param enabled: Whether or not the schedule is enabled. + :type enabled: bool + :param interval: Value of the schedule's recurring interval, if the + scheduletype is recurring. ISO8601 duration format. + :type interval: str + """ + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'type': {'key': 'type', 'type': 'JobScheduleType'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'interval': {'key': 'interval', 'type': 'str'}, + } + + def __init__(self, *, start_time="0001-01-01T00:00:00Z", end_time="9999-12-31T11:59:59Z", type="Once", enabled: bool=None, interval: str=None, **kwargs) -> None: + super(JobSchedule, self).__init__(**kwargs) + self.start_time = start_time + self.end_time = end_time + self.type = type + self.enabled = enabled + self.interval = interval diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_step.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_step.py new file mode 100644 index 000000000000..f032375dec32 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_step.py @@ -0,0 +1,75 @@ +# 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 JobStep(ProxyResource): + """A job step. + + 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 step_id: The job step's index within the job. If not specified when + creating the job step, it will be created as the last step. If not + specified when updating the job step, the step id is not modified. + :type step_id: int + :param target_group: Required. The resource ID of the target group that + the job step will be executed on. + :type target_group: str + :param credential: Required. The resource ID of the job credential that + will be used to connect to the targets. + :type credential: str + :param action: Required. The action payload of the job step. + :type action: ~azure.mgmt.sql.models.JobStepAction + :param output: Output destination properties of the job step. + :type output: ~azure.mgmt.sql.models.JobStepOutput + :param execution_options: Execution options for the job step. + :type execution_options: ~azure.mgmt.sql.models.JobStepExecutionOptions + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'target_group': {'required': True}, + 'credential': {'required': True}, + 'action': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'step_id': {'key': 'properties.stepId', 'type': 'int'}, + 'target_group': {'key': 'properties.targetGroup', 'type': 'str'}, + 'credential': {'key': 'properties.credential', 'type': 'str'}, + 'action': {'key': 'properties.action', 'type': 'JobStepAction'}, + 'output': {'key': 'properties.output', 'type': 'JobStepOutput'}, + 'execution_options': {'key': 'properties.executionOptions', 'type': 'JobStepExecutionOptions'}, + } + + def __init__(self, **kwargs): + super(JobStep, self).__init__(**kwargs) + self.step_id = kwargs.get('step_id', None) + self.target_group = kwargs.get('target_group', None) + self.credential = kwargs.get('credential', None) + self.action = kwargs.get('action', None) + self.output = kwargs.get('output', None) + self.execution_options = kwargs.get('execution_options', None) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_step_action.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_step_action.py new file mode 100644 index 000000000000..68e55b1fa38f --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_step_action.py @@ -0,0 +1,45 @@ +# 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 JobStepAction(Model): + """The action to be executed by a job step. + + All required parameters must be populated in order to send to Azure. + + :param type: Type of action being executed by the job step. Possible + values include: 'TSql'. Default value: "TSql" . + :type type: str or ~azure.mgmt.sql.models.JobStepActionType + :param source: The source of the action to execute. Possible values + include: 'Inline'. Default value: "Inline" . + :type source: str or ~azure.mgmt.sql.models.JobStepActionSource + :param value: Required. The action value, for example the text of the + T-SQL script to execute. + :type value: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobStepAction, self).__init__(**kwargs) + self.type = kwargs.get('type', "TSql") + self.source = kwargs.get('source', "Inline") + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_step_action_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_step_action_py3.py new file mode 100644 index 000000000000..4d8848c8eaef --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_step_action_py3.py @@ -0,0 +1,45 @@ +# 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 JobStepAction(Model): + """The action to be executed by a job step. + + All required parameters must be populated in order to send to Azure. + + :param type: Type of action being executed by the job step. Possible + values include: 'TSql'. Default value: "TSql" . + :type type: str or ~azure.mgmt.sql.models.JobStepActionType + :param source: The source of the action to execute. Possible values + include: 'Inline'. Default value: "Inline" . + :type source: str or ~azure.mgmt.sql.models.JobStepActionSource + :param value: Required. The action value, for example the text of the + T-SQL script to execute. + :type value: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, value: str, type="TSql", source="Inline", **kwargs) -> None: + super(JobStepAction, self).__init__(**kwargs) + self.type = type + self.source = source + self.value = value diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_step_execution_options.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_step_execution_options.py new file mode 100644 index 000000000000..6a49f1d10f25 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_step_execution_options.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class JobStepExecutionOptions(Model): + """The execution options of a job step. + + :param timeout_seconds: Execution timeout for the job step. Default value: + 43200 . + :type timeout_seconds: int + :param retry_attempts: Maximum number of times the job step will be + reattempted if the first attempt fails. Default value: 10 . + :type retry_attempts: int + :param initial_retry_interval_seconds: Initial delay between retries for + job step execution. Default value: 1 . + :type initial_retry_interval_seconds: int + :param maximum_retry_interval_seconds: The maximum amount of time to wait + between retries for job step execution. Default value: 120 . + :type maximum_retry_interval_seconds: int + :param retry_interval_backoff_multiplier: The backoff multiplier for the + time between retries. Default value: 2 . + :type retry_interval_backoff_multiplier: float + """ + + _attribute_map = { + 'timeout_seconds': {'key': 'timeoutSeconds', 'type': 'int'}, + 'retry_attempts': {'key': 'retryAttempts', 'type': 'int'}, + 'initial_retry_interval_seconds': {'key': 'initialRetryIntervalSeconds', 'type': 'int'}, + 'maximum_retry_interval_seconds': {'key': 'maximumRetryIntervalSeconds', 'type': 'int'}, + 'retry_interval_backoff_multiplier': {'key': 'retryIntervalBackoffMultiplier', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(JobStepExecutionOptions, self).__init__(**kwargs) + self.timeout_seconds = kwargs.get('timeout_seconds', 43200) + self.retry_attempts = kwargs.get('retry_attempts', 10) + self.initial_retry_interval_seconds = kwargs.get('initial_retry_interval_seconds', 1) + self.maximum_retry_interval_seconds = kwargs.get('maximum_retry_interval_seconds', 120) + self.retry_interval_backoff_multiplier = kwargs.get('retry_interval_backoff_multiplier', 2) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_step_execution_options_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_step_execution_options_py3.py new file mode 100644 index 000000000000..712f0e947436 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_step_execution_options_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class JobStepExecutionOptions(Model): + """The execution options of a job step. + + :param timeout_seconds: Execution timeout for the job step. Default value: + 43200 . + :type timeout_seconds: int + :param retry_attempts: Maximum number of times the job step will be + reattempted if the first attempt fails. Default value: 10 . + :type retry_attempts: int + :param initial_retry_interval_seconds: Initial delay between retries for + job step execution. Default value: 1 . + :type initial_retry_interval_seconds: int + :param maximum_retry_interval_seconds: The maximum amount of time to wait + between retries for job step execution. Default value: 120 . + :type maximum_retry_interval_seconds: int + :param retry_interval_backoff_multiplier: The backoff multiplier for the + time between retries. Default value: 2 . + :type retry_interval_backoff_multiplier: float + """ + + _attribute_map = { + 'timeout_seconds': {'key': 'timeoutSeconds', 'type': 'int'}, + 'retry_attempts': {'key': 'retryAttempts', 'type': 'int'}, + 'initial_retry_interval_seconds': {'key': 'initialRetryIntervalSeconds', 'type': 'int'}, + 'maximum_retry_interval_seconds': {'key': 'maximumRetryIntervalSeconds', 'type': 'int'}, + 'retry_interval_backoff_multiplier': {'key': 'retryIntervalBackoffMultiplier', 'type': 'float'}, + } + + def __init__(self, *, timeout_seconds: int=43200, retry_attempts: int=10, initial_retry_interval_seconds: int=1, maximum_retry_interval_seconds: int=120, retry_interval_backoff_multiplier: float=2, **kwargs) -> None: + super(JobStepExecutionOptions, self).__init__(**kwargs) + self.timeout_seconds = timeout_seconds + self.retry_attempts = retry_attempts + self.initial_retry_interval_seconds = initial_retry_interval_seconds + self.maximum_retry_interval_seconds = maximum_retry_interval_seconds + self.retry_interval_backoff_multiplier = retry_interval_backoff_multiplier diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_step_output.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_step_output.py new file mode 100644 index 000000000000..8a015a7505bd --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_step_output.py @@ -0,0 +1,67 @@ +# 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 JobStepOutput(Model): + """The output configuration of a job step. + + All required parameters must be populated in order to send to Azure. + + :param type: The output destination type. Possible values include: + 'SqlDatabase'. Default value: "SqlDatabase" . + :type type: str or ~azure.mgmt.sql.models.JobStepOutputType + :param subscription_id: The output destination subscription id. + :type subscription_id: str + :param resource_group_name: The output destination resource group. + :type resource_group_name: str + :param server_name: Required. The output destination server name. + :type server_name: str + :param database_name: Required. The output destination database. + :type database_name: str + :param schema_name: The output destination schema. Default value: "dbo" . + :type schema_name: str + :param table_name: Required. The output destination table. + :type table_name: str + :param credential: Required. The resource ID of the credential to use to + connect to the output destination. + :type credential: str + """ + + _validation = { + 'server_name': {'required': True}, + 'database_name': {'required': True}, + 'table_name': {'required': True}, + 'credential': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'schema_name': {'key': 'schemaName', 'type': 'str'}, + 'table_name': {'key': 'tableName', 'type': 'str'}, + 'credential': {'key': 'credential', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobStepOutput, self).__init__(**kwargs) + self.type = kwargs.get('type', "SqlDatabase") + self.subscription_id = kwargs.get('subscription_id', None) + self.resource_group_name = kwargs.get('resource_group_name', None) + self.server_name = kwargs.get('server_name', None) + self.database_name = kwargs.get('database_name', None) + self.schema_name = kwargs.get('schema_name', "dbo") + self.table_name = kwargs.get('table_name', None) + self.credential = kwargs.get('credential', None) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_step_output_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_step_output_py3.py new file mode 100644 index 000000000000..d10ecbbd6f8c --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_step_output_py3.py @@ -0,0 +1,67 @@ +# 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 JobStepOutput(Model): + """The output configuration of a job step. + + All required parameters must be populated in order to send to Azure. + + :param type: The output destination type. Possible values include: + 'SqlDatabase'. Default value: "SqlDatabase" . + :type type: str or ~azure.mgmt.sql.models.JobStepOutputType + :param subscription_id: The output destination subscription id. + :type subscription_id: str + :param resource_group_name: The output destination resource group. + :type resource_group_name: str + :param server_name: Required. The output destination server name. + :type server_name: str + :param database_name: Required. The output destination database. + :type database_name: str + :param schema_name: The output destination schema. Default value: "dbo" . + :type schema_name: str + :param table_name: Required. The output destination table. + :type table_name: str + :param credential: Required. The resource ID of the credential to use to + connect to the output destination. + :type credential: str + """ + + _validation = { + 'server_name': {'required': True}, + 'database_name': {'required': True}, + 'table_name': {'required': True}, + 'credential': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'schema_name': {'key': 'schemaName', 'type': 'str'}, + 'table_name': {'key': 'tableName', 'type': 'str'}, + 'credential': {'key': 'credential', 'type': 'str'}, + } + + def __init__(self, *, server_name: str, database_name: str, table_name: str, credential: str, type="SqlDatabase", subscription_id: str=None, resource_group_name: str=None, schema_name: str="dbo", **kwargs) -> None: + super(JobStepOutput, self).__init__(**kwargs) + self.type = type + self.subscription_id = subscription_id + self.resource_group_name = resource_group_name + self.server_name = server_name + self.database_name = database_name + self.schema_name = schema_name + self.table_name = table_name + self.credential = credential diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_step_paged.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_step_paged.py new file mode 100644 index 000000000000..1bda4f5adf6e --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_step_paged.py @@ -0,0 +1,27 @@ +# 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 JobStepPaged(Paged): + """ + A paging container for iterating over a list of :class:`JobStep ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[JobStep]'} + } + + def __init__(self, *args, **kwargs): + + super(JobStepPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_step_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_step_py3.py new file mode 100644 index 000000000000..bd267f9fd9a6 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_step_py3.py @@ -0,0 +1,75 @@ +# 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 JobStep(ProxyResource): + """A job step. + + 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 step_id: The job step's index within the job. If not specified when + creating the job step, it will be created as the last step. If not + specified when updating the job step, the step id is not modified. + :type step_id: int + :param target_group: Required. The resource ID of the target group that + the job step will be executed on. + :type target_group: str + :param credential: Required. The resource ID of the job credential that + will be used to connect to the targets. + :type credential: str + :param action: Required. The action payload of the job step. + :type action: ~azure.mgmt.sql.models.JobStepAction + :param output: Output destination properties of the job step. + :type output: ~azure.mgmt.sql.models.JobStepOutput + :param execution_options: Execution options for the job step. + :type execution_options: ~azure.mgmt.sql.models.JobStepExecutionOptions + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'target_group': {'required': True}, + 'credential': {'required': True}, + 'action': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'step_id': {'key': 'properties.stepId', 'type': 'int'}, + 'target_group': {'key': 'properties.targetGroup', 'type': 'str'}, + 'credential': {'key': 'properties.credential', 'type': 'str'}, + 'action': {'key': 'properties.action', 'type': 'JobStepAction'}, + 'output': {'key': 'properties.output', 'type': 'JobStepOutput'}, + 'execution_options': {'key': 'properties.executionOptions', 'type': 'JobStepExecutionOptions'}, + } + + def __init__(self, *, target_group: str, credential: str, action, step_id: int=None, output=None, execution_options=None, **kwargs) -> None: + super(JobStep, self).__init__(**kwargs) + self.step_id = step_id + self.target_group = target_group + self.credential = credential + self.action = action + self.output = output + self.execution_options = execution_options diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_target.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_target.py new file mode 100644 index 000000000000..a608d87c1af1 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_target.py @@ -0,0 +1,65 @@ +# 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 JobTarget(Model): + """A job target, for example a specific database or a container of databases + that is evaluated during job execution. + + All required parameters must be populated in order to send to Azure. + + :param membership_type: Whether the target is included or excluded from + the group. Possible values include: 'Include', 'Exclude'. Default value: + "Include" . + :type membership_type: str or + ~azure.mgmt.sql.models.JobTargetGroupMembershipType + :param type: Required. The target type. Possible values include: + 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', 'SqlServer' + :type type: str or ~azure.mgmt.sql.models.JobTargetType + :param server_name: The target server name. + :type server_name: str + :param database_name: The target database name. + :type database_name: str + :param elastic_pool_name: The target elastic pool name. + :type elastic_pool_name: str + :param shard_map_name: The target shard map. + :type shard_map_name: str + :param refresh_credential: The resource ID of the credential that is used + during job execution to connect to the target and determine the list of + databases inside the target. + :type refresh_credential: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'membership_type': {'key': 'membershipType', 'type': 'JobTargetGroupMembershipType'}, + 'type': {'key': 'type', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'elastic_pool_name': {'key': 'elasticPoolName', 'type': 'str'}, + 'shard_map_name': {'key': 'shardMapName', 'type': 'str'}, + 'refresh_credential': {'key': 'refreshCredential', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobTarget, self).__init__(**kwargs) + self.membership_type = kwargs.get('membership_type', "Include") + self.type = kwargs.get('type', None) + self.server_name = kwargs.get('server_name', None) + self.database_name = kwargs.get('database_name', None) + self.elastic_pool_name = kwargs.get('elastic_pool_name', None) + self.shard_map_name = kwargs.get('shard_map_name', None) + self.refresh_credential = kwargs.get('refresh_credential', None) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group.py new file mode 100644 index 000000000000..38148fb244c4 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource import ProxyResource + + +class JobTargetGroup(ProxyResource): + """A group of job targets. + + 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 members: Required. Members of the target group. + :type members: list[~azure.mgmt.sql.models.JobTarget] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'members': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'members': {'key': 'properties.members', 'type': '[JobTarget]'}, + } + + def __init__(self, **kwargs): + super(JobTargetGroup, self).__init__(**kwargs) + self.members = kwargs.get('members', None) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group_paged.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group_paged.py new file mode 100644 index 000000000000..cd466e5afa84 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group_paged.py @@ -0,0 +1,27 @@ +# 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 JobTargetGroupPaged(Paged): + """ + A paging container for iterating over a list of :class:`JobTargetGroup ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[JobTargetGroup]'} + } + + def __init__(self, *args, **kwargs): + + super(JobTargetGroupPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group_py3.py new file mode 100644 index 000000000000..a9582212ff82 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_target_group_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource_py3 import ProxyResource + + +class JobTargetGroup(ProxyResource): + """A group of job targets. + + 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 members: Required. Members of the target group. + :type members: list[~azure.mgmt.sql.models.JobTarget] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'members': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'members': {'key': 'properties.members', 'type': '[JobTarget]'}, + } + + def __init__(self, *, members, **kwargs) -> None: + super(JobTargetGroup, self).__init__(**kwargs) + self.members = members diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_target_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_target_py3.py new file mode 100644 index 000000000000..281eb7598f18 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_target_py3.py @@ -0,0 +1,65 @@ +# 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 JobTarget(Model): + """A job target, for example a specific database or a container of databases + that is evaluated during job execution. + + All required parameters must be populated in order to send to Azure. + + :param membership_type: Whether the target is included or excluded from + the group. Possible values include: 'Include', 'Exclude'. Default value: + "Include" . + :type membership_type: str or + ~azure.mgmt.sql.models.JobTargetGroupMembershipType + :param type: Required. The target type. Possible values include: + 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', 'SqlServer' + :type type: str or ~azure.mgmt.sql.models.JobTargetType + :param server_name: The target server name. + :type server_name: str + :param database_name: The target database name. + :type database_name: str + :param elastic_pool_name: The target elastic pool name. + :type elastic_pool_name: str + :param shard_map_name: The target shard map. + :type shard_map_name: str + :param refresh_credential: The resource ID of the credential that is used + during job execution to connect to the target and determine the list of + databases inside the target. + :type refresh_credential: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'membership_type': {'key': 'membershipType', 'type': 'JobTargetGroupMembershipType'}, + 'type': {'key': 'type', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'elastic_pool_name': {'key': 'elasticPoolName', 'type': 'str'}, + 'shard_map_name': {'key': 'shardMapName', 'type': 'str'}, + 'refresh_credential': {'key': 'refreshCredential', 'type': 'str'}, + } + + def __init__(self, *, type, membership_type="Include", server_name: str=None, database_name: str=None, elastic_pool_name: str=None, shard_map_name: str=None, refresh_credential: str=None, **kwargs) -> None: + super(JobTarget, self).__init__(**kwargs) + self.membership_type = membership_type + self.type = type + self.server_name = server_name + self.database_name = database_name + self.elastic_pool_name = elastic_pool_name + self.shard_map_name = shard_map_name + self.refresh_credential = refresh_credential diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_version.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_version.py new file mode 100644 index 000000000000..3c480e739607 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_version.py @@ -0,0 +1,42 @@ +# 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 JobVersion(ProxyResource): + """A job version. + + 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 + """ + + _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'}, + } + + def __init__(self, **kwargs): + super(JobVersion, self).__init__(**kwargs) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_version_paged.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_version_paged.py new file mode 100644 index 000000000000..162e4d8cfb5e --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_version_paged.py @@ -0,0 +1,27 @@ +# 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 JobVersionPaged(Paged): + """ + A paging container for iterating over a list of :class:`JobVersion ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[JobVersion]'} + } + + def __init__(self, *args, **kwargs): + + super(JobVersionPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/job_version_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/job_version_py3.py new file mode 100644 index 000000000000..16a8798c5949 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/job_version_py3.py @@ -0,0 +1,42 @@ +# 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 JobVersion(ProxyResource): + """A job version. + + 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 + """ + + _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'}, + } + + def __init__(self, **kwargs) -> None: + super(JobVersion, self).__init__(**kwargs) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup_py3.py index a7d128063b24..eb1372180fb0 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/long_term_retention_backup_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class LongTermRetentionBackup(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/managed_database.py b/azure-mgmt-sql/azure/mgmt/sql/models/managed_database.py new file mode 100644 index 000000000000..92d1c06510f0 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/managed_database.py @@ -0,0 +1,123 @@ +# 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 .tracked_resource import TrackedResource + + +class ManagedDatabase(TrackedResource): + """A managed database resource. + + 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 location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param collation: Collation of the managed database. + :type collation: str + :ivar status: Status for the database. Possible values include: 'Online', + 'Offline', 'Shutdown', 'Creating', 'Inaccessible' + :vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus + :ivar creation_date: Creation date of the database. + :vartype creation_date: datetime + :ivar earliest_restore_point: Earliest restore point in time for point in + time restore. + :vartype earliest_restore_point: datetime + :param restore_point_in_time: Conditional. If createMode is + PointInTimeRestore, this value is required. Specifies the point in time + (ISO8601 format) of the source database that will be restored to create + the new database. + :type restore_point_in_time: datetime + :ivar default_secondary_location: Geo paired region. + :vartype default_secondary_location: str + :param catalog_collation: Collation of the metadata catalog. Possible + values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' + :type catalog_collation: str or + ~azure.mgmt.sql.models.CatalogCollationType + :param create_mode: Managed database create mode. PointInTimeRestore: + Create a database by restoring a point in time backup of an existing + database. SourceDatabaseName, SourceManagedInstanceName and PointInTime + must be specified. RestoreExternalBackup: Create a database by restoring + from external backup files. Collation, StorageContainerUri and + StorageContainerSasToken must be specified. Possible values include: + 'Default', 'RestoreExternalBackup', 'PointInTimeRestore' + :type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode + :param storage_container_uri: Conditional. If createMode is + RestoreExternalBackup, this value is required. Specifies the uri of the + storage container where backups for this restore are stored. + :type storage_container_uri: str + :param source_database_id: The resource identifier of the source database + associated with create operation of this database. + :type source_database_id: str + :param storage_container_sas_token: Conditional. If createMode is + RestoreExternalBackup, this value is required. Specifies the storage + container sas token. + :type storage_container_sas_token: str + :ivar failover_group_id: Instance Failover Group resource identifier that + this managed database belongs to. + :vartype failover_group_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'status': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'earliest_restore_point': {'readonly': True}, + 'default_secondary_location': {'readonly': True}, + 'failover_group_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'earliest_restore_point': {'key': 'properties.earliestRestorePoint', 'type': 'iso-8601'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, + 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, + 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, + 'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'}, + 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, + 'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'}, + 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedDatabase, self).__init__(**kwargs) + self.collation = kwargs.get('collation', None) + self.status = None + self.creation_date = None + self.earliest_restore_point = None + self.restore_point_in_time = kwargs.get('restore_point_in_time', None) + self.default_secondary_location = None + self.catalog_collation = kwargs.get('catalog_collation', None) + self.create_mode = kwargs.get('create_mode', None) + self.storage_container_uri = kwargs.get('storage_container_uri', None) + self.source_database_id = kwargs.get('source_database_id', None) + self.storage_container_sas_token = kwargs.get('storage_container_sas_token', None) + self.failover_group_id = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_paged.py b/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_paged.py new file mode 100644 index 000000000000..e15d9d532b5a --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_paged.py @@ -0,0 +1,27 @@ +# 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 ManagedDatabasePaged(Paged): + """ + A paging container for iterating over a list of :class:`ManagedDatabase ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ManagedDatabase]'} + } + + def __init__(self, *args, **kwargs): + + super(ManagedDatabasePaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_py3.py new file mode 100644 index 000000000000..4470afe5bb7e --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_py3.py @@ -0,0 +1,123 @@ +# 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 .tracked_resource_py3 import TrackedResource + + +class ManagedDatabase(TrackedResource): + """A managed database resource. + + 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 location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param collation: Collation of the managed database. + :type collation: str + :ivar status: Status for the database. Possible values include: 'Online', + 'Offline', 'Shutdown', 'Creating', 'Inaccessible' + :vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus + :ivar creation_date: Creation date of the database. + :vartype creation_date: datetime + :ivar earliest_restore_point: Earliest restore point in time for point in + time restore. + :vartype earliest_restore_point: datetime + :param restore_point_in_time: Conditional. If createMode is + PointInTimeRestore, this value is required. Specifies the point in time + (ISO8601 format) of the source database that will be restored to create + the new database. + :type restore_point_in_time: datetime + :ivar default_secondary_location: Geo paired region. + :vartype default_secondary_location: str + :param catalog_collation: Collation of the metadata catalog. Possible + values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' + :type catalog_collation: str or + ~azure.mgmt.sql.models.CatalogCollationType + :param create_mode: Managed database create mode. PointInTimeRestore: + Create a database by restoring a point in time backup of an existing + database. SourceDatabaseName, SourceManagedInstanceName and PointInTime + must be specified. RestoreExternalBackup: Create a database by restoring + from external backup files. Collation, StorageContainerUri and + StorageContainerSasToken must be specified. Possible values include: + 'Default', 'RestoreExternalBackup', 'PointInTimeRestore' + :type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode + :param storage_container_uri: Conditional. If createMode is + RestoreExternalBackup, this value is required. Specifies the uri of the + storage container where backups for this restore are stored. + :type storage_container_uri: str + :param source_database_id: The resource identifier of the source database + associated with create operation of this database. + :type source_database_id: str + :param storage_container_sas_token: Conditional. If createMode is + RestoreExternalBackup, this value is required. Specifies the storage + container sas token. + :type storage_container_sas_token: str + :ivar failover_group_id: Instance Failover Group resource identifier that + this managed database belongs to. + :vartype failover_group_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'status': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'earliest_restore_point': {'readonly': True}, + 'default_secondary_location': {'readonly': True}, + 'failover_group_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'earliest_restore_point': {'key': 'properties.earliestRestorePoint', 'type': 'iso-8601'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, + 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, + 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, + 'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'}, + 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, + 'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'}, + 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, + } + + def __init__(self, *, location: str, tags=None, collation: str=None, restore_point_in_time=None, catalog_collation=None, create_mode=None, storage_container_uri: str=None, source_database_id: str=None, storage_container_sas_token: str=None, **kwargs) -> None: + super(ManagedDatabase, self).__init__(location=location, tags=tags, **kwargs) + self.collation = collation + self.status = None + self.creation_date = None + self.earliest_restore_point = None + self.restore_point_in_time = restore_point_in_time + self.default_secondary_location = None + self.catalog_collation = catalog_collation + self.create_mode = create_mode + self.storage_container_uri = storage_container_uri + self.source_database_id = source_database_id + self.storage_container_sas_token = storage_container_sas_token + self.failover_group_id = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update.py b/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update.py new file mode 100644 index 000000000000..4335e9b19dfa --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update.py @@ -0,0 +1,106 @@ +# 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 ManagedDatabaseUpdate(Model): + """An managed database update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param collation: Collation of the managed database. + :type collation: str + :ivar status: Status for the database. Possible values include: 'Online', + 'Offline', 'Shutdown', 'Creating', 'Inaccessible' + :vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus + :ivar creation_date: Creation date of the database. + :vartype creation_date: datetime + :ivar earliest_restore_point: Earliest restore point in time for point in + time restore. + :vartype earliest_restore_point: datetime + :param restore_point_in_time: Conditional. If createMode is + PointInTimeRestore, this value is required. Specifies the point in time + (ISO8601 format) of the source database that will be restored to create + the new database. + :type restore_point_in_time: datetime + :ivar default_secondary_location: Geo paired region. + :vartype default_secondary_location: str + :param catalog_collation: Collation of the metadata catalog. Possible + values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' + :type catalog_collation: str or + ~azure.mgmt.sql.models.CatalogCollationType + :param create_mode: Managed database create mode. PointInTimeRestore: + Create a database by restoring a point in time backup of an existing + database. SourceDatabaseName, SourceManagedInstanceName and PointInTime + must be specified. RestoreExternalBackup: Create a database by restoring + from external backup files. Collation, StorageContainerUri and + StorageContainerSasToken must be specified. Possible values include: + 'Default', 'RestoreExternalBackup', 'PointInTimeRestore' + :type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode + :param storage_container_uri: Conditional. If createMode is + RestoreExternalBackup, this value is required. Specifies the uri of the + storage container where backups for this restore are stored. + :type storage_container_uri: str + :param source_database_id: The resource identifier of the source database + associated with create operation of this database. + :type source_database_id: str + :param storage_container_sas_token: Conditional. If createMode is + RestoreExternalBackup, this value is required. Specifies the storage + container sas token. + :type storage_container_sas_token: str + :ivar failover_group_id: Instance Failover Group resource identifier that + this managed database belongs to. + :vartype failover_group_id: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'status': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'earliest_restore_point': {'readonly': True}, + 'default_secondary_location': {'readonly': True}, + 'failover_group_id': {'readonly': True}, + } + + _attribute_map = { + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'earliest_restore_point': {'key': 'properties.earliestRestorePoint', 'type': 'iso-8601'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, + 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, + 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, + 'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'}, + 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, + 'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'}, + 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ManagedDatabaseUpdate, self).__init__(**kwargs) + self.collation = kwargs.get('collation', None) + self.status = None + self.creation_date = None + self.earliest_restore_point = None + self.restore_point_in_time = kwargs.get('restore_point_in_time', None) + self.default_secondary_location = None + self.catalog_collation = kwargs.get('catalog_collation', None) + self.create_mode = kwargs.get('create_mode', None) + self.storage_container_uri = kwargs.get('storage_container_uri', None) + self.source_database_id = kwargs.get('source_database_id', None) + self.storage_container_sas_token = kwargs.get('storage_container_sas_token', None) + self.failover_group_id = None + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update_py3.py new file mode 100644 index 000000000000..668eec38f38b --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update_py3.py @@ -0,0 +1,106 @@ +# 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 ManagedDatabaseUpdate(Model): + """An managed database update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param collation: Collation of the managed database. + :type collation: str + :ivar status: Status for the database. Possible values include: 'Online', + 'Offline', 'Shutdown', 'Creating', 'Inaccessible' + :vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus + :ivar creation_date: Creation date of the database. + :vartype creation_date: datetime + :ivar earliest_restore_point: Earliest restore point in time for point in + time restore. + :vartype earliest_restore_point: datetime + :param restore_point_in_time: Conditional. If createMode is + PointInTimeRestore, this value is required. Specifies the point in time + (ISO8601 format) of the source database that will be restored to create + the new database. + :type restore_point_in_time: datetime + :ivar default_secondary_location: Geo paired region. + :vartype default_secondary_location: str + :param catalog_collation: Collation of the metadata catalog. Possible + values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' + :type catalog_collation: str or + ~azure.mgmt.sql.models.CatalogCollationType + :param create_mode: Managed database create mode. PointInTimeRestore: + Create a database by restoring a point in time backup of an existing + database. SourceDatabaseName, SourceManagedInstanceName and PointInTime + must be specified. RestoreExternalBackup: Create a database by restoring + from external backup files. Collation, StorageContainerUri and + StorageContainerSasToken must be specified. Possible values include: + 'Default', 'RestoreExternalBackup', 'PointInTimeRestore' + :type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode + :param storage_container_uri: Conditional. If createMode is + RestoreExternalBackup, this value is required. Specifies the uri of the + storage container where backups for this restore are stored. + :type storage_container_uri: str + :param source_database_id: The resource identifier of the source database + associated with create operation of this database. + :type source_database_id: str + :param storage_container_sas_token: Conditional. If createMode is + RestoreExternalBackup, this value is required. Specifies the storage + container sas token. + :type storage_container_sas_token: str + :ivar failover_group_id: Instance Failover Group resource identifier that + this managed database belongs to. + :vartype failover_group_id: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'status': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'earliest_restore_point': {'readonly': True}, + 'default_secondary_location': {'readonly': True}, + 'failover_group_id': {'readonly': True}, + } + + _attribute_map = { + 'collation': {'key': 'properties.collation', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'earliest_restore_point': {'key': 'properties.earliestRestorePoint', 'type': 'iso-8601'}, + 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, + 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, + 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, + 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, + 'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'}, + 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, + 'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'}, + 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, collation: str=None, restore_point_in_time=None, catalog_collation=None, create_mode=None, storage_container_uri: str=None, source_database_id: str=None, storage_container_sas_token: str=None, tags=None, **kwargs) -> None: + super(ManagedDatabaseUpdate, self).__init__(**kwargs) + self.collation = collation + self.status = None + self.creation_date = None + self.earliest_restore_point = None + self.restore_point_in_time = restore_point_in_time + self.default_secondary_location = None + self.catalog_collation = catalog_collation + self.create_mode = create_mode + self.storage_container_uri = storage_container_uri + self.source_database_id = source_database_id + self.storage_container_sas_token = storage_container_sas_token + self.failover_group_id = None + self.tags = tags diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance.py b/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance.py new file mode 100644 index 000000000000..9239f4aa347d --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance.py @@ -0,0 +1,99 @@ +# 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 .tracked_resource import TrackedResource + + +class ManagedInstance(TrackedResource): + """An Azure SQL managed instance. + + 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 location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param identity: The Azure Active Directory identity of the managed + instance. + :type identity: ~azure.mgmt.sql.models.ResourceIdentity + :param sku: Managed instance sku + :type sku: ~azure.mgmt.sql.models.Sku + :ivar fully_qualified_domain_name: The fully qualified domain name of the + managed instance. + :vartype fully_qualified_domain_name: str + :param administrator_login: Administrator username for the managed + instance. Can only be specified when the managed instance is being created + (and is required for creation). + :type administrator_login: str + :param administrator_login_password: The administrator login password + (required for managed instance creation). + :type administrator_login_password: str + :param subnet_id: Subnet resource ID for the managed instance. + :type subnet_id: str + :ivar state: The state of the managed instance. + :vartype state: str + :param license_type: The license type. Possible values are + 'LicenseIncluded' and 'BasePrice'. + :type license_type: str + :param v_cores: The number of VCores. + :type v_cores: int + :param storage_size_in_gb: The maximum storage size in GB. + :type storage_size_in_gb: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'fully_qualified_domain_name': {'readonly': True}, + 'state': {'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}'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, + 'storage_size_in_gb': {'key': 'properties.storageSizeInGB', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ManagedInstance, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.sku = kwargs.get('sku', None) + self.fully_qualified_domain_name = None + self.administrator_login = kwargs.get('administrator_login', None) + self.administrator_login_password = kwargs.get('administrator_login_password', None) + self.subnet_id = kwargs.get('subnet_id', None) + self.state = None + self.license_type = kwargs.get('license_type', None) + self.v_cores = kwargs.get('v_cores', None) + self.storage_size_in_gb = kwargs.get('storage_size_in_gb', None) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_paged.py b/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_paged.py new file mode 100644 index 000000000000..c39881da9f3b --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_paged.py @@ -0,0 +1,27 @@ +# 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 ManagedInstancePaged(Paged): + """ + A paging container for iterating over a list of :class:`ManagedInstance ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ManagedInstance]'} + } + + def __init__(self, *args, **kwargs): + + super(ManagedInstancePaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_pair_info.py b/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_pair_info.py new file mode 100644 index 000000000000..ee49c1db0c62 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_pair_info.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ManagedInstancePairInfo(Model): + """Pairs of Managed Instances in the failover group. + + :param primary_managed_instance_id: Id of Primary Managed Instance in + pair. + :type primary_managed_instance_id: str + :param partner_managed_instance_id: Id of Partner Managed Instance in + pair. + :type partner_managed_instance_id: str + """ + + _attribute_map = { + 'primary_managed_instance_id': {'key': 'primaryManagedInstanceId', 'type': 'str'}, + 'partner_managed_instance_id': {'key': 'partnerManagedInstanceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedInstancePairInfo, self).__init__(**kwargs) + self.primary_managed_instance_id = kwargs.get('primary_managed_instance_id', None) + self.partner_managed_instance_id = kwargs.get('partner_managed_instance_id', None) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_pair_info_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_pair_info_py3.py new file mode 100644 index 000000000000..49f52752b439 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_pair_info_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ManagedInstancePairInfo(Model): + """Pairs of Managed Instances in the failover group. + + :param primary_managed_instance_id: Id of Primary Managed Instance in + pair. + :type primary_managed_instance_id: str + :param partner_managed_instance_id: Id of Partner Managed Instance in + pair. + :type partner_managed_instance_id: str + """ + + _attribute_map = { + 'primary_managed_instance_id': {'key': 'primaryManagedInstanceId', 'type': 'str'}, + 'partner_managed_instance_id': {'key': 'partnerManagedInstanceId', 'type': 'str'}, + } + + def __init__(self, *, primary_managed_instance_id: str=None, partner_managed_instance_id: str=None, **kwargs) -> None: + super(ManagedInstancePairInfo, self).__init__(**kwargs) + self.primary_managed_instance_id = primary_managed_instance_id + self.partner_managed_instance_id = partner_managed_instance_id diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_py3.py new file mode 100644 index 000000000000..1cf2899bbfee --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_py3.py @@ -0,0 +1,99 @@ +# 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 .tracked_resource_py3 import TrackedResource + + +class ManagedInstance(TrackedResource): + """An Azure SQL managed instance. + + 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 location: Required. Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param identity: The Azure Active Directory identity of the managed + instance. + :type identity: ~azure.mgmt.sql.models.ResourceIdentity + :param sku: Managed instance sku + :type sku: ~azure.mgmt.sql.models.Sku + :ivar fully_qualified_domain_name: The fully qualified domain name of the + managed instance. + :vartype fully_qualified_domain_name: str + :param administrator_login: Administrator username for the managed + instance. Can only be specified when the managed instance is being created + (and is required for creation). + :type administrator_login: str + :param administrator_login_password: The administrator login password + (required for managed instance creation). + :type administrator_login_password: str + :param subnet_id: Subnet resource ID for the managed instance. + :type subnet_id: str + :ivar state: The state of the managed instance. + :vartype state: str + :param license_type: The license type. Possible values are + 'LicenseIncluded' and 'BasePrice'. + :type license_type: str + :param v_cores: The number of VCores. + :type v_cores: int + :param storage_size_in_gb: The maximum storage size in GB. + :type storage_size_in_gb: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'fully_qualified_domain_name': {'readonly': True}, + 'state': {'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}'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, + 'storage_size_in_gb': {'key': 'properties.storageSizeInGB', 'type': 'int'}, + } + + def __init__(self, *, location: str, tags=None, identity=None, sku=None, administrator_login: str=None, administrator_login_password: str=None, subnet_id: str=None, license_type: str=None, v_cores: int=None, storage_size_in_gb: int=None, **kwargs) -> None: + super(ManagedInstance, self).__init__(location=location, tags=tags, **kwargs) + self.identity = identity + self.sku = sku + self.fully_qualified_domain_name = None + self.administrator_login = administrator_login + self.administrator_login_password = administrator_login_password + self.subnet_id = subnet_id + self.state = None + self.license_type = license_type + self.v_cores = v_cores + self.storage_size_in_gb = storage_size_in_gb diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_update.py b/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_update.py new file mode 100644 index 000000000000..7ea51f29ddff --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_update.py @@ -0,0 +1,77 @@ +# 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 ManagedInstanceUpdate(Model): + """An update request for an Azure SQL Database managed instance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param sku: Managed instance sku + :type sku: ~azure.mgmt.sql.models.Sku + :ivar fully_qualified_domain_name: The fully qualified domain name of the + managed instance. + :vartype fully_qualified_domain_name: str + :param administrator_login: Administrator username for the managed + instance. Can only be specified when the managed instance is being created + (and is required for creation). + :type administrator_login: str + :param administrator_login_password: The administrator login password + (required for managed instance creation). + :type administrator_login_password: str + :param subnet_id: Subnet resource ID for the managed instance. + :type subnet_id: str + :ivar state: The state of the managed instance. + :vartype state: str + :param license_type: The license type. Possible values are + 'LicenseIncluded' and 'BasePrice'. + :type license_type: str + :param v_cores: The number of VCores. + :type v_cores: int + :param storage_size_in_gb: The maximum storage size in GB. + :type storage_size_in_gb: int + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'fully_qualified_domain_name': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, + 'storage_size_in_gb': {'key': 'properties.storageSizeInGB', 'type': 'int'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ManagedInstanceUpdate, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.fully_qualified_domain_name = None + self.administrator_login = kwargs.get('administrator_login', None) + self.administrator_login_password = kwargs.get('administrator_login_password', None) + self.subnet_id = kwargs.get('subnet_id', None) + self.state = None + self.license_type = kwargs.get('license_type', None) + self.v_cores = kwargs.get('v_cores', None) + self.storage_size_in_gb = kwargs.get('storage_size_in_gb', None) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_update_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_update_py3.py new file mode 100644 index 000000000000..0adbe5f439f8 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/managed_instance_update_py3.py @@ -0,0 +1,77 @@ +# 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 ManagedInstanceUpdate(Model): + """An update request for an Azure SQL Database managed instance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param sku: Managed instance sku + :type sku: ~azure.mgmt.sql.models.Sku + :ivar fully_qualified_domain_name: The fully qualified domain name of the + managed instance. + :vartype fully_qualified_domain_name: str + :param administrator_login: Administrator username for the managed + instance. Can only be specified when the managed instance is being created + (and is required for creation). + :type administrator_login: str + :param administrator_login_password: The administrator login password + (required for managed instance creation). + :type administrator_login_password: str + :param subnet_id: Subnet resource ID for the managed instance. + :type subnet_id: str + :ivar state: The state of the managed instance. + :vartype state: str + :param license_type: The license type. Possible values are + 'LicenseIncluded' and 'BasePrice'. + :type license_type: str + :param v_cores: The number of VCores. + :type v_cores: int + :param storage_size_in_gb: The maximum storage size in GB. + :type storage_size_in_gb: int + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'fully_qualified_domain_name': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, + 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, + 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, + 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, + 'storage_size_in_gb': {'key': 'properties.storageSizeInGB', 'type': 'int'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, sku=None, administrator_login: str=None, administrator_login_password: str=None, subnet_id: str=None, license_type: str=None, v_cores: int=None, storage_size_in_gb: int=None, tags=None, **kwargs) -> None: + super(ManagedInstanceUpdate, self).__init__(**kwargs) + self.sku = sku + self.fully_qualified_domain_name = None + self.administrator_login = administrator_login + self.administrator_login_password = administrator_login_password + self.subnet_id = subnet_id + self.state = None + self.license_type = license_type + self.v_cores = v_cores + self.storage_size_in_gb = storage_size_in_gb + self.tags = tags diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/partner_region_info.py b/azure-mgmt-sql/azure/mgmt/sql/models/partner_region_info.py new file mode 100644 index 000000000000..4d8e2688acb1 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/partner_region_info.py @@ -0,0 +1,41 @@ +# 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 PartnerRegionInfo(Model): + """Partner region information for the failover group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param location: Geo location of the partner managed instances. + :type location: str + :ivar replication_role: Replication role of the partner managed instances. + Possible values include: 'Primary', 'Secondary' + :vartype replication_role: str or + ~azure.mgmt.sql.models.InstanceFailoverGroupReplicationRole + """ + + _validation = { + 'replication_role': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'replication_role': {'key': 'replicationRole', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PartnerRegionInfo, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.replication_role = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/partner_region_info_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/partner_region_info_py3.py new file mode 100644 index 000000000000..76c52b49c0ba --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/partner_region_info_py3.py @@ -0,0 +1,41 @@ +# 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 PartnerRegionInfo(Model): + """Partner region information for the failover group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param location: Geo location of the partner managed instances. + :type location: str + :ivar replication_role: Replication role of the partner managed instances. + Possible values include: 'Primary', 'Secondary' + :vartype replication_role: str or + ~azure.mgmt.sql.models.InstanceFailoverGroupReplicationRole + """ + + _validation = { + 'replication_role': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'replication_role': {'key': 'replicationRole', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, **kwargs) -> None: + super(PartnerRegionInfo, self).__init__(**kwargs) + self.location = location + self.replication_role = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/proxy_resource_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/proxy_resource_py3.py index 322fccf81120..707323dfc134 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/proxy_resource_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/proxy_resource_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class ProxyResource(Resource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_py3.py index f11b8a1bc507..ee13abf5d237 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class RecommendedElasticPool(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/recommended_index_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/recommended_index_py3.py index 446e1fafd8e0..5aea5620371e 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/recommended_index_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/recommended_index_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class RecommendedIndex(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database_py3.py index 5b753144dc76..8eb9d5510689 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/recoverable_database_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class RecoverableDatabase(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/replication_link_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/replication_link_py3.py index 98ca741b476a..740748f154b2 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/replication_link_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/replication_link_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class ReplicationLink(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database_py3.py index 80b7d9c9b02b..0e4a5f45ec89 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/restorable_dropped_database_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class RestorableDroppedDatabase(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/restore_point_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/restore_point_py3.py index f86ba3ed37b2..886f576a4575 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/restore_point_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/restore_point_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class RestorePoint(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/server.py b/azure-mgmt-sql/azure/mgmt/sql/models/server.py index dada32666e04..1c399fadb353 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/server.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/server.py @@ -26,10 +26,10 @@ class Server(TrackedResource): :vartype name: str :ivar type: Resource type. :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] :param location: Required. Resource location. :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] :param identity: The Azure Active Directory identity of the server. :type identity: ~azure.mgmt.sql.models.ResourceIdentity :ivar kind: Kind of sql server. This is metadata used for the Azure portal @@ -64,8 +64,8 @@ class Server(TrackedResource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, 'kind': {'key': 'kind', 'type': 'str'}, 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/server_automatic_tuning_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/server_automatic_tuning_py3.py index 4c31615adcb9..fb8fb4804610 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/server_automatic_tuning_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/server_automatic_tuning_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class ServerAutomaticTuning(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator_py3.py index fb5d93d90546..3dfeb71123c3 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/server_azure_ad_administrator_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class ServerAzureADAdministrator(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link_py3.py index 58795afad14e..6a32069ca067 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/server_communication_link_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class ServerCommunicationLink(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/server_connection_policy_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/server_connection_policy_py3.py index 60164406821b..10bd81052301 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/server_connection_policy_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/server_connection_policy_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class ServerConnectionPolicy(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_py3.py index 1a49b635ca8a..c57df1a85f06 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class ServerDnsAlias(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/server_key_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/server_key_py3.py index 5b8569a81ea3..41ef40ab165a 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/server_key_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/server_key_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class ServerKey(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/server_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/server_py3.py index f68696704197..625c4d0aea4c 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/server_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/server_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .tracked_resource import TrackedResource +from .tracked_resource_py3 import TrackedResource class Server(TrackedResource): @@ -26,10 +26,10 @@ class Server(TrackedResource): :vartype name: str :ivar type: Resource type. :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] :param location: Required. Resource location. :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] :param identity: The Azure Active Directory identity of the server. :type identity: ~azure.mgmt.sql.models.ResourceIdentity :ivar kind: Kind of sql server. This is metadata used for the Azure portal @@ -64,8 +64,8 @@ class Server(TrackedResource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, 'kind': {'key': 'kind', 'type': 'str'}, 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, @@ -76,7 +76,7 @@ class Server(TrackedResource): } def __init__(self, *, location: str, tags=None, identity=None, administrator_login: str=None, administrator_login_password: str=None, version: str=None, **kwargs) -> None: - super(Server, self).__init__(tags=tags, location=location, **kwargs) + super(Server, self).__init__(location=location, tags=tags, **kwargs) self.identity = identity self.kind = None self.administrator_login = administrator_login diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_py3.py index e4e590716ec4..2fc00134e6ec 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class ServiceObjective(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor_py3.py index 0cc77ab82872..04f5dceca1c0 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/service_tier_advisor_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class ServiceTierAdvisor(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/sku.py b/azure-mgmt-sql/azure/mgmt/sql/models/sku.py index 6605594386e7..e37091dc4e2f 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/sku.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/sku.py @@ -13,21 +13,26 @@ class Sku(Model): - """An ARM Resource SKU. + """The resource model definition representing SKU. All required parameters must be populated in order to send to Azure. - :param name: Required. The name of the SKU, typically, a letter + Number - code, e.g. P3. + :param name: Required. The name of the SKU. Ex - P3. It is typically a + letter+number code :type name: str - :param tier: The tier of the particular SKU, e.g. Basic, Premium. + :param tier: This field is required to be implemented by the Resource + Provider if the service has more than one tier, but is not required on a + PUT. :type tier: str - :param size: Size of the particular SKU + :param size: The SKU size. When the name field is the combination of tier + and some other value, this would be the standalone code. :type size: str :param family: If the service has different generations of hardware, for the same SKU, then that can be captured here. :type family: str - :param capacity: Capacity of the particular SKU. + :param capacity: If the SKU supports scale out/in then the capacity + integer should be included. If scale out/in is not possible for the + resource this may be omitted. :type capacity: int """ diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/sku_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/sku_py3.py index d998a023ec22..a6f04765e87c 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/sku_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/sku_py3.py @@ -13,21 +13,26 @@ class Sku(Model): - """An ARM Resource SKU. + """The resource model definition representing SKU. All required parameters must be populated in order to send to Azure. - :param name: Required. The name of the SKU, typically, a letter + Number - code, e.g. P3. + :param name: Required. The name of the SKU. Ex - P3. It is typically a + letter+number code :type name: str - :param tier: The tier of the particular SKU, e.g. Basic, Premium. + :param tier: This field is required to be implemented by the Resource + Provider if the service has more than one tier, but is not required on a + PUT. :type tier: str - :param size: Size of the particular SKU + :param size: The SKU size. When the name field is the combination of tier + and some other value, this would be the standalone code. :type size: str :param family: If the service has different generations of hardware, for the same SKU, then that can be captured here. :type family: str - :param capacity: Capacity of the particular SKU. + :param capacity: If the SKU supports scale out/in then the capacity + integer should be included. If scale out/in is not possible for the + resource this may be omitted. :type capacity: int """ diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/sql_management_client_enums.py b/azure-mgmt-sql/azure/mgmt/sql/models/sql_management_client_enums.py index 62713566786f..e4a76e0f84e5 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/sql_management_client_enums.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/sql_management_client_enums.py @@ -326,15 +326,15 @@ class FailoverGroupReplicationRole(str, Enum): secondary = "Secondary" -class OperationOrigin(str, Enum): +class IdentityType(str, Enum): - user = "user" - system = "system" + system_assigned = "SystemAssigned" -class IdentityType(str, Enum): +class OperationOrigin(str, Enum): - system_assigned = "SystemAssigned" + user = "user" + system = "system" class SyncAgentState(str, Enum): @@ -411,6 +411,96 @@ class VirtualNetworkRuleState(str, Enum): unknown = "Unknown" +class JobAgentState(str, Enum): + + creating = "Creating" + ready = "Ready" + updating = "Updating" + deleting = "Deleting" + disabled = "Disabled" + + +class JobExecutionLifecycle(str, Enum): + + created = "Created" + in_progress = "InProgress" + waiting_for_child_job_executions = "WaitingForChildJobExecutions" + waiting_for_retry = "WaitingForRetry" + succeeded = "Succeeded" + succeeded_with_skipped = "SucceededWithSkipped" + failed = "Failed" + timed_out = "TimedOut" + canceled = "Canceled" + skipped = "Skipped" + + +class ProvisioningState(str, Enum): + + created = "Created" + in_progress = "InProgress" + succeeded = "Succeeded" + failed = "Failed" + canceled = "Canceled" + + +class JobTargetType(str, Enum): + + target_group = "TargetGroup" + sql_database = "SqlDatabase" + sql_elastic_pool = "SqlElasticPool" + sql_shard_map = "SqlShardMap" + sql_server = "SqlServer" + + +class JobScheduleType(str, Enum): + + once = "Once" + recurring = "Recurring" + + +class JobStepActionType(str, Enum): + + tsql = "TSql" + + +class JobStepActionSource(str, Enum): + + inline = "Inline" + + +class JobStepOutputType(str, Enum): + + sql_database = "SqlDatabase" + + +class JobTargetGroupMembershipType(str, Enum): + + include = "Include" + exclude = "Exclude" + + +class ManagedDatabaseStatus(str, Enum): + + online = "Online" + offline = "Offline" + shutdown = "Shutdown" + creating = "Creating" + inaccessible = "Inaccessible" + + +class CatalogCollationType(str, Enum): + + database_default = "DATABASE_DEFAULT" + sql_latin1_general_cp1_ci_as = "SQL_Latin1_General_CP1_CI_AS" + + +class ManagedDatabaseCreateMode(str, Enum): + + default = "Default" + restore_external_backup = "RestoreExternalBackup" + point_in_time_restore = "PointInTimeRestore" + + class AutomaticTuningServerMode(str, Enum): custom = "Custom" @@ -515,12 +605,6 @@ class DatabaseStatus(str, Enum): scaling = "Scaling" -class CatalogCollationType(str, Enum): - - database_default = "DATABASE_DEFAULT" - sql_latin1_general_cp1_ci_as = "SQL_Latin1_General_CP1_CI_AS" - - class DatabaseLicenseType(str, Enum): license_included = "LicenseIncluded" @@ -546,6 +630,26 @@ class ElasticPoolLicenseType(str, Enum): base_price = "BasePrice" +class VulnerabilityAssessmentScanTriggerType(str, Enum): + + on_demand = "OnDemand" + recurring = "Recurring" + + +class VulnerabilityAssessmentScanState(str, Enum): + + passed = "Passed" + failed = "Failed" + failed_to_run = "FailedToRun" + in_progress = "InProgress" + + +class InstanceFailoverGroupReplicationRole(str, Enum): + + primary = "Primary" + secondary = "Secondary" + + class LongTermRetentionDatabaseState(str, Enum): all = "All" diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage_py3.py index a4ba7cd8c102..d55e3275a74b 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/subscription_usage_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class SubscriptionUsage(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database_py3.py index 30a633cda9a1..7d92287e1a37 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_linked_database_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class SyncAgentLinkedDatabase(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_py3.py index 06fa4a8f1100..f07649750457 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class SyncAgent(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_py3.py index 8d1a557ef6ca..1654af79245f 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class SyncGroup(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/sync_member_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/sync_member_py3.py index 74b903a63b0f..50cf8fe2d65c 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/sync_member_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/sync_member_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class SyncMember(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/tracked_resource.py b/azure-mgmt-sql/azure/mgmt/sql/models/tracked_resource.py index 71fc851de040..dc99e096cf18 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/tracked_resource.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/tracked_resource.py @@ -26,10 +26,10 @@ class TrackedResource(Resource): :vartype name: str :ivar type: Resource type. :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] :param location: Required. Resource location. :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] """ _validation = { @@ -43,11 +43,11 @@ class TrackedResource(Resource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, } def __init__(self, **kwargs): super(TrackedResource, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/tracked_resource_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/tracked_resource_py3.py index 4d8ec200976a..5edf04ac0a73 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/tracked_resource_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/tracked_resource_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class TrackedResource(Resource): @@ -26,10 +26,10 @@ class TrackedResource(Resource): :vartype name: str :ivar type: Resource type. :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] :param location: Required. Resource location. :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] """ _validation = { @@ -43,11 +43,11 @@ class TrackedResource(Resource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, } def __init__(self, *, location: str, tags=None, **kwargs) -> None: super(TrackedResource, self).__init__(**kwargs) - self.tags = tags self.location = location + self.tags = tags diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity_py3.py index f8d509c9a56e..9bf146137c20 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_activity_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class TransparentDataEncryptionActivity(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_py3.py index bc38ca655789..db2b2096f798 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/transparent_data_encryption_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class TransparentDataEncryption(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule_py3.py index 4fd7a128505a..19e6bd30ff5e 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/virtual_network_rule_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .proxy_resource_py3 import ProxyResource class VirtualNetworkRule(ProxyResource): diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_recurring_scans_properties.py b/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_recurring_scans_properties.py new file mode 100644 index 000000000000..e7d424543f2b --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_recurring_scans_properties.py @@ -0,0 +1,39 @@ +# 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 VulnerabilityAssessmentRecurringScansProperties(Model): + """Properties of a Vulnerability Assessment recurring scans. + + :param is_enabled: Recurring scans state. + :type is_enabled: bool + :param email_subscription_admins: Specifies that the schedule scan + notification will be is sent to the subscription administrators. Default + value: True . + :type email_subscription_admins: bool + :param emails: Specifies an array of e-mail addresses to which the scan + notification is sent. + :type emails: list[str] + """ + + _attribute_map = { + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'email_subscription_admins': {'key': 'emailSubscriptionAdmins', 'type': 'bool'}, + 'emails': {'key': 'emails', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VulnerabilityAssessmentRecurringScansProperties, self).__init__(**kwargs) + self.is_enabled = kwargs.get('is_enabled', None) + self.email_subscription_admins = kwargs.get('email_subscription_admins', True) + self.emails = kwargs.get('emails', None) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_recurring_scans_properties_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_recurring_scans_properties_py3.py new file mode 100644 index 000000000000..3a55afaa0a5e --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_recurring_scans_properties_py3.py @@ -0,0 +1,39 @@ +# 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 VulnerabilityAssessmentRecurringScansProperties(Model): + """Properties of a Vulnerability Assessment recurring scans. + + :param is_enabled: Recurring scans state. + :type is_enabled: bool + :param email_subscription_admins: Specifies that the schedule scan + notification will be is sent to the subscription administrators. Default + value: True . + :type email_subscription_admins: bool + :param emails: Specifies an array of e-mail addresses to which the scan + notification is sent. + :type emails: list[str] + """ + + _attribute_map = { + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'email_subscription_admins': {'key': 'emailSubscriptionAdmins', 'type': 'bool'}, + 'emails': {'key': 'emails', 'type': '[str]'}, + } + + def __init__(self, *, is_enabled: bool=None, email_subscription_admins: bool=True, emails=None, **kwargs) -> None: + super(VulnerabilityAssessmentRecurringScansProperties, self).__init__(**kwargs) + self.is_enabled = is_enabled + self.email_subscription_admins = email_subscription_admins + self.emails = emails diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_error.py b/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_error.py new file mode 100644 index 000000000000..1d465691ba60 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_error.py @@ -0,0 +1,40 @@ +# 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 VulnerabilityAssessmentScanError(Model): + """Properties of a vulnerability assessment scan error. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VulnerabilityAssessmentScanError, self).__init__(**kwargs) + self.code = None + self.message = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_error_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_error_py3.py new file mode 100644 index 000000000000..93c13998eb25 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_error_py3.py @@ -0,0 +1,40 @@ +# 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 VulnerabilityAssessmentScanError(Model): + """Properties of a vulnerability assessment scan error. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(VulnerabilityAssessmentScanError, self).__init__(**kwargs) + self.code = None + self.message = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record.py b/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record.py new file mode 100644 index 000000000000..67a6d163f90c --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record.py @@ -0,0 +1,88 @@ +# 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 VulnerabilityAssessmentScanRecord(ProxyResource): + """A vulnerability assessment scan record. + + 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 + :ivar scan_id: The scan ID. + :vartype scan_id: str + :ivar trigger_type: The scan trigger type. Possible values include: + 'OnDemand', 'Recurring' + :vartype trigger_type: str or + ~azure.mgmt.sql.models.VulnerabilityAssessmentScanTriggerType + :ivar state: The scan status. Possible values include: 'Passed', 'Failed', + 'FailedToRun', 'InProgress' + :vartype state: str or + ~azure.mgmt.sql.models.VulnerabilityAssessmentScanState + :ivar start_time: The scan start time (UTC). + :vartype start_time: datetime + :ivar end_time: The scan end time (UTC). + :vartype end_time: datetime + :ivar errors: The scan errors. + :vartype errors: + list[~azure.mgmt.sql.models.VulnerabilityAssessmentScanError] + :ivar storage_container_path: The scan results storage container path. + :vartype storage_container_path: str + :ivar number_of_failed_security_checks: The number of failed security + checks. + :vartype number_of_failed_security_checks: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'scan_id': {'readonly': True}, + 'trigger_type': {'readonly': True}, + 'state': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'errors': {'readonly': True}, + 'storage_container_path': {'readonly': True}, + 'number_of_failed_security_checks': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'scan_id': {'key': 'properties.scanId', 'type': 'str'}, + 'trigger_type': {'key': 'properties.triggerType', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'errors': {'key': 'properties.errors', 'type': '[VulnerabilityAssessmentScanError]'}, + 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, + 'number_of_failed_security_checks': {'key': 'properties.numberOfFailedSecurityChecks', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(VulnerabilityAssessmentScanRecord, self).__init__(**kwargs) + self.scan_id = None + self.trigger_type = None + self.state = None + self.start_time = None + self.end_time = None + self.errors = None + self.storage_container_path = None + self.number_of_failed_security_checks = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record_paged.py b/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record_paged.py new file mode 100644 index 000000000000..7076acc9290f --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record_paged.py @@ -0,0 +1,27 @@ +# 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 VulnerabilityAssessmentScanRecordPaged(Paged): + """ + A paging container for iterating over a list of :class:`VulnerabilityAssessmentScanRecord ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VulnerabilityAssessmentScanRecord]'} + } + + def __init__(self, *args, **kwargs): + + super(VulnerabilityAssessmentScanRecordPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record_py3.py new file mode 100644 index 000000000000..e31d141065af --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/vulnerability_assessment_scan_record_py3.py @@ -0,0 +1,88 @@ +# 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 VulnerabilityAssessmentScanRecord(ProxyResource): + """A vulnerability assessment scan record. + + 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 + :ivar scan_id: The scan ID. + :vartype scan_id: str + :ivar trigger_type: The scan trigger type. Possible values include: + 'OnDemand', 'Recurring' + :vartype trigger_type: str or + ~azure.mgmt.sql.models.VulnerabilityAssessmentScanTriggerType + :ivar state: The scan status. Possible values include: 'Passed', 'Failed', + 'FailedToRun', 'InProgress' + :vartype state: str or + ~azure.mgmt.sql.models.VulnerabilityAssessmentScanState + :ivar start_time: The scan start time (UTC). + :vartype start_time: datetime + :ivar end_time: The scan end time (UTC). + :vartype end_time: datetime + :ivar errors: The scan errors. + :vartype errors: + list[~azure.mgmt.sql.models.VulnerabilityAssessmentScanError] + :ivar storage_container_path: The scan results storage container path. + :vartype storage_container_path: str + :ivar number_of_failed_security_checks: The number of failed security + checks. + :vartype number_of_failed_security_checks: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'scan_id': {'readonly': True}, + 'trigger_type': {'readonly': True}, + 'state': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'errors': {'readonly': True}, + 'storage_container_path': {'readonly': True}, + 'number_of_failed_security_checks': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'scan_id': {'key': 'properties.scanId', 'type': 'str'}, + 'trigger_type': {'key': 'properties.triggerType', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'errors': {'key': 'properties.errors', 'type': '[VulnerabilityAssessmentScanError]'}, + 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, + 'number_of_failed_security_checks': {'key': 'properties.numberOfFailedSecurityChecks', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(VulnerabilityAssessmentScanRecord, self).__init__(**kwargs) + self.scan_id = None + self.trigger_type = None + self.state = None + self.start_time = None + self.end_time = None + self.errors = None + self.storage_container_path = None + self.number_of_failed_security_checks = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/__init__.py b/azure-mgmt-sql/azure/mgmt/sql/operations/__init__.py index fdda72bc17ff..953bb00775df 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/operations/__init__.py +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/__init__.py @@ -36,6 +36,7 @@ from .database_automatic_tuning_operations import DatabaseAutomaticTuningOperations from .encryption_protectors_operations import EncryptionProtectorsOperations from .failover_groups_operations import FailoverGroupsOperations +from .managed_instances_operations import ManagedInstancesOperations from .operations import Operations from .server_keys_operations import ServerKeysOperations from .sync_agents_operations import SyncAgentsOperations @@ -43,14 +44,29 @@ from .sync_members_operations import SyncMembersOperations from .subscription_usages_operations import SubscriptionUsagesOperations from .virtual_network_rules_operations import VirtualNetworkRulesOperations +from .database_vulnerability_assessment_rule_baselines_operations import DatabaseVulnerabilityAssessmentRuleBaselinesOperations +from .database_vulnerability_assessments_operations import DatabaseVulnerabilityAssessmentsOperations +from .job_agents_operations import JobAgentsOperations +from .job_credentials_operations import JobCredentialsOperations +from .job_executions_operations import JobExecutionsOperations +from .jobs_operations import JobsOperations +from .job_step_executions_operations import JobStepExecutionsOperations +from .job_steps_operations import JobStepsOperations +from .job_target_executions_operations import JobTargetExecutionsOperations +from .job_target_groups_operations import JobTargetGroupsOperations +from .job_versions_operations import JobVersionsOperations from .long_term_retention_backups_operations import LongTermRetentionBackupsOperations from .backup_long_term_retention_policies_operations import BackupLongTermRetentionPoliciesOperations +from .managed_databases_operations import ManagedDatabasesOperations from .server_automatic_tuning_operations import ServerAutomaticTuningOperations from .server_dns_aliases_operations import ServerDnsAliasesOperations from .restore_points_operations import RestorePointsOperations from .database_operations import DatabaseOperations from .elastic_pool_operations import ElasticPoolOperations from .capabilities_operations import CapabilitiesOperations +from .database_vulnerability_assessment_scans_operations import DatabaseVulnerabilityAssessmentScansOperations +from .instance_failover_groups_operations import InstanceFailoverGroupsOperations +from .backup_short_term_retention_policies_operations import BackupShortTermRetentionPoliciesOperations __all__ = [ 'RecoverableDatabasesOperations', @@ -80,6 +96,7 @@ 'DatabaseAutomaticTuningOperations', 'EncryptionProtectorsOperations', 'FailoverGroupsOperations', + 'ManagedInstancesOperations', 'Operations', 'ServerKeysOperations', 'SyncAgentsOperations', @@ -87,12 +104,27 @@ 'SyncMembersOperations', 'SubscriptionUsagesOperations', 'VirtualNetworkRulesOperations', + 'DatabaseVulnerabilityAssessmentRuleBaselinesOperations', + 'DatabaseVulnerabilityAssessmentsOperations', + 'JobAgentsOperations', + 'JobCredentialsOperations', + 'JobExecutionsOperations', + 'JobsOperations', + 'JobStepExecutionsOperations', + 'JobStepsOperations', + 'JobTargetExecutionsOperations', + 'JobTargetGroupsOperations', + 'JobVersionsOperations', 'LongTermRetentionBackupsOperations', 'BackupLongTermRetentionPoliciesOperations', + 'ManagedDatabasesOperations', 'ServerAutomaticTuningOperations', 'ServerDnsAliasesOperations', 'RestorePointsOperations', 'DatabaseOperations', 'ElasticPoolOperations', 'CapabilitiesOperations', + 'DatabaseVulnerabilityAssessmentScansOperations', + 'InstanceFailoverGroupsOperations', + 'BackupShortTermRetentionPoliciesOperations', ] diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/backup_short_term_retention_policies_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/backup_short_term_retention_policies_operations.py new file mode 100644 index 000000000000..e50f15c2a997 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/backup_short_term_retention_policies_operations.py @@ -0,0 +1,333 @@ +# 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 msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class BackupShortTermRetentionPoliciesOperations(object): + """BackupShortTermRetentionPoliciesOperations 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 policy_name: The policy name. Should always be "default". Constant value: "default". + :ivar api_version: The API version to use for the request. Constant value: "2017-10-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.policy_name = "default" + self.api_version = "2017-10-01-preview" + + self.config = config + + def get( + self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): + """Gets a database's short term retention policy. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param database_name: The name of the database. + :type database_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: BackupShortTermRetentionPolicy or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.sql.models.BackupShortTermRetentionPolicy 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'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'policyName': self._serialize.url("self.policy_name", self.policy_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('BackupShortTermRetentionPolicy', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupShortTermRetentionPolicies/{policyName}'} + + + def _create_or_update_initial( + self, resource_group_name, server_name, database_name, retention_days=None, custom_headers=None, raw=False, **operation_config): + parameters = models.BackupShortTermRetentionPolicy(retention_days=retention_days) + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'policyName': self._serialize.url("self.policy_name", self.policy_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, 'BackupShortTermRetentionPolicy') + + # 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, 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('BackupShortTermRetentionPolicy', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, server_name, database_name, retention_days=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Updates a database's short term retention policy. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param database_name: The name of the database. + :type database_name: str + :param retention_days: The backup retention period in days. This is + how many days Point-in-Time Restore will be supported. + :type retention_days: int + :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 + BackupShortTermRetentionPolicy or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.BackupShortTermRetentionPolicy] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.BackupShortTermRetentionPolicy]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + server_name=server_name, + database_name=database_name, + retention_days=retention_days, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('BackupShortTermRetentionPolicy', 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) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupShortTermRetentionPolicies/{policyName}'} + + + def _update_initial( + self, resource_group_name, server_name, database_name, retention_days=None, custom_headers=None, raw=False, **operation_config): + parameters = models.BackupShortTermRetentionPolicy(retention_days=retention_days) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'policyName': self._serialize.url("self.policy_name", self.policy_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, 'BackupShortTermRetentionPolicy') + + # Construct and send request + request = self._client.patch(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('BackupShortTermRetentionPolicy', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, server_name, database_name, retention_days=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Updates a database's short term retention policy. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param database_name: The name of the database. + :type database_name: str + :param retention_days: The backup retention period in days. This is + how many days Point-in-Time Restore will be supported. + :type retention_days: int + :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 + BackupShortTermRetentionPolicy or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.BackupShortTermRetentionPolicy] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.BackupShortTermRetentionPolicy]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + server_name=server_name, + database_name=database_name, + retention_days=retention_days, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('BackupShortTermRetentionPolicy', 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) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupShortTermRetentionPolicies/{policyName}'} diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessment_rule_baselines_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessment_rule_baselines_operations.py new file mode 100644 index 000000000000..16a909e27a1a --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessment_rule_baselines_operations.py @@ -0,0 +1,266 @@ +# 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 DatabaseVulnerabilityAssessmentRuleBaselinesOperations(object): + """DatabaseVulnerabilityAssessmentRuleBaselinesOperations 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 vulnerability_assessment_name: The name of the vulnerability assessment. Constant value: "default". + :ivar baseline_name: The name of the vulnerability assessment rule baseline. Constant value: "default". + :ivar api_version: The API version to use for the request. Constant value: "2017-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.vulnerability_assessment_name = "default" + self.baseline_name = "default" + self.api_version = "2017-03-01-preview" + + self.config = config + + def get( + self, resource_group_name, server_name, database_name, rule_id, custom_headers=None, raw=False, **operation_config): + """Gets a database's vulnerability assessment rule baseline. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param database_name: The name of the database for which the + vulnerability assessment rule baseline is defined. + :type database_name: str + :param rule_id: The vulnerability assessment rule ID. + :type rule_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: DatabaseVulnerabilityAssessmentRuleBaseline or + ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.sql.models.DatabaseVulnerabilityAssessmentRuleBaseline 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'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'vulnerabilityAssessmentName': self._serialize.url("self.vulnerability_assessment_name", self.vulnerability_assessment_name, 'str'), + 'ruleId': self._serialize.url("rule_id", rule_id, 'str'), + 'baselineName': self._serialize.url("self.baseline_name", self.baseline_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('DatabaseVulnerabilityAssessmentRuleBaseline', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}'} + + def create_or_update( + self, resource_group_name, server_name, database_name, rule_id, baseline_results, custom_headers=None, raw=False, **operation_config): + """Creates or updates a database's vulnerability assessment rule baseline. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param database_name: The name of the database for which the + vulnerability assessment rule baseline is defined. + :type database_name: str + :param rule_id: The vulnerability assessment rule ID. + :type rule_id: str + :param baseline_results: The rule baseline result + :type baseline_results: + list[~azure.mgmt.sql.models.DatabaseVulnerabilityAssessmentRuleBaselineItem] + :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: DatabaseVulnerabilityAssessmentRuleBaseline or + ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.sql.models.DatabaseVulnerabilityAssessmentRuleBaseline or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + parameters = models.DatabaseVulnerabilityAssessmentRuleBaseline(baseline_results=baseline_results) + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'vulnerabilityAssessmentName': self._serialize.url("self.vulnerability_assessment_name", self.vulnerability_assessment_name, 'str'), + 'ruleId': self._serialize.url("rule_id", rule_id, 'str'), + 'baselineName': self._serialize.url("self.baseline_name", self.baseline_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, 'DatabaseVulnerabilityAssessmentRuleBaseline') + + # 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('DatabaseVulnerabilityAssessmentRuleBaseline', 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.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}'} + + def delete( + self, resource_group_name, server_name, database_name, rule_id, custom_headers=None, raw=False, **operation_config): + """Removes the database's vulnerability assessment rule baseline. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param database_name: The name of the database for which the + vulnerability assessment rule baseline is defined. + :type database_name: str + :param rule_id: The vulnerability assessment rule ID. + :type rule_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: 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'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'vulnerabilityAssessmentName': self._serialize.url("self.vulnerability_assessment_name", self.vulnerability_assessment_name, 'str'), + 'ruleId': self._serialize.url("rule_id", rule_id, 'str'), + 'baselineName': self._serialize.url("self.baseline_name", self.baseline_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.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}'} diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessment_scans_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessment_scans_operations.py new file mode 100644 index 000000000000..e1d379ff4529 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessment_scans_operations.py @@ -0,0 +1,361 @@ +# 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 msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class DatabaseVulnerabilityAssessmentScansOperations(object): + """DatabaseVulnerabilityAssessmentScansOperations 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 vulnerability_assessment_name: The name of the vulnerability assessment. Constant value: "default". + :ivar api_version: The API version to use for the request. Constant value: "2017-10-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.vulnerability_assessment_name = "default" + self.api_version = "2017-10-01-preview" + + self.config = config + + def get( + self, resource_group_name, server_name, database_name, scan_id, custom_headers=None, raw=False, **operation_config): + """Gets a vulnerability assessment scan record of a database. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param database_name: The name of the database. + :type database_name: str + :param scan_id: The vulnerability assessment scan Id of the scan to + retrieve. + :type scan_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: VulnerabilityAssessmentScanRecord or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.sql.models.VulnerabilityAssessmentScanRecord 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'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'vulnerabilityAssessmentName': self._serialize.url("self.vulnerability_assessment_name", self.vulnerability_assessment_name, 'str'), + 'scanId': self._serialize.url("scan_id", scan_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("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('VulnerabilityAssessmentScanRecord', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}'} + + + def _initiate_scan_initial( + self, resource_group_name, server_name, database_name, scan_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.initiate_scan.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'vulnerabilityAssessmentName': self._serialize.url("self.vulnerability_assessment_name", self.vulnerability_assessment_name, 'str'), + 'scanId': self._serialize.url("scan_id", scan_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("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.post(url, query_parameters) + response = self._client.send(request, header_parameters, 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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def initiate_scan( + self, resource_group_name, server_name, database_name, scan_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Executes a Vulnerability Assessment database scan. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param database_name: The name of the database. + :type database_name: str + :param scan_id: The vulnerability assessment scan Id of the scan to + retrieve. + :type scan_id: str + :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 None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._initiate_scan_initial( + resource_group_name=resource_group_name, + server_name=server_name, + database_name=database_name, + scan_id=scan_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + 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) + initiate_scan.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/initiateScan'} + + def list_by_database( + self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): + """Lists the vulnerability assessment scans of a database. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param database_name: The name of the database. + :type database_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 + VulnerabilityAssessmentScanRecord + :rtype: + ~azure.mgmt.sql.models.VulnerabilityAssessmentScanRecordPaged[~azure.mgmt.sql.models.VulnerabilityAssessmentScanRecord] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_database.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'vulnerabilityAssessmentName': self._serialize.url("self.vulnerability_assessment_name", self.vulnerability_assessment_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.VulnerabilityAssessmentScanRecordPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.VulnerabilityAssessmentScanRecordPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans'} + + def export( + self, resource_group_name, server_name, database_name, scan_id, custom_headers=None, raw=False, **operation_config): + """Convert an existing scan result to a human readable format. If already + exists nothing happens. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param database_name: The name of the scanned database. + :type database_name: str + :param scan_id: The vulnerability assessment scan Id. + :type scan_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: DatabaseVulnerabilityAssessmentScansExport or + ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.sql.models.DatabaseVulnerabilityAssessmentScansExport or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.export.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'vulnerabilityAssessmentName': self._serialize.url("self.vulnerability_assessment_name", self.vulnerability_assessment_name, 'str'), + 'scanId': self._serialize.url("scan_id", scan_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("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.post(url, query_parameters) + response = self._client.send(request, header_parameters, 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('DatabaseVulnerabilityAssessmentScansExport', response) + if response.status_code == 201: + deserialized = self._deserialize('DatabaseVulnerabilityAssessmentScansExport', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + export.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/export'} diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessments_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessments_operations.py new file mode 100644 index 000000000000..5f923f69d777 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/database_vulnerability_assessments_operations.py @@ -0,0 +1,250 @@ +# 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 DatabaseVulnerabilityAssessmentsOperations(object): + """DatabaseVulnerabilityAssessmentsOperations 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 vulnerability_assessment_name: The name of the vulnerability assessment. Constant value: "default". + :ivar api_version: The API version to use for the request. Constant value: "2017-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.vulnerability_assessment_name = "default" + self.api_version = "2017-03-01-preview" + + self.config = config + + def get( + self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): + """Gets the database's vulnerability assessment. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param database_name: The name of the database for which the + vulnerability assessment is defined. + :type database_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: DatabaseVulnerabilityAssessment or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.sql.models.DatabaseVulnerabilityAssessment 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'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'vulnerabilityAssessmentName': self._serialize.url("self.vulnerability_assessment_name", self.vulnerability_assessment_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('DatabaseVulnerabilityAssessment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}'} + + def create_or_update( + self, resource_group_name, server_name, database_name, parameters, custom_headers=None, raw=False, **operation_config): + """Creates or updates the database's vulnerability assessment. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param database_name: The name of the database for which the + vulnerability assessment is defined. + :type database_name: str + :param parameters: The requested resource. + :type parameters: + ~azure.mgmt.sql.models.DatabaseVulnerabilityAssessment + :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: DatabaseVulnerabilityAssessment or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.sql.models.DatabaseVulnerabilityAssessment 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'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'vulnerabilityAssessmentName': self._serialize.url("self.vulnerability_assessment_name", self.vulnerability_assessment_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, 'DatabaseVulnerabilityAssessment') + + # 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('DatabaseVulnerabilityAssessment', response) + if response.status_code == 201: + deserialized = self._deserialize('DatabaseVulnerabilityAssessment', 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.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}'} + + def delete( + self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): + """Removes the database's vulnerability assessment. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param database_name: The name of the database for which the + vulnerability assessment is defined. + :type database_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'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'vulnerabilityAssessmentName': self._serialize.url("self.vulnerability_assessment_name", self.vulnerability_assessment_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.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}'} diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/instance_failover_groups_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/instance_failover_groups_operations.py new file mode 100644 index 000000000000..8e9e2c566109 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/instance_failover_groups_operations.py @@ -0,0 +1,580 @@ +# 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 msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class InstanceFailoverGroupsOperations(object): + """InstanceFailoverGroupsOperations 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: The API version to use for the request. Constant value: "2017-10-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-10-01-preview" + + self.config = config + + def get( + self, resource_group_name, location_name, failover_group_name, custom_headers=None, raw=False, **operation_config): + """Gets a failover group. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param location_name: The name of the region where the resource is + located. + :type location_name: str + :param failover_group_name: The name of the failover group. + :type failover_group_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: InstanceFailoverGroup or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.sql.models.InstanceFailoverGroup 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'), + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'failoverGroupName': self._serialize.url("failover_group_name", failover_group_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('InstanceFailoverGroup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups/{failoverGroupName}'} + + + def _create_or_update_initial( + self, resource_group_name, location_name, failover_group_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'failoverGroupName': self._serialize.url("failover_group_name", failover_group_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, 'InstanceFailoverGroup') + + # 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, 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('InstanceFailoverGroup', response) + if response.status_code == 201: + deserialized = self._deserialize('InstanceFailoverGroup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, location_name, failover_group_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates a failover group. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param location_name: The name of the region where the resource is + located. + :type location_name: str + :param failover_group_name: The name of the failover group. + :type failover_group_name: str + :param parameters: The failover group parameters. + :type parameters: ~azure.mgmt.sql.models.InstanceFailoverGroup + :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 InstanceFailoverGroup + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.InstanceFailoverGroup] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.InstanceFailoverGroup]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + location_name=location_name, + failover_group_name=failover_group_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('InstanceFailoverGroup', 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) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups/{failoverGroupName}'} + + + def _delete_initial( + self, resource_group_name, location_name, failover_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'failoverGroupName': self._serialize.url("failover_group_name", failover_group_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, 202, 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 + + def delete( + self, resource_group_name, location_name, failover_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a failover group. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param location_name: The name of the region where the resource is + located. + :type location_name: str + :param failover_group_name: The name of the failover group. + :type failover_group_name: str + :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 None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + location_name=location_name, + failover_group_name=failover_group_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + 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) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups/{failoverGroupName}'} + + def list_by_location( + self, resource_group_name, location_name, custom_headers=None, raw=False, **operation_config): + """Lists the failover groups in a location. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param location_name: The name of the region where the resource is + located. + :type location_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 InstanceFailoverGroup + :rtype: + ~azure.mgmt.sql.models.InstanceFailoverGroupPaged[~azure.mgmt.sql.models.InstanceFailoverGroup] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_location.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'locationName': self._serialize.url("location_name", location_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.InstanceFailoverGroupPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.InstanceFailoverGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups'} + + + def _failover_initial( + self, resource_group_name, location_name, failover_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.failover.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'failoverGroupName': self._serialize.url("failover_group_name", failover_group_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.post(url, query_parameters) + response = self._client.send(request, header_parameters, 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('InstanceFailoverGroup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def failover( + self, resource_group_name, location_name, failover_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Fails over from the current primary managed instance to this managed + instance. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param location_name: The name of the region where the resource is + located. + :type location_name: str + :param failover_group_name: The name of the failover group. + :type failover_group_name: str + :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 InstanceFailoverGroup + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.InstanceFailoverGroup] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.InstanceFailoverGroup]] + :raises: :class:`CloudError` + """ + raw_result = self._failover_initial( + resource_group_name=resource_group_name, + location_name=location_name, + failover_group_name=failover_group_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('InstanceFailoverGroup', 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) + failover.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups/{failoverGroupName}/failover'} + + + def _force_failover_allow_data_loss_initial( + self, resource_group_name, location_name, failover_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.force_failover_allow_data_loss.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'failoverGroupName': self._serialize.url("failover_group_name", failover_group_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.post(url, query_parameters) + response = self._client.send(request, header_parameters, 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('InstanceFailoverGroup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def force_failover_allow_data_loss( + self, resource_group_name, location_name, failover_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Fails over from the current primary managed instance to this managed + instance. This operation might result in data loss. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param location_name: The name of the region where the resource is + located. + :type location_name: str + :param failover_group_name: The name of the failover group. + :type failover_group_name: str + :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 InstanceFailoverGroup + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.InstanceFailoverGroup] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.InstanceFailoverGroup]] + :raises: :class:`CloudError` + """ + raw_result = self._force_failover_allow_data_loss_initial( + resource_group_name=resource_group_name, + location_name=location_name, + failover_group_name=failover_group_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('InstanceFailoverGroup', 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) + force_failover_allow_data_loss.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups/{failoverGroupName}/forceFailoverAllowDataLoss'} diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/job_agents_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/job_agents_operations.py new file mode 100644 index 000000000000..774fa59314ce --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/job_agents_operations.py @@ -0,0 +1,483 @@ +# 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 msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class JobAgentsOperations(object): + """JobAgentsOperations 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: The API version to use for the request. Constant value: "2017-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-03-01-preview" + + self.config = config + + def list_by_server( + self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of job agents in a server. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_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 JobAgent + :rtype: + ~azure.mgmt.sql.models.JobAgentPaged[~azure.mgmt.sql.models.JobAgent] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_server.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_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.JobAgentPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.JobAgentPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents'} + + def get( + self, resource_group_name, server_name, job_agent_name, custom_headers=None, raw=False, **operation_config): + """Gets a job agent. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent to be retrieved. + :type job_agent_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: JobAgent or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.sql.models.JobAgent 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'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_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('JobAgent', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}'} + + + def _create_or_update_initial( + self, resource_group_name, server_name, job_agent_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_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, 'JobAgent') + + # 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, 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('JobAgent', response) + if response.status_code == 201: + deserialized = self._deserialize('JobAgent', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, server_name, job_agent_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates a job agent. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent to be created or + updated. + :type job_agent_name: str + :param parameters: The requested job agent resource state. + :type parameters: ~azure.mgmt.sql.models.JobAgent + :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 JobAgent or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.JobAgent] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.JobAgent]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + server_name=server_name, + job_agent_name=job_agent_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('JobAgent', 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) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}'} + + + def _delete_initial( + self, resource_group_name, server_name, job_agent_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_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, 202, 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 + + def delete( + self, resource_group_name, server_name, job_agent_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a job agent. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent to be deleted. + :type job_agent_name: str + :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 None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + server_name=server_name, + job_agent_name=job_agent_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + 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) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}'} + + + def _update_initial( + self, resource_group_name, server_name, job_agent_name, tags=None, custom_headers=None, raw=False, **operation_config): + parameters = models.JobAgentUpdate(tags=tags) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_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, 'JobAgentUpdate') + + # Construct and send request + request = self._client.patch(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('JobAgent', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, server_name, job_agent_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Updates a job agent. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent to be updated. + :type job_agent_name: str + :param tags: Resource tags. + :type tags: dict[str, str] + :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 JobAgent or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.JobAgent] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.JobAgent]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + server_name=server_name, + job_agent_name=job_agent_name, + tags=tags, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('JobAgent', 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) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}'} diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/job_credentials_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/job_credentials_operations.py new file mode 100644 index 000000000000..c4bf415fe5e4 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/job_credentials_operations.py @@ -0,0 +1,328 @@ +# 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 JobCredentialsOperations(object): + """JobCredentialsOperations 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: The API version to use for the request. Constant value: "2017-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-03-01-preview" + + self.config = config + + def list_by_agent( + self, resource_group_name, server_name, job_agent_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of jobs credentials. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_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 JobCredential + :rtype: + ~azure.mgmt.sql.models.JobCredentialPaged[~azure.mgmt.sql.models.JobCredential] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_agent.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_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.JobCredentialPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.JobCredentialPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_agent.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/credentials'} + + def get( + self, resource_group_name, server_name, job_agent_name, credential_name, custom_headers=None, raw=False, **operation_config): + """Gets a jobs credential. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param credential_name: The name of the credential. + :type credential_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: JobCredential or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.sql.models.JobCredential 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'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'credentialName': self._serialize.url("credential_name", credential_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('JobCredential', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/credentials/{credentialName}'} + + def create_or_update( + self, resource_group_name, server_name, job_agent_name, credential_name, username, password, custom_headers=None, raw=False, **operation_config): + """Creates or updates a job credential. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param credential_name: The name of the credential. + :type credential_name: str + :param username: The credential user name. + :type username: str + :param password: The credential password. + :type password: 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: JobCredential or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.sql.models.JobCredential or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + parameters = models.JobCredential(username=username, password=password) + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'credentialName': self._serialize.url("credential_name", credential_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, 'JobCredential') + + # 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('JobCredential', response) + if response.status_code == 201: + deserialized = self._deserialize('JobCredential', 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.Sql/servers/{serverName}/jobAgents/{jobAgentName}/credentials/{credentialName}'} + + def delete( + self, resource_group_name, server_name, job_agent_name, credential_name, custom_headers=None, raw=False, **operation_config): + """Deletes a job credential. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param credential_name: The name of the credential. + :type credential_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'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'credentialName': self._serialize.url("credential_name", credential_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.Sql/servers/{serverName}/jobAgents/{jobAgentName}/credentials/{credentialName}'} diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/job_executions_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/job_executions_operations.py new file mode 100644 index 000000000000..3a9c7cd1c597 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/job_executions_operations.py @@ -0,0 +1,612 @@ +# 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 msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class JobExecutionsOperations(object): + """JobExecutionsOperations 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: The API version to use for the request. Constant value: "2017-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-03-01-preview" + + self.config = config + + def list_by_agent( + self, resource_group_name, server_name, job_agent_name, create_time_min=None, create_time_max=None, end_time_min=None, end_time_max=None, is_active=None, skip=None, top=None, custom_headers=None, raw=False, **operation_config): + """Lists all executions in a job agent. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param create_time_min: If specified, only job executions created at + or after the specified time are included. + :type create_time_min: datetime + :param create_time_max: If specified, only job executions created + before the specified time are included. + :type create_time_max: datetime + :param end_time_min: If specified, only job executions completed at or + after the specified time are included. + :type end_time_min: datetime + :param end_time_max: If specified, only job executions completed + before the specified time are included. + :type end_time_max: datetime + :param is_active: If specified, only active or only completed job + executions are included. + :type is_active: bool + :param skip: The number of elements in the collection to skip. + :type skip: int + :param top: The number of elements to return from the collection. + :type top: int + :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 JobExecution + :rtype: + ~azure.mgmt.sql.models.JobExecutionPaged[~azure.mgmt.sql.models.JobExecution] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_agent.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_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 = {} + if create_time_min is not None: + query_parameters['createTimeMin'] = self._serialize.query("create_time_min", create_time_min, 'iso-8601') + if create_time_max is not None: + query_parameters['createTimeMax'] = self._serialize.query("create_time_max", create_time_max, 'iso-8601') + if end_time_min is not None: + query_parameters['endTimeMin'] = self._serialize.query("end_time_min", end_time_min, 'iso-8601') + if end_time_max is not None: + query_parameters['endTimeMax'] = self._serialize.query("end_time_max", end_time_max, 'iso-8601') + if is_active is not None: + query_parameters['isActive'] = self._serialize.query("is_active", is_active, 'bool') + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + 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.JobExecutionPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_agent.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/executions'} + + def cancel( + self, resource_group_name, server_name, job_agent_name, job_name, job_execution_id, custom_headers=None, raw=False, **operation_config): + """Requests cancellation of a job execution. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param job_name: The name of the job. + :type job_name: str + :param job_execution_id: The id of the job execution to cancel. + :type job_execution_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: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.cancel.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str'), + 'jobExecutionId': self._serialize.url("job_execution_id", job_execution_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("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.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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/cancel'} + + + def _create_initial( + self, resource_group_name, server_name, job_agent_name, job_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'jobName': self._serialize.url("job_name", job_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.post(url, query_parameters) + response = self._client.send(request, header_parameters, 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('JobExecution', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create( + self, resource_group_name, server_name, job_agent_name, job_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Starts an elastic job execution. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param job_name: The name of the job to get. + :type job_name: str + :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 JobExecution or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.JobExecution] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.JobExecution]] + :raises: :class:`CloudError` + """ + raw_result = self._create_initial( + resource_group_name=resource_group_name, + server_name=server_name, + job_agent_name=job_agent_name, + job_name=job_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('JobExecution', 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) + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/start'} + + def list_by_job( + self, resource_group_name, server_name, job_agent_name, job_name, create_time_min=None, create_time_max=None, end_time_min=None, end_time_max=None, is_active=None, skip=None, top=None, custom_headers=None, raw=False, **operation_config): + """Lists a job's executions. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param job_name: The name of the job to get. + :type job_name: str + :param create_time_min: If specified, only job executions created at + or after the specified time are included. + :type create_time_min: datetime + :param create_time_max: If specified, only job executions created + before the specified time are included. + :type create_time_max: datetime + :param end_time_min: If specified, only job executions completed at or + after the specified time are included. + :type end_time_min: datetime + :param end_time_max: If specified, only job executions completed + before the specified time are included. + :type end_time_max: datetime + :param is_active: If specified, only active or only completed job + executions are included. + :type is_active: bool + :param skip: The number of elements in the collection to skip. + :type skip: int + :param top: The number of elements to return from the collection. + :type top: int + :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 JobExecution + :rtype: + ~azure.mgmt.sql.models.JobExecutionPaged[~azure.mgmt.sql.models.JobExecution] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_job.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'jobName': self._serialize.url("job_name", job_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 = {} + if create_time_min is not None: + query_parameters['createTimeMin'] = self._serialize.query("create_time_min", create_time_min, 'iso-8601') + if create_time_max is not None: + query_parameters['createTimeMax'] = self._serialize.query("create_time_max", create_time_max, 'iso-8601') + if end_time_min is not None: + query_parameters['endTimeMin'] = self._serialize.query("end_time_min", end_time_min, 'iso-8601') + if end_time_max is not None: + query_parameters['endTimeMax'] = self._serialize.query("end_time_max", end_time_max, 'iso-8601') + if is_active is not None: + query_parameters['isActive'] = self._serialize.query("is_active", is_active, 'bool') + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + 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.JobExecutionPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions'} + + def get( + self, resource_group_name, server_name, job_agent_name, job_name, job_execution_id, custom_headers=None, raw=False, **operation_config): + """Gets a job execution. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param job_name: The name of the job. + :type job_name: str + :param job_execution_id: The id of the job execution + :type job_execution_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: JobExecution or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.sql.models.JobExecution 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'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str'), + 'jobExecutionId': self._serialize.url("job_execution_id", job_execution_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("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('JobExecution', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}'} + + + def _create_or_update_initial( + self, resource_group_name, server_name, job_agent_name, job_name, job_execution_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str'), + 'jobExecutionId': self._serialize.url("job_execution_id", job_execution_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("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.put(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200, 201, 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('JobExecution', response) + if response.status_code == 201: + deserialized = self._deserialize('JobExecution', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, server_name, job_agent_name, job_name, job_execution_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updatess a job execution. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param job_name: The name of the job to get. + :type job_name: str + :param job_execution_id: The job execution id to create the job + execution under. + :type job_execution_id: str + :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 JobExecution or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.JobExecution] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.JobExecution]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + server_name=server_name, + job_agent_name=job_agent_name, + job_name=job_name, + job_execution_id=job_execution_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('JobExecution', 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) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}'} diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/job_step_executions_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/job_step_executions_operations.py new file mode 100644 index 000000000000..3a2c37310f40 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/job_step_executions_operations.py @@ -0,0 +1,229 @@ +# 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 JobStepExecutionsOperations(object): + """JobStepExecutionsOperations 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: The API version to use for the request. Constant value: "2017-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-03-01-preview" + + self.config = config + + def list_by_job_execution( + self, resource_group_name, server_name, job_agent_name, job_name, job_execution_id, create_time_min=None, create_time_max=None, end_time_min=None, end_time_max=None, is_active=None, skip=None, top=None, custom_headers=None, raw=False, **operation_config): + """Lists the step executions of a job execution. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param job_name: The name of the job to get. + :type job_name: str + :param job_execution_id: The id of the job execution + :type job_execution_id: str + :param create_time_min: If specified, only job executions created at + or after the specified time are included. + :type create_time_min: datetime + :param create_time_max: If specified, only job executions created + before the specified time are included. + :type create_time_max: datetime + :param end_time_min: If specified, only job executions completed at or + after the specified time are included. + :type end_time_min: datetime + :param end_time_max: If specified, only job executions completed + before the specified time are included. + :type end_time_max: datetime + :param is_active: If specified, only active or only completed job + executions are included. + :type is_active: bool + :param skip: The number of elements in the collection to skip. + :type skip: int + :param top: The number of elements to return from the collection. + :type top: int + :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 JobExecution + :rtype: + ~azure.mgmt.sql.models.JobExecutionPaged[~azure.mgmt.sql.models.JobExecution] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_job_execution.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str'), + 'jobExecutionId': self._serialize.url("job_execution_id", job_execution_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 = {} + if create_time_min is not None: + query_parameters['createTimeMin'] = self._serialize.query("create_time_min", create_time_min, 'iso-8601') + if create_time_max is not None: + query_parameters['createTimeMax'] = self._serialize.query("create_time_max", create_time_max, 'iso-8601') + if end_time_min is not None: + query_parameters['endTimeMin'] = self._serialize.query("end_time_min", end_time_min, 'iso-8601') + if end_time_max is not None: + query_parameters['endTimeMax'] = self._serialize.query("end_time_max", end_time_max, 'iso-8601') + if is_active is not None: + query_parameters['isActive'] = self._serialize.query("is_active", is_active, 'bool') + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + 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.JobExecutionPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_job_execution.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps'} + + def get( + self, resource_group_name, server_name, job_agent_name, job_name, job_execution_id, step_name, custom_headers=None, raw=False, **operation_config): + """Gets a step execution of a job execution. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param job_name: The name of the job to get. + :type job_name: str + :param job_execution_id: The unique id of the job execution + :type job_execution_id: str + :param step_name: The name of the step. + :type step_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: JobExecution or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.sql.models.JobExecution 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'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str'), + 'jobExecutionId': self._serialize.url("job_execution_id", job_execution_id, 'str'), + 'stepName': self._serialize.url("step_name", step_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('JobExecution', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps/{stepName}'} diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/job_steps_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/job_steps_operations.py new file mode 100644 index 000000000000..0cd2ba4bc13d --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/job_steps_operations.py @@ -0,0 +1,495 @@ +# 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 JobStepsOperations(object): + """JobStepsOperations 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: The API version to use for the request. Constant value: "2017-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-03-01-preview" + + self.config = config + + def list_by_version( + self, resource_group_name, server_name, job_agent_name, job_name, job_version, custom_headers=None, raw=False, **operation_config): + """Gets all job steps in the specified job version. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param job_name: The name of the job to get. + :type job_name: str + :param job_version: The version of the job to get. + :type job_version: int + :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 JobStep + :rtype: + ~azure.mgmt.sql.models.JobStepPaged[~azure.mgmt.sql.models.JobStep] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_version.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str'), + 'jobVersion': self._serialize.url("job_version", job_version, 'int'), + '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.JobStepPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.JobStepPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_version.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions/{jobVersion}/steps'} + + def get_by_version( + self, resource_group_name, server_name, job_agent_name, job_name, job_version, step_name, custom_headers=None, raw=False, **operation_config): + """Gets the specified version of a job step. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param job_name: The name of the job. + :type job_name: str + :param job_version: The version of the job to get. + :type job_version: int + :param step_name: The name of the job step. + :type step_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: JobStep or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.sql.models.JobStep or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_by_version.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str'), + 'jobVersion': self._serialize.url("job_version", job_version, 'int'), + 'stepName': self._serialize.url("step_name", step_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('JobStep', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_by_version.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions/{jobVersion}/steps/{stepName}'} + + def list_by_job( + self, resource_group_name, server_name, job_agent_name, job_name, custom_headers=None, raw=False, **operation_config): + """Gets all job steps for a job's current version. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param job_name: The name of the job to get. + :type job_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 JobStep + :rtype: + ~azure.mgmt.sql.models.JobStepPaged[~azure.mgmt.sql.models.JobStep] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_job.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'jobName': self._serialize.url("job_name", job_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.JobStepPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.JobStepPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps'} + + def get( + self, resource_group_name, server_name, job_agent_name, job_name, step_name, custom_headers=None, raw=False, **operation_config): + """Gets a job step in a job's current version. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param job_name: The name of the job. + :type job_name: str + :param step_name: The name of the job step. + :type step_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: JobStep or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.sql.models.JobStep 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'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str'), + 'stepName': self._serialize.url("step_name", step_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('JobStep', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps/{stepName}'} + + def create_or_update( + self, resource_group_name, server_name, job_agent_name, job_name, step_name, parameters, custom_headers=None, raw=False, **operation_config): + """Creates or updates a job step. This will implicitly create a new job + version. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param job_name: The name of the job. + :type job_name: str + :param step_name: The name of the job step. + :type step_name: str + :param parameters: The requested state of the job step. + :type parameters: ~azure.mgmt.sql.models.JobStep + :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: JobStep or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.sql.models.JobStep 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'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str'), + 'stepName': self._serialize.url("step_name", step_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, 'JobStep') + + # 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('JobStep', response) + if response.status_code == 201: + deserialized = self._deserialize('JobStep', 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.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps/{stepName}'} + + def delete( + self, resource_group_name, server_name, job_agent_name, job_name, step_name, custom_headers=None, raw=False, **operation_config): + """Deletes a job step. This will implicitly create a new job version. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param job_name: The name of the job. + :type job_name: str + :param step_name: The name of the job step to delete. + :type step_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'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str'), + 'stepName': self._serialize.url("step_name", step_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.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps/{stepName}'} diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/job_target_executions_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/job_target_executions_operations.py new file mode 100644 index 000000000000..3224d6ec2d87 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/job_target_executions_operations.py @@ -0,0 +1,350 @@ +# 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 JobTargetExecutionsOperations(object): + """JobTargetExecutionsOperations 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: The API version to use for the request. Constant value: "2017-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-03-01-preview" + + self.config = config + + def list_by_job_execution( + self, resource_group_name, server_name, job_agent_name, job_name, job_execution_id, create_time_min=None, create_time_max=None, end_time_min=None, end_time_max=None, is_active=None, skip=None, top=None, custom_headers=None, raw=False, **operation_config): + """Lists target executions for all steps of a job execution. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param job_name: The name of the job to get. + :type job_name: str + :param job_execution_id: The id of the job execution + :type job_execution_id: str + :param create_time_min: If specified, only job executions created at + or after the specified time are included. + :type create_time_min: datetime + :param create_time_max: If specified, only job executions created + before the specified time are included. + :type create_time_max: datetime + :param end_time_min: If specified, only job executions completed at or + after the specified time are included. + :type end_time_min: datetime + :param end_time_max: If specified, only job executions completed + before the specified time are included. + :type end_time_max: datetime + :param is_active: If specified, only active or only completed job + executions are included. + :type is_active: bool + :param skip: The number of elements in the collection to skip. + :type skip: int + :param top: The number of elements to return from the collection. + :type top: int + :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 JobExecution + :rtype: + ~azure.mgmt.sql.models.JobExecutionPaged[~azure.mgmt.sql.models.JobExecution] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_job_execution.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str'), + 'jobExecutionId': self._serialize.url("job_execution_id", job_execution_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 = {} + if create_time_min is not None: + query_parameters['createTimeMin'] = self._serialize.query("create_time_min", create_time_min, 'iso-8601') + if create_time_max is not None: + query_parameters['createTimeMax'] = self._serialize.query("create_time_max", create_time_max, 'iso-8601') + if end_time_min is not None: + query_parameters['endTimeMin'] = self._serialize.query("end_time_min", end_time_min, 'iso-8601') + if end_time_max is not None: + query_parameters['endTimeMax'] = self._serialize.query("end_time_max", end_time_max, 'iso-8601') + if is_active is not None: + query_parameters['isActive'] = self._serialize.query("is_active", is_active, 'bool') + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + 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.JobExecutionPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_job_execution.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/targets'} + + def list_by_step( + self, resource_group_name, server_name, job_agent_name, job_name, job_execution_id, step_name, create_time_min=None, create_time_max=None, end_time_min=None, end_time_max=None, is_active=None, skip=None, top=None, custom_headers=None, raw=False, **operation_config): + """Lists the target executions of a job step execution. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param job_name: The name of the job to get. + :type job_name: str + :param job_execution_id: The id of the job execution + :type job_execution_id: str + :param step_name: The name of the step. + :type step_name: str + :param create_time_min: If specified, only job executions created at + or after the specified time are included. + :type create_time_min: datetime + :param create_time_max: If specified, only job executions created + before the specified time are included. + :type create_time_max: datetime + :param end_time_min: If specified, only job executions completed at or + after the specified time are included. + :type end_time_min: datetime + :param end_time_max: If specified, only job executions completed + before the specified time are included. + :type end_time_max: datetime + :param is_active: If specified, only active or only completed job + executions are included. + :type is_active: bool + :param skip: The number of elements in the collection to skip. + :type skip: int + :param top: The number of elements to return from the collection. + :type top: int + :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 JobExecution + :rtype: + ~azure.mgmt.sql.models.JobExecutionPaged[~azure.mgmt.sql.models.JobExecution] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_step.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str'), + 'jobExecutionId': self._serialize.url("job_execution_id", job_execution_id, 'str'), + 'stepName': self._serialize.url("step_name", step_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 = {} + if create_time_min is not None: + query_parameters['createTimeMin'] = self._serialize.query("create_time_min", create_time_min, 'iso-8601') + if create_time_max is not None: + query_parameters['createTimeMax'] = self._serialize.query("create_time_max", create_time_max, 'iso-8601') + if end_time_min is not None: + query_parameters['endTimeMin'] = self._serialize.query("end_time_min", end_time_min, 'iso-8601') + if end_time_max is not None: + query_parameters['endTimeMax'] = self._serialize.query("end_time_max", end_time_max, 'iso-8601') + if is_active is not None: + query_parameters['isActive'] = self._serialize.query("is_active", is_active, 'bool') + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + 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.JobExecutionPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.JobExecutionPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_step.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps/{stepName}/targets'} + + def get( + self, resource_group_name, server_name, job_agent_name, job_name, job_execution_id, step_name, target_id, custom_headers=None, raw=False, **operation_config): + """Gets a target execution. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param job_name: The name of the job to get. + :type job_name: str + :param job_execution_id: The unique id of the job execution + :type job_execution_id: str + :param step_name: The name of the step. + :type step_name: str + :param target_id: The target id. + :type target_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: JobExecution or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.sql.models.JobExecution 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'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str'), + 'jobExecutionId': self._serialize.url("job_execution_id", job_execution_id, 'str'), + 'stepName': self._serialize.url("step_name", step_name, 'str'), + 'targetId': self._serialize.url("target_id", target_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("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('JobExecution', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps/{stepName}/targets/{targetId}'} diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/job_target_groups_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/job_target_groups_operations.py new file mode 100644 index 000000000000..0bf98a502cb8 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/job_target_groups_operations.py @@ -0,0 +1,326 @@ +# 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 JobTargetGroupsOperations(object): + """JobTargetGroupsOperations 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: The API version to use for the request. Constant value: "2017-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-03-01-preview" + + self.config = config + + def list_by_agent( + self, resource_group_name, server_name, job_agent_name, custom_headers=None, raw=False, **operation_config): + """Gets all target groups in an agent. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_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 JobTargetGroup + :rtype: + ~azure.mgmt.sql.models.JobTargetGroupPaged[~azure.mgmt.sql.models.JobTargetGroup] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_agent.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_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.JobTargetGroupPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.JobTargetGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_agent.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/targetGroups'} + + def get( + self, resource_group_name, server_name, job_agent_name, target_group_name, custom_headers=None, raw=False, **operation_config): + """Gets a target group. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param target_group_name: The name of the target group. + :type target_group_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: JobTargetGroup or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.sql.models.JobTargetGroup 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'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'targetGroupName': self._serialize.url("target_group_name", target_group_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('JobTargetGroup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/targetGroups/{targetGroupName}'} + + def create_or_update( + self, resource_group_name, server_name, job_agent_name, target_group_name, members, custom_headers=None, raw=False, **operation_config): + """Creates or updates a target group. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param target_group_name: The name of the target group. + :type target_group_name: str + :param members: Members of the target group. + :type members: list[~azure.mgmt.sql.models.JobTarget] + :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: JobTargetGroup or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.sql.models.JobTargetGroup or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + parameters = models.JobTargetGroup(members=members) + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'targetGroupName': self._serialize.url("target_group_name", target_group_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, 'JobTargetGroup') + + # 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('JobTargetGroup', response) + if response.status_code == 201: + deserialized = self._deserialize('JobTargetGroup', 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.Sql/servers/{serverName}/jobAgents/{jobAgentName}/targetGroups/{targetGroupName}'} + + def delete( + self, resource_group_name, server_name, job_agent_name, target_group_name, custom_headers=None, raw=False, **operation_config): + """Deletes a target group. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param target_group_name: The name of the target group. + :type target_group_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'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'targetGroupName': self._serialize.url("target_group_name", target_group_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.Sql/servers/{serverName}/jobAgents/{jobAgentName}/targetGroups/{targetGroupName}'} diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/job_versions_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/job_versions_operations.py new file mode 100644 index 000000000000..ec9e2ff23061 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/job_versions_operations.py @@ -0,0 +1,190 @@ +# 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 JobVersionsOperations(object): + """JobVersionsOperations 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: The API version to use for the request. Constant value: "2017-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-03-01-preview" + + self.config = config + + def list_by_job( + self, resource_group_name, server_name, job_agent_name, job_name, custom_headers=None, raw=False, **operation_config): + """Gets all versions of a job. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param job_name: The name of the job to get. + :type job_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 JobVersion + :rtype: + ~azure.mgmt.sql.models.JobVersionPaged[~azure.mgmt.sql.models.JobVersion] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_job.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'jobName': self._serialize.url("job_name", job_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.JobVersionPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.JobVersionPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions'} + + def get( + self, resource_group_name, server_name, job_agent_name, job_name, job_version, custom_headers=None, raw=False, **operation_config): + """Gets a job version. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param job_name: The name of the job. + :type job_name: str + :param job_version: The version of the job to get. + :type job_version: int + :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: JobVersion or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.sql.models.JobVersion 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'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'jobName': self._serialize.url("job_name", job_name, 'str'), + 'jobVersion': self._serialize.url("job_version", job_version, 'int'), + '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('JobVersion', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions/{jobVersion}'} diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/jobs_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/jobs_operations.py new file mode 100644 index 000000000000..042336e20941 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/jobs_operations.py @@ -0,0 +1,327 @@ +# 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 JobsOperations(object): + """JobsOperations 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: The API version to use for the request. Constant value: "2017-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-03-01-preview" + + self.config = config + + def list_by_agent( + self, resource_group_name, server_name, job_agent_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of jobs. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_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 Job + :rtype: ~azure.mgmt.sql.models.JobPaged[~azure.mgmt.sql.models.Job] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_agent.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_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.JobPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.JobPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_agent.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs'} + + def get( + self, resource_group_name, server_name, job_agent_name, job_name, custom_headers=None, raw=False, **operation_config): + """Gets a job. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param job_name: The name of the job to get. + :type job_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: Job or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.sql.models.Job 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'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'jobName': self._serialize.url("job_name", job_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('Job', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}'} + + def create_or_update( + self, resource_group_name, server_name, job_agent_name, job_name, description="", schedule=None, custom_headers=None, raw=False, **operation_config): + """Creates or updates a job. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param job_name: The name of the job to get. + :type job_name: str + :param description: User-defined description of the job. + :type description: str + :param schedule: Schedule properties of the job. + :type schedule: ~azure.mgmt.sql.models.JobSchedule + :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: Job or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.sql.models.Job or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + parameters = models.Job(description=description, schedule=schedule) + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'jobName': self._serialize.url("job_name", job_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, 'Job') + + # 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('Job', response) + if response.status_code == 201: + deserialized = self._deserialize('Job', 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.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}'} + + def delete( + self, resource_group_name, server_name, job_agent_name, job_name, custom_headers=None, raw=False, **operation_config): + """Deletes a job. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param job_agent_name: The name of the job agent. + :type job_agent_name: str + :param job_name: The name of the job to delete. + :type job_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'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'jobAgentName': self._serialize.url("job_agent_name", job_agent_name, 'str'), + 'jobName': self._serialize.url("job_name", job_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.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}'} diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/managed_databases_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/managed_databases_operations.py new file mode 100644 index 000000000000..d4d2bb29f2b5 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/managed_databases_operations.py @@ -0,0 +1,571 @@ +# 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 msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class ManagedDatabasesOperations(object): + """ManagedDatabasesOperations 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: The API version to use for the request. Constant value: "2017-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-03-01-preview" + + self.config = config + + + def _complete_restore_initial( + self, location_name, operation_id, last_backup_name, custom_headers=None, raw=False, **operation_config): + parameters = models.CompleteDatabaseRestoreDefinition(last_backup_name=last_backup_name) + + # Construct URL + url = self.complete_restore.metadata['url'] + path_format_arguments = { + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'operationId': self._serialize.url("operation_id", operation_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("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, 'CompleteDatabaseRestoreDefinition') + + # 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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def complete_restore( + self, location_name, operation_id, last_backup_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Completes the restore operation on a managed database. + + :param location_name: The name of the region where the resource is + located. + :type location_name: str + :param operation_id: Management operation id that this request tries + to complete. + :type operation_id: str + :param last_backup_name: The last backup name to apply + :type last_backup_name: str + :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 None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._complete_restore_initial( + location_name=location_name, + operation_id=operation_id, + last_backup_name=last_backup_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + 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) + complete_restore.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/managedDatabaseRestoreAzureAsyncOperation/{operationId}/completeRestore'} + + def list_by_instance( + self, resource_group_name, managed_instance_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of managed databases. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param managed_instance_name: The name of the managed instance. + :type managed_instance_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 ManagedDatabase + :rtype: + ~azure.mgmt.sql.models.ManagedDatabasePaged[~azure.mgmt.sql.models.ManagedDatabase] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_instance.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_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.ManagedDatabasePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ManagedDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_instance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases'} + + def get( + self, resource_group_name, managed_instance_name, database_name, custom_headers=None, raw=False, **operation_config): + """Gets a managed database. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param managed_instance_name: The name of the managed instance. + :type managed_instance_name: str + :param database_name: The name of the database. + :type database_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: ManagedDatabase or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.sql.models.ManagedDatabase 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'), + 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_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('ManagedDatabase', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}'} + + + def _create_or_update_initial( + self, resource_group_name, managed_instance_name, database_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_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, 'ManagedDatabase') + + # 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, 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('ManagedDatabase', response) + if response.status_code == 201: + deserialized = self._deserialize('ManagedDatabase', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, managed_instance_name, database_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates a new database or updates an existing database. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param managed_instance_name: The name of the managed instance. + :type managed_instance_name: str + :param database_name: The name of the database. + :type database_name: str + :param parameters: The requested database resource state. + :type parameters: ~azure.mgmt.sql.models.ManagedDatabase + :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 ManagedDatabase or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.ManagedDatabase] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.ManagedDatabase]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + managed_instance_name=managed_instance_name, + database_name=database_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ManagedDatabase', 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) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}'} + + + def _delete_initial( + self, resource_group_name, managed_instance_name, database_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_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, 202, 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 + + def delete( + self, resource_group_name, managed_instance_name, database_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes the managed database. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param managed_instance_name: The name of the managed instance. + :type managed_instance_name: str + :param database_name: The name of the database. + :type database_name: str + :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 None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + managed_instance_name=managed_instance_name, + database_name=database_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + 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) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}'} + + + def _update_initial( + self, resource_group_name, managed_instance_name, database_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_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, 'ManagedDatabaseUpdate') + + # Construct and send request + request = self._client.patch(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('ManagedDatabase', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, managed_instance_name, database_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Updates an existing database. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param managed_instance_name: The name of the managed instance. + :type managed_instance_name: str + :param database_name: The name of the database. + :type database_name: str + :param parameters: The requested database resource state. + :type parameters: ~azure.mgmt.sql.models.ManagedDatabaseUpdate + :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 ManagedDatabase or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.ManagedDatabase] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.ManagedDatabase]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + managed_instance_name=managed_instance_name, + database_name=database_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ManagedDatabase', 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) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}'} diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instances_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instances_operations.py new file mode 100644 index 000000000000..1bd0b6a0d60c --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/managed_instances_operations.py @@ -0,0 +1,527 @@ +# 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 msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class ManagedInstancesOperations(object): + """ManagedInstancesOperations 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: The API version to use for the request. Constant value: "2015-05-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-05-01-preview" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Gets a list of all managed instances in the subscription. + + :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 ManagedInstance + :rtype: + ~azure.mgmt.sql.models.ManagedInstancePaged[~azure.mgmt.sql.models.ManagedInstance] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.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("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.ManagedInstancePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ManagedInstancePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Sql/managedInstances'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of managed instances in a resource group. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_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 ManagedInstance + :rtype: + ~azure.mgmt.sql.models.ManagedInstancePaged[~azure.mgmt.sql.models.ManagedInstance] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_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.ManagedInstancePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ManagedInstancePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances'} + + def get( + self, resource_group_name, managed_instance_name, custom_headers=None, raw=False, **operation_config): + """Gets a managed instance. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param managed_instance_name: The name of the managed instance. + :type managed_instance_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: ManagedInstance or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.sql.models.ManagedInstance 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'), + 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_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('ManagedInstance', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}'} + + + def _create_or_update_initial( + self, resource_group_name, managed_instance_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_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, 'ManagedInstance') + + # 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, 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('ManagedInstance', response) + if response.status_code == 201: + deserialized = self._deserialize('ManagedInstance', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, managed_instance_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates a managed instance. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param managed_instance_name: The name of the managed instance. + :type managed_instance_name: str + :param parameters: The requested managed instance resource state. + :type parameters: ~azure.mgmt.sql.models.ManagedInstance + :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 ManagedInstance or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.ManagedInstance] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.ManagedInstance]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + managed_instance_name=managed_instance_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ManagedInstance', 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) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}'} + + + def _delete_initial( + self, resource_group_name, managed_instance_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_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, 202, 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 + + def delete( + self, resource_group_name, managed_instance_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a managed instance. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param managed_instance_name: The name of the managed instance. + :type managed_instance_name: str + :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 None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + managed_instance_name=managed_instance_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + 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) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}'} + + + def _update_initial( + self, resource_group_name, managed_instance_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_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, 'ManagedInstanceUpdate') + + # Construct and send request + request = self._client.patch(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('ManagedInstance', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, managed_instance_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Updates a managed instance. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param managed_instance_name: The name of the managed instance. + :type managed_instance_name: str + :param parameters: The requested managed instance resource state. + :type parameters: ~azure.mgmt.sql.models.ManagedInstanceUpdate + :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 ManagedInstance or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.ManagedInstance] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.sql.models.ManagedInstance]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + managed_instance_name=managed_instance_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ManagedInstance', 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) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}'} diff --git a/azure-mgmt-sql/azure/mgmt/sql/sql_management_client.py b/azure-mgmt-sql/azure/mgmt/sql/sql_management_client.py index 3d71bd1986b7..39a53dad15fb 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/sql_management_client.py +++ b/azure-mgmt-sql/azure/mgmt/sql/sql_management_client.py @@ -40,6 +40,7 @@ from .operations.database_automatic_tuning_operations import DatabaseAutomaticTuningOperations from .operations.encryption_protectors_operations import EncryptionProtectorsOperations from .operations.failover_groups_operations import FailoverGroupsOperations +from .operations.managed_instances_operations import ManagedInstancesOperations from .operations.operations import Operations from .operations.server_keys_operations import ServerKeysOperations from .operations.sync_agents_operations import SyncAgentsOperations @@ -47,14 +48,29 @@ from .operations.sync_members_operations import SyncMembersOperations from .operations.subscription_usages_operations import SubscriptionUsagesOperations from .operations.virtual_network_rules_operations import VirtualNetworkRulesOperations +from .operations.database_vulnerability_assessment_rule_baselines_operations import DatabaseVulnerabilityAssessmentRuleBaselinesOperations +from .operations.database_vulnerability_assessments_operations import DatabaseVulnerabilityAssessmentsOperations +from .operations.job_agents_operations import JobAgentsOperations +from .operations.job_credentials_operations import JobCredentialsOperations +from .operations.job_executions_operations import JobExecutionsOperations +from .operations.jobs_operations import JobsOperations +from .operations.job_step_executions_operations import JobStepExecutionsOperations +from .operations.job_steps_operations import JobStepsOperations +from .operations.job_target_executions_operations import JobTargetExecutionsOperations +from .operations.job_target_groups_operations import JobTargetGroupsOperations +from .operations.job_versions_operations import JobVersionsOperations from .operations.long_term_retention_backups_operations import LongTermRetentionBackupsOperations from .operations.backup_long_term_retention_policies_operations import BackupLongTermRetentionPoliciesOperations +from .operations.managed_databases_operations import ManagedDatabasesOperations from .operations.server_automatic_tuning_operations import ServerAutomaticTuningOperations from .operations.server_dns_aliases_operations import ServerDnsAliasesOperations from .operations.restore_points_operations import RestorePointsOperations from .operations.database_operations import DatabaseOperations from .operations.elastic_pool_operations import ElasticPoolOperations from .operations.capabilities_operations import CapabilitiesOperations +from .operations.database_vulnerability_assessment_scans_operations import DatabaseVulnerabilityAssessmentScansOperations +from .operations.instance_failover_groups_operations import InstanceFailoverGroupsOperations +from .operations.backup_short_term_retention_policies_operations import BackupShortTermRetentionPoliciesOperations from . import models @@ -151,6 +167,8 @@ class SqlManagementClient(SDKClient): :vartype encryption_protectors: azure.mgmt.sql.operations.EncryptionProtectorsOperations :ivar failover_groups: FailoverGroups operations :vartype failover_groups: azure.mgmt.sql.operations.FailoverGroupsOperations + :ivar managed_instances: ManagedInstances operations + :vartype managed_instances: azure.mgmt.sql.operations.ManagedInstancesOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.sql.operations.Operations :ivar server_keys: ServerKeys operations @@ -165,10 +183,34 @@ class SqlManagementClient(SDKClient): :vartype subscription_usages: azure.mgmt.sql.operations.SubscriptionUsagesOperations :ivar virtual_network_rules: VirtualNetworkRules operations :vartype virtual_network_rules: azure.mgmt.sql.operations.VirtualNetworkRulesOperations + :ivar database_vulnerability_assessment_rule_baselines: DatabaseVulnerabilityAssessmentRuleBaselines operations + :vartype database_vulnerability_assessment_rule_baselines: azure.mgmt.sql.operations.DatabaseVulnerabilityAssessmentRuleBaselinesOperations + :ivar database_vulnerability_assessments: DatabaseVulnerabilityAssessments operations + :vartype database_vulnerability_assessments: azure.mgmt.sql.operations.DatabaseVulnerabilityAssessmentsOperations + :ivar job_agents: JobAgents operations + :vartype job_agents: azure.mgmt.sql.operations.JobAgentsOperations + :ivar job_credentials: JobCredentials operations + :vartype job_credentials: azure.mgmt.sql.operations.JobCredentialsOperations + :ivar job_executions: JobExecutions operations + :vartype job_executions: azure.mgmt.sql.operations.JobExecutionsOperations + :ivar jobs: Jobs operations + :vartype jobs: azure.mgmt.sql.operations.JobsOperations + :ivar job_step_executions: JobStepExecutions operations + :vartype job_step_executions: azure.mgmt.sql.operations.JobStepExecutionsOperations + :ivar job_steps: JobSteps operations + :vartype job_steps: azure.mgmt.sql.operations.JobStepsOperations + :ivar job_target_executions: JobTargetExecutions operations + :vartype job_target_executions: azure.mgmt.sql.operations.JobTargetExecutionsOperations + :ivar job_target_groups: JobTargetGroups operations + :vartype job_target_groups: azure.mgmt.sql.operations.JobTargetGroupsOperations + :ivar job_versions: JobVersions operations + :vartype job_versions: azure.mgmt.sql.operations.JobVersionsOperations :ivar long_term_retention_backups: LongTermRetentionBackups operations :vartype long_term_retention_backups: azure.mgmt.sql.operations.LongTermRetentionBackupsOperations :ivar backup_long_term_retention_policies: BackupLongTermRetentionPolicies operations :vartype backup_long_term_retention_policies: azure.mgmt.sql.operations.BackupLongTermRetentionPoliciesOperations + :ivar managed_databases: ManagedDatabases operations + :vartype managed_databases: azure.mgmt.sql.operations.ManagedDatabasesOperations :ivar server_automatic_tuning: ServerAutomaticTuning operations :vartype server_automatic_tuning: azure.mgmt.sql.operations.ServerAutomaticTuningOperations :ivar server_dns_aliases: ServerDnsAliases operations @@ -181,6 +223,12 @@ class SqlManagementClient(SDKClient): :vartype elastic_pool_operations: azure.mgmt.sql.operations.ElasticPoolOperations :ivar capabilities: Capabilities operations :vartype capabilities: azure.mgmt.sql.operations.CapabilitiesOperations + :ivar database_vulnerability_assessment_scans: DatabaseVulnerabilityAssessmentScans operations + :vartype database_vulnerability_assessment_scans: azure.mgmt.sql.operations.DatabaseVulnerabilityAssessmentScansOperations + :ivar instance_failover_groups: InstanceFailoverGroups operations + :vartype instance_failover_groups: azure.mgmt.sql.operations.InstanceFailoverGroupsOperations + :ivar backup_short_term_retention_policies: BackupShortTermRetentionPolicies operations + :vartype backup_short_term_retention_policies: azure.mgmt.sql.operations.BackupShortTermRetentionPoliciesOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -255,6 +303,8 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.failover_groups = FailoverGroupsOperations( self._client, self.config, self._serialize, self._deserialize) + self.managed_instances = ManagedInstancesOperations( + self._client, self.config, self._serialize, self._deserialize) self.operations = Operations( self._client, self.config, self._serialize, self._deserialize) self.server_keys = ServerKeysOperations( @@ -269,10 +319,34 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.virtual_network_rules = VirtualNetworkRulesOperations( self._client, self.config, self._serialize, self._deserialize) + self.database_vulnerability_assessment_rule_baselines = DatabaseVulnerabilityAssessmentRuleBaselinesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.database_vulnerability_assessments = DatabaseVulnerabilityAssessmentsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.job_agents = JobAgentsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.job_credentials = JobCredentialsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.job_executions = JobExecutionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.jobs = JobsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.job_step_executions = JobStepExecutionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.job_steps = JobStepsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.job_target_executions = JobTargetExecutionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.job_target_groups = JobTargetGroupsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.job_versions = JobVersionsOperations( + self._client, self.config, self._serialize, self._deserialize) self.long_term_retention_backups = LongTermRetentionBackupsOperations( self._client, self.config, self._serialize, self._deserialize) self.backup_long_term_retention_policies = BackupLongTermRetentionPoliciesOperations( self._client, self.config, self._serialize, self._deserialize) + self.managed_databases = ManagedDatabasesOperations( + self._client, self.config, self._serialize, self._deserialize) self.server_automatic_tuning = ServerAutomaticTuningOperations( self._client, self.config, self._serialize, self._deserialize) self.server_dns_aliases = ServerDnsAliasesOperations( @@ -285,3 +359,9 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.capabilities = CapabilitiesOperations( self._client, self.config, self._serialize, self._deserialize) + self.database_vulnerability_assessment_scans = DatabaseVulnerabilityAssessmentScansOperations( + self._client, self.config, self._serialize, self._deserialize) + self.instance_failover_groups = InstanceFailoverGroupsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.backup_short_term_retention_policies = BackupShortTermRetentionPoliciesOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/azure-mgmt-sql/azure/mgmt/sql/version.py b/azure-mgmt-sql/azure/mgmt/sql/version.py index 3697d9b71739..413a68a462da 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/version.py +++ b/azure-mgmt-sql/azure/mgmt/sql/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.9.0" +VERSION = "0.9.1" diff --git a/azure-mgmt-sql/build.json b/azure-mgmt-sql/build.json deleted file mode 100644 index d2ddfa00c96b..000000000000 --- a/azure-mgmt-sql/build.json +++ /dev/null @@ -1,424 +0,0 @@ -{ - "autorest": [ - { - "resolvedInfo": null, - "packageMetadata": { - "name": "@microsoft.azure/autorest-core", - "version": "2.0.4216", - "engines": { - "node": ">=7.10.0" - }, - "dependencies": {}, - "optionalDependencies": {}, - "devDependencies": { - "@types/commonmark": "^0.27.0", - "@types/js-yaml": "^3.10.0", - "@types/jsonpath": "^0.1.29", - "@types/node": "^8.0.53", - "@types/source-map": "^0.5.0", - "@types/yargs": "^8.0.2", - "dts-generator": "^2.1.0", - "mocha": "^4.0.1", - "mocha-typescript": "^1.1.7", - "shx": "0.2.2", - "static-link": "^0.2.3", - "vscode-jsonrpc": "^3.3.1" - }, - "bundleDependencies": false, - "peerDependencies": {}, - "deprecated": false, - "_resolved": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core", - "_shasum": "f6b97454df552dfa54bd0df23f8309665be5fd4c", - "_shrinkwrap": null, - "bin": { - "autorest-core": "./dist/app.js", - "autorest-language-service": "dist/language-service/language-service.js" - }, - "_id": "@microsoft.azure/autorest-core@2.0.4216", - "_from": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core", - "_requested": { - "type": "directory", - "where": "/git-restapi", - "raw": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core", - "rawSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core", - "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core", - "fetchSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core" - }, - "_spec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core", - "_where": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core" - }, - "extensionManager": { - "installationPath": "/root/.autorest", - "sharedLock": { - "name": "/root/.autorest", - "exclusiveLock": { - "name": "_root_.autorest.exclusive-lock", - "options": { - "port": 45234, - "host": "2130706813", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" - }, - "busyLock": { - "name": "_root_.autorest.busy-lock", - "options": { - "port": 37199, - "host": "2130756895", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" - }, - "personalLock": { - "name": "_root_.autorest.8491.947977755912.personal-lock", - "options": { - "port": 47761, - "host": "2130719825", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.8491.947977755912.personal-lock:47761" - }, - "file": "/tmp/_root_.autorest.lock" - }, - "dotnetPath": "/root/.dotnet" - }, - "installationPath": "/root/.autorest" - }, - { - "resolvedInfo": null, - "packageMetadata": { - "name": "@microsoft.azure/autorest-core", - "version": "2.0.4227", - "engines": { - "node": ">=7.10.0" - }, - "dependencies": {}, - "optionalDependencies": {}, - "devDependencies": { - "@types/commonmark": "^0.27.0", - "@types/js-yaml": "^3.10.0", - "@types/jsonpath": "^0.1.29", - "@types/node": "^8.0.53", - "@types/source-map": "^0.5.0", - "@types/yargs": "^8.0.2", - "@types/z-schema": "^3.16.31", - "dts-generator": "^2.1.0", - "mocha": "^4.0.1", - "mocha-typescript": "^1.1.7", - "shx": "0.2.2", - "static-link": "^0.2.3", - "vscode-jsonrpc": "^3.3.1" - }, - "bundleDependencies": false, - "peerDependencies": {}, - "deprecated": false, - "_resolved": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4227/node_modules/@microsoft.azure/autorest-core", - "_shasum": "d29217f10a534571f15f28ad2556c308726c5e0e", - "_shrinkwrap": null, - "bin": { - "autorest-core": "./dist/app.js", - "autorest-language-service": "dist/language-service/language-service.js" - }, - "_id": "@microsoft.azure/autorest-core@2.0.4227", - "_from": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4227/node_modules/@microsoft.azure/autorest-core", - "_requested": { - "type": "directory", - "where": "/git-restapi", - "raw": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4227/node_modules/@microsoft.azure/autorest-core", - "rawSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4227/node_modules/@microsoft.azure/autorest-core", - "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4227/node_modules/@microsoft.azure/autorest-core", - "fetchSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4227/node_modules/@microsoft.azure/autorest-core" - }, - "_spec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4227/node_modules/@microsoft.azure/autorest-core", - "_where": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4227/node_modules/@microsoft.azure/autorest-core" - }, - "extensionManager": { - "installationPath": "/root/.autorest", - "sharedLock": { - "name": "/root/.autorest", - "exclusiveLock": { - "name": "_root_.autorest.exclusive-lock", - "options": { - "port": 45234, - "host": "2130706813", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" - }, - "busyLock": { - "name": "_root_.autorest.busy-lock", - "options": { - "port": 37199, - "host": "2130756895", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" - }, - "personalLock": { - "name": "_root_.autorest.8491.947977755912.personal-lock", - "options": { - "port": 47761, - "host": "2130719825", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.8491.947977755912.personal-lock:47761" - }, - "file": "/tmp/_root_.autorest.lock" - }, - "dotnetPath": "/root/.dotnet" - }, - "installationPath": "/root/.autorest" - }, - { - "resolvedInfo": null, - "packageMetadata": { - "name": "@microsoft.azure/autorest.modeler", - "version": "2.0.21", - "dependencies": { - "dotnet-2.0.0": "^1.3.2" - }, - "optionalDependencies": {}, - "devDependencies": { - "coffee-script": "^1.11.1", - "dotnet-sdk-2.0.0": "^1.1.1", - "gulp": "^3.9.1", - "gulp-filter": "^5.0.0", - "gulp-line-ending-corrector": "^1.0.1", - "iced-coffee-script": "^108.0.11", - "marked": "^0.3.6", - "marked-terminal": "^2.0.0", - "moment": "^2.17.1", - "run-sequence": "*", - "shx": "^0.2.2", - "through2-parallel": "^0.1.3", - "yargs": "^8.0.2", - "yarn": "^1.0.2" - }, - "bundleDependencies": false, - "peerDependencies": {}, - "deprecated": false, - "_resolved": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", - "_shasum": "3ce7d3939124b31830be15e5de99b9b7768afb90", - "_shrinkwrap": null, - "bin": null, - "_id": "@microsoft.azure/autorest.modeler@2.0.21", - "_from": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", - "_requested": { - "type": "directory", - "where": "/git-restapi", - "raw": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", - "rawSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", - "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", - "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler" - }, - "_spec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", - "_where": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler" - }, - "extensionManager": { - "installationPath": "/root/.autorest", - "sharedLock": { - "name": "/root/.autorest", - "exclusiveLock": { - "name": "_root_.autorest.exclusive-lock", - "options": { - "port": 45234, - "host": "2130706813", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" - }, - "busyLock": { - "name": "_root_.autorest.busy-lock", - "options": { - "port": 37199, - "host": "2130756895", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" - }, - "personalLock": { - "name": "_root_.autorest.8491.947977755912.personal-lock", - "options": { - "port": 47761, - "host": "2130719825", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.8491.947977755912.personal-lock:47761" - }, - "file": "/tmp/_root_.autorest.lock" - }, - "dotnetPath": "/root/.dotnet" - }, - "installationPath": "/root/.autorest" - }, - { - "resolvedInfo": null, - "packageMetadata": { - "name": "@microsoft.azure/autorest.modeler", - "version": "2.3.38", - "dependencies": { - "dotnet-2.0.0": "^1.4.4" - }, - "optionalDependencies": {}, - "devDependencies": { - "@microsoft.azure/autorest.testserver": "2.3.1", - "autorest": "^2.0.4201", - "coffee-script": "^1.11.1", - "dotnet-sdk-2.0.0": "^1.4.4", - "gulp": "^3.9.1", - "gulp-filter": "^5.0.0", - "gulp-line-ending-corrector": "^1.0.1", - "iced-coffee-script": "^108.0.11", - "marked": "^0.3.6", - "marked-terminal": "^2.0.0", - "moment": "^2.17.1", - "run-sequence": "*", - "shx": "^0.2.2", - "through2-parallel": "^0.1.3", - "yargs": "^8.0.2", - "yarn": "^1.0.2" - }, - "bundleDependencies": false, - "peerDependencies": {}, - "deprecated": false, - "_resolved": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", - "_shasum": "903bb77932e4ed1b8bc3b25cc39b167143494f6c", - "_shrinkwrap": null, - "bin": null, - "_id": "@microsoft.azure/autorest.modeler@2.3.38", - "_from": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", - "_requested": { - "type": "directory", - "where": "/git-restapi", - "raw": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", - "rawSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", - "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", - "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler" - }, - "_spec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", - "_where": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler" - }, - "extensionManager": { - "installationPath": "/root/.autorest", - "sharedLock": { - "name": "/root/.autorest", - "exclusiveLock": { - "name": "_root_.autorest.exclusive-lock", - "options": { - "port": 45234, - "host": "2130706813", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" - }, - "busyLock": { - "name": "_root_.autorest.busy-lock", - "options": { - "port": 37199, - "host": "2130756895", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" - }, - "personalLock": { - "name": "_root_.autorest.8491.947977755912.personal-lock", - "options": { - "port": 47761, - "host": "2130719825", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.8491.947977755912.personal-lock:47761" - }, - "file": "/tmp/_root_.autorest.lock" - }, - "dotnetPath": "/root/.dotnet" - }, - "installationPath": "/root/.autorest" - }, - { - "resolvedInfo": null, - "packageMetadata": { - "name": "@microsoft.azure/autorest.python", - "version": "2.1.28", - "dependencies": { - "dotnet-2.0.0": "^1.4.4" - }, - "optionalDependencies": {}, - "devDependencies": { - "@microsoft.azure/autorest.testserver": "^2.3.13", - "autorest": "^2.0.4203", - "coffee-script": "^1.11.1", - "dotnet-sdk-2.0.0": "^1.4.4", - "gulp": "^3.9.1", - "gulp-filter": "^5.0.0", - "gulp-line-ending-corrector": "^1.0.1", - "iced-coffee-script": "^108.0.11", - "marked": "^0.3.6", - "marked-terminal": "^2.0.0", - "moment": "^2.17.1", - "run-sequence": "*", - "shx": "^0.2.2", - "through2-parallel": "^0.1.3", - "yargs": "^8.0.2", - "yarn": "^1.0.2" - }, - "bundleDependencies": false, - "peerDependencies": {}, - "deprecated": false, - "_resolved": "/root/.autorest/@microsoft.azure_autorest.python@2.1.28/node_modules/@microsoft.azure/autorest.python", - "_shasum": "864acf40daff5c5e073f0e7da55597c3a7994469", - "_shrinkwrap": null, - "bin": null, - "_id": "@microsoft.azure/autorest.python@2.1.28", - "_from": "file:/root/.autorest/@microsoft.azure_autorest.python@2.1.28/node_modules/@microsoft.azure/autorest.python", - "_requested": { - "type": "directory", - "where": "/git-restapi", - "raw": "/root/.autorest/@microsoft.azure_autorest.python@2.1.28/node_modules/@microsoft.azure/autorest.python", - "rawSpec": "/root/.autorest/@microsoft.azure_autorest.python@2.1.28/node_modules/@microsoft.azure/autorest.python", - "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.python@2.1.28/node_modules/@microsoft.azure/autorest.python", - "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.python@2.1.28/node_modules/@microsoft.azure/autorest.python" - }, - "_spec": "/root/.autorest/@microsoft.azure_autorest.python@2.1.28/node_modules/@microsoft.azure/autorest.python", - "_where": "/root/.autorest/@microsoft.azure_autorest.python@2.1.28/node_modules/@microsoft.azure/autorest.python" - }, - "extensionManager": { - "installationPath": "/root/.autorest", - "sharedLock": { - "name": "/root/.autorest", - "exclusiveLock": { - "name": "_root_.autorest.exclusive-lock", - "options": { - "port": 45234, - "host": "2130706813", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" - }, - "busyLock": { - "name": "_root_.autorest.busy-lock", - "options": { - "port": 37199, - "host": "2130756895", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" - }, - "personalLock": { - "name": "_root_.autorest.8491.947977755912.personal-lock", - "options": { - "port": 47761, - "host": "2130719825", - "exclusive": true - }, - "pipe": "/tmp/pipe__root_.autorest.8491.947977755912.personal-lock:47761" - }, - "file": "/tmp/_root_.autorest.lock" - }, - "dotnetPath": "/root/.dotnet" - }, - "installationPath": "/root/.autorest" - } - ], - "autorest_bootstrap": {} -} \ No newline at end of file diff --git a/azure-mgmt-sql/sdk_packaging.toml b/azure-mgmt-sql/sdk_packaging.toml new file mode 100644 index 000000000000..e96df6059b96 --- /dev/null +++ b/azure-mgmt-sql/sdk_packaging.toml @@ -0,0 +1,5 @@ +[packaging] +package_name = "azure-mgmt-sql" +package_pprint_name = "SQL Management" +package_doc_id = "sql" +is_stable = false diff --git a/azure-mgmt-trafficmanager/HISTORY.rst b/azure-mgmt-trafficmanager/HISTORY.rst index 080ba80372a2..35693628de5e 100644 --- a/azure-mgmt-trafficmanager/HISTORY.rst +++ b/azure-mgmt-trafficmanager/HISTORY.rst @@ -3,6 +3,48 @@ Release History =============== +0.50.0 (2018-05-25) ++++++++++++++++++++ + +**Features** + +- Model Endpoint has a new parameter custom_headers +- Model MonitorConfig has a new parameter custom_headers +- Model MonitorConfig has a new parameter expected_status_code_ranges +- Model Profile has a new parameter traffic_view_enrollment_status +- Added operation group HeatMapOperations +- Client class can be used as a context manager to keep the underlying HTTP session open for performance + +**General Breaking changes** + +This version uses a next-generation code generator that *might* introduce breaking changes. + +- Model signatures now use only keyword-argument syntax. All positional arguments must be re-written as keyword-arguments. + To keep auto-completion in most cases, models are now generated for Python 2 and Python 3. Python 3 uses the "*" syntax for keyword-only arguments. +- Enum types now use the "str" mixin (class AzureEnum(str, Enum)) to improve the behavior when unrecognized enum values are encountered. + While this is not a breaking change, the distinctions are important, and are documented here: + https://docs.python.org/3/library/enum.html#others + At a glance: + + - "is" should not be used at all. + - "format" will return the string value, where "%s" string formatting will return `NameOfEnum.stringvalue`. Format syntax should be prefered. + +- New Long Running Operation: + + - Return type changes from `msrestazure.azure_operation.AzureOperationPoller` to `msrest.polling.LROPoller`. External API is the same. + - Return type is now **always** a `msrest.polling.LROPoller`, regardless of the optional parameters used. + - The behavior has changed when using `raw=True`. Instead of returning the initial call result as `ClientRawResponse`, + without polling, now this returns an LROPoller. After polling, the final resource will be returned as a `ClientRawResponse`. + - New `polling` parameter. The default behavior is `Polling=True` which will poll using ARM algorithm. When `Polling=False`, + the response of the initial call will be returned without polling. + - `polling` parameter accepts instances of subclasses of `msrest.polling.PollingMethod`. + - `add_done_callback` will no longer raise if called after polling is finished, but will instead execute the callback right away. + +**Bugfixes** + +- Compatibility of the sdist with wheel 0.31.0 + + 0.40.0 (2017-07-03) +++++++++++++++++++ diff --git a/azure-mgmt-trafficmanager/README.rst b/azure-mgmt-trafficmanager/README.rst index dbacee1b4596..947b56fed25d 100644 --- a/azure-mgmt-trafficmanager/README.rst +++ b/azure-mgmt-trafficmanager/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Traffic Manager Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. +This package has been tested with Python 2.7, 3.4, 3.5 and 3.6. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. @@ -37,8 +37,8 @@ Usage ===== For code examples, see `Traffic Manager -`__ -on readthedocs.org. +`__ +on docs.microsoft.com. Provide Feedback diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/__init__.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/__init__.py index c41ba9dd7f2c..16e7f531c796 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/__init__.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/__init__.py @@ -9,18 +9,46 @@ # regenerated. # -------------------------------------------------------------------------- -from .delete_operation_result import DeleteOperationResult -from .endpoint import Endpoint -from .check_traffic_manager_relative_dns_name_availability_parameters import CheckTrafficManagerRelativeDnsNameAvailabilityParameters -from .dns_config import DnsConfig -from .monitor_config import MonitorConfig -from .profile import Profile -from .traffic_manager_name_availability import TrafficManagerNameAvailability -from .region import Region -from .traffic_manager_geographic_hierarchy import TrafficManagerGeographicHierarchy -from .resource import Resource -from .tracked_resource import TrackedResource -from .proxy_resource import ProxyResource +try: + from .delete_operation_result_py3 import DeleteOperationResult + from .endpoint_properties_custom_headers_item_py3 import EndpointPropertiesCustomHeadersItem + from .heat_map_endpoint_py3 import HeatMapEndpoint + from .query_experience_py3 import QueryExperience + from .traffic_flow_py3 import TrafficFlow + from .heat_map_model_py3 import HeatMapModel + from .endpoint_py3 import Endpoint + from .check_traffic_manager_relative_dns_name_availability_parameters_py3 import CheckTrafficManagerRelativeDnsNameAvailabilityParameters + from .dns_config_py3 import DnsConfig + from .monitor_config_custom_headers_item_py3 import MonitorConfigCustomHeadersItem + from .monitor_config_expected_status_code_ranges_item_py3 import MonitorConfigExpectedStatusCodeRangesItem + from .monitor_config_py3 import MonitorConfig + from .profile_py3 import Profile + from .traffic_manager_name_availability_py3 import TrafficManagerNameAvailability + from .region_py3 import Region + from .traffic_manager_geographic_hierarchy_py3 import TrafficManagerGeographicHierarchy + from .resource_py3 import Resource + from .tracked_resource_py3 import TrackedResource + from .proxy_resource_py3 import ProxyResource +except (SyntaxError, ImportError): + from .delete_operation_result import DeleteOperationResult + from .endpoint_properties_custom_headers_item import EndpointPropertiesCustomHeadersItem + from .heat_map_endpoint import HeatMapEndpoint + from .query_experience import QueryExperience + from .traffic_flow import TrafficFlow + from .heat_map_model import HeatMapModel + from .endpoint import Endpoint + from .check_traffic_manager_relative_dns_name_availability_parameters import CheckTrafficManagerRelativeDnsNameAvailabilityParameters + from .dns_config import DnsConfig + from .monitor_config_custom_headers_item import MonitorConfigCustomHeadersItem + from .monitor_config_expected_status_code_ranges_item import MonitorConfigExpectedStatusCodeRangesItem + from .monitor_config import MonitorConfig + from .profile import Profile + from .traffic_manager_name_availability import TrafficManagerNameAvailability + from .region import Region + from .traffic_manager_geographic_hierarchy import TrafficManagerGeographicHierarchy + from .resource import Resource + from .tracked_resource import TrackedResource + from .proxy_resource import ProxyResource from .profile_paged import ProfilePaged from .traffic_manager_management_client_enums import ( EndpointStatus, @@ -29,13 +57,21 @@ MonitorProtocol, ProfileStatus, TrafficRoutingMethod, + TrafficViewEnrollmentStatus, ) __all__ = [ 'DeleteOperationResult', + 'EndpointPropertiesCustomHeadersItem', + 'HeatMapEndpoint', + 'QueryExperience', + 'TrafficFlow', + 'HeatMapModel', 'Endpoint', 'CheckTrafficManagerRelativeDnsNameAvailabilityParameters', 'DnsConfig', + 'MonitorConfigCustomHeadersItem', + 'MonitorConfigExpectedStatusCodeRangesItem', 'MonitorConfig', 'Profile', 'TrafficManagerNameAvailability', @@ -51,4 +87,5 @@ 'MonitorProtocol', 'ProfileStatus', 'TrafficRoutingMethod', + 'TrafficViewEnrollmentStatus', ] diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/check_traffic_manager_relative_dns_name_availability_parameters.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/check_traffic_manager_relative_dns_name_availability_parameters.py index 5f0f8a69e760..1e26b45eb788 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/check_traffic_manager_relative_dns_name_availability_parameters.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/check_traffic_manager_relative_dns_name_availability_parameters.py @@ -26,6 +26,7 @@ class CheckTrafficManagerRelativeDnsNameAvailabilityParameters(Model): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, name=None, type=None): - self.name = name - self.type = type + def __init__(self, **kwargs): + super(CheckTrafficManagerRelativeDnsNameAvailabilityParameters, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/check_traffic_manager_relative_dns_name_availability_parameters_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/check_traffic_manager_relative_dns_name_availability_parameters_py3.py new file mode 100644 index 000000000000..d8ef2dda2b26 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/check_traffic_manager_relative_dns_name_availability_parameters_py3.py @@ -0,0 +1,32 @@ +# 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 CheckTrafficManagerRelativeDnsNameAvailabilityParameters(Model): + """Parameters supplied to check Traffic Manager name operation. + + :param name: The name of the resource. + :type name: str + :param type: The type of the resource. + :type type: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, type: str=None, **kwargs) -> None: + super(CheckTrafficManagerRelativeDnsNameAvailabilityParameters, self).__init__(**kwargs) + self.name = name + self.type = type diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/delete_operation_result.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/delete_operation_result.py index b3f73ced1df7..2da7e41543e4 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/delete_operation_result.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/delete_operation_result.py @@ -30,5 +30,6 @@ class DeleteOperationResult(Model): 'operation_result': {'key': 'boolean', 'type': 'bool'}, } - def __init__(self): + def __init__(self, **kwargs): + super(DeleteOperationResult, self).__init__(**kwargs) self.operation_result = None diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/delete_operation_result_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/delete_operation_result_py3.py new file mode 100644 index 000000000000..5cc1960c6f7e --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/delete_operation_result_py3.py @@ -0,0 +1,35 @@ +# 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 DeleteOperationResult(Model): + """The result of the request or operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar operation_result: The result of the operation or request. + :vartype operation_result: bool + """ + + _validation = { + 'operation_result': {'readonly': True}, + } + + _attribute_map = { + 'operation_result': {'key': 'boolean', 'type': 'bool'}, + } + + def __init__(self, **kwargs) -> None: + super(DeleteOperationResult, self).__init__(**kwargs) + self.operation_result = None diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/dns_config.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/dns_config.py index 9091f3f250ed..501be4bfb276 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/dns_config.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/dns_config.py @@ -43,7 +43,8 @@ class DnsConfig(Model): 'ttl': {'key': 'ttl', 'type': 'long'}, } - def __init__(self, relative_name=None, ttl=None): - self.relative_name = relative_name + def __init__(self, **kwargs): + super(DnsConfig, self).__init__(**kwargs) + self.relative_name = kwargs.get('relative_name', None) self.fqdn = None - self.ttl = ttl + self.ttl = kwargs.get('ttl', None) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/dns_config_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/dns_config_py3.py new file mode 100644 index 000000000000..74a79966f868 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/dns_config_py3.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 msrest.serialization import Model + + +class DnsConfig(Model): + """Class containing DNS settings in a Traffic Manager profile. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param relative_name: The relative DNS name provided by this Traffic + Manager profile. This value is combined with the DNS domain name used by + Azure Traffic Manager to form the fully-qualified domain name (FQDN) of + the profile. + :type relative_name: str + :ivar fqdn: The fully-qualified domain name (FQDN) of the Traffic Manager + profile. This is formed from the concatenation of the RelativeName with + the DNS domain used by Azure Traffic Manager. + :vartype fqdn: str + :param ttl: The DNS Time-To-Live (TTL), in seconds. This informs the local + DNS resolvers and DNS clients how long to cache DNS responses provided by + this Traffic Manager profile. + :type ttl: long + """ + + _validation = { + 'fqdn': {'readonly': True}, + } + + _attribute_map = { + 'relative_name': {'key': 'relativeName', 'type': 'str'}, + 'fqdn': {'key': 'fqdn', 'type': 'str'}, + 'ttl': {'key': 'ttl', 'type': 'long'}, + } + + def __init__(self, *, relative_name: str=None, ttl: int=None, **kwargs) -> None: + super(DnsConfig, self).__init__(**kwargs) + self.relative_name = relative_name + self.fqdn = None + self.ttl = ttl diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint.py index d521b844fa53..0054ed7b772b 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint.py @@ -15,29 +15,26 @@ class Endpoint(ProxyResource): """Class representing a Traffic Manager endpoint. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - + :param id: Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- + :type id: str + :param name: The name of the resource + :type name: str + :param type: The type of the resource. Ex- Microsoft.Network/trafficmanagerProfiles. - :vartype type: str + :type type: str :param target_resource_id: The Azure Resource URI of the of the endpoint. Not applicable to endpoints of type 'ExternalEndpoints'. :type target_resource_id: str - :param target: The fully-qualified DNS name of the endpoint. Traffic - Manager returns this value in DNS responses to direct traffic to this - endpoint. + :param target: The fully-qualified DNS name or IP address of the endpoint. + Traffic Manager returns this value in DNS responses to direct traffic to + this endpoint. :type target: str :param endpoint_status: The status of the endpoint. If the endpoint is Enabled, it is probed for endpoint health and is included in the traffic routing method. Possible values include: 'Enabled', 'Disabled' - :type endpoint_status: str or :class:`EndpointStatus - ` + :type endpoint_status: str or + ~azure.mgmt.trafficmanager.models.EndpointStatus :param weight: The weight of this endpoint when using the 'Weighted' traffic routing method. Possible values are from 1 to 1000. :type weight: long @@ -53,8 +50,8 @@ class Endpoint(ProxyResource): :param endpoint_monitor_status: The monitoring status of the endpoint. Possible values include: 'CheckingEndpoint', 'Online', 'Degraded', 'Disabled', 'Inactive', 'Stopped' - :type endpoint_monitor_status: str or :class:`EndpointMonitorStatus - ` + :type endpoint_monitor_status: str or + ~azure.mgmt.trafficmanager.models.EndpointMonitorStatus :param min_child_endpoints: The minimum number of endpoints that must be available in the child profile in order for the parent profile to be considered available. Only applicable to endpoint of type @@ -63,15 +60,12 @@ class Endpoint(ProxyResource): :param geo_mapping: The list of countries/regions mapped to this endpoint when using the ‘Geographic’ traffic routing method. Please consult Traffic Manager Geographic documentation for a full list of accepted values. - :type geo_mapping: list of str + :type geo_mapping: list[str] + :param custom_headers: List of custom headers. + :type custom_headers: + list[~azure.mgmt.trafficmanager.models.EndpointPropertiesCustomHeadersItem] """ - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, @@ -85,16 +79,18 @@ class Endpoint(ProxyResource): 'endpoint_monitor_status': {'key': 'properties.endpointMonitorStatus', 'type': 'str'}, 'min_child_endpoints': {'key': 'properties.minChildEndpoints', 'type': 'long'}, 'geo_mapping': {'key': 'properties.geoMapping', 'type': '[str]'}, + 'custom_headers': {'key': 'properties.customHeaders', 'type': '[EndpointPropertiesCustomHeadersItem]'}, } - def __init__(self, target_resource_id=None, target=None, endpoint_status=None, weight=None, priority=None, endpoint_location=None, endpoint_monitor_status=None, min_child_endpoints=None, geo_mapping=None): - super(Endpoint, self).__init__() - self.target_resource_id = target_resource_id - self.target = target - self.endpoint_status = endpoint_status - self.weight = weight - self.priority = priority - self.endpoint_location = endpoint_location - self.endpoint_monitor_status = endpoint_monitor_status - self.min_child_endpoints = min_child_endpoints - self.geo_mapping = geo_mapping + def __init__(self, **kwargs): + super(Endpoint, self).__init__(**kwargs) + self.target_resource_id = kwargs.get('target_resource_id', None) + self.target = kwargs.get('target', None) + self.endpoint_status = kwargs.get('endpoint_status', None) + self.weight = kwargs.get('weight', None) + self.priority = kwargs.get('priority', None) + self.endpoint_location = kwargs.get('endpoint_location', None) + self.endpoint_monitor_status = kwargs.get('endpoint_monitor_status', None) + self.min_child_endpoints = kwargs.get('min_child_endpoints', None) + self.geo_mapping = kwargs.get('geo_mapping', None) + self.custom_headers = kwargs.get('custom_headers', None) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint_properties_custom_headers_item.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint_properties_custom_headers_item.py new file mode 100644 index 000000000000..ac5b3c43ed1a --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint_properties_custom_headers_item.py @@ -0,0 +1,32 @@ +# 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 EndpointPropertiesCustomHeadersItem(Model): + """Custom header name and value. + + :param name: Header name. + :type name: str + :param value: Header value. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EndpointPropertiesCustomHeadersItem, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint_properties_custom_headers_item_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint_properties_custom_headers_item_py3.py new file mode 100644 index 000000000000..d0c95f5ca25b --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint_properties_custom_headers_item_py3.py @@ -0,0 +1,32 @@ +# 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 EndpointPropertiesCustomHeadersItem(Model): + """Custom header name and value. + + :param name: Header name. + :type name: str + :param value: Header value. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: + super(EndpointPropertiesCustomHeadersItem, self).__init__(**kwargs) + self.name = name + self.value = value diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint_py3.py new file mode 100644 index 000000000000..367993bbf1c5 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint_py3.py @@ -0,0 +1,96 @@ +# 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 Endpoint(ProxyResource): + """Class representing a Traffic Manager endpoint. + + :param id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} + :type id: str + :param name: The name of the resource + :type name: str + :param type: The type of the resource. Ex- + Microsoft.Network/trafficmanagerProfiles. + :type type: str + :param target_resource_id: The Azure Resource URI of the of the endpoint. + Not applicable to endpoints of type 'ExternalEndpoints'. + :type target_resource_id: str + :param target: The fully-qualified DNS name or IP address of the endpoint. + Traffic Manager returns this value in DNS responses to direct traffic to + this endpoint. + :type target: str + :param endpoint_status: The status of the endpoint. If the endpoint is + Enabled, it is probed for endpoint health and is included in the traffic + routing method. Possible values include: 'Enabled', 'Disabled' + :type endpoint_status: str or + ~azure.mgmt.trafficmanager.models.EndpointStatus + :param weight: The weight of this endpoint when using the 'Weighted' + traffic routing method. Possible values are from 1 to 1000. + :type weight: long + :param priority: The priority of this endpoint when using the ‘Priority’ + traffic routing method. Possible values are from 1 to 1000, lower values + represent higher priority. This is an optional parameter. If specified, + it must be specified on all endpoints, and no two endpoints can share the + same priority value. + :type priority: long + :param endpoint_location: Specifies the location of the external or nested + endpoints when using the ‘Performance’ traffic routing method. + :type endpoint_location: str + :param endpoint_monitor_status: The monitoring status of the endpoint. + Possible values include: 'CheckingEndpoint', 'Online', 'Degraded', + 'Disabled', 'Inactive', 'Stopped' + :type endpoint_monitor_status: str or + ~azure.mgmt.trafficmanager.models.EndpointMonitorStatus + :param min_child_endpoints: The minimum number of endpoints that must be + available in the child profile in order for the parent profile to be + considered available. Only applicable to endpoint of type + 'NestedEndpoints'. + :type min_child_endpoints: long + :param geo_mapping: The list of countries/regions mapped to this endpoint + when using the ‘Geographic’ traffic routing method. Please consult Traffic + Manager Geographic documentation for a full list of accepted values. + :type geo_mapping: list[str] + :param custom_headers: List of custom headers. + :type custom_headers: + list[~azure.mgmt.trafficmanager.models.EndpointPropertiesCustomHeadersItem] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, + 'target': {'key': 'properties.target', 'type': 'str'}, + 'endpoint_status': {'key': 'properties.endpointStatus', 'type': 'str'}, + 'weight': {'key': 'properties.weight', 'type': 'long'}, + 'priority': {'key': 'properties.priority', 'type': 'long'}, + 'endpoint_location': {'key': 'properties.endpointLocation', 'type': 'str'}, + 'endpoint_monitor_status': {'key': 'properties.endpointMonitorStatus', 'type': 'str'}, + 'min_child_endpoints': {'key': 'properties.minChildEndpoints', 'type': 'long'}, + 'geo_mapping': {'key': 'properties.geoMapping', 'type': '[str]'}, + 'custom_headers': {'key': 'properties.customHeaders', 'type': '[EndpointPropertiesCustomHeadersItem]'}, + } + + def __init__(self, *, id: str=None, name: str=None, type: str=None, target_resource_id: str=None, target: str=None, endpoint_status=None, weight: int=None, priority: int=None, endpoint_location: str=None, endpoint_monitor_status=None, min_child_endpoints: int=None, geo_mapping=None, custom_headers=None, **kwargs) -> None: + super(Endpoint, self).__init__(id=id, name=name, type=type, **kwargs) + self.target_resource_id = target_resource_id + self.target = target + self.endpoint_status = endpoint_status + self.weight = weight + self.priority = priority + self.endpoint_location = endpoint_location + self.endpoint_monitor_status = endpoint_monitor_status + self.min_child_endpoints = min_child_endpoints + self.geo_mapping = geo_mapping + self.custom_headers = custom_headers diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/heat_map_endpoint.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/heat_map_endpoint.py new file mode 100644 index 000000000000..add3cf93b309 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/heat_map_endpoint.py @@ -0,0 +1,33 @@ +# 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 HeatMapEndpoint(Model): + """Class which is a sparse representation of a Traffic Manager endpoint. + + :param resource_id: The ARM Resource ID of this Traffic Manager endpoint. + :type resource_id: str + :param endpoint_id: A number uniquely identifying this endpoint in query + experiences. + :type endpoint_id: int + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'endpoint_id': {'key': 'endpointId', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(HeatMapEndpoint, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + self.endpoint_id = kwargs.get('endpoint_id', None) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/heat_map_endpoint_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/heat_map_endpoint_py3.py new file mode 100644 index 000000000000..eff0c0887005 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/heat_map_endpoint_py3.py @@ -0,0 +1,33 @@ +# 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 HeatMapEndpoint(Model): + """Class which is a sparse representation of a Traffic Manager endpoint. + + :param resource_id: The ARM Resource ID of this Traffic Manager endpoint. + :type resource_id: str + :param endpoint_id: A number uniquely identifying this endpoint in query + experiences. + :type endpoint_id: int + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'endpoint_id': {'key': 'endpointId', 'type': 'int'}, + } + + def __init__(self, *, resource_id: str=None, endpoint_id: int=None, **kwargs) -> None: + super(HeatMapEndpoint, self).__init__(**kwargs) + self.resource_id = resource_id + self.endpoint_id = endpoint_id diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/heat_map_model.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/heat_map_model.py new file mode 100644 index 000000000000..255716b0acd9 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/heat_map_model.py @@ -0,0 +1,54 @@ +# 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 HeatMapModel(ProxyResource): + """Class representing a Traffic Manager HeatMap. + + :param id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} + :type id: str + :param name: The name of the resource + :type name: str + :param type: The type of the resource. Ex- + Microsoft.Network/trafficmanagerProfiles. + :type type: str + :param start_time: The beginning of the time window for this HeatMap, + inclusive. + :type start_time: datetime + :param end_time: The ending of the time window for this HeatMap, + exclusive. + :type end_time: datetime + :param endpoints: The endpoints used in this HeatMap calculation. + :type endpoints: list[~azure.mgmt.trafficmanager.models.HeatMapEndpoint] + :param traffic_flows: The traffic flows produced in this HeatMap + calculation. + :type traffic_flows: list[~azure.mgmt.trafficmanager.models.TrafficFlow] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'endpoints': {'key': 'properties.endpoints', 'type': '[HeatMapEndpoint]'}, + 'traffic_flows': {'key': 'properties.trafficFlows', 'type': '[TrafficFlow]'}, + } + + def __init__(self, **kwargs): + super(HeatMapModel, self).__init__(**kwargs) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.endpoints = kwargs.get('endpoints', None) + self.traffic_flows = kwargs.get('traffic_flows', None) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/heat_map_model_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/heat_map_model_py3.py new file mode 100644 index 000000000000..c5a47ad4f537 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/heat_map_model_py3.py @@ -0,0 +1,54 @@ +# 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 HeatMapModel(ProxyResource): + """Class representing a Traffic Manager HeatMap. + + :param id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} + :type id: str + :param name: The name of the resource + :type name: str + :param type: The type of the resource. Ex- + Microsoft.Network/trafficmanagerProfiles. + :type type: str + :param start_time: The beginning of the time window for this HeatMap, + inclusive. + :type start_time: datetime + :param end_time: The ending of the time window for this HeatMap, + exclusive. + :type end_time: datetime + :param endpoints: The endpoints used in this HeatMap calculation. + :type endpoints: list[~azure.mgmt.trafficmanager.models.HeatMapEndpoint] + :param traffic_flows: The traffic flows produced in this HeatMap + calculation. + :type traffic_flows: list[~azure.mgmt.trafficmanager.models.TrafficFlow] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'endpoints': {'key': 'properties.endpoints', 'type': '[HeatMapEndpoint]'}, + 'traffic_flows': {'key': 'properties.trafficFlows', 'type': '[TrafficFlow]'}, + } + + def __init__(self, *, id: str=None, name: str=None, type: str=None, start_time=None, end_time=None, endpoints=None, traffic_flows=None, **kwargs) -> None: + super(HeatMapModel, self).__init__(id=id, name=name, type=type, **kwargs) + self.start_time = start_time + self.end_time = end_time + self.endpoints = endpoints + self.traffic_flows = traffic_flows diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config.py index 590518ae775c..829c3bc20ec4 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config.py @@ -18,12 +18,11 @@ class MonitorConfig(Model): :param profile_monitor_status: The profile-level monitoring status of the Traffic Manager profile. Possible values include: 'CheckingEndpoints', 'Online', 'Degraded', 'Disabled', 'Inactive' - :type profile_monitor_status: str or :class:`ProfileMonitorStatus - ` + :type profile_monitor_status: str or + ~azure.mgmt.trafficmanager.models.ProfileMonitorStatus :param protocol: The protocol (HTTP, HTTPS or TCP) used to probe for endpoint health. Possible values include: 'HTTP', 'HTTPS', 'TCP' - :type protocol: str or :class:`MonitorProtocol - ` + :type protocol: str or ~azure.mgmt.trafficmanager.models.MonitorProtocol :param port: The TCP port used to probe for endpoint health. :type port: long :param path: The path relative to the endpoint domain name used to probe @@ -41,6 +40,12 @@ class MonitorConfig(Model): health check that Traffic Manager tolerates before declaring an endpoint in this profile Degraded after the next failed health check. :type tolerated_number_of_failures: long + :param custom_headers: List of custom headers. + :type custom_headers: + list[~azure.mgmt.trafficmanager.models.MonitorConfigCustomHeadersItem] + :param expected_status_code_ranges: List of expected status code ranges. + :type expected_status_code_ranges: + list[~azure.mgmt.trafficmanager.models.MonitorConfigExpectedStatusCodeRangesItem] """ _attribute_map = { @@ -51,13 +56,18 @@ class MonitorConfig(Model): 'interval_in_seconds': {'key': 'intervalInSeconds', 'type': 'long'}, 'timeout_in_seconds': {'key': 'timeoutInSeconds', 'type': 'long'}, 'tolerated_number_of_failures': {'key': 'toleratedNumberOfFailures', 'type': 'long'}, + 'custom_headers': {'key': 'customHeaders', 'type': '[MonitorConfigCustomHeadersItem]'}, + 'expected_status_code_ranges': {'key': 'expectedStatusCodeRanges', 'type': '[MonitorConfigExpectedStatusCodeRangesItem]'}, } - def __init__(self, profile_monitor_status=None, protocol=None, port=None, path=None, interval_in_seconds=None, timeout_in_seconds=None, tolerated_number_of_failures=None): - self.profile_monitor_status = profile_monitor_status - self.protocol = protocol - self.port = port - self.path = path - self.interval_in_seconds = interval_in_seconds - self.timeout_in_seconds = timeout_in_seconds - self.tolerated_number_of_failures = tolerated_number_of_failures + def __init__(self, **kwargs): + super(MonitorConfig, self).__init__(**kwargs) + self.profile_monitor_status = kwargs.get('profile_monitor_status', None) + self.protocol = kwargs.get('protocol', None) + self.port = kwargs.get('port', None) + self.path = kwargs.get('path', None) + self.interval_in_seconds = kwargs.get('interval_in_seconds', None) + self.timeout_in_seconds = kwargs.get('timeout_in_seconds', None) + self.tolerated_number_of_failures = kwargs.get('tolerated_number_of_failures', None) + self.custom_headers = kwargs.get('custom_headers', None) + self.expected_status_code_ranges = kwargs.get('expected_status_code_ranges', None) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config_custom_headers_item.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config_custom_headers_item.py new file mode 100644 index 000000000000..e98f2ae02d49 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config_custom_headers_item.py @@ -0,0 +1,32 @@ +# 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 MonitorConfigCustomHeadersItem(Model): + """Custom header name and value. + + :param name: Header name. + :type name: str + :param value: Header value. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MonitorConfigCustomHeadersItem, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config_custom_headers_item_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config_custom_headers_item_py3.py new file mode 100644 index 000000000000..7d616409cf51 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config_custom_headers_item_py3.py @@ -0,0 +1,32 @@ +# 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 MonitorConfigCustomHeadersItem(Model): + """Custom header name and value. + + :param name: Header name. + :type name: str + :param value: Header value. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: + super(MonitorConfigCustomHeadersItem, self).__init__(**kwargs) + self.name = name + self.value = value diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config_expected_status_code_ranges_item.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config_expected_status_code_ranges_item.py new file mode 100644 index 000000000000..a5276d230394 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config_expected_status_code_ranges_item.py @@ -0,0 +1,32 @@ +# 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 MonitorConfigExpectedStatusCodeRangesItem(Model): + """Min and max value of a status code range. + + :param min: Min status code. + :type min: int + :param max: Max status code. + :type max: int + """ + + _attribute_map = { + 'min': {'key': 'min', 'type': 'int'}, + 'max': {'key': 'max', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(MonitorConfigExpectedStatusCodeRangesItem, self).__init__(**kwargs) + self.min = kwargs.get('min', None) + self.max = kwargs.get('max', None) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config_expected_status_code_ranges_item_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config_expected_status_code_ranges_item_py3.py new file mode 100644 index 000000000000..f999298028a8 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config_expected_status_code_ranges_item_py3.py @@ -0,0 +1,32 @@ +# 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 MonitorConfigExpectedStatusCodeRangesItem(Model): + """Min and max value of a status code range. + + :param min: Min status code. + :type min: int + :param max: Max status code. + :type max: int + """ + + _attribute_map = { + 'min': {'key': 'min', 'type': 'int'}, + 'max': {'key': 'max', 'type': 'int'}, + } + + def __init__(self, *, min: int=None, max: int=None, **kwargs) -> None: + super(MonitorConfigExpectedStatusCodeRangesItem, self).__init__(**kwargs) + self.min = min + self.max = max diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config_py3.py new file mode 100644 index 000000000000..ed9d0b39ff48 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config_py3.py @@ -0,0 +1,73 @@ +# 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 MonitorConfig(Model): + """Class containing endpoint monitoring settings in a Traffic Manager profile. + + :param profile_monitor_status: The profile-level monitoring status of the + Traffic Manager profile. Possible values include: 'CheckingEndpoints', + 'Online', 'Degraded', 'Disabled', 'Inactive' + :type profile_monitor_status: str or + ~azure.mgmt.trafficmanager.models.ProfileMonitorStatus + :param protocol: The protocol (HTTP, HTTPS or TCP) used to probe for + endpoint health. Possible values include: 'HTTP', 'HTTPS', 'TCP' + :type protocol: str or ~azure.mgmt.trafficmanager.models.MonitorProtocol + :param port: The TCP port used to probe for endpoint health. + :type port: long + :param path: The path relative to the endpoint domain name used to probe + for endpoint health. + :type path: str + :param interval_in_seconds: The monitor interval for endpoints in this + profile. This is the interval at which Traffic Manager will check the + health of each endpoint in this profile. + :type interval_in_seconds: long + :param timeout_in_seconds: The monitor timeout for endpoints in this + profile. This is the time that Traffic Manager allows endpoints in this + profile to response to the health check. + :type timeout_in_seconds: long + :param tolerated_number_of_failures: The number of consecutive failed + health check that Traffic Manager tolerates before declaring an endpoint + in this profile Degraded after the next failed health check. + :type tolerated_number_of_failures: long + :param custom_headers: List of custom headers. + :type custom_headers: + list[~azure.mgmt.trafficmanager.models.MonitorConfigCustomHeadersItem] + :param expected_status_code_ranges: List of expected status code ranges. + :type expected_status_code_ranges: + list[~azure.mgmt.trafficmanager.models.MonitorConfigExpectedStatusCodeRangesItem] + """ + + _attribute_map = { + 'profile_monitor_status': {'key': 'profileMonitorStatus', 'type': 'str'}, + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'long'}, + 'path': {'key': 'path', 'type': 'str'}, + 'interval_in_seconds': {'key': 'intervalInSeconds', 'type': 'long'}, + 'timeout_in_seconds': {'key': 'timeoutInSeconds', 'type': 'long'}, + 'tolerated_number_of_failures': {'key': 'toleratedNumberOfFailures', 'type': 'long'}, + 'custom_headers': {'key': 'customHeaders', 'type': '[MonitorConfigCustomHeadersItem]'}, + 'expected_status_code_ranges': {'key': 'expectedStatusCodeRanges', 'type': '[MonitorConfigExpectedStatusCodeRangesItem]'}, + } + + def __init__(self, *, profile_monitor_status=None, protocol=None, port: int=None, path: str=None, interval_in_seconds: int=None, timeout_in_seconds: int=None, tolerated_number_of_failures: int=None, custom_headers=None, expected_status_code_ranges=None, **kwargs) -> None: + super(MonitorConfig, self).__init__(**kwargs) + self.profile_monitor_status = profile_monitor_status + self.protocol = protocol + self.port = port + self.path = path + self.interval_in_seconds = interval_in_seconds + self.timeout_in_seconds = timeout_in_seconds + self.tolerated_number_of_failures = tolerated_number_of_failures + self.custom_headers = custom_headers + self.expected_status_code_ranges = expected_status_code_ranges diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/profile.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/profile.py index 61e38bbe7b4e..5c5831e70ccd 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/profile.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/profile.py @@ -15,48 +15,42 @@ class Profile(TrackedResource): """Class representing a Traffic Manager profile. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - + :param id: Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- + :type id: str + :param name: The name of the resource + :type name: str + :param type: The type of the resource. Ex- Microsoft.Network/trafficmanagerProfiles. - :vartype type: str + :type type: str :param tags: Resource tags. - :type tags: dict + :type tags: dict[str, str] :param location: The Azure Region where the resource lives :type location: str :param profile_status: The status of the Traffic Manager profile. Possible values include: 'Enabled', 'Disabled' - :type profile_status: str or :class:`ProfileStatus - ` + :type profile_status: str or + ~azure.mgmt.trafficmanager.models.ProfileStatus :param traffic_routing_method: The traffic routing method of the Traffic Manager profile. Possible values include: 'Performance', 'Priority', 'Weighted', 'Geographic' - :type traffic_routing_method: str or :class:`TrafficRoutingMethod - ` + :type traffic_routing_method: str or + ~azure.mgmt.trafficmanager.models.TrafficRoutingMethod :param dns_config: The DNS settings of the Traffic Manager profile. - :type dns_config: :class:`DnsConfig - ` + :type dns_config: ~azure.mgmt.trafficmanager.models.DnsConfig :param monitor_config: The endpoint monitoring settings of the Traffic Manager profile. - :type monitor_config: :class:`MonitorConfig - ` + :type monitor_config: ~azure.mgmt.trafficmanager.models.MonitorConfig :param endpoints: The list of endpoints in the Traffic Manager profile. - :type endpoints: list of :class:`Endpoint - ` + :type endpoints: list[~azure.mgmt.trafficmanager.models.Endpoint] + :param traffic_view_enrollment_status: Indicates whether Traffic View is + 'Enabled' or 'Disabled' for the Traffic Manager profile. Null, indicates + 'Disabled'. Enabling this feature will increase the cost of the Traffic + Manage profile. Possible values include: 'Enabled', 'Disabled' + :type traffic_view_enrollment_status: str or + ~azure.mgmt.trafficmanager.models.TrafficViewEnrollmentStatus """ - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, @@ -68,12 +62,14 @@ class Profile(TrackedResource): 'dns_config': {'key': 'properties.dnsConfig', 'type': 'DnsConfig'}, 'monitor_config': {'key': 'properties.monitorConfig', 'type': 'MonitorConfig'}, 'endpoints': {'key': 'properties.endpoints', 'type': '[Endpoint]'}, + 'traffic_view_enrollment_status': {'key': 'properties.trafficViewEnrollmentStatus', 'type': 'str'}, } - def __init__(self, tags=None, location=None, profile_status=None, traffic_routing_method=None, dns_config=None, monitor_config=None, endpoints=None): - super(Profile, self).__init__(tags=tags, location=location) - self.profile_status = profile_status - self.traffic_routing_method = traffic_routing_method - self.dns_config = dns_config - self.monitor_config = monitor_config - self.endpoints = endpoints + def __init__(self, **kwargs): + super(Profile, self).__init__(**kwargs) + self.profile_status = kwargs.get('profile_status', None) + self.traffic_routing_method = kwargs.get('traffic_routing_method', None) + self.dns_config = kwargs.get('dns_config', None) + self.monitor_config = kwargs.get('monitor_config', None) + self.endpoints = kwargs.get('endpoints', None) + self.traffic_view_enrollment_status = kwargs.get('traffic_view_enrollment_status', None) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/profile_paged.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/profile_paged.py index 3d62cd910cd0..04652ccd9400 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/profile_paged.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/profile_paged.py @@ -14,7 +14,7 @@ class ProfilePaged(Paged): """ - A paging container for iterating over a list of Profile object + A paging container for iterating over a list of :class:`Profile ` object """ _attribute_map = { diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/profile_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/profile_py3.py new file mode 100644 index 000000000000..f412c1e65900 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/profile_py3.py @@ -0,0 +1,75 @@ +# 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 .tracked_resource_py3 import TrackedResource + + +class Profile(TrackedResource): + """Class representing a Traffic Manager profile. + + :param id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} + :type id: str + :param name: The name of the resource + :type name: str + :param type: The type of the resource. Ex- + Microsoft.Network/trafficmanagerProfiles. + :type type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: The Azure Region where the resource lives + :type location: str + :param profile_status: The status of the Traffic Manager profile. Possible + values include: 'Enabled', 'Disabled' + :type profile_status: str or + ~azure.mgmt.trafficmanager.models.ProfileStatus + :param traffic_routing_method: The traffic routing method of the Traffic + Manager profile. Possible values include: 'Performance', 'Priority', + 'Weighted', 'Geographic' + :type traffic_routing_method: str or + ~azure.mgmt.trafficmanager.models.TrafficRoutingMethod + :param dns_config: The DNS settings of the Traffic Manager profile. + :type dns_config: ~azure.mgmt.trafficmanager.models.DnsConfig + :param monitor_config: The endpoint monitoring settings of the Traffic + Manager profile. + :type monitor_config: ~azure.mgmt.trafficmanager.models.MonitorConfig + :param endpoints: The list of endpoints in the Traffic Manager profile. + :type endpoints: list[~azure.mgmt.trafficmanager.models.Endpoint] + :param traffic_view_enrollment_status: Indicates whether Traffic View is + 'Enabled' or 'Disabled' for the Traffic Manager profile. Null, indicates + 'Disabled'. Enabling this feature will increase the cost of the Traffic + Manage profile. Possible values include: 'Enabled', 'Disabled' + :type traffic_view_enrollment_status: str or + ~azure.mgmt.trafficmanager.models.TrafficViewEnrollmentStatus + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'profile_status': {'key': 'properties.profileStatus', 'type': 'str'}, + 'traffic_routing_method': {'key': 'properties.trafficRoutingMethod', 'type': 'str'}, + 'dns_config': {'key': 'properties.dnsConfig', 'type': 'DnsConfig'}, + 'monitor_config': {'key': 'properties.monitorConfig', 'type': 'MonitorConfig'}, + 'endpoints': {'key': 'properties.endpoints', 'type': '[Endpoint]'}, + 'traffic_view_enrollment_status': {'key': 'properties.trafficViewEnrollmentStatus', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, name: str=None, type: str=None, tags=None, location: str=None, profile_status=None, traffic_routing_method=None, dns_config=None, monitor_config=None, endpoints=None, traffic_view_enrollment_status=None, **kwargs) -> None: + super(Profile, self).__init__(id=id, name=name, type=type, tags=tags, location=location, **kwargs) + self.profile_status = profile_status + self.traffic_routing_method = traffic_routing_method + self.dns_config = dns_config + self.monitor_config = monitor_config + self.endpoints = endpoints + self.traffic_view_enrollment_status = traffic_view_enrollment_status diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/proxy_resource.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/proxy_resource.py index 27d4c8b91fb5..6c28b1486d47 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/proxy_resource.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/proxy_resource.py @@ -16,24 +16,21 @@ class ProxyResource(Resource): """The resource model definition for a ARM proxy resource. It will have everything other than required location and tags. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - + :param id: Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- + :type id: str + :param name: The name of the resource + :type name: str + :param type: The type of the resource. Ex- Microsoft.Network/trafficmanagerProfiles. - :vartype type: str + :type type: 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'}, } - def __init__(self): - super(ProxyResource, self).__init__() + def __init__(self, **kwargs): + super(ProxyResource, self).__init__(**kwargs) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/proxy_resource_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/proxy_resource_py3.py new file mode 100644 index 000000000000..2ddbec4c9593 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/proxy_resource_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class ProxyResource(Resource): + """The resource model definition for a ARM proxy resource. It will have + everything other than required location and tags. + + :param id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} + :type id: str + :param name: The name of the resource + :type name: str + :param type: The type of the resource. Ex- + Microsoft.Network/trafficmanagerProfiles. + :type type: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, name: str=None, type: str=None, **kwargs) -> None: + super(ProxyResource, self).__init__(id=id, name=name, type=type, **kwargs) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/query_experience.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/query_experience.py new file mode 100644 index 000000000000..18f8555520a1 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/query_experience.py @@ -0,0 +1,46 @@ +# 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 QueryExperience(Model): + """Class representing a Traffic Manager HeatMap query experience properties. + + All required parameters must be populated in order to send to Azure. + + :param endpoint_id: Required. The id of the endpoint from the 'endpoints' + array which these queries were routed to. + :type endpoint_id: int + :param query_count: Required. The number of queries originating from this + location. + :type query_count: int + :param latency: The latency experienced by queries originating from this + location. + :type latency: float + """ + + _validation = { + 'endpoint_id': {'required': True}, + 'query_count': {'required': True}, + } + + _attribute_map = { + 'endpoint_id': {'key': 'endpointId', 'type': 'int'}, + 'query_count': {'key': 'queryCount', 'type': 'int'}, + 'latency': {'key': 'latency', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(QueryExperience, self).__init__(**kwargs) + self.endpoint_id = kwargs.get('endpoint_id', None) + self.query_count = kwargs.get('query_count', None) + self.latency = kwargs.get('latency', None) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/query_experience_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/query_experience_py3.py new file mode 100644 index 000000000000..84b7835b59a0 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/query_experience_py3.py @@ -0,0 +1,46 @@ +# 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 QueryExperience(Model): + """Class representing a Traffic Manager HeatMap query experience properties. + + All required parameters must be populated in order to send to Azure. + + :param endpoint_id: Required. The id of the endpoint from the 'endpoints' + array which these queries were routed to. + :type endpoint_id: int + :param query_count: Required. The number of queries originating from this + location. + :type query_count: int + :param latency: The latency experienced by queries originating from this + location. + :type latency: float + """ + + _validation = { + 'endpoint_id': {'required': True}, + 'query_count': {'required': True}, + } + + _attribute_map = { + 'endpoint_id': {'key': 'endpointId', 'type': 'int'}, + 'query_count': {'key': 'queryCount', 'type': 'int'}, + 'latency': {'key': 'latency', 'type': 'float'}, + } + + def __init__(self, *, endpoint_id: int, query_count: int, latency: float=None, **kwargs) -> None: + super(QueryExperience, self).__init__(**kwargs) + self.endpoint_id = endpoint_id + self.query_count = query_count + self.latency = latency diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/region.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/region.py index 3502d19c19e4..1e358a541bfd 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/region.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/region.py @@ -22,8 +22,7 @@ class Region(Model): :type name: str :param regions: The list of Regions grouped under this Region in the Geographic Hierarchy. - :type regions: list of :class:`Region - ` + :type regions: list[~azure.mgmt.trafficmanager.models.Region] """ _attribute_map = { @@ -32,7 +31,8 @@ class Region(Model): 'regions': {'key': 'regions', 'type': '[Region]'}, } - def __init__(self, code=None, name=None, regions=None): - self.code = code - self.name = name - self.regions = regions + def __init__(self, **kwargs): + super(Region, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.name = kwargs.get('name', None) + self.regions = kwargs.get('regions', None) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/region_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/region_py3.py new file mode 100644 index 000000000000..5899c229f365 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/region_py3.py @@ -0,0 +1,38 @@ +# 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 Region(Model): + """Class representing a region in the Geographic hierarchy used with the + Geographic traffic routing method. + + :param code: The code of the region + :type code: str + :param name: The name of the region + :type name: str + :param regions: The list of Regions grouped under this Region in the + Geographic Hierarchy. + :type regions: list[~azure.mgmt.trafficmanager.models.Region] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'regions': {'key': 'regions', 'type': '[Region]'}, + } + + def __init__(self, *, code: str=None, name: str=None, regions=None, **kwargs) -> None: + super(Region, self).__init__(**kwargs) + self.code = code + self.name = name + self.regions = regions diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/resource.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/resource.py index 502263321c4f..e69909f81f81 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/resource.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/resource.py @@ -15,32 +15,24 @@ class Resource(Model): """The core properties of ARM resources. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - + :param id: Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- + :type id: str + :param name: The name of the resource + :type name: str + :param type: The type of the resource. Ex- Microsoft.Network/trafficmanagerProfiles. - :vartype type: str + :type type: 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'}, } - def __init__(self): - self.id = None - self.name = None - self.type = None + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/resource_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/resource_py3.py new file mode 100644 index 000000000000..b3b3eb79ac2c --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/resource_py3.py @@ -0,0 +1,38 @@ +# 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 core properties of ARM resources. + + :param id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} + :type id: str + :param name: The name of the resource + :type name: str + :param type: The type of the resource. Ex- + Microsoft.Network/trafficmanagerProfiles. + :type type: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, name: str=None, type: str=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = id + self.name = name + self.type = type diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/tracked_resource.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/tracked_resource.py index 9969862c3a39..0400b888df53 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/tracked_resource.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/tracked_resource.py @@ -15,29 +15,20 @@ class TrackedResource(Resource): """The resource model definition for a ARM tracked top level resource. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - + :param id: Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- + :type id: str + :param name: The name of the resource + :type name: str + :param type: The type of the resource. Ex- Microsoft.Network/trafficmanagerProfiles. - :vartype type: str + :type type: str :param tags: Resource tags. - :type tags: dict + :type tags: dict[str, str] :param location: The Azure Region where the resource lives :type location: str """ - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, @@ -46,7 +37,7 @@ class TrackedResource(Resource): 'location': {'key': 'location', 'type': 'str'}, } - def __init__(self, tags=None, location=None): - super(TrackedResource, self).__init__() - self.tags = tags - self.location = location + def __init__(self, **kwargs): + super(TrackedResource, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.location = kwargs.get('location', None) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/tracked_resource_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/tracked_resource_py3.py new file mode 100644 index 000000000000..90ace2635832 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/tracked_resource_py3.py @@ -0,0 +1,43 @@ +# 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 TrackedResource(Resource): + """The resource model definition for a ARM tracked top level resource. + + :param id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} + :type id: str + :param name: The name of the resource + :type name: str + :param type: The type of the resource. Ex- + Microsoft.Network/trafficmanagerProfiles. + :type type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: The Azure Region where the resource lives + :type location: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, name: str=None, type: str=None, tags=None, location: str=None, **kwargs) -> None: + super(TrackedResource, self).__init__(id=id, name=name, type=type, **kwargs) + self.tags = tags + self.location = location diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_flow.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_flow.py new file mode 100644 index 000000000000..0c32b8cac1d3 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_flow.py @@ -0,0 +1,45 @@ +# 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 TrafficFlow(Model): + """Class representing a Traffic Manager HeatMap traffic flow properties. + + :param source_ip: The IP address that this query experience originated + from. + :type source_ip: str + :param latitude: The approximate latitude that these queries originated + from. + :type latitude: float + :param longitude: The approximate longitude that these queries originated + from. + :type longitude: float + :param query_experiences: The query experiences produced in this HeatMap + calculation. + :type query_experiences: + list[~azure.mgmt.trafficmanager.models.QueryExperience] + """ + + _attribute_map = { + 'source_ip': {'key': 'sourceIp', 'type': 'str'}, + 'latitude': {'key': 'latitude', 'type': 'float'}, + 'longitude': {'key': 'longitude', 'type': 'float'}, + 'query_experiences': {'key': 'queryExperiences', 'type': '[QueryExperience]'}, + } + + def __init__(self, **kwargs): + super(TrafficFlow, self).__init__(**kwargs) + self.source_ip = kwargs.get('source_ip', None) + self.latitude = kwargs.get('latitude', None) + self.longitude = kwargs.get('longitude', None) + self.query_experiences = kwargs.get('query_experiences', None) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_flow_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_flow_py3.py new file mode 100644 index 000000000000..28c396b417f5 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_flow_py3.py @@ -0,0 +1,45 @@ +# 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 TrafficFlow(Model): + """Class representing a Traffic Manager HeatMap traffic flow properties. + + :param source_ip: The IP address that this query experience originated + from. + :type source_ip: str + :param latitude: The approximate latitude that these queries originated + from. + :type latitude: float + :param longitude: The approximate longitude that these queries originated + from. + :type longitude: float + :param query_experiences: The query experiences produced in this HeatMap + calculation. + :type query_experiences: + list[~azure.mgmt.trafficmanager.models.QueryExperience] + """ + + _attribute_map = { + 'source_ip': {'key': 'sourceIp', 'type': 'str'}, + 'latitude': {'key': 'latitude', 'type': 'float'}, + 'longitude': {'key': 'longitude', 'type': 'float'}, + 'query_experiences': {'key': 'queryExperiences', 'type': '[QueryExperience]'}, + } + + def __init__(self, *, source_ip: str=None, latitude: float=None, longitude: float=None, query_experiences=None, **kwargs) -> None: + super(TrafficFlow, self).__init__(**kwargs) + self.source_ip = source_ip + self.latitude = latitude + self.longitude = longitude + self.query_experiences = query_experiences diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_geographic_hierarchy.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_geographic_hierarchy.py index b10c5fe5b23d..11d886c49f10 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_geographic_hierarchy.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_geographic_hierarchy.py @@ -16,29 +16,19 @@ class TrafficManagerGeographicHierarchy(ProxyResource): """Class representing the Geographic hierarchy used with the Geographic traffic routing method. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - + :param id: Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- + :type id: str + :param name: The name of the resource + :type name: str + :param type: The type of the resource. Ex- Microsoft.Network/trafficmanagerProfiles. - :vartype type: str + :type type: str :param geographic_hierarchy: The region at the root of the hierarchy from all the regions in the hierarchy can be retrieved. - :type geographic_hierarchy: :class:`Region - ` + :type geographic_hierarchy: ~azure.mgmt.trafficmanager.models.Region """ - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, @@ -46,6 +36,6 @@ class TrafficManagerGeographicHierarchy(ProxyResource): 'geographic_hierarchy': {'key': 'properties.geographicHierarchy', 'type': 'Region'}, } - def __init__(self, geographic_hierarchy=None): - super(TrafficManagerGeographicHierarchy, self).__init__() - self.geographic_hierarchy = geographic_hierarchy + def __init__(self, **kwargs): + super(TrafficManagerGeographicHierarchy, self).__init__(**kwargs) + self.geographic_hierarchy = kwargs.get('geographic_hierarchy', None) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_geographic_hierarchy_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_geographic_hierarchy_py3.py new file mode 100644 index 000000000000..142fffe5f15b --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_geographic_hierarchy_py3.py @@ -0,0 +1,41 @@ +# 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 TrafficManagerGeographicHierarchy(ProxyResource): + """Class representing the Geographic hierarchy used with the Geographic + traffic routing method. + + :param id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} + :type id: str + :param name: The name of the resource + :type name: str + :param type: The type of the resource. Ex- + Microsoft.Network/trafficmanagerProfiles. + :type type: str + :param geographic_hierarchy: The region at the root of the hierarchy from + all the regions in the hierarchy can be retrieved. + :type geographic_hierarchy: ~azure.mgmt.trafficmanager.models.Region + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'geographic_hierarchy': {'key': 'properties.geographicHierarchy', 'type': 'Region'}, + } + + def __init__(self, *, id: str=None, name: str=None, type: str=None, geographic_hierarchy=None, **kwargs) -> None: + super(TrafficManagerGeographicHierarchy, self).__init__(id=id, name=name, type=type, **kwargs) + self.geographic_hierarchy = geographic_hierarchy diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_management_client_enums.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_management_client_enums.py index 2cfc1756cb51..5efc19f68740 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_management_client_enums.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_management_client_enums.py @@ -12,13 +12,13 @@ from enum import Enum -class EndpointStatus(Enum): +class EndpointStatus(str, Enum): enabled = "Enabled" disabled = "Disabled" -class EndpointMonitorStatus(Enum): +class EndpointMonitorStatus(str, Enum): checking_endpoint = "CheckingEndpoint" online = "Online" @@ -28,7 +28,7 @@ class EndpointMonitorStatus(Enum): stopped = "Stopped" -class ProfileMonitorStatus(Enum): +class ProfileMonitorStatus(str, Enum): checking_endpoints = "CheckingEndpoints" online = "Online" @@ -37,22 +37,28 @@ class ProfileMonitorStatus(Enum): inactive = "Inactive" -class MonitorProtocol(Enum): +class MonitorProtocol(str, Enum): http = "HTTP" https = "HTTPS" tcp = "TCP" -class ProfileStatus(Enum): +class ProfileStatus(str, Enum): enabled = "Enabled" disabled = "Disabled" -class TrafficRoutingMethod(Enum): +class TrafficRoutingMethod(str, Enum): performance = "Performance" priority = "Priority" weighted = "Weighted" geographic = "Geographic" + + +class TrafficViewEnrollmentStatus(str, Enum): + + enabled = "Enabled" + disabled = "Disabled" diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_name_availability.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_name_availability.py index a38a59b5f873..f51a8785201b 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_name_availability.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_name_availability.py @@ -37,9 +37,10 @@ class TrafficManagerNameAvailability(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self, name=None, type=None, name_available=None, reason=None, message=None): - self.name = name - self.type = type - self.name_available = name_available - self.reason = reason - self.message = message + def __init__(self, **kwargs): + super(TrafficManagerNameAvailability, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + self.name_available = kwargs.get('name_available', None) + self.reason = kwargs.get('reason', None) + self.message = kwargs.get('message', None) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_name_availability_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_name_availability_py3.py new file mode 100644 index 000000000000..c28513705c95 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_name_availability_py3.py @@ -0,0 +1,46 @@ +# 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 TrafficManagerNameAvailability(Model): + """Class representing a Traffic Manager Name Availability response. + + :param name: The relative name. + :type name: str + :param type: Traffic Manager profile resource type. + :type type: str + :param name_available: Describes whether the relative name is available or + not. + :type name_available: bool + :param reason: The reason why the name is not available, when applicable. + :type reason: str + :param message: Descriptive message that explains why the name is not + available, when applicable. + :type message: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, type: str=None, name_available: bool=None, reason: str=None, message: str=None, **kwargs) -> None: + super(TrafficManagerNameAvailability, self).__init__(**kwargs) + self.name = name + self.type = type + self.name_available = name_available + self.reason = reason + self.message = message diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/__init__.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/__init__.py index 415f816221f4..d337ba0ff8a0 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/__init__.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/__init__.py @@ -12,9 +12,11 @@ from .endpoints_operations import EndpointsOperations from .profiles_operations import ProfilesOperations from .geographic_hierarchies_operations import GeographicHierarchiesOperations +from .heat_map_operations import HeatMapOperations __all__ = [ 'EndpointsOperations', 'ProfilesOperations', 'GeographicHierarchiesOperations', + 'HeatMapOperations', ] diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/endpoints_operations.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/endpoints_operations.py index b115a7edf4b5..f4edba686289 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/endpoints_operations.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/endpoints_operations.py @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -import uuid from .. import models @@ -22,16 +22,18 @@ class EndpointsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Client Api Version. Constant value: "2017-05-01". + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-03-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-05-01" + self.api_version = "2018-03-01" self.config = config @@ -52,20 +54,19 @@ def update( :type endpoint_name: str :param parameters: The Traffic Manager endpoint parameters supplied to the Update operation. - :type parameters: :class:`Endpoint - ` + :type parameters: ~azure.mgmt.trafficmanager.models.Endpoint :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`. - :rtype: :class:`Endpoint ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: Endpoint or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.trafficmanager.models.Endpoint or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/{endpointType}/{endpointName}' + url = self.update.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'profileName': self._serialize.url("profile_name", profile_name, 'str'), @@ -95,7 +96,7 @@ def update( # Construct and send request request = self._client.patch(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -112,6 +113,7 @@ def update( return client_raw_response return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/{endpointType}/{endpointName}'} def get( self, resource_group_name, profile_name, endpoint_type, endpoint_name, custom_headers=None, raw=False, **operation_config): @@ -131,13 +133,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`Endpoint ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: Endpoint or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.trafficmanager.models.Endpoint or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/{endpointType}/{endpointName}' + url = self.get.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'profileName': self._serialize.url("profile_name", profile_name, 'str'), @@ -163,7 +165,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -180,6 +182,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/{endpointType}/{endpointName}'} def create_or_update( self, resource_group_name, profile_name, endpoint_type, endpoint_name, parameters, custom_headers=None, raw=False, **operation_config): @@ -198,20 +201,19 @@ def create_or_update( :type endpoint_name: str :param parameters: The Traffic Manager endpoint parameters supplied to the CreateOrUpdate operation. - :type parameters: :class:`Endpoint - ` + :type parameters: ~azure.mgmt.trafficmanager.models.Endpoint :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`. - :rtype: :class:`Endpoint ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: Endpoint or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.trafficmanager.models.Endpoint or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/{endpointType}/{endpointName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'profileName': self._serialize.url("profile_name", profile_name, 'str'), @@ -241,7 +243,7 @@ def create_or_update( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -260,6 +262,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/{endpointType}/{endpointName}'} def delete( self, resource_group_name, profile_name, endpoint_type, endpoint_name, custom_headers=None, raw=False, **operation_config): @@ -281,14 +284,13 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`DeleteOperationResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: DeleteOperationResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.trafficmanager.models.DeleteOperationResult or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/{endpointType}/{endpointName}' + url = self.delete.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'profileName': self._serialize.url("profile_name", profile_name, 'str'), @@ -314,7 +316,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -331,3 +333,4 @@ def delete( return client_raw_response return deserialized + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/{endpointType}/{endpointName}'} diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/geographic_hierarchies_operations.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/geographic_hierarchies_operations.py index a08339703e51..48ec79c5cc6f 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/geographic_hierarchies_operations.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/geographic_hierarchies_operations.py @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -import uuid from .. import models @@ -22,16 +22,18 @@ class GeographicHierarchiesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Client Api Version. Constant value: "2017-05-01". + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-03-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-05-01" + self.api_version = "2018-03-01" self.config = config @@ -45,14 +47,15 @@ def get_default( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`TrafficManagerGeographicHierarchy - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: TrafficManagerGeographicHierarchy or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.trafficmanager.models.TrafficManagerGeographicHierarchy or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/providers/Microsoft.Network/trafficManagerGeographicHierarchies/default' + url = self.get_default.metadata['url'] # Construct parameters query_parameters = {} @@ -70,7 +73,7 @@ def get_default( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -87,3 +90,4 @@ def get_default( return client_raw_response return deserialized + get_default.metadata = {'url': '/providers/Microsoft.Network/trafficManagerGeographicHierarchies/default'} diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/heat_map_operations.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/heat_map_operations.py new file mode 100644 index 000000000000..0e2006fa2c8d --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/heat_map_operations.py @@ -0,0 +1,114 @@ +# 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 HeatMapOperations(object): + """HeatMapOperations 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 heat_map_type: The type of HeatMap for the Traffic Manager profile. Constant value: "default". + :ivar api_version: Client Api Version. Constant value: "2018-03-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.heat_map_type = "default" + self.api_version = "2018-03-01" + + self.config = config + + def get( + self, resource_group_name, profile_name, top_left=None, bot_right=None, custom_headers=None, raw=False, **operation_config): + """Gets latest heatmap for Traffic Manager profile. + + :param resource_group_name: The name of the resource group containing + the Traffic Manager endpoint. + :type resource_group_name: str + :param profile_name: The name of the Traffic Manager profile. + :type profile_name: str + :param top_left: The top left latitude,longitude pair of the + rectangular viewport to query for. + :type top_left: list[float] + :param bot_right: The bottom right latitude,longitude pair of the + rectangular viewport to query for. + :type bot_right: list[float] + :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: HeatMapModel or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.trafficmanager.models.HeatMapModel or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'profileName': self._serialize.url("profile_name", profile_name, 'str'), + 'heatMapType': self._serialize.url("self.heat_map_type", self.heat_map_type, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if top_left is not None: + query_parameters['topLeft'] = self._serialize.query("top_left", top_left, '[float]', div=',', max_items=2, min_items=2) + if bot_right is not None: + query_parameters['botRight'] = self._serialize.query("bot_right", bot_right, '[float]', div=',', max_items=2, min_items=2) + 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('HeatMapModel', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/heatMaps/{heatMapType}'} diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/profiles_operations.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/profiles_operations.py index eceeab07fe19..d7b1ab52f633 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/profiles_operations.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/profiles_operations.py @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -import uuid from .. import models @@ -22,16 +22,18 @@ class ProfilesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Client Api Version. Constant value: "2017-05-01". + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-03-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-05-01" + self.api_version = "2018-03-01" self.config = config @@ -48,16 +50,17 @@ def check_traffic_manager_relative_dns_name_availability( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`TrafficManagerNameAvailability - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: TrafficManagerNameAvailability or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.trafficmanager.models.TrafficManagerNameAvailability or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ parameters = models.CheckTrafficManagerRelativeDnsNameAvailabilityParameters(name=name, type=type) # Construct URL - url = '/providers/Microsoft.Network/checkTrafficManagerNameAvailability' + url = self.check_traffic_manager_relative_dns_name_availability.metadata['url'] # Construct parameters query_parameters = {} @@ -79,7 +82,7 @@ def check_traffic_manager_relative_dns_name_availability( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -96,6 +99,7 @@ def check_traffic_manager_relative_dns_name_availability( return client_raw_response return deserialized + check_traffic_manager_relative_dns_name_availability.metadata = {'url': '/providers/Microsoft.Network/checkTrafficManagerNameAvailability'} def list_by_resource_group( self, resource_group_name, custom_headers=None, raw=False, **operation_config): @@ -109,15 +113,16 @@ def list_by_resource_group( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`ProfilePaged - ` + :return: An iterator like instance of Profile + :rtype: + ~azure.mgmt.trafficmanager.models.ProfilePaged[~azure.mgmt.trafficmanager.models.Profile] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles' + url = self.list_by_resource_group.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -145,7 +150,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -163,6 +168,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles'} def list_by_subscription( self, custom_headers=None, raw=False, **operation_config): @@ -173,15 +179,16 @@ def list_by_subscription( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`ProfilePaged - ` + :return: An iterator like instance of Profile + :rtype: + ~azure.mgmt.trafficmanager.models.ProfilePaged[~azure.mgmt.trafficmanager.models.Profile] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.Network/trafficmanagerprofiles' + url = self.list_by_subscription.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -208,7 +215,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -226,6 +233,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/trafficmanagerprofiles'} def get( self, resource_group_name, profile_name, custom_headers=None, raw=False, **operation_config): @@ -241,13 +249,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`Profile ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: Profile or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.trafficmanager.models.Profile or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}' + url = self.get.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'profileName': self._serialize.url("profile_name", profile_name, 'str'), @@ -271,7 +279,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -288,6 +296,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}'} def create_or_update( self, resource_group_name, profile_name, parameters, custom_headers=None, raw=False, **operation_config): @@ -300,20 +309,19 @@ def create_or_update( :type profile_name: str :param parameters: The Traffic Manager profile parameters supplied to the CreateOrUpdate operation. - :type parameters: :class:`Profile - ` + :type parameters: ~azure.mgmt.trafficmanager.models.Profile :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`. - :rtype: :class:`Profile ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: Profile or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.trafficmanager.models.Profile or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'profileName': self._serialize.url("profile_name", profile_name, 'str'), @@ -341,7 +349,7 @@ def create_or_update( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -360,6 +368,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}'} def delete( self, resource_group_name, profile_name, custom_headers=None, raw=False, **operation_config): @@ -376,14 +385,13 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`DeleteOperationResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: DeleteOperationResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.trafficmanager.models.DeleteOperationResult or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}' + url = self.delete.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'profileName': self._serialize.url("profile_name", profile_name, 'str'), @@ -407,7 +415,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -424,6 +432,7 @@ def delete( return client_raw_response return deserialized + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}'} def update( self, resource_group_name, profile_name, parameters, custom_headers=None, raw=False, **operation_config): @@ -436,20 +445,19 @@ def update( :type profile_name: str :param parameters: The Traffic Manager profile parameters supplied to the Update operation. - :type parameters: :class:`Profile - ` + :type parameters: ~azure.mgmt.trafficmanager.models.Profile :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`. - :rtype: :class:`Profile ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: Profile or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.trafficmanager.models.Profile or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}' + url = self.update.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'profileName': self._serialize.url("profile_name", profile_name, 'str'), @@ -477,7 +485,7 @@ def update( # Construct and send request request = self._client.patch(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -494,3 +502,4 @@ def update( return client_raw_response return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}'} diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/traffic_manager_management_client.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/traffic_manager_management_client.py index 4fc420ca3bdf..5982206b29ae 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/traffic_manager_management_client.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/traffic_manager_management_client.py @@ -9,13 +9,14 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import ServiceClient +from msrest.service_client import SDKClient from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION from .operations.endpoints_operations import EndpointsOperations from .operations.profiles_operations import ProfilesOperations from .operations.geographic_hierarchies_operations import GeographicHierarchiesOperations +from .operations.heat_map_operations import HeatMapOperations from . import models @@ -41,21 +42,19 @@ def __init__( raise ValueError("Parameter 'credentials' must not be None.") if subscription_id is None: raise ValueError("Parameter 'subscription_id' must not be None.") - if not isinstance(subscription_id, str): - raise TypeError("Parameter 'subscription_id' must be str.") if not base_url: base_url = 'https://management.azure.com' super(TrafficManagerManagementClientConfiguration, self).__init__(base_url) - self.add_user_agent('trafficmanagermanagementclient/{}'.format(VERSION)) + self.add_user_agent('azure-mgmt-trafficmanager/{}'.format(VERSION)) self.add_user_agent('Azure-SDK-For-Python') self.credentials = credentials self.subscription_id = subscription_id -class TrafficManagerManagementClient(object): +class TrafficManagerManagementClient(SDKClient): """TrafficManagerManagementClient :ivar config: Configuration for client. @@ -67,6 +66,8 @@ class TrafficManagerManagementClient(object): :vartype profiles: azure.mgmt.trafficmanager.operations.ProfilesOperations :ivar geographic_hierarchies: GeographicHierarchies operations :vartype geographic_hierarchies: azure.mgmt.trafficmanager.operations.GeographicHierarchiesOperations + :ivar heat_map: HeatMap operations + :vartype heat_map: azure.mgmt.trafficmanager.operations.HeatMapOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -82,10 +83,10 @@ def __init__( self, credentials, subscription_id, base_url=None): self.config = TrafficManagerManagementClientConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) + super(TrafficManagerManagementClient, 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 = '2017-05-01' + self.api_version = '2018-03-01' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) @@ -95,3 +96,5 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.geographic_hierarchies = GeographicHierarchiesOperations( self._client, self.config, self._serialize, self._deserialize) + self.heat_map = HeatMapOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/version.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/version.py index 57866fdf17d0..1002e003856c 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/version.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.40.0" +VERSION = "0.50.0" diff --git a/azure-mgmt-trafficmanager/build.json b/azure-mgmt-trafficmanager/build.json deleted file mode 100644 index f1f715d8363e..000000000000 --- a/azure-mgmt-trafficmanager/build.json +++ /dev/null @@ -1 +0,0 @@ -{"autorest": "1.1.0", "date": "2017-06-30T18:58:00Z", "version": ""} \ No newline at end of file diff --git a/azure-mgmt-trafficmanager/sdk_packaging.toml b/azure-mgmt-trafficmanager/sdk_packaging.toml new file mode 100644 index 000000000000..95a3d39ca5db --- /dev/null +++ b/azure-mgmt-trafficmanager/sdk_packaging.toml @@ -0,0 +1,5 @@ +[packaging] +package_name = "azure-mgmt-trafficmanager" +package_pprint_name = "Traffic Manager" +package_doc_id = "traffic-manager" +is_stable = false diff --git a/azure-mgmt-trafficmanager/setup.py b/azure-mgmt-trafficmanager/setup.py index 9eed435aa049..c126f5565201 100644 --- a/azure-mgmt-trafficmanager/setup.py +++ b/azure-mgmt-trafficmanager/setup.py @@ -61,7 +61,7 @@ long_description=readme + '\n\n' + history, license='MIT License', author='Microsoft Corporation', - author_email='ptvshelp@microsoft.com', + author_email='azpysdkhelp@microsoft.com', url='https://github.com/Azure/azure-sdk-for-python', classifiers=[ 'Development Status :: 4 - Beta', @@ -69,17 +69,16 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'License :: OSI Approved :: MIT License', ], zip_safe=False, - packages=find_packages(), + packages=find_packages(exclude=["tests"]), install_requires=[ - 'msrestazure~=0.4.8', - 'azure-common~=1.1.6', + 'msrestazure>=0.4.27,<2.0.0', + 'azure-common~=1.1', ], cmdclass=cmdclass ) diff --git a/azure-sdk-tools/changelog_generics.rst b/azure-sdk-tools/changelog_generics.rst new file mode 100644 index 000000000000..f0374878e1ac --- /dev/null +++ b/azure-sdk-tools/changelog_generics.rst @@ -0,0 +1,38 @@ +Autorest context manager + +**Features** + +- Client class can be used as a context manager to keep the underlying HTTP session open for performance + +Autorest 3.x + +**General Breaking changes** + +This version uses a next-generation code generator that *might* introduce breaking changes. + +- Model signatures now use only keyword-argument syntax. All positional arguments must be re-written as keyword-arguments. + To keep auto-completion in most cases, models are now generated for Python 2 and Python 3. Python 3 uses the "*" syntax for keyword-only arguments. +- Enum types now use the "str" mixin (class AzureEnum(str, Enum)) to improve the behavior when unrecognized enum values are encountered. + While this is not a breaking change, the distinctions are important, and are documented here: + https://docs.python.org/3/library/enum.html#others + At a glance: + + - "is" should not be used at all. + - "format" will return the string value, where "%s" string formatting will return `NameOfEnum.stringvalue`. Format syntax should be prefered. + +- New Long Running Operation: + + - Return type changes from `msrestazure.azure_operation.AzureOperationPoller` to `msrest.polling.LROPoller`. External API is the same. + - Return type is now **always** a `msrest.polling.LROPoller`, regardless of the optional parameters used. + - The behavior has changed when using `raw=True`. Instead of returning the initial call result as `ClientRawResponse`, + without polling, now this returns an LROPoller. After polling, the final resource will be returned as a `ClientRawResponse`. + - New `polling` parameter. The default behavior is `Polling=True` which will poll using ARM algorithm. When `Polling=False`, + the response of the initial call will be returned without polling. + - `polling` parameter accepts instances of subclasses of `msrest.polling.PollingMethod`. + - `add_done_callback` will no longer raise if called after polling is finished, but will instead execute the callback right away. + +Misc + +**Bugfixes** + +- Compatibility of the sdist with wheel 0.31.0 \ No newline at end of file diff --git a/azure-sdk-testutils/devtools_testutils/__init__.py b/azure-sdk-tools/devtools_testutils/__init__.py similarity index 100% rename from azure-sdk-testutils/devtools_testutils/__init__.py rename to azure-sdk-tools/devtools_testutils/__init__.py diff --git a/azure-sdk-testutils/devtools_testutils/config.py b/azure-sdk-tools/devtools_testutils/config.py similarity index 100% rename from azure-sdk-testutils/devtools_testutils/config.py rename to azure-sdk-tools/devtools_testutils/config.py diff --git a/azure-sdk-testutils/devtools_testutils/mgmt_settings_fake.py b/azure-sdk-tools/devtools_testutils/mgmt_settings_fake.py similarity index 100% rename from azure-sdk-testutils/devtools_testutils/mgmt_settings_fake.py rename to azure-sdk-tools/devtools_testutils/mgmt_settings_fake.py diff --git a/azure-sdk-testutils/devtools_testutils/mgmt_testcase.py b/azure-sdk-tools/devtools_testutils/mgmt_testcase.py similarity index 100% rename from azure-sdk-testutils/devtools_testutils/mgmt_testcase.py rename to azure-sdk-tools/devtools_testutils/mgmt_testcase.py diff --git a/azure-sdk-testutils/devtools_testutils/resource_testcase.py b/azure-sdk-tools/devtools_testutils/resource_testcase.py similarity index 100% rename from azure-sdk-testutils/devtools_testutils/resource_testcase.py rename to azure-sdk-tools/devtools_testutils/resource_testcase.py diff --git a/azure-sdk-testutils/devtools_testutils/setup.py b/azure-sdk-tools/devtools_testutils/setup.py similarity index 100% rename from azure-sdk-testutils/devtools_testutils/setup.py rename to azure-sdk-tools/devtools_testutils/setup.py diff --git a/azure-sdk-testutils/devtools_testutils/storage_testcase.py b/azure-sdk-tools/devtools_testutils/storage_testcase.py similarity index 100% rename from azure-sdk-testutils/devtools_testutils/storage_testcase.py rename to azure-sdk-tools/devtools_testutils/storage_testcase.py diff --git a/azure-sdk-tools/packaging_requirements.txt b/azure-sdk-tools/packaging_requirements.txt new file mode 100644 index 000000000000..8e9429c459e0 --- /dev/null +++ b/azure-sdk-tools/packaging_requirements.txt @@ -0,0 +1,5 @@ +packaging +wheel +Jinja2 +pytoml +json-delta>=2.0 \ No newline at end of file diff --git a/azure-sdk-tools/packaging_tools/__init__.py b/azure-sdk-tools/packaging_tools/__init__.py new file mode 100644 index 000000000000..ab7099952f52 --- /dev/null +++ b/azure-sdk-tools/packaging_tools/__init__.py @@ -0,0 +1,62 @@ +import logging +from pathlib import Path +from typing import Dict, Any + +from jinja2 import Template, PackageLoader, Environment +from .conf import read_conf, build_default_conf, CONF_NAME + +_LOGGER = logging.getLogger(__name__) + +_CWD = Path(__file__).resolve().parent +_TEMPLATE_PATH = _CWD / "template" + +def build_config(config : Dict[str, Any]) -> Dict[str, str]: + """Will build the actual config for Jinja2, based on SDK config. + """ + result = config.copy() + # Manage the classifier stable/beta + is_stable = result.pop("is_stable", False) + if is_stable: + result["classifier"] = "Development Status :: 5 - Production/Stable" + else: + result["classifier"] = "Development Status :: 4 - Beta" + # Manage the nspkg + package_name = result["package_name"] + result["package_nspkg"] = package_name[:package_name.rindex('-')]+"-nspkg" + + # Return result + return result + +def build_packaging(package_name: str, output_folder: str, build_conf: bool = False) -> None: + _LOGGER.info("Building template %s", package_name) + package_folder = Path(output_folder) / Path(package_name) + + if build_conf: + build_default_conf(package_folder, package_name) + + conf = read_conf(package_folder) + if not conf: + raise ValueError("Create a {} file before calling this script".format(package_folder / CONF_NAME)) + + env = Environment( + loader=PackageLoader('packaging_tools', 'templates'), + keep_trailing_newline=True + ) + conf = build_config(conf) + + for template_name in env.list_templates(): + future_filepath = Path(output_folder) / package_name / template_name + + # Might decide to make it more generic one day + if template_name == "HISTORY.rst" and future_filepath.exists(): + _LOGGER.info("Skipping HISTORY.txt template, since a previous one was found") + # Never overwirte the ChangeLog + continue + + template = env.get_template(template_name) + result = template.render(**conf) + + with open(Path(output_folder) / package_name / template_name, "w") as fd: + fd.write(result) + + _LOGGER.info("Template done %s", package_name) \ No newline at end of file diff --git a/azure-sdk-tools/packaging_tools/__main__.py b/azure-sdk-tools/packaging_tools/__main__.py new file mode 100644 index 000000000000..2faec6d52012 --- /dev/null +++ b/azure-sdk-tools/packaging_tools/__main__.py @@ -0,0 +1,41 @@ +import argparse +import logging +import sys + +from . import build_packaging + +_LOGGER = logging.getLogger(__name__) + +_epilog="""This script will automatically build the TOML configuration file with default value if it doesn't exist. +""" + +parser = argparse.ArgumentParser( + description='Packaging tools for Azure SDK for Python', + formatter_class=argparse.RawTextHelpFormatter, + epilog=_epilog +) +parser.add_argument('--output', '-o', + dest='output', default='.', + help='Output dir, should be SDK repo folder. [default: %(default)s]') +parser.add_argument("--debug", + dest="debug", action="store_true", + help="Verbosity in DEBUG mode") +parser.add_argument("--build-conf", + dest="build_conf", action="store_true", + help="Build a default TOML file, with package name, fake pretty name, as beta package and no doc page. Do nothing if the file exists, remove manually the file if needed.") +parser.add_argument('package_name', help='The package name.') + +args = parser.parse_args() + +main_logger = logging.getLogger() +logging.basicConfig() +main_logger.setLevel(logging.DEBUG if args.debug else logging.INFO) + +try: + build_packaging(args.package_name, args.output, build_conf=args.build_conf) +except Exception as err: + if args.debug: + _LOGGER.exception(err) + else: + _LOGGER.critical(err) + sys.exit(1) \ No newline at end of file diff --git a/azure-sdk-tools/packaging_tools/change_log.py b/azure-sdk-tools/packaging_tools/change_log.py new file mode 100644 index 000000000000..109b4a3593ed --- /dev/null +++ b/azure-sdk-tools/packaging_tools/change_log.py @@ -0,0 +1,191 @@ +import json +import logging + +from json_delta import diff + +_LOGGER = logging.getLogger(__name__) + +class ChangeLog: + def __init__(self, old_report, new_report): + self.features = [] + self.breaking_changes = [] + self._old_report = old_report + self._new_report = new_report + + def build_md(self): + buffer = [] + if self.features: + buffer.append("**Features**") + buffer.append("") + for feature in self.features: + buffer.append("- "+feature) + buffer.append("") + if self.breaking_changes: + buffer.append("**Breaking changes**") + buffer.append("") + for breaking_change in self.breaking_changes: + buffer.append("- "+breaking_change) + return "\n".join(buffer).strip() + + @staticmethod + def _unpack_diff_entry(diff_entry): + return diff_entry[0], len(diff_entry) == 1 + + def operation(self, diff_entry): + path, is_deletion = self._unpack_diff_entry(diff_entry) + + # Is this a new operation group? + _, operation_name, *remaining_path = path + if not remaining_path: + if is_deletion: + self.breaking_changes.append(_REMOVE_OPERATION_GROUP.format(operation_name)) + else: + self.features.append(_ADD_OPERATION_GROUP.format(operation_name)) + return + + _, *remaining_path = remaining_path + if not remaining_path: + # Not common, but this means this has changed a lot. Compute the list manually + old_ops_name = list(self._old_report["operations"][operation_name]["functions"]) + new_ops_name = list(self._new_report["operations"][operation_name]["functions"]) + for removed_function in set(old_ops_name) - set(new_ops_name): + self.breaking_changes.append(_REMOVE_OPERATION.format(operation_name, removed_function)) + for added_function in set(new_ops_name) - set(old_ops_name): + self.features.append(_ADD_OPERATION.format(operation_name, added_function)) + return + + # Is this a new operation, inside a known operation group? + function_name, *remaining_path = remaining_path + if not remaining_path: + if is_deletion: + self.breaking_changes.append(_REMOVE_OPERATION.format(operation_name, function_name)) + else: + self.features.append(_ADD_OPERATION.format(operation_name, function_name)) + return + + if remaining_path[0] == "metadata": + # Ignore change in metadata for now, they have no impact + return + + # So method signaure changed. Be vague for now + self.breaking_changes.append(_SIGNATURE_CHANGE.format(operation_name, function_name)) + + + def models(self, diff_entry): + path, is_deletion = self._unpack_diff_entry(diff_entry) + + # Is this a new model? + _, mtype, model_name, *remaining_path = path + if not remaining_path: + # A new model or a model deletion is not very interesting by itself + # since it usually means that there is a new operation + # + # We might miss some discrimanator new sub-classes however + return + + # That's a model signature change + if mtype in ["enums", "exceptions"]: + # Don't change log anything for Enums for now + return + + _, *remaining_path = remaining_path + if not remaining_path: # This means massive signature changes, that we don't even try to list them + self.breaking_changes.append(_MODEL_SIGNATURE_CHANGE.format(model_name)) + return + + # This is a real model + parameter_name, *remaining_path = remaining_path + is_required = lambda report, model_name, param_name: report["models"]["models"][model_name]["parameters"][param_name]["properties"]["required"] + if not remaining_path: + if is_deletion: + self.breaking_changes.append(_MODEL_PARAM_DELETE.format(model_name, parameter_name)) + else: + # This one is tough, if the new parameter is "required", + # then it's breaking. If not, it's a feature + if is_required(self._new_report, model_name, parameter_name): + self.breaking_changes.append(_MODEL_PARAM_ADD_REQUIRED.format(model_name, parameter_name)) + else: + self.features.append(_MODEL_PARAM_ADD.format(model_name, parameter_name)) + return + + # The parameter already exists + new_is_required = is_required(self._new_report, model_name, parameter_name) + old_is_required = is_required(self._old_report, model_name, parameter_name) + + if new_is_required and not old_is_required: + # This shift from optional to required + self.breaking_changes.append(_MODEL_PARAM_CHANGE_REQUIRED.format(parameter_name, model_name)) + return + + +## Features +_ADD_OPERATION_GROUP = "Added operation group {}" +_ADD_OPERATION = "Added operation {}.{}" +_MODEL_PARAM_ADD = "Model {} has a new parameter {}" + +## Breaking Changes +_REMOVE_OPERATION_GROUP = "Removed operation group {}" +_REMOVE_OPERATION = "Removed operation {}.{}" +_SIGNATURE_CHANGE = "Operation {}.{} has a new signature" +_MODEL_SIGNATURE_CHANGE = "Model {} has a new signature" +_MODEL_PARAM_DELETE = "Model {} no longer has parameter {}" +_MODEL_PARAM_ADD_REQUIRED = "Model {} has a new required parameter {}" +_MODEL_PARAM_CHANGE_REQUIRED = "Parameter {} of model {} is now required" + +def build_change_log(old_report, new_report): + change_log = ChangeLog(old_report, new_report) + + result = diff(old_report, new_report) + + for diff_line in result: + # Operations + if diff_line[0][0] == "operations": + change_log.operation(diff_line) + else: + change_log.models(diff_line) + + return change_log + + +if __name__ == "__main__": + import argparse + + parser = argparse.ArgumentParser( + description='ChangeLog computation', + formatter_class=argparse.RawTextHelpFormatter, + epilog="Package Name and Package Print are mutually exclusive and at least one must be provided" + ) + parser.add_argument('base_input', + help='Input base fingerprint') + parser.add_argument('--package-name', '-n', + dest='package_name', + help='Package name to test. Must be importable.') + parser.add_argument('--package-print', '-p', + dest='package_print', + help='Package name to test. Must be importable.') + parser.add_argument("--debug", + dest="debug", action="store_true", + help="Verbosity in DEBUG mode") + + args = parser.parse_args() + + main_logger = logging.getLogger() + logging.basicConfig() + main_logger.setLevel(logging.DEBUG if args.debug else logging.INFO) + + if args.package_name: + raise NotImplementedError("FIXME") + + if args.package_print: + with open(args.package_print) as fd: + new_report = json.load(fd) + + with open(args.base_input) as fd: + old_report = json.load(fd) + + result = diff(old_report, new_report) + with open("result.json", "w") as fd: + json.dump(result, fd) + + change_log = build_change_log(old_report, new_report) + print(change_log.build_md()) diff --git a/azure-sdk-tools/packaging_tools/code_report.py b/azure-sdk-tools/packaging_tools/code_report.py new file mode 100644 index 000000000000..c64234ad97f6 --- /dev/null +++ b/azure-sdk-tools/packaging_tools/code_report.py @@ -0,0 +1,129 @@ +import importlib +import inspect +import json +import logging +import types +from typing import Dict, Any + +_LOGGER = logging.getLogger(__name__) + +def parse_input(input_parameter): + """From a syntax like package_name#submodule, build a package name + and complete module name. + """ + split_package_name = input_parameter.split('#') + package_name = split_package_name[0] + module_name = package_name.replace("-", ".") + if len(split_package_name) >= 2: + module_name = ".".join([module_name, split_package_name[1]]) + return package_name, module_name + + +def create_report(module_name: str) -> Dict[str, Any]: + module_to_generate = importlib.import_module(module_name) + + report = {} + report["models"] = { + "enums": {}, + "exceptions": {}, + "models": {} + } + # Look for models first + model_names = [model_name for model_name in dir(module_to_generate.models) if model_name[0].isupper()] + for model_name in model_names: + model_cls = getattr(module_to_generate.models, model_name) + if hasattr(model_cls, "_attribute_map"): + report["models"]["models"][model_name] = create_model_report(model_cls) + elif issubclass(model_cls, Exception): # If not, might be an exception + report["models"]["exceptions"][model_name] = create_model_report(model_cls) + else: + report["models"]["enums"][model_name] = create_model_report(model_cls) + # Look for operation groups + operations_classes = [op_name for op_name in dir(module_to_generate.operations) if op_name[0].isupper()] + for op_name in operations_classes: + op_content = {'name': op_name} + op_cls = getattr(module_to_generate.operations, op_name) + for op_attr_name in dir(op_cls): + op_attr = getattr(op_cls, op_attr_name) + if isinstance(op_attr, types.FunctionType) and not op_attr_name.startswith("_"): + # Keep it + func_content = create_report_from_func(op_attr) + op_content.setdefault("functions", {})[op_attr_name] = func_content + report.setdefault("operations", {})[op_name] = op_content + + return report + +def create_model_report(model_cls): + result = { + 'name': model_cls.__name__, + } + # If _attribute_map, it's a model + if hasattr(model_cls, "_attribute_map"): + result['type'] = "Model" + for attribute, conf in model_cls._attribute_map.items(): + attribute_validation = getattr(model_cls, "_validation", {}).get(attribute, {}) + + result.setdefault('parameters', {})[attribute] = { + 'name': attribute, + 'properties': { + 'type': conf['type'], + 'required': attribute_validation.get('required', False), + 'readonly': attribute_validation.get('readonly', False) + } + } + elif issubclass(model_cls, Exception): # If not, might be an exception + result['type'] = "Exception" + else: # If not, it's an enum + result['type'] = "Enum" + result['values'] = list(model_cls.__members__) + + return result + +def create_report_from_func(function_attr): + func_content = { + 'name': function_attr.__name__, + 'metadata': getattr(function_attr, "metadata", {}), + 'parameters': [] + } + signature = inspect.signature(function_attr) + for parameter_name in signature.parameters: + if parameter_name == "self": + continue + if parameter_name =="custom_headers": + break # We reach Autorest generic + parameter = signature.parameters[parameter_name] + func_content["parameters"].append({ + 'name': parameter.name, + }) + return func_content + +def main(input_parameter: str, output_filename: str): + _, module_name = parse_input(input_parameter) + report = create_report(module_name) + + with open(output_filename, "w") as fd: + json.dump(report, fd, indent=2) + +if __name__ == "__main__": + import argparse + + parser = argparse.ArgumentParser( + description='Code fingerprint building', + formatter_class=argparse.RawTextHelpFormatter, + ) + parser.add_argument('package_name', + help='Package name') + parser.add_argument('--output-file', '-o', + dest='output_file', default='./report.json', + help='Output file. [default: %(default)s]') + parser.add_argument("--debug", + dest="debug", action="store_true", + help="Verbosity in DEBUG mode") + + args = parser.parse_args() + + main_logger = logging.getLogger() + logging.basicConfig() + main_logger.setLevel(logging.DEBUG if args.debug else logging.INFO) + + main(args.package_name, args.output_file) diff --git a/azure-sdk-tools/packaging_tools/conf.py b/azure-sdk-tools/packaging_tools/conf.py new file mode 100644 index 000000000000..6140b6eac2de --- /dev/null +++ b/azure-sdk-tools/packaging_tools/conf.py @@ -0,0 +1,39 @@ +import logging +from pathlib import Path +from typing import Dict, Any + +import pytoml as toml + +_LOGGER = logging.getLogger(__name__) + +CONF_NAME = "sdk_packaging.toml" +_SECTION = "packaging" + +# Default conf +_CONFIG = { + "package_name": "packagename", + "package_pprint_name": "MyService Management", + "package_doc_id": "", + "is_stable": False +} + +def read_conf(folder: Path) -> Dict[str, Any]: + conf_path = folder / CONF_NAME + if not conf_path.exists(): + return {} + + with open(conf_path, "rb") as fd: + return toml.load(fd)[_SECTION] + +def build_default_conf(folder: Path, package_name: str) -> None: + conf_path = folder / CONF_NAME + if conf_path.exists(): + _LOGGER.info("Skipping default conf since the file exists") + return + + _LOGGER.info("Build default conf for %s", package_name) + conf = {_SECTION: _CONFIG.copy()} + conf[_SECTION]["package_name"] = package_name + + with open(conf_path, "w") as fd: + toml.dump(conf, fd) diff --git a/azure-sdk-tools/packaging_tools/templates/HISTORY.rst b/azure-sdk-tools/packaging_tools/templates/HISTORY.rst new file mode 100644 index 000000000000..8924d5d6c445 --- /dev/null +++ b/azure-sdk-tools/packaging_tools/templates/HISTORY.rst @@ -0,0 +1,9 @@ +.. :changelog: + +Release History +=============== + +0.1.0 (1970-01-01) +++++++++++++++++++ + +* Initial Release diff --git a/azure-sdk-tools/packaging_tools/templates/MANIFEST.in b/azure-sdk-tools/packaging_tools/templates/MANIFEST.in new file mode 100644 index 000000000000..9ecaeb15de50 --- /dev/null +++ b/azure-sdk-tools/packaging_tools/templates/MANIFEST.in @@ -0,0 +1,2 @@ +include *.rst +include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-sdk-tools/packaging_tools/templates/README.rst b/azure-sdk-tools/packaging_tools/templates/README.rst new file mode 100644 index 000000000000..41025dfbb229 --- /dev/null +++ b/azure-sdk-tools/packaging_tools/templates/README.rst @@ -0,0 +1,49 @@ +Microsoft Azure SDK for Python +============================== + +This is the Microsoft Azure {{package_pprint_name}} Client Library. + +Azure Resource Manager (ARM) is the next generation of management APIs that +replace the old Azure Service Management (ASM). + +This package has been tested with Python 2.7, 3.4, 3.5 and 3.6. + +For the older Azure Service Management (ASM) libraries, see +`azure-servicemanagement-legacy `__ library. + +For a more complete set of Azure libraries, see the `azure `__ bundle package. + + +Compatibility +============= + +**IMPORTANT**: If you have an earlier version of the azure package +(version < 1.0), you should uninstall it before installing this package. + +You can check the version using pip: + +.. code:: shell + + pip freeze + +If you see azure==0.11.0 (or any version below 1.0), uninstall it first: + +.. code:: shell + + pip uninstall azure + + +Usage +===== + +For code examples, see `{{package_pprint_name}} +`__ +on docs.microsoft.com. + + +Provide Feedback +================ + +If you encounter any bugs or have suggestions, please file an issue in the +`Issues `__ +section of the project. diff --git a/azure-sdk-tools/packaging_tools/templates/azure_bdist_wheel.py b/azure-sdk-tools/packaging_tools/templates/azure_bdist_wheel.py new file mode 100644 index 000000000000..8a81d1b61775 --- /dev/null +++ b/azure-sdk-tools/packaging_tools/templates/azure_bdist_wheel.py @@ -0,0 +1,54 @@ +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +from distutils import log as logger +import os.path + +from wheel.bdist_wheel import bdist_wheel +class azure_bdist_wheel(bdist_wheel): + """The purpose of this class is to build wheel a little differently than the sdist, + without requiring to build the wheel from the sdist (i.e. you can build the wheel + directly from source). + """ + + description = "Create an Azure wheel distribution" + + user_options = bdist_wheel.user_options + \ + [('azure-namespace-package=', None, + "Name of the deepest nspkg used")] + + def initialize_options(self): + bdist_wheel.initialize_options(self) + self.azure_namespace_package = None + + def finalize_options(self): + bdist_wheel.finalize_options(self) + if self.azure_namespace_package and not self.azure_namespace_package.endswith("-nspkg"): + raise ValueError("azure_namespace_package must finish by -nspkg") + + def run(self): + if not self.distribution.install_requires: + self.distribution.install_requires = [] + self.distribution.install_requires.append( + "{}>=2.0.0".format(self.azure_namespace_package)) + bdist_wheel.run(self) + + def write_record(self, bdist_dir, distinfo_dir): + if self.azure_namespace_package: + # Split and remove last part, assuming it's "nspkg" + subparts = self.azure_namespace_package.split('-')[0:-1] + folder_with_init = [os.path.join(*subparts[0:i+1]) for i in range(len(subparts))] + for azure_sub_package in folder_with_init: + init_file = os.path.join(bdist_dir, azure_sub_package, '__init__.py') + if os.path.isfile(init_file): + logger.info("manually remove {} while building the wheel".format(init_file)) + os.remove(init_file) + else: + raise ValueError("Unable to find {}. Are you sure of your namespace package?".format(init_file)) + bdist_wheel.write_record(self, bdist_dir, distinfo_dir) +cmdclass = { + 'bdist_wheel': azure_bdist_wheel, +} diff --git a/azure-sdk-tools/packaging_tools/templates/setup.cfg b/azure-sdk-tools/packaging_tools/templates/setup.cfg new file mode 100644 index 000000000000..57c8683c0b05 --- /dev/null +++ b/azure-sdk-tools/packaging_tools/templates/setup.cfg @@ -0,0 +1,3 @@ +[bdist_wheel] +universal=1 +azure-namespace-package={{package_nspkg}} \ No newline at end of file diff --git a/azure-sdk-tools/packaging_tools/templates/setup.py b/azure-sdk-tools/packaging_tools/templates/setup.py new file mode 100644 index 000000000000..584d888a218e --- /dev/null +++ b/azure-sdk-tools/packaging_tools/templates/setup.py @@ -0,0 +1,84 @@ +#!/usr/bin/env python + +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +import re +import os.path +from io import open +from setuptools import find_packages, setup +try: + from azure_bdist_wheel import cmdclass +except ImportError: + from distutils import log as logger + logger.warn("Wheel is not available, disabling bdist_wheel hook") + cmdclass = {} + +# Change the PACKAGE_NAME only to change folder and different name +PACKAGE_NAME = "{{package_name}}" +PACKAGE_PPRINT_NAME = "{{package_pprint_name}}" + +# a-b-c => a/b/c +package_folder_path = PACKAGE_NAME.replace('-', '/') +# a-b-c => a.b.c +namespace_name = PACKAGE_NAME.replace('-', '.') + +# azure v0.x is not compatible with this package +# azure v0.x used to have a __version__ attribute (newer versions don't) +try: + import azure + try: + ver = azure.__version__ + raise Exception( + 'This package is incompatible with azure=={}. '.format(ver) + + 'Uninstall it with "pip uninstall azure".' + ) + except AttributeError: + pass +except ImportError: + pass + +# Version extraction inspired from 'requests' +with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', + fd.read(), re.MULTILINE).group(1) + +if not version: + raise RuntimeError('Cannot find version information') + +with open('README.rst', encoding='utf-8') as f: + readme = f.read() +with open('HISTORY.rst', encoding='utf-8') as f: + history = f.read() + +setup( + name=PACKAGE_NAME, + version=version, + description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), + long_description=readme + '\n\n' + history, + license='MIT License', + author='Microsoft Corporation', + author_email='azpysdkhelp@microsoft.com', + url='https://github.com/Azure/azure-sdk-for-python', + classifiers=[ + '{{classifier}}', + 'Programming Language :: Python', + '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', + 'License :: OSI Approved :: MIT License', + ], + zip_safe=False, + packages=find_packages(exclude=["tests"]), + install_requires=[ + 'msrestazure>=0.4.27,<2.0.0', + 'azure-common~=1.1', + ], + cmdclass=cmdclass +) diff --git a/azure-sdk-testutils/setup.py b/azure-sdk-tools/setup.py similarity index 84% rename from azure-sdk-testutils/setup.py rename to azure-sdk-tools/setup.py index c5832f90bee2..77df62008bc6 100644 --- a/azure-sdk-testutils/setup.py +++ b/azure-sdk-tools/setup.py @@ -5,9 +5,9 @@ # locally with "pip install -e" setup( - name = "azure-sdk-testutils", + name = "azure-sdk-tools", version = "0.0.0", - author='Microsoft Corporation', + author='Microsoft Corporation', author_email='azpysdkhelp@microsoft.com', url='https://github.com/Azure/azure-sdk-for-python', packages=find_packages(), diff --git a/azure-sdk-testutils/test-requirements.txt b/azure-sdk-tools/test-requirements.txt similarity index 100% rename from azure-sdk-testutils/test-requirements.txt rename to azure-sdk-tools/test-requirements.txt diff --git a/package_service_mapping.json b/package_service_mapping.json index d902db1be12b..07bbfc31ced9 100644 --- a/package_service_mapping.json +++ b/package_service_mapping.json @@ -313,6 +313,13 @@ ], "service_name": "Key Vault" }, + "azure-mgmt-loganalytics": { + "category ": "Management", + "namespaces": [ + "azure.mgmt.loganalytics" + ], + "service_name": "Log Analytics" + }, "azure-mgmt-logic": { "category ": "Management", "namespaces": [ @@ -439,6 +446,7 @@ "azure.mgmt.resource.resources.v2016_02_01", "azure.mgmt.resource.resources.v2016_09_01", "azure.mgmt.resource.resources.v2017_05_10", + "azure.mgmt.resource.resources.v2018_02_01", "azure.mgmt.resource.policy.v2015_10_01_preview", "azure.mgmt.resource.policy.v2016_04_01", "azure.mgmt.resource.policy.v2016_12_01", diff --git a/scripts/dev_setup.py b/scripts/dev_setup.py index 66de1f42309d..8441539d861a 100644 --- a/scripts/dev_setup.py +++ b/scripts/dev_setup.py @@ -50,10 +50,10 @@ def pip_command(command): pip_command('install -e {}'.format(package_name)) # install test requirements -pip_command('install -r azure-sdk-testutils/test-requirements.txt') +pip_command('install -r azure-sdk-tools/test-requirements.txt') # install packaging requirements -pip_command('install -r scripts/packaging_requirements.txt') +pip_command('install -r azure-sdk-tools/packaging_requirements.txt') # Ensure that the site package's azure/__init__.py has the old style namespace # package declaration by installing the old namespace package diff --git a/scripts/multiapi_init_gen.py b/scripts/multiapi_init_gen.py index 0dd403ab0c45..a6e169d1a6b5 100644 --- a/scripts/multiapi_init_gen.py +++ b/scripts/multiapi_init_gen.py @@ -3,6 +3,7 @@ import pkgutil import re import sys +import types from pathlib import Path from unittest.mock import MagicMock, patch @@ -10,27 +11,17 @@ import msrestazure except: # Install msrestazure. Would be best to mock it, since we don't need it, but all scenarios I know are fine with a pip install for now import subprocess - subprocess.call("pip install msrestazure", shell=True) # Use shell to use venv if available + subprocess.call(sys.executable + " -m pip install msrestazure", shell=True) # Use shell to use venv if available try: - import azure.profiles - import azure.profiles.multiapiclient + import azure.common except: - patch_profiles = patch.dict('sys.modules', { - "azure.profiles": MagicMock(), - "azure.profiles.multiapiclient": MagicMock()} - ) - patch_profiles.start() - -# try: -# import azure.profiles -# except: # Install azure-common. Would be best to mock it, since we don't need it, but all scenarios I know are fine with a pip install for now -# import subprocess -# subprocess.call("pip install -e azure-common", shell=True) # Use shell to use venv if available - - # The following DOES not work, since it bypasses venv for some reason - # import pip - # pip.main(["install", "msrestazure"]) + sdk_root = Path(__file__).parents[1] + sys.path.append(str((sdk_root / "azure-common").resolve())) + import azure.common + +import pkg_resources +pkg_resources.declare_namespace('azure') _GENERATE_MARKER = "############ Generated from here ############\n" @@ -49,7 +40,9 @@ def get_versionned_modules(package_name, module_name, sdk_root=None): if not sdk_root: sdk_root = Path(__file__).parents[1] - sys.path.append(str((sdk_root / package_name).resolve())) + azure.__path__.append(str((sdk_root / package_name / "azure").resolve())) + # Doesn't work with namespace package + # sys.path.append(str((sdk_root / package_name).resolve())) module_to_generate = importlib.import_module(module_name) return [(label, importlib.import_module('.'+label, module_to_generate.__name__)) for (_, label, ispkg) in pkgutil.iter_modules(module_to_generate.__path__) diff --git a/scripts/packaging_requirements.txt b/scripts/packaging_requirements.txt deleted file mode 100644 index 87db124f67a4..000000000000 --- a/scripts/packaging_requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -cookiecutter -packaging -wheel