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-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_status_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_status_operations.py new file mode 100644 index 000000000000..21a5688cf429 --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/backup_status_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 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 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-07-01" + + self.config = config + + def get( + self, azure_region, parameters, custom_headers=None, raw=False, **operation_config): + """Get the container backup status. + + :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`. + :return: BackupStatusResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.recoveryservicesbackup.models.BackupStatusResponse + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + 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) + + # 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, 'BackupStatusRequest') + + # 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('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-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/feature_support_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/feature_support_operations.py new file mode 100644 index 000000000000..82dd110e4f5d --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/feature_support_operations.py @@ -0,0 +1,107 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# 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 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 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-07-01" + + self.config = config + + 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 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`. + :return: AzureVMResourceFeatureSupportResponse or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.AzureVMResourceFeatureSupportResponse + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.validate.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) + + # 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, 'FeatureSupportRequest') + + # 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('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-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protection_intent_operations.py b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protection_intent_operations.py new file mode 100644 index 000000000000..bb2b67f38c8e --- /dev/null +++ b/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/protection_intent_operations.py @@ -0,0 +1,187 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# 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 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 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-07-01" + + self.config = config + + 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: PreValidateEnableBackupResponse or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.PreValidateEnableBackupResponse + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.validate.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) + + # 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, 'PreValidateEnableBackupRequest') + + # 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('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 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 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: ProtectionIntentResource or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.ProtectionIntentResource or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + 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'), + '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) + + # 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, 'ProtectionIntentResource') + + # 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('ProtectionIntentResource', 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.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