-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Autorest violations fixes in RecoveryServices.Backup (#1805)
* Generated from ee4507d * Update version.py * Updated tests and recordings for recoveryservices.backup
- Loading branch information
1 parent
f262d80
commit 6c72af3
Showing
250 changed files
with
9,705 additions
and
5,458 deletions.
There are no files selected for viewing
432 changes: 310 additions & 122 deletions
432
azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/__init__.py
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
...ervicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_backup_request.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 .backup_request import BackupRequest | ||
|
||
|
||
class AzureFileShareBackupRequest(BackupRequest): | ||
"""AzureFileShare workload-specific backup request. | ||
:param object_type: 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): | ||
super(AzureFileShareBackupRequest, self).__init__() | ||
self.recovery_point_expiry_time_in_utc = recovery_point_expiry_time_in_utc | ||
self.object_type = 'AzureFileShareBackupRequest' |
64 changes: 64 additions & 0 deletions
64
...vicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_protectable_item.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 .workload_protectable_item import WorkloadProtectableItem | ||
|
||
|
||
class AzureFileShareProtectableItem(WorkloadProtectableItem): | ||
"""Protectable item for Azure Fileshare workloads. | ||
: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: 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=None, workload_type=None, friendly_name=None, protection_state=None, parent_container_fabric_id=None, parent_container_friendly_name=None, azure_file_share_type=None): | ||
super(AzureFileShareProtectableItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, friendly_name=friendly_name, protection_state=protection_state) | ||
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' |
56 changes: 56 additions & 0 deletions
56
...icesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_protection_policy.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 .protection_policy import ProtectionPolicy | ||
|
||
|
||
class AzureFileShareProtectionPolicy(ProtectionPolicy): | ||
"""AzureStorage backup policy. | ||
:param protected_items_count: Number of items associated with this policy. | ||
:type protected_items_count: int | ||
:param backup_management_type: 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=None, work_load_type=None, schedule_policy=None, retention_policy=None, time_zone=None): | ||
super(AzureFileShareProtectionPolicy, self).__init__(protected_items_count=protected_items_count) | ||
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' |
46 changes: 46 additions & 0 deletions
46
...ervicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_recovery_point.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 .recovery_point import RecoveryPoint | ||
|
||
|
||
class AzureFileShareRecoveryPoint(RecoveryPoint): | ||
"""Azure File Share workload specific backup copy. | ||
:param object_type: 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=None, recovery_point_time=None, file_share_snapshot_uri=None): | ||
super(AzureFileShareRecoveryPoint, self).__init__() | ||
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' |
66 changes: 66 additions & 0 deletions
66
...rvicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_file_share_restore_request.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 .restore_request import RestoreRequest | ||
|
||
|
||
class AzureFileShareRestoreRequest(RestoreRequest): | ||
"""AzureFileShare Restore Request. | ||
:param object_type: 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=None, copy_options=None, restore_request_type=None, restore_file_specs=None, target_details=None): | ||
super(AzureFileShareRestoreRequest, self).__init__() | ||
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' |
Oops, something went wrong.