diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/__init__.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/__init__.py index 6995828b0b25..6691d5e232b5 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/__init__.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/__init__.py @@ -25,6 +25,8 @@ from .operation_display_info_py3 import OperationDisplayInfo from .operation_entity_py3 import OperationEntity from .operation_display_resource_py3 import OperationDisplayResource + from .check_name_availability_parameters_py3 import CheckNameAvailabilityParameters + from .check_name_availability_result_py3 import CheckNameAvailabilityResult from .restore_file_spec_py3 import RestoreFileSpec from .post_restore_request_py3 import PostRestoreRequest from .pre_restore_request_py3 import PreRestoreRequest @@ -47,6 +49,8 @@ from .operation_display_info import OperationDisplayInfo from .operation_entity import OperationEntity from .operation_display_resource import OperationDisplayResource + from .check_name_availability_parameters import CheckNameAvailabilityParameters + from .check_name_availability_result import CheckNameAvailabilityResult from .restore_file_spec import RestoreFileSpec from .post_restore_request import PostRestoreRequest from .pre_restore_request import PreRestoreRequest @@ -61,6 +65,7 @@ from .registered_server_paged import RegisteredServerPaged from .storage_sync_management_client_enums import ( Reason, + NameAvailabilityReason, ) __all__ = [ @@ -79,6 +84,8 @@ 'OperationDisplayInfo', 'OperationEntity', 'OperationDisplayResource', + 'CheckNameAvailabilityParameters', + 'CheckNameAvailabilityResult', 'RestoreFileSpec', 'PostRestoreRequest', 'PreRestoreRequest', @@ -92,4 +99,5 @@ 'ServerEndpointPaged', 'RegisteredServerPaged', 'Reason', + 'NameAvailabilityReason', ] diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/check_name_availability_parameters.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/check_name_availability_parameters.py new file mode 100644 index 000000000000..de7bfc6d4f7b --- /dev/null +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/check_name_availability_parameters.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 CheckNameAvailabilityParameters(Model): + """Parameters for a check name availability request. + + 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 name to check for availability + :type name: str + :ivar type: Required. The resource type. Must be set to + Microsoft.StorageSync/storageSyncServices. Default value: + "Microsoft.StorageSync/storageSyncServices" . + :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.StorageSync/storageSyncServices" + + def __init__(self, **kwargs): + super(CheckNameAvailabilityParameters, self).__init__(**kwargs) + self.name = kwargs.get('name', None) diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/check_name_availability_parameters_py3.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/check_name_availability_parameters_py3.py new file mode 100644 index 000000000000..4e5f4a4b374c --- /dev/null +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/check_name_availability_parameters_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 CheckNameAvailabilityParameters(Model): + """Parameters for a check name availability request. + + 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 name to check for availability + :type name: str + :ivar type: Required. The resource type. Must be set to + Microsoft.StorageSync/storageSyncServices. Default value: + "Microsoft.StorageSync/storageSyncServices" . + :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.StorageSync/storageSyncServices" + + def __init__(self, *, name: str, **kwargs) -> None: + super(CheckNameAvailabilityParameters, self).__init__(**kwargs) + self.name = name diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/check_name_availability_result.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/check_name_availability_result.py new file mode 100644 index 000000000000..2e861884d51e --- /dev/null +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/check_name_availability_result.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 CheckNameAvailabilityResult(Model): + """The CheckNameAvailability operation response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name_available: Gets a boolean value that indicates whether the name + is available for you to use. If true, the name is available. If false, the + name has already been taken or invalid and cannot be used. + :vartype name_available: bool + :ivar reason: Gets the reason that a Storage Sync Service name could not + be used. The Reason element is only returned if NameAvailable is false. + Possible values include: 'Invalid', 'AlreadyExists' + :vartype reason: str or + ~azure.mgmt.storagesync.models.NameAvailabilityReason + :ivar message: Gets an error message explaining the Reason value in more + detail. + :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': 'NameAvailabilityReason'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CheckNameAvailabilityResult, self).__init__(**kwargs) + self.name_available = None + self.reason = None + self.message = None diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/check_name_availability_result_py3.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/check_name_availability_result_py3.py new file mode 100644 index 000000000000..c15345123e3c --- /dev/null +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/check_name_availability_result_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 CheckNameAvailabilityResult(Model): + """The CheckNameAvailability operation response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name_available: Gets a boolean value that indicates whether the name + is available for you to use. If true, the name is available. If false, the + name has already been taken or invalid and cannot be used. + :vartype name_available: bool + :ivar reason: Gets the reason that a Storage Sync Service name could not + be used. The Reason element is only returned if NameAvailable is false. + Possible values include: 'Invalid', 'AlreadyExists' + :vartype reason: str or + ~azure.mgmt.storagesync.models.NameAvailabilityReason + :ivar message: Gets an error message explaining the Reason value in more + detail. + :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': 'NameAvailabilityReason'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CheckNameAvailabilityResult, self).__init__(**kwargs) + self.name_available = None + self.reason = None + self.message = None diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/cloud_endpoint.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/cloud_endpoint.py index 835f393c6201..7997f9f7d8d0 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/cloud_endpoint.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/cloud_endpoint.py @@ -44,6 +44,8 @@ class CloudEndpoint(Resource): :type provisioning_state: str :param last_workflow_id: CloudEndpoint lastWorkflowId :type last_workflow_id: str + :param last_operation_name: Resource Last Operation Name + :type last_operation_name: str """ _validation = { @@ -67,6 +69,7 @@ class CloudEndpoint(Resource): 'backup_enabled': {'key': 'properties.backupEnabled', 'type': 'bool'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'last_workflow_id': {'key': 'properties.lastWorkflowId', 'type': 'str'}, + 'last_operation_name': {'key': 'properties.lastOperationName', 'type': 'str'}, } def __init__(self, **kwargs): @@ -81,3 +84,4 @@ def __init__(self, **kwargs): self.backup_enabled = None self.provisioning_state = kwargs.get('provisioning_state', None) self.last_workflow_id = kwargs.get('last_workflow_id', None) + self.last_operation_name = kwargs.get('last_operation_name', None) diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/cloud_endpoint_py3.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/cloud_endpoint_py3.py index 4d33f724eb23..043ddc19b890 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/cloud_endpoint_py3.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/cloud_endpoint_py3.py @@ -44,6 +44,8 @@ class CloudEndpoint(Resource): :type provisioning_state: str :param last_workflow_id: CloudEndpoint lastWorkflowId :type last_workflow_id: str + :param last_operation_name: Resource Last Operation Name + :type last_operation_name: str """ _validation = { @@ -67,9 +69,10 @@ class CloudEndpoint(Resource): 'backup_enabled': {'key': 'properties.backupEnabled', 'type': 'bool'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'last_workflow_id': {'key': 'properties.lastWorkflowId', 'type': 'str'}, + 'last_operation_name': {'key': 'properties.lastOperationName', 'type': 'str'}, } - def __init__(self, *, storage_account_key: str=None, storage_account: str=None, storage_account_resource_id: str=None, storage_account_share_name: str=None, storage_account_tenant_id: str=None, partnership_id: str=None, friendly_name: str=None, provisioning_state: str=None, last_workflow_id: str=None, **kwargs) -> None: + def __init__(self, *, storage_account_key: str=None, storage_account: str=None, storage_account_resource_id: str=None, storage_account_share_name: str=None, storage_account_tenant_id: str=None, partnership_id: str=None, friendly_name: str=None, provisioning_state: str=None, last_workflow_id: str=None, last_operation_name: str=None, **kwargs) -> None: super(CloudEndpoint, self).__init__(**kwargs) self.storage_account_key = storage_account_key self.storage_account = storage_account @@ -81,3 +84,4 @@ def __init__(self, *, storage_account_key: str=None, storage_account: str=None, self.backup_enabled = None self.provisioning_state = provisioning_state self.last_workflow_id = last_workflow_id + self.last_operation_name = last_operation_name diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/registered_server.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/registered_server.py index 480990677022..edf1a9cb94df 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/registered_server.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/registered_server.py @@ -49,6 +49,18 @@ class RegisteredServer(Model): :type storage_sync_service_uid: str :param last_workflow_id: Registered Server lastWorkflowId :type last_workflow_id: str + :param last_operation_name: Resource Last Operation Name + :type last_operation_name: str + :param discovery_endpoint_uri: Resource discoveryEndpointUri + :type discovery_endpoint_uri: str + :param resource_location: Resource Location + :type resource_location: str + :param service_location: Service Location + :type service_location: str + :param friendly_name: Friendly Name + :type friendly_name: str + :param management_endpoint_uri: Management Endpoint Uri + :type management_endpoint_uri: str """ _validation = { @@ -73,6 +85,12 @@ class RegisteredServer(Model): 'server_id': {'key': 'properties.serverId', 'type': 'str'}, 'storage_sync_service_uid': {'key': 'properties.storageSyncServiceUid', 'type': 'str'}, 'last_workflow_id': {'key': 'properties.lastWorkflowId', 'type': 'str'}, + 'last_operation_name': {'key': 'properties.lastOperationName', 'type': 'str'}, + 'discovery_endpoint_uri': {'key': 'properties.discoveryEndpointUri', 'type': 'str'}, + 'resource_location': {'key': 'properties.resourceLocation', 'type': 'str'}, + 'service_location': {'key': 'properties.serviceLocation', 'type': 'str'}, + 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, + 'management_endpoint_uri': {'key': 'properties.managementEndpointUri', 'type': 'str'}, } def __init__(self, **kwargs): @@ -92,3 +110,9 @@ def __init__(self, **kwargs): self.server_id = kwargs.get('server_id', None) self.storage_sync_service_uid = kwargs.get('storage_sync_service_uid', None) self.last_workflow_id = kwargs.get('last_workflow_id', None) + self.last_operation_name = kwargs.get('last_operation_name', None) + self.discovery_endpoint_uri = kwargs.get('discovery_endpoint_uri', None) + self.resource_location = kwargs.get('resource_location', None) + self.service_location = kwargs.get('service_location', None) + self.friendly_name = kwargs.get('friendly_name', None) + self.management_endpoint_uri = kwargs.get('management_endpoint_uri', None) diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/registered_server_py3.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/registered_server_py3.py index 2e7699895b74..8e1cc0ead172 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/registered_server_py3.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/registered_server_py3.py @@ -49,6 +49,18 @@ class RegisteredServer(Model): :type storage_sync_service_uid: str :param last_workflow_id: Registered Server lastWorkflowId :type last_workflow_id: str + :param last_operation_name: Resource Last Operation Name + :type last_operation_name: str + :param discovery_endpoint_uri: Resource discoveryEndpointUri + :type discovery_endpoint_uri: str + :param resource_location: Resource Location + :type resource_location: str + :param service_location: Service Location + :type service_location: str + :param friendly_name: Friendly Name + :type friendly_name: str + :param management_endpoint_uri: Management Endpoint Uri + :type management_endpoint_uri: str """ _validation = { @@ -73,9 +85,15 @@ class RegisteredServer(Model): 'server_id': {'key': 'properties.serverId', 'type': 'str'}, 'storage_sync_service_uid': {'key': 'properties.storageSyncServiceUid', 'type': 'str'}, 'last_workflow_id': {'key': 'properties.lastWorkflowId', 'type': 'str'}, + 'last_operation_name': {'key': 'properties.lastOperationName', 'type': 'str'}, + 'discovery_endpoint_uri': {'key': 'properties.discoveryEndpointUri', 'type': 'str'}, + 'resource_location': {'key': 'properties.resourceLocation', 'type': 'str'}, + 'service_location': {'key': 'properties.serviceLocation', 'type': 'str'}, + 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, + 'management_endpoint_uri': {'key': 'properties.managementEndpointUri', 'type': 'str'}, } - def __init__(self, *, server_certificate: str=None, agent_version: str=None, server_os_version: str=None, server_managementt_error_code: int=None, last_heart_beat: str=None, provisioning_state: str=None, server_role: str=None, cluster_id: str=None, cluster_name: str=None, server_id: str=None, storage_sync_service_uid: str=None, last_workflow_id: str=None, **kwargs) -> None: + def __init__(self, *, server_certificate: str=None, agent_version: str=None, server_os_version: str=None, server_managementt_error_code: int=None, last_heart_beat: str=None, provisioning_state: str=None, server_role: str=None, cluster_id: str=None, cluster_name: str=None, server_id: str=None, storage_sync_service_uid: str=None, last_workflow_id: str=None, last_operation_name: str=None, discovery_endpoint_uri: str=None, resource_location: str=None, service_location: str=None, friendly_name: str=None, management_endpoint_uri: str=None, **kwargs) -> None: super(RegisteredServer, self).__init__(**kwargs) self.id = None self.name = None @@ -92,3 +110,9 @@ def __init__(self, *, server_certificate: str=None, agent_version: str=None, ser self.server_id = server_id self.storage_sync_service_uid = storage_sync_service_uid self.last_workflow_id = last_workflow_id + self.last_operation_name = last_operation_name + self.discovery_endpoint_uri = discovery_endpoint_uri + self.resource_location = resource_location + self.service_location = service_location + self.friendly_name = friendly_name + self.management_endpoint_uri = management_endpoint_uri diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/server_endpoint.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/server_endpoint.py index cede6e99f08f..6aef24dcf466 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/server_endpoint.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/server_endpoint.py @@ -33,40 +33,16 @@ class ServerEndpoint(Resource): :type volume_free_space_percent: int :param friendly_name: Friendly Name :type friendly_name: str - :param last_sync_success: Last Sync Success - :type last_sync_success: datetime - :param sync_error_state: Sync Error State - :type sync_error_state: str - :param sync_error_state_timestamp: Sync Error State Timestamp - :type sync_error_state_timestamp: datetime - :param sync_error_direction: Sync Error Direction. Possible values - include: 'none', 'initialize', 'download', 'upload', 'recall' - :type sync_error_direction: str or ~azure.mgmt.storagesync.models.enum - :param item_upload_error_count: Item Upload Error Count. - :type item_upload_error_count: int - :param item_download_error_count: Item download error count. - :type item_download_error_count: int - :param sync_error_context: sync error context. - :type sync_error_context: str - :param current_progress_type: current progress type. Possible values - include: 'none', 'initialize', 'download', 'upload', 'recall' - :type current_progress_type: str or ~azure.mgmt.storagesync.models.enum - :param item_progress_count: Item Progress Count - :type item_progress_count: int - :param item_total_count: Item Total Count - :type item_total_count: int - :param byte_progress: Bytes in progress - :type byte_progress: int - :param total_progress: Total progress - :type total_progress: int - :param byte_total: Bytes total - :type byte_total: int :param server_resource_id: Server Resource Id. :type server_resource_id: str :param provisioning_state: ServerEndpoint Provisioning State :type provisioning_state: str :param last_workflow_id: ServerEndpoint lastWorkflowId :type last_workflow_id: str + :param last_operation_name: Resource Last Operation Name + :type last_operation_name: str + :param sync_status: Sync Health Status + :type sync_status: object """ _validation = { @@ -84,22 +60,11 @@ class ServerEndpoint(Resource): 'cloud_tiering': {'key': 'properties.cloudTiering', 'type': 'str'}, 'volume_free_space_percent': {'key': 'properties.volumeFreeSpacePercent', 'type': 'int'}, 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, - 'last_sync_success': {'key': 'properties.lastSyncSuccess', 'type': 'iso-8601'}, - 'sync_error_state': {'key': 'properties.syncErrorState', 'type': 'str'}, - 'sync_error_state_timestamp': {'key': 'properties.syncErrorStateTimestamp', 'type': 'iso-8601'}, - 'sync_error_direction': {'key': 'properties.syncErrorDirection', 'type': 'str'}, - 'item_upload_error_count': {'key': 'properties.itemUploadErrorCount', 'type': 'int'}, - 'item_download_error_count': {'key': 'properties.itemDownloadErrorCount', 'type': 'int'}, - 'sync_error_context': {'key': 'properties.syncErrorContext', 'type': 'str'}, - 'current_progress_type': {'key': 'properties.currentProgressType', 'type': 'str'}, - 'item_progress_count': {'key': 'properties.itemProgressCount', 'type': 'int'}, - 'item_total_count': {'key': 'properties.itemTotalCount', 'type': 'int'}, - 'byte_progress': {'key': 'properties.byteProgress', 'type': 'int'}, - 'total_progress': {'key': 'properties.totalProgress', 'type': 'int'}, - 'byte_total': {'key': 'properties.byteTotal', 'type': 'int'}, 'server_resource_id': {'key': 'properties.serverResourceId', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'last_workflow_id': {'key': 'properties.lastWorkflowId', 'type': 'str'}, + 'last_operation_name': {'key': 'properties.lastOperationName', 'type': 'str'}, + 'sync_status': {'key': 'properties.syncStatus', 'type': 'object'}, } def __init__(self, **kwargs): @@ -108,19 +73,8 @@ def __init__(self, **kwargs): self.cloud_tiering = kwargs.get('cloud_tiering', None) self.volume_free_space_percent = kwargs.get('volume_free_space_percent', None) self.friendly_name = kwargs.get('friendly_name', None) - self.last_sync_success = kwargs.get('last_sync_success', None) - self.sync_error_state = kwargs.get('sync_error_state', None) - self.sync_error_state_timestamp = kwargs.get('sync_error_state_timestamp', None) - self.sync_error_direction = kwargs.get('sync_error_direction', None) - self.item_upload_error_count = kwargs.get('item_upload_error_count', None) - self.item_download_error_count = kwargs.get('item_download_error_count', None) - self.sync_error_context = kwargs.get('sync_error_context', None) - self.current_progress_type = kwargs.get('current_progress_type', None) - self.item_progress_count = kwargs.get('item_progress_count', None) - self.item_total_count = kwargs.get('item_total_count', None) - self.byte_progress = kwargs.get('byte_progress', None) - self.total_progress = kwargs.get('total_progress', None) - self.byte_total = kwargs.get('byte_total', None) self.server_resource_id = kwargs.get('server_resource_id', None) self.provisioning_state = kwargs.get('provisioning_state', None) self.last_workflow_id = kwargs.get('last_workflow_id', None) + self.last_operation_name = kwargs.get('last_operation_name', None) + self.sync_status = kwargs.get('sync_status', None) diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/server_endpoint_py3.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/server_endpoint_py3.py index 0814d31c2d51..168b56719923 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/server_endpoint_py3.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/server_endpoint_py3.py @@ -33,40 +33,16 @@ class ServerEndpoint(Resource): :type volume_free_space_percent: int :param friendly_name: Friendly Name :type friendly_name: str - :param last_sync_success: Last Sync Success - :type last_sync_success: datetime - :param sync_error_state: Sync Error State - :type sync_error_state: str - :param sync_error_state_timestamp: Sync Error State Timestamp - :type sync_error_state_timestamp: datetime - :param sync_error_direction: Sync Error Direction. Possible values - include: 'none', 'initialize', 'download', 'upload', 'recall' - :type sync_error_direction: str or ~azure.mgmt.storagesync.models.enum - :param item_upload_error_count: Item Upload Error Count. - :type item_upload_error_count: int - :param item_download_error_count: Item download error count. - :type item_download_error_count: int - :param sync_error_context: sync error context. - :type sync_error_context: str - :param current_progress_type: current progress type. Possible values - include: 'none', 'initialize', 'download', 'upload', 'recall' - :type current_progress_type: str or ~azure.mgmt.storagesync.models.enum - :param item_progress_count: Item Progress Count - :type item_progress_count: int - :param item_total_count: Item Total Count - :type item_total_count: int - :param byte_progress: Bytes in progress - :type byte_progress: int - :param total_progress: Total progress - :type total_progress: int - :param byte_total: Bytes total - :type byte_total: int :param server_resource_id: Server Resource Id. :type server_resource_id: str :param provisioning_state: ServerEndpoint Provisioning State :type provisioning_state: str :param last_workflow_id: ServerEndpoint lastWorkflowId :type last_workflow_id: str + :param last_operation_name: Resource Last Operation Name + :type last_operation_name: str + :param sync_status: Sync Health Status + :type sync_status: object """ _validation = { @@ -84,43 +60,21 @@ class ServerEndpoint(Resource): 'cloud_tiering': {'key': 'properties.cloudTiering', 'type': 'str'}, 'volume_free_space_percent': {'key': 'properties.volumeFreeSpacePercent', 'type': 'int'}, 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, - 'last_sync_success': {'key': 'properties.lastSyncSuccess', 'type': 'iso-8601'}, - 'sync_error_state': {'key': 'properties.syncErrorState', 'type': 'str'}, - 'sync_error_state_timestamp': {'key': 'properties.syncErrorStateTimestamp', 'type': 'iso-8601'}, - 'sync_error_direction': {'key': 'properties.syncErrorDirection', 'type': 'str'}, - 'item_upload_error_count': {'key': 'properties.itemUploadErrorCount', 'type': 'int'}, - 'item_download_error_count': {'key': 'properties.itemDownloadErrorCount', 'type': 'int'}, - 'sync_error_context': {'key': 'properties.syncErrorContext', 'type': 'str'}, - 'current_progress_type': {'key': 'properties.currentProgressType', 'type': 'str'}, - 'item_progress_count': {'key': 'properties.itemProgressCount', 'type': 'int'}, - 'item_total_count': {'key': 'properties.itemTotalCount', 'type': 'int'}, - 'byte_progress': {'key': 'properties.byteProgress', 'type': 'int'}, - 'total_progress': {'key': 'properties.totalProgress', 'type': 'int'}, - 'byte_total': {'key': 'properties.byteTotal', 'type': 'int'}, 'server_resource_id': {'key': 'properties.serverResourceId', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'last_workflow_id': {'key': 'properties.lastWorkflowId', 'type': 'str'}, + 'last_operation_name': {'key': 'properties.lastOperationName', 'type': 'str'}, + 'sync_status': {'key': 'properties.syncStatus', 'type': 'object'}, } - def __init__(self, *, server_local_path: str=None, cloud_tiering=None, volume_free_space_percent: int=None, friendly_name: str=None, last_sync_success=None, sync_error_state: str=None, sync_error_state_timestamp=None, sync_error_direction=None, item_upload_error_count: int=None, item_download_error_count: int=None, sync_error_context: str=None, current_progress_type=None, item_progress_count: int=None, item_total_count: int=None, byte_progress: int=None, total_progress: int=None, byte_total: int=None, server_resource_id: str=None, provisioning_state: str=None, last_workflow_id: str=None, **kwargs) -> None: + def __init__(self, *, server_local_path: str=None, cloud_tiering=None, volume_free_space_percent: int=None, friendly_name: str=None, server_resource_id: str=None, provisioning_state: str=None, last_workflow_id: str=None, last_operation_name: str=None, sync_status=None, **kwargs) -> None: super(ServerEndpoint, self).__init__(**kwargs) self.server_local_path = server_local_path self.cloud_tiering = cloud_tiering self.volume_free_space_percent = volume_free_space_percent self.friendly_name = friendly_name - self.last_sync_success = last_sync_success - self.sync_error_state = sync_error_state - self.sync_error_state_timestamp = sync_error_state_timestamp - self.sync_error_direction = sync_error_direction - self.item_upload_error_count = item_upload_error_count - self.item_download_error_count = item_download_error_count - self.sync_error_context = sync_error_context - self.current_progress_type = current_progress_type - self.item_progress_count = item_progress_count - self.item_total_count = item_total_count - self.byte_progress = byte_progress - self.total_progress = total_progress - self.byte_total = byte_total self.server_resource_id = server_resource_id self.provisioning_state = provisioning_state self.last_workflow_id = last_workflow_id + self.last_operation_name = last_operation_name + self.sync_status = sync_status diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/storage_sync_management_client_enums.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/storage_sync_management_client_enums.py index af1009630441..2e5f8975de92 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/storage_sync_management_client_enums.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/storage_sync_management_client_enums.py @@ -19,3 +19,9 @@ class Reason(str, Enum): warned = "Warned" suspended = "Suspended" deleted = "Deleted" + + +class NameAvailabilityReason(str, Enum): + + invalid = "Invalid" + already_exists = "AlreadyExists" diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/cloud_endpoints_operations.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/cloud_endpoints_operations.py index 92cce51e6cc6..747835b25d53 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/cloud_endpoints_operations.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/cloud_endpoints_operations.py @@ -24,7 +24,7 @@ class CloudEndpointsOperations(object): :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-06-05-preview". + :ivar api_version: Client Api Version. Constant value: "2018-04-02". """ 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-06-05-preview" + self.api_version = "2018-04-02" self.config = config @@ -758,7 +758,7 @@ def get_long_running_output(response): return LROPoller(self._client, raw_result, get_long_running_output, polling_method) pre_restore.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}/prerestore'} - def restore_heatbeat( + def restoreheartbeat( self, resource_group_name, storage_sync_service_name, sync_group_name, cloud_endpoint_name, custom_headers=None, raw=False, **operation_config): """Restore Heartbeat a given CloudEndpoint. @@ -783,7 +783,7 @@ def restore_heatbeat( :class:`StorageSyncErrorException` """ # Construct URL - url = self.restore_heatbeat.metadata['url'] + url = self.restoreheartbeat.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', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), @@ -821,7 +821,7 @@ def restore_heatbeat( 'x-ms-correlation-request-id': 'str', }) return client_raw_response - restore_heatbeat.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}/restoreheartbeat'} + restoreheartbeat.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}/restoreheartbeat'} def _post_restore_initial( diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/operations.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/operations.py index 0d968b321136..78bb14cdfb11 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/operations.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/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: Client Api Version. Constant value: "2017-06-05-preview". + :ivar api_version: Client Api Version. Constant value: "2018-04-02". """ 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-06-05-preview" + self.api_version = "2018-04-02" self.config = config diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/registered_servers_operations.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/registered_servers_operations.py index b2eb98fc9bdf..53017b34da96 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/registered_servers_operations.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/registered_servers_operations.py @@ -24,7 +24,7 @@ class RegisteredServersOperations(object): :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-06-05-preview". + :ivar api_version: Client Api Version. Constant value: "2018-04-02". """ 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-06-05-preview" + self.api_version = "2018-04-02" self.config = config diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/server_endpoints_operations.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/server_endpoints_operations.py index 05f38470467a..9471cb508238 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/server_endpoints_operations.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/server_endpoints_operations.py @@ -24,7 +24,7 @@ class ServerEndpointsOperations(object): :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-06-05-preview". + :ivar api_version: Client Api Version. Constant value: "2018-04-02". """ 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-06-05-preview" + self.api_version = "2018-04-02" self.config = config @@ -540,10 +540,10 @@ def internal_paging(next_link=None, raw=False): list_by_sync_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/serverEndpoints'} - def _recall_initial( + def _recall_action_initial( self, resource_group_name, storage_sync_service_name, sync_group_name, server_endpoint_name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = self.recall.metadata['url'] + url = self.recall_action.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', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), @@ -584,7 +584,7 @@ def _recall_initial( client_raw_response.add_headers(header_dict) return client_raw_response - def recall( + def recall_action( self, resource_group_name, storage_sync_service_name, sync_group_name, server_endpoint_name, custom_headers=None, raw=False, polling=True, **operation_config): """Recall a serverendpoint. @@ -610,7 +610,7 @@ def recall( :raises: :class:`StorageSyncErrorException` """ - raw_result = self._recall_initial( + raw_result = self._recall_action_initial( resource_group_name=resource_group_name, storage_sync_service_name=storage_sync_service_name, sync_group_name=sync_group_name, @@ -637,4 +637,4 @@ def get_long_running_output(response): elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - recall.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/serverEndpoints/{serverEndpointName}/recallAction'} + recall_action.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/serverEndpoints/{serverEndpointName}/recallAction'} diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/storage_sync_services_operations.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/storage_sync_services_operations.py index 9c51813d8936..4a9c7f7f5ed6 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/storage_sync_services_operations.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/storage_sync_services_operations.py @@ -11,6 +11,7 @@ import uuid from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError from .. import models @@ -22,7 +23,7 @@ class StorageSyncServicesOperations(object): :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-06-05-preview". + :ivar api_version: Client Api Version. Constant value: "2018-04-02". """ models = models @@ -32,10 +33,77 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-06-05-preview" + self.api_version = "2018-04-02" self.config = config + def check_name_availability( + self, location_name, name, custom_headers=None, raw=False, **operation_config): + """Check the give namespace name availability. + + :param location_name: The desired region for the name check. + :type location_name: str + :param name: The name to check for availability + :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: CheckNameAvailabilityResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.storagesync.models.CheckNameAvailabilityResult or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + parameters = models.CheckNameAvailabilityParameters(name=name) + + # Construct URL + url = self.check_name_availability.metadata['url'] + path_format_arguments = { + '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') + + # 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, 'CheckNameAvailabilityParameters') + + # 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('CheckNameAvailabilityResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.StorageSync/locations/{locationName}/checkNameAvailability'} + def create( self, resource_group_name, storage_sync_service_name, location=None, tags=None, custom_headers=None, raw=False, **operation_config): """Create a new StorageSyncService. diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/sync_groups_operations.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/sync_groups_operations.py index 9327e161d45c..71cd458c9657 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/sync_groups_operations.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/sync_groups_operations.py @@ -22,7 +22,7 @@ class SyncGroupsOperations(object): :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-06-05-preview". + :ivar api_version: Client Api Version. Constant value: "2018-04-02". """ 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-06-05-preview" + self.api_version = "2018-04-02" self.config = config diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/workflows_operations.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/workflows_operations.py index ab5abe0272cd..7fe7e152cccd 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/workflows_operations.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/workflows_operations.py @@ -22,7 +22,7 @@ class WorkflowsOperations(object): :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-06-05-preview". + :ivar api_version: Client Api Version. Constant value: "2018-04-02". """ 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-06-05-preview" + self.api_version = "2018-04-02" self.config = config diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/storage_sync_management_client.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/storage_sync_management_client.py index 83b4804c3ff4..cb528aa061bc 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/storage_sync_management_client.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/storage_sync_management_client.py @@ -95,7 +95,7 @@ def __init__( super(StorageSyncManagementClient, 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-06-05-preview' + self.api_version = '2018-04-02' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models)